#[allow(clippy::needless_question_mark)]
pub fn de_scanned_resource(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
) -> ::std::result::Result<crate::types::ScannedResource, ::aws_smithy_xml::decode::XmlDecodeError> {
#[allow(unused_mut)]
let mut builder = crate::types::ScannedResource::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("ResourceType") => {
let var_1 =
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_resource_type(var_1);
}
,
s if s.matches("ResourceIdentifier") => {
let var_2 =
Some(
crate::protocol_serde::shape_jazz_resource_identifier_properties::de_jazz_resource_identifier_properties(&mut tag)
?
)
;
builder = builder.set_resource_identifier(var_2);
}
,
s if s.matches("ManagedByStack") => {
let var_3 =
Some(
{
<bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
)
.map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.cloudformation#ManagedByStack`)"))
}
?
)
;
builder = builder.set_managed_by_stack(var_3);
}
,
_ => {}
}
}
Ok(builder.build())
}