#![allow(
dead_code,
unused_variables,
clippy::let_and_return,
clippy::single_match
)]
#[allow(unused_imports)]
use http::header::HeaderName;
use winterbaume_core::MockResponse;
pub use super::model::*;
pub fn serialize_delete_connection_response() -> MockResponse {
MockResponse::rest_json(200, "{}")
}
pub fn serialize_delete_thing_shadow_response(result: &DeleteThingShadowResponse) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}
pub fn serialize_get_retained_message_response(
result: &GetRetainedMessageResponse,
) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}
pub fn serialize_get_thing_shadow_response(result: &GetThingShadowResponse) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}
pub fn serialize_list_named_shadows_for_thing_response(
result: &ListNamedShadowsForThingResponse,
) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}
pub fn serialize_list_retained_messages_response(
result: &ListRetainedMessagesResponse,
) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}
pub fn serialize_publish_response() -> MockResponse {
MockResponse::rest_json(200, "{}")
}
pub fn serialize_update_thing_shadow_response(result: &UpdateThingShadowResponse) -> MockResponse {
let status = 200_u16;
let body = serde_json::to_string(result).unwrap_or_else(|_| "{}".to_string());
MockResponse::rest_json(status, body)
}