aws_sdk_redshift/protocol_serde/
shape_pending_modified_values.rs1#[allow(clippy::needless_question_mark)]
3pub fn de_pending_modified_values(
4 decoder: &mut ::aws_smithy_xml::decode::ScopedDecoder,
5) -> ::std::result::Result<crate::types::PendingModifiedValues, ::aws_smithy_xml::decode::XmlDecodeError> {
6 #[allow(unused_mut)]
7 let mut builder = crate::types::PendingModifiedValues::builder();
8 while let Some(mut tag) = decoder.next_tag() {
9 match tag.start_el() {
10 s if s.matches("MasterUserPassword") => {
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_master_user_password(var_1);
21 }
22 ,
23 s if s.matches("NodeType") => {
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_node_type(var_2);
34 }
35 ,
36 s if s.matches("NumberOfNodes") => {
37 let var_3 =
38 Some(
39 {
40 <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
41 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
42 )
43 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.redshift#IntegerOptional`)"))
44 }
45 ?
46 )
47 ;
48 builder = builder.set_number_of_nodes(var_3);
49 }
50 ,
51 s if s.matches("ClusterType") => {
52 let var_4 =
53 Some(
54 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
55 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
56 .into()
57 )
58 ?
59 )
60 ;
61 builder = builder.set_cluster_type(var_4);
62 }
63 ,
64 s if s.matches("ClusterVersion") => {
65 let var_5 =
66 Some(
67 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
68 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
69 .into()
70 )
71 ?
72 )
73 ;
74 builder = builder.set_cluster_version(var_5);
75 }
76 ,
77 s if s.matches("AutomatedSnapshotRetentionPeriod") => {
78 let var_6 =
79 Some(
80 {
81 <i32 as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
82 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
83 )
84 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (integer: `com.amazonaws.redshift#IntegerOptional`)"))
85 }
86 ?
87 )
88 ;
89 builder = builder.set_automated_snapshot_retention_period(var_6);
90 }
91 ,
92 s if s.matches("ClusterIdentifier") => {
93 let var_7 =
94 Some(
95 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
96 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
97 .into()
98 )
99 ?
100 )
101 ;
102 builder = builder.set_cluster_identifier(var_7);
103 }
104 ,
105 s if s.matches("PubliclyAccessible") => {
106 let var_8 =
107 Some(
108 {
109 <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
110 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
111 )
112 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.redshift#BooleanOptional`)"))
113 }
114 ?
115 )
116 ;
117 builder = builder.set_publicly_accessible(var_8);
118 }
119 ,
120 s if s.matches("EnhancedVpcRouting") => {
121 let var_9 =
122 Some(
123 {
124 <bool as ::aws_smithy_types::primitive::Parse>::parse_smithy_primitive(
125 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
126 )
127 .map_err(|_|::aws_smithy_xml::decode::XmlDecodeError::custom("expected (boolean: `com.amazonaws.redshift#BooleanOptional`)"))
128 }
129 ?
130 )
131 ;
132 builder = builder.set_enhanced_vpc_routing(var_9);
133 }
134 ,
135 s if s.matches("MaintenanceTrackName") => {
136 let var_10 =
137 Some(
138 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
139 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
140 .into()
141 )
142 ?
143 )
144 ;
145 builder = builder.set_maintenance_track_name(var_10);
146 }
147 ,
148 s if s.matches("EncryptionType") => {
149 let var_11 =
150 Some(
151 Result::<::std::string::String, ::aws_smithy_xml::decode::XmlDecodeError>::Ok(
152 ::aws_smithy_xml::decode::try_data(&mut tag)?.as_ref()
153 .into()
154 )
155 ?
156 )
157 ;
158 builder = builder.set_encryption_type(var_11);
159 }
160 ,
161 _ => {}
162 }
163 }
164 Ok(builder.build())
165}