#[allow(unused_mut)]
pub fn ser_delivery_options(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::DeliveryOptions,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("TlsPolicy");
if let Some(var_2) = &input.tls_policy {
scope_1.string(var_2.as_str());
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_delivery_options(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::DeliveryOptions, ::aws_smithy_xml::decode::XmlDecodeError> {
if depth >= 128u32 {
return Err(::aws_smithy_xml::decode::XmlDecodeError::custom("maximum nesting depth exceeded"));
}
#[allow(unused_mut)]
let mut builder = crate::types::DeliveryOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("TlsPolicy") => {
let var_3 =
Some(
Result::<crate::types::TlsPolicy, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
crate::types::TlsPolicy::from(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
)
?
)
;
builder = builder.set_tls_policy(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}