#[allow(clippy::needless_question_mark)]
pub fn de_processor_info(
decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
depth: u32,
) -> ::std::result::Result<crate::types::ProcessorInfo, ::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::ProcessorInfo::builder();
while let Some(mut tag) = decoder.next_tag() {
match tag.start_el() {
s if s.matches("supportedArchitectures") => {
let var_1 =
Some(
crate::protocol_serde::shape_architecture_type_list::de_architecture_type_list(&mut tag, depth + 1)
?
)
;
builder = builder.set_supported_architectures(var_1);
}
,
s if s.matches("sustainedClockSpeedInGhz") => {
let var_2 =
Some(
{
<f64 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 (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
}
?
)
;
builder = builder.set_sustained_clock_speed_in_ghz(var_2);
}
,
s if s.matches("supportedFeatures") => {
let var_3 =
Some(
crate::protocol_serde::shape_supported_additional_processor_feature_list::de_supported_additional_processor_feature_list(&mut tag, depth + 1)
?
)
;
builder = builder.set_supported_features(var_3);
}
,
s if s.matches("manufacturer") => {
let var_4 =
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_manufacturer(var_4);
}
,
_ => {}
}
}
Ok(builder.build())
}