aws_sdk_ec2/protocol_serde/
shape_verified_access_endpoint_rds_options.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_verified_access_endpoint_rds_options(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::VerifiedAccessEndpointRdsOptions, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::VerifiedAccessEndpointRdsOptions::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("protocol") => {
11 let var_1 =
12 Some(
13 Result::<crate::types::VerifiedAccessEndpointProtocol, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
14 crate::types::VerifiedAccessEndpointProtocol::from(
15 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
16 )
17 )
18 ?
19 )
20 ;
21 builder = builder.set_protocol(var_1);
22 }
23 ,
24 s if s.matches("port") => {
25 let var_2 =
26 Some(
27 {
28 <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
29 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
30 )
31 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.ec2#VerifiedAccessEndpointPortNumber`)"))
32 }
33 ?
34 )
35 ;
36 builder = builder.set_port(var_2);
37 }
38 ,
39 s if s.matches("rdsDbInstanceArn") => {
40 let var_3 =
41 Some(
42 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
43 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
44 .into()
45 )
46 ?
47 )
48 ;
49 builder = builder.set_rds_db_instance_arn(var_3);
50 }
51 ,
52 s if s.matches("rdsDbClusterArn") => {
53 let var_4 =
54 Some(
55 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
56 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
57 .into()
58 )
59 ?
60 )
61 ;
62 builder = builder.set_rds_db_cluster_arn(var_4);
63 }
64 ,
65 s if s.matches("rdsDbProxyArn") => {
66 let var_5 =
67 Some(
68 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
69 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
70 .into()
71 )
72 ?
73 )
74 ;
75 builder = builder.set_rds_db_proxy_arn(var_5);
76 }
77 ,
78 s if s.matches("rdsEndpoint") => {
79 let var_6 =
80 Some(
81 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
82 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
83 .into()
84 )
85 ?
86 )
87 ;
88 builder = builder.set_rds_endpoint(var_6);
89 }
90 ,
91 s if s.matches("subnetIdSet") => {
92 let var_7 =
93 Some(
94 crate::protocol_serde::shape_verified_access_endpoint_subnet_id_list::de_verified_access_endpoint_subnet_id_list(&mut tag)
95 ?
96 )
97 ;
98 builder = builder.set_subnet_ids(var_7);
99 }
100 ,
101 _ => {}
102 }
103 }
104 Ok(builder.build())
105}