57 57 | "com.amazonaws.ec2.synthetic",
|
58 58 | "CreateRouteServerInput",
|
59 59 | );
|
60 60 | static CREATEROUTESERVERINPUT_MEMBER_AMAZON_SIDE_ASN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
61 61 | ::aws_smithy_schema::ShapeId::from_static(
|
62 62 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$AmazonSideAsn",
|
63 63 | "com.amazonaws.ec2.synthetic",
|
64 64 | "CreateRouteServerInput",
|
65 65 | ),
|
66 66 | ::aws_smithy_schema::ShapeType::Long,
|
67 - | "amazon_side_asn",
|
67 + | "AmazonSideAsn",
|
68 68 | 0,
|
69 69 | );
|
70 70 | static CREATEROUTESERVERINPUT_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
71 71 | ::aws_smithy_schema::ShapeId::from_static(
|
72 72 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$ClientToken",
|
73 73 | "com.amazonaws.ec2.synthetic",
|
74 74 | "CreateRouteServerInput",
|
75 75 | ),
|
76 76 | ::aws_smithy_schema::ShapeType::String,
|
77 - | "client_token",
|
77 + | "ClientToken",
|
78 78 | 1,
|
79 79 | );
|
80 80 | static CREATEROUTESERVERINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
81 81 | ::aws_smithy_schema::ShapeId::from_static(
|
82 82 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$DryRun",
|
83 83 | "com.amazonaws.ec2.synthetic",
|
84 84 | "CreateRouteServerInput",
|
85 85 | ),
|
86 86 | ::aws_smithy_schema::ShapeType::Boolean,
|
87 - | "dry_run",
|
87 + | "DryRun",
|
88 88 | 2,
|
89 89 | );
|
90 90 | static CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
91 91 | ::aws_smithy_schema::ShapeId::from_static(
|
92 92 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$PersistRoutes",
|
93 93 | "com.amazonaws.ec2.synthetic",
|
94 94 | "CreateRouteServerInput",
|
95 95 | ),
|
96 96 | ::aws_smithy_schema::ShapeType::String,
|
97 - | "persist_routes",
|
97 + | "PersistRoutes",
|
98 98 | 3,
|
99 99 | );
|
100 100 | static CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES_DURATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
101 101 | ::aws_smithy_schema::ShapeId::from_static(
|
102 102 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$PersistRoutesDuration",
|
103 103 | "com.amazonaws.ec2.synthetic",
|
104 104 | "CreateRouteServerInput",
|
105 105 | ),
|
106 106 | ::aws_smithy_schema::ShapeType::Long,
|
107 - | "persist_routes_duration",
|
107 + | "PersistRoutesDuration",
|
108 108 | 4,
|
109 109 | );
|
110 110 | static CREATEROUTESERVERINPUT_MEMBER_SNS_NOTIFICATIONS_ENABLED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
111 111 | ::aws_smithy_schema::ShapeId::from_static(
|
112 112 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$SnsNotificationsEnabled",
|
113 113 | "com.amazonaws.ec2.synthetic",
|
114 114 | "CreateRouteServerInput",
|
115 115 | ),
|
116 116 | ::aws_smithy_schema::ShapeType::Boolean,
|
117 - | "sns_notifications_enabled",
|
117 + | "SnsNotificationsEnabled",
|
118 118 | 5,
|
119 119 | );
|
120 120 | static CREATEROUTESERVERINPUT_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
121 121 | ::aws_smithy_schema::ShapeId::from_static(
|
122 122 | "com.amazonaws.ec2.synthetic#CreateRouteServerInput$TagSpecifications",
|
123 123 | "com.amazonaws.ec2.synthetic",
|
124 124 | "CreateRouteServerInput",
|
125 125 | ),
|
126 126 | ::aws_smithy_schema::ShapeType::List,
|
127 - | "tag_specifications",
|
127 + | "TagSpecifications",
|
128 128 | 6,
|
129 129 | )
|
130 130 | .with_xml_name("TagSpecification");
|
131 131 | static CREATEROUTESERVERINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
132 132 | CREATEROUTESERVERINPUT_SCHEMA_ID,
|
133 133 | ::aws_smithy_schema::ShapeType::Structure,
|
134 134 | &[
|
135 135 | &CREATEROUTESERVERINPUT_MEMBER_AMAZON_SIDE_ASN,
|
136 136 | &CREATEROUTESERVERINPUT_MEMBER_CLIENT_TOKEN,
|
137 137 | &CREATEROUTESERVERINPUT_MEMBER_DRY_RUN,
|
138 138 | &CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES,
|
139 139 | &CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES_DURATION,
|
140 140 | &CREATEROUTESERVERINPUT_MEMBER_SNS_NOTIFICATIONS_ENABLED,
|
141 141 | &CREATEROUTESERVERINPUT_MEMBER_TAG_SPECIFICATIONS,
|
142 142 | ],
|
143 143 | );
|
144 144 | impl CreateRouteServerInput {
|
145 145 | /// The schema for this shape.
|
146 146 | pub const SCHEMA: &'static ::aws_smithy_schema::Schema = &CREATEROUTESERVERINPUT_SCHEMA;
|
147 147 | }
|
148 148 | impl ::aws_smithy_schema::serde::SerializableStruct for CreateRouteServerInput {
|
149 149 | #[allow(unused_variables, clippy::diverging_sub_expression)]
|
150 150 | fn serialize_members(
|
151 151 | &self,
|
152 152 | ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
|
153 153 | ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
|
154 154 | if let Some(ref val) = self.amazon_side_asn {
|
155 155 | ser.write_long(&CREATEROUTESERVERINPUT_MEMBER_AMAZON_SIDE_ASN, *val)?;
|
156 156 | }
|
157 157 | if let Some(ref val) = self.client_token {
|
158 158 | ser.write_string(&CREATEROUTESERVERINPUT_MEMBER_CLIENT_TOKEN, val)?;
|
159 159 | }
|
160 160 | if let Some(ref val) = self.dry_run {
|
161 161 | ser.write_boolean(&CREATEROUTESERVERINPUT_MEMBER_DRY_RUN, *val)?;
|
162 162 | }
|
163 163 | if let Some(ref val) = self.persist_routes {
|
164 164 | ser.write_string(&CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES, val.as_str())?;
|
165 165 | }
|
166 166 | if let Some(ref val) = self.persist_routes_duration {
|
167 167 | ser.write_long(&CREATEROUTESERVERINPUT_MEMBER_PERSIST_ROUTES_DURATION, *val)?;
|
168 168 | }
|
169 169 | if let Some(ref val) = self.sns_notifications_enabled {
|
170 170 | ser.write_boolean(&CREATEROUTESERVERINPUT_MEMBER_SNS_NOTIFICATIONS_ENABLED, *val)?;
|
171 171 | }
|
172 172 | if let Some(ref val) = self.tag_specifications {
|
173 173 | ser.write_list(
|
174 174 | &CREATEROUTESERVERINPUT_MEMBER_TAG_SPECIFICATIONS,
|
175 175 | &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
|
176 176 | for item in val {
|
177 177 | ser.write_struct(crate::types::TagSpecification::SCHEMA, item)?;
|
178 178 | }
|
179 179 | Ok(())
|
180 180 | },
|
181 181 | )?;
|
182 182 | }
|
183 183 | Ok(())
|
184 184 | }
|
185 185 | }
|
186 186 | impl CreateRouteServerInput {
|
187 187 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
188 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
189 - | deserializer: &mut D,
|
188 + | pub fn deserialize(
|
189 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
190 190 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
191 191 | #[allow(unused_variables, unused_mut)]
|
192 192 | let mut builder = Self::builder();
|
193 193 | #[allow(
|
194 194 | unused_variables,
|
195 195 | unreachable_code,
|
196 196 | clippy::single_match,
|
197 197 | clippy::match_single_binding,
|
198 198 | clippy::diverging_sub_expression
|
199 199 | )]
|
200 - | deserializer.read_struct(&CREATEROUTESERVERINPUT_SCHEMA, (), |_, member, deser| {
|
200 + | deserializer.read_struct(&CREATEROUTESERVERINPUT_SCHEMA, &mut |member, deser| {
|
201 201 | match member.member_index() {
|
202 202 | Some(0) => {
|
203 203 | builder.amazon_side_asn = Some(deser.read_long(member)?);
|
204 204 | }
|
205 205 | Some(1) => {
|
206 206 | builder.client_token = Some(deser.read_string(member)?);
|
207 207 | }
|
208 208 | Some(2) => {
|
209 209 | builder.dry_run = Some(deser.read_boolean(member)?);
|
210 210 | }
|
211 211 | Some(3) => {
|
212 212 | builder.persist_routes = Some(crate::types::RouteServerPersistRoutesAction::from(deser.read_string(member)?.as_str()));
|
213 213 | }
|
214 214 | Some(4) => {
|
215 215 | builder.persist_routes_duration = Some(deser.read_long(member)?);
|
216 216 | }
|
217 217 | Some(5) => {
|
218 218 | builder.sns_notifications_enabled = Some(deser.read_boolean(member)?);
|
219 219 | }
|
220 220 | Some(6) => {
|
221 221 | builder.tag_specifications = Some({
|
222 - | let container = if let Some(cap) = deser.container_size() {
|
223 - | Vec::with_capacity(cap)
|
224 - | } else {
|
225 - | Vec::new()
|
226 - | };
|
227 - | deser.read_list(member, container, |mut list, deser| {
|
228 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
229 - | Ok(list)
|
230 - | })?
|
222 + | let mut container = Vec::new();
|
223 + | deser.read_list(member, &mut |deser| {
|
224 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
225 + | Ok(())
|
226 + | })?;
|
227 + | container
|
231 228 | });
|
232 229 | }
|
233 230 | _ => {}
|
234 231 | }
|
235 232 | Ok(())
|
236 233 | })?;
|
234 + | builder.amazon_side_asn = builder.amazon_side_asn.or(Some(0i64));
|
237 235 | builder
|
238 236 | .build()
|
239 237 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
240 238 | }
|
241 239 | }
|
240 + | impl CreateRouteServerInput {
|
241 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
242 + | pub fn deserialize_with_response(
|
243 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
244 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
245 + | _status: u16,
|
246 + | _body: &[u8],
|
247 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
248 + | Self::deserialize(deserializer)
|
249 + | }
|
250 + | }
|
242 251 | impl CreateRouteServerInput {
|
243 252 | /// Creates a new builder-style object to manufacture [`CreateRouteServerInput`](crate::operation::create_route_server::CreateRouteServerInput).
|
244 253 | pub fn builder() -> crate::operation::create_route_server::builders::CreateRouteServerInputBuilder {
|
245 254 | crate::operation::create_route_server::builders::CreateRouteServerInputBuilder::default()
|
246 255 | }
|
247 256 | }
|
248 257 |
|
249 258 | /// A builder for [`CreateRouteServerInput`](crate::operation::create_route_server::CreateRouteServerInput).
|
250 259 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
251 260 | #[non_exhaustive]
|