aws_sdk_ec2/protocol_serde/
shape_connection_notification.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_connection_notification(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::ConnectionNotification, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::ConnectionNotification::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("connectionNotificationId") => {
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_connection_notification_id(var_1);
21 }
22 ,
23 s if s.matches("serviceId") => {
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_service_id(var_2);
34 }
35 ,
36 s if s.matches("vpcEndpointId") => {
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_vpc_endpoint_id(var_3);
47 }
48 ,
49 s if s.matches("connectionNotificationType") => {
50 let var_4 =
51 Some(
52 Result::<crate::types::ConnectionNotificationType, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
53 crate::types::ConnectionNotificationType::from(
54 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
55 )
56 )
57 ?
58 )
59 ;
60 builder = builder.set_connection_notification_type(var_4);
61 }
62 ,
63 s if s.matches("connectionNotificationArn") => {
64 let var_5 =
65 Some(
66 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
67 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
68 .into()
69 )
70 ?
71 )
72 ;
73 builder = builder.set_connection_notification_arn(var_5);
74 }
75 ,
76 s if s.matches("connectionEvents") => {
77 let var_6 =
78 Some(
79 crate::protocol_serde::shape_value_string_list::de_value_string_list(&mut tag)
80 ?
81 )
82 ;
83 builder = builder.set_connection_events(var_6);
84 }
85 ,
86 s if s.matches("connectionNotificationState") => {
87 let var_7 =
88 Some(
89 Result::<crate::types::ConnectionNotificationState, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
90 crate::types::ConnectionNotificationState::from(
91 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
92 )
93 )
94 ?
95 )
96 ;
97 builder = builder.set_connection_notification_state(var_7);
98 }
99 ,
100 s if s.matches("serviceRegion") => {
101 let var_8 =
102 Some(
103 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
104 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
105 .into()
106 )
107 ?
108 )
109 ;
110 builder = builder.set_service_region(var_8);
111 }
112 ,
113 _ => {}
114 }
115 }
116 Ok(builder.build())
117}