aws_sdk_ec2/protocol_serde/
shape_processor_info.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_processor_info(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::ProcessorInfo, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::ProcessorInfo::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("supportedArchitectures") => {
11 let var_1 =
12 Some(
13 crate::protocol_serde::shape_architecture_type_list::de_architecture_type_list(&mut tag)
14 ?
15 )
16 ;
17 builder = builder.set_supported_architectures(var_1);
18 }
19 ,
20 s if s.matches("sustainedClockSpeedInGhz") => {
21 let var_2 =
22 Some(
23 {
24 <f64 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
25 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
26 )
27 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (double: `com.amazonaws.ec2#ProcessorSustainedClockSpeed`)"))
28 }
29 ?
30 )
31 ;
32 builder = builder.set_sustained_clock_speed_in_ghz(var_2);
33 }
34 ,
35 s if s.matches("supportedFeatures") => {
36 let var_3 =
37 Some(
38 crate::protocol_serde::shape_supported_additional_processor_feature_list::de_supported_additional_processor_feature_list(&mut tag)
39 ?
40 )
41 ;
42 builder = builder.set_supported_features(var_3);
43 }
44 ,
45 s if s.matches("manufacturer") => {
46 let var_4 =
47 Some(
48 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
49 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
50 .into()
51 )
52 ?
53 )
54 ;
55 builder = builder.set_manufacturer(var_4);
56 }
57 ,
58 _ => {}
59 }
60 }
61 Ok(builder.build())
62}