#[allow(unused_mut)]
pub fn ser_template_configuration(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::TemplateConfiguration,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("DeletionPolicy");
if let Some(var_2) = &input.deletion_policy {
scope_1.string(var_2.as_str());
}
#[allow(unused_mut)]
let mut scope_3 = writer.prefix("UpdateReplacePolicy");
if let Some(var_4) = &input.update_replace_policy {
scope_3.string(var_4.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_template_configuration(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::TemplateConfiguration, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::TemplateConfiguration::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("DeletionPolicy") => {
let var_5 =
Some(
Result::<crate::types::GeneratedTemplateDeletionPolicy, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::GeneratedTemplateDeletionPolicy::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_deletion_policy(var_5);
}
,
s if s.matches("UpdateReplacePolicy") => {
let var_6 =
Some(
Result::<crate::types::GeneratedTemplateUpdateReplacePolicy, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::GeneratedTemplateUpdateReplacePolicy::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_update_replace_policy(var_6);
}
,
_ => {}
}
}
Ok(builder.build())
}