#[allow(unused_mut)]
pub fn ser_fixed_response_action_config(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::FixedResponseActionConfig,
) -> Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("MessageBody");
if let Some(var_2) = &input.message_body {
scope_1.string(var_2);
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("StatusCode");
if let Some(var_4) = &input.status_code {
scope_3.string(var_4);
}
#[allow(unused_mut)]
let mut scope_5 = writer.prefix("ContentType");
if let Some(var_6) = &input.content_type {
scope_5.string(var_6);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_fixed_response_action_config(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> Result<crate::types::FixedResponseActionConfig, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::FixedResponseActionConfig::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("MessageBody") => {
let var_7 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_message_body(var_7);
}
,
s if s.matches("StatusCode") => {
let var_8 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_status_code(var_8);
}
,
s if s.matches("ContentType") => {
let var_9 =
Some(
Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
.into()
)
?
)
;
builder = builder.set_content_type(var_9);
}
,
_ => {}
}
}
Ok(crate::serde_util::fixed_response_action_config_correct_errors(builder).build())
}