#[allow(unused_mut)]
pub fn ser_tracking_options(
mut writer: ::aws_smithy_query::QueryValueWriter,
input: &crate::types::TrackingOptions,
) -> ::std::result::Result<(), ::aws_smithy_types::error::operation::SerializationError> {
#[allow(unused_mut)]
let mut scope_1 = writer.prefix("CustomRedirectDomain");
if let Some(var_2) = &input.custom_redirect_domain {
scope_1.string(var_2);
}
Ok(())
}
#[allow(clippy::needless_question_mark)]
pub fn de_tracking_options(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::TrackingOptions, ::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::TrackingOptions::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("CustomRedirectDomain") => {
let var_3 =
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_custom_redirect_domain(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}