aws_sdk_ec2/protocol_serde/
shape_instance_status.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_instance_status(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::InstanceStatus, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::InstanceStatus::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("availabilityZone") => {
11 let var_1 =
12 Some(
13 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
14 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
15 .into()
16 )
17 ?
18 )
19 ;
20 builder = builder.set_availability_zone(var_1);
21 }
22 ,
23 s if s.matches("availabilityZoneId") => {
24 let var_2 =
25 Some(
26 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
27 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
28 .into()
29 )
30 ?
31 )
32 ;
33 builder = builder.set_availability_zone_id(var_2);
34 }
35 ,
36 s if s.matches("outpostArn") => {
37 let var_3 =
38 Some(
39 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
40 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
41 .into()
42 )
43 ?
44 )
45 ;
46 builder = builder.set_outpost_arn(var_3);
47 }
48 ,
49 s if s.matches("operator") => {
50 let var_4 =
51 Some(
52 crate::protocol_serde::shape_operator_response::de_operator_response(&mut tag)
53 ?
54 )
55 ;
56 builder = builder.set_operator(var_4);
57 }
58 ,
59 s if s.matches("eventsSet") => {
60 let var_5 =
61 Some(
62 crate::protocol_serde::shape_instance_status_event_list::de_instance_status_event_list(&mut tag)
63 ?
64 )
65 ;
66 builder = builder.set_events(var_5);
67 }
68 ,
69 s if s.matches("instanceId") => {
70 let var_6 =
71 Some(
72 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
73 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
74 .into()
75 )
76 ?
77 )
78 ;
79 builder = builder.set_instance_id(var_6);
80 }
81 ,
82 s if s.matches("instanceState") => {
83 let var_7 =
84 Some(
85 crate::protocol_serde::shape_instance_state::de_instance_state(&mut tag)
86 ?
87 )
88 ;
89 builder = builder.set_instance_state(var_7);
90 }
91 ,
92 s if s.matches("instanceStatus") => {
93 let var_8 =
94 Some(
95 crate::protocol_serde::shape_instance_status_summary::de_instance_status_summary(&mut tag)
96 ?
97 )
98 ;
99 builder = builder.set_instance_status(var_8);
100 }
101 ,
102 s if s.matches("systemStatus") => {
103 let var_9 =
104 Some(
105 crate::protocol_serde::shape_instance_status_summary::de_instance_status_summary(&mut tag)
106 ?
107 )
108 ;
109 builder = builder.set_system_status(var_9);
110 }
111 ,
112 s if s.matches("attachedEbsStatus") => {
113 let var_10 =
114 Some(
115 crate::protocol_serde::shape_ebs_status_summary::de_ebs_status_summary(&mut tag)
116 ?
117 )
118 ;
119 builder = builder.set_attached_ebs_status(var_10);
120 }
121 ,
122 _ => {}
123 }
124 }
125 Ok(builder.build())
126}