#[allow(clippy::needless_question_mark)]
pub fn de_image_criterion(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::ImageCriterion, ::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::ImageCriterion::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("imageProviderSet") => {
let var_1 =
Some(
crate::protocol_serde::shape_image_provider_list::de_image_provider_list(&mut tag, depth + 1)
?
)
;
builder = builder.set_image_providers(var_1);
}
,
s if s.matches("marketplaceProductCodeSet") => {
let var_2 =
Some(
crate::protocol_serde::shape_marketplace_product_code_list::de_marketplace_product_code_list(&mut tag, depth + 1)
?
)
;
builder = builder.set_marketplace_product_codes(var_2);
}
,
s if s.matches("imageNameSet") => {
let var_3 =
Some(
crate::protocol_serde::shape_image_name_list::de_image_name_list(&mut tag, depth + 1)
?
)
;
builder = builder.set_image_names(var_3);
}
,
s if s.matches("deprecationTimeCondition") => {
let var_4 =
Some(
crate::protocol_serde::shape_deprecation_time_condition::de_deprecation_time_condition(&mut tag, depth + 1)
?
)
;
builder = builder.set_deprecation_time_condition(var_4);
}
,
s if s.matches("creationDateCondition") => {
let var_5 =
Some(
crate::protocol_serde::shape_creation_date_condition::de_creation_date_condition(&mut tag, depth + 1)
?
)
;
builder = builder.set_creation_date_condition(var_5);
}
,
_ => {}
}
}
Ok(builder.build())
}