aws_sdk_ec2/protocol_serde/
shape_classic_link_instance.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_classic_link_instance(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::ClassicLinkInstance, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::ClassicLinkInstance::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("groupSet") => {
11 let var_1 =
12 Some(
13 crate::protocol_serde::shape_group_identifier_list::de_group_identifier_list(&mut tag)
14 ?
15 )
16 ;
17 builder = builder.set_groups(var_1);
18 }
19 ,
20 s if s.matches("instanceId") => {
21 let var_2 =
22 Some(
23 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
24 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
25 .into()
26 )
27 ?
28 )
29 ;
30 builder = builder.set_instance_id(var_2);
31 }
32 ,
33 s if s.matches("tagSet") => {
34 let var_3 =
35 Some(
36 crate::protocol_serde::shape_tag_list::de_tag_list(&mut tag)
37 ?
38 )
39 ;
40 builder = builder.set_tags(var_3);
41 }
42 ,
43 s if s.matches("vpcId") => {
44 let var_4 =
45 Some(
46 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
47 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
48 .into()
49 )
50 ?
51 )
52 ;
53 builder = builder.set_vpc_id(var_4);
54 }
55 ,
56 _ => {}
57 }
58 }
59 Ok(builder.build())
60}