135 135 | "com.amazonaws.ec2.synthetic",
|
136 136 | "ModifyInstanceAttributeInput",
|
137 137 | );
|
138 138 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_SOURCE_DEST_CHECK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
139 139 | ::aws_smithy_schema::ShapeId::from_static(
|
140 140 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$SourceDestCheck",
|
141 141 | "com.amazonaws.ec2.synthetic",
|
142 142 | "ModifyInstanceAttributeInput",
|
143 143 | ),
|
144 144 | ::aws_smithy_schema::ShapeType::Structure,
|
145 - | "source_dest_check",
|
145 + | "SourceDestCheck",
|
146 146 | 0,
|
147 147 | );
|
148 148 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_DISABLE_API_STOP: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
149 149 | ::aws_smithy_schema::ShapeId::from_static(
|
150 150 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$DisableApiStop",
|
151 151 | "com.amazonaws.ec2.synthetic",
|
152 152 | "ModifyInstanceAttributeInput",
|
153 153 | ),
|
154 154 | ::aws_smithy_schema::ShapeType::Structure,
|
155 - | "disable_api_stop",
|
155 + | "DisableApiStop",
|
156 156 | 1,
|
157 157 | );
|
158 158 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_DRY_RUN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
159 159 | ::aws_smithy_schema::ShapeId::from_static(
|
160 160 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$DryRun",
|
161 161 | "com.amazonaws.ec2.synthetic",
|
162 162 | "ModifyInstanceAttributeInput",
|
163 163 | ),
|
164 164 | ::aws_smithy_schema::ShapeType::Boolean,
|
165 - | "dry_run",
|
165 + | "DryRun",
|
166 166 | 2,
|
167 167 | )
|
168 168 | .with_xml_name("dryRun");
|
169 169 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
170 170 | ::aws_smithy_schema::ShapeId::from_static(
|
171 171 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$InstanceId",
|
172 172 | "com.amazonaws.ec2.synthetic",
|
173 173 | "ModifyInstanceAttributeInput",
|
174 174 | ),
|
175 175 | ::aws_smithy_schema::ShapeType::String,
|
176 - | "instance_id",
|
176 + | "InstanceId",
|
177 177 | 3,
|
178 178 | )
|
179 179 | .with_xml_name("instanceId");
|
180 180 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_ATTRIBUTE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
181 181 | ::aws_smithy_schema::ShapeId::from_static(
|
182 182 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$Attribute",
|
183 183 | "com.amazonaws.ec2.synthetic",
|
184 184 | "ModifyInstanceAttributeInput",
|
185 185 | ),
|
186 186 | ::aws_smithy_schema::ShapeType::String,
|
187 - | "attribute",
|
187 + | "Attribute",
|
188 188 | 4,
|
189 189 | )
|
190 190 | .with_xml_name("attribute");
|
191 191 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_VALUE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
192 192 | ::aws_smithy_schema::ShapeId::from_static(
|
193 193 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$Value",
|
194 194 | "com.amazonaws.ec2.synthetic",
|
195 195 | "ModifyInstanceAttributeInput",
|
196 196 | ),
|
197 197 | ::aws_smithy_schema::ShapeType::String,
|
198 - | "value",
|
198 + | "Value",
|
199 199 | 5,
|
200 200 | )
|
201 201 | .with_xml_name("value");
|
202 202 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_BLOCK_DEVICE_MAPPINGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
203 203 | ::aws_smithy_schema::ShapeId::from_static(
|
204 204 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$BlockDeviceMappings",
|
205 205 | "com.amazonaws.ec2.synthetic",
|
206 206 | "ModifyInstanceAttributeInput",
|
207 207 | ),
|
208 208 | ::aws_smithy_schema::ShapeType::List,
|
209 - | "block_device_mappings",
|
209 + | "BlockDeviceMappings",
|
210 210 | 6,
|
211 211 | )
|
212 212 | .with_xml_name("blockDeviceMapping");
|
213 213 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_DISABLE_API_TERMINATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
214 214 | ::aws_smithy_schema::ShapeId::from_static(
|
215 215 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$DisableApiTermination",
|
216 216 | "com.amazonaws.ec2.synthetic",
|
217 217 | "ModifyInstanceAttributeInput",
|
218 218 | ),
|
219 219 | ::aws_smithy_schema::ShapeType::Structure,
|
220 - | "disable_api_termination",
|
220 + | "DisableApiTermination",
|
221 221 | 7,
|
222 222 | )
|
223 223 | .with_xml_name("disableApiTermination");
|
224 224 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_INSTANCE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
225 225 | ::aws_smithy_schema::ShapeId::from_static(
|
226 226 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$InstanceType",
|
227 227 | "com.amazonaws.ec2.synthetic",
|
228 228 | "ModifyInstanceAttributeInput",
|
229 229 | ),
|
230 230 | ::aws_smithy_schema::ShapeType::Structure,
|
231 - | "instance_type",
|
231 + | "InstanceType",
|
232 232 | 8,
|
233 233 | )
|
234 234 | .with_xml_name("instanceType");
|
235 235 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_KERNEL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
236 236 | ::aws_smithy_schema::ShapeId::from_static(
|
237 237 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$Kernel",
|
238 238 | "com.amazonaws.ec2.synthetic",
|
239 239 | "ModifyInstanceAttributeInput",
|
240 240 | ),
|
241 241 | ::aws_smithy_schema::ShapeType::Structure,
|
242 - | "kernel",
|
242 + | "Kernel",
|
243 243 | 9,
|
244 244 | )
|
245 245 | .with_xml_name("kernel");
|
246 246 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_RAMDISK: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
247 247 | ::aws_smithy_schema::ShapeId::from_static(
|
248 248 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$Ramdisk",
|
249 249 | "com.amazonaws.ec2.synthetic",
|
250 250 | "ModifyInstanceAttributeInput",
|
251 251 | ),
|
252 252 | ::aws_smithy_schema::ShapeType::Structure,
|
253 - | "ramdisk",
|
253 + | "Ramdisk",
|
254 254 | 10,
|
255 255 | )
|
256 256 | .with_xml_name("ramdisk");
|
257 257 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_USER_DATA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
258 258 | ::aws_smithy_schema::ShapeId::from_static(
|
259 259 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$UserData",
|
260 260 | "com.amazonaws.ec2.synthetic",
|
261 261 | "ModifyInstanceAttributeInput",
|
262 262 | ),
|
263 263 | ::aws_smithy_schema::ShapeType::Structure,
|
264 - | "user_data",
|
264 + | "UserData",
|
265 265 | 11,
|
266 266 | )
|
267 267 | .with_xml_name("userData");
|
268 268 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_INSTANCE_INITIATED_SHUTDOWN_BEHAVIOR: ::aws_smithy_schema::Schema =
|
269 269 | ::aws_smithy_schema::Schema::new_member(
|
270 270 | ::aws_smithy_schema::ShapeId::from_static(
|
271 271 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$InstanceInitiatedShutdownBehavior",
|
272 272 | "com.amazonaws.ec2.synthetic",
|
273 273 | "ModifyInstanceAttributeInput",
|
274 274 | ),
|
275 275 | ::aws_smithy_schema::ShapeType::Structure,
|
276 - | "instance_initiated_shutdown_behavior",
|
276 + | "InstanceInitiatedShutdownBehavior",
|
277 277 | 12,
|
278 278 | )
|
279 279 | .with_xml_name("instanceInitiatedShutdownBehavior");
|
280 280 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_GROUPS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
281 281 | ::aws_smithy_schema::ShapeId::from_static(
|
282 282 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$Groups",
|
283 283 | "com.amazonaws.ec2.synthetic",
|
284 284 | "ModifyInstanceAttributeInput",
|
285 285 | ),
|
286 286 | ::aws_smithy_schema::ShapeType::List,
|
287 - | "groups",
|
287 + | "Groups",
|
288 288 | 13,
|
289 289 | )
|
290 290 | .with_xml_name("GroupId");
|
291 291 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_EBS_OPTIMIZED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
292 292 | ::aws_smithy_schema::ShapeId::from_static(
|
293 293 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$EbsOptimized",
|
294 294 | "com.amazonaws.ec2.synthetic",
|
295 295 | "ModifyInstanceAttributeInput",
|
296 296 | ),
|
297 297 | ::aws_smithy_schema::ShapeType::Structure,
|
298 - | "ebs_optimized",
|
298 + | "EbsOptimized",
|
299 299 | 14,
|
300 300 | )
|
301 301 | .with_xml_name("ebsOptimized");
|
302 302 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_SRIOV_NET_SUPPORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
303 303 | ::aws_smithy_schema::ShapeId::from_static(
|
304 304 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$SriovNetSupport",
|
305 305 | "com.amazonaws.ec2.synthetic",
|
306 306 | "ModifyInstanceAttributeInput",
|
307 307 | ),
|
308 308 | ::aws_smithy_schema::ShapeType::Structure,
|
309 - | "sriov_net_support",
|
309 + | "SriovNetSupport",
|
310 310 | 15,
|
311 311 | )
|
312 312 | .with_xml_name("sriovNetSupport");
|
313 313 | static MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_ENA_SUPPORT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
314 314 | ::aws_smithy_schema::ShapeId::from_static(
|
315 315 | "com.amazonaws.ec2.synthetic#ModifyInstanceAttributeInput$EnaSupport",
|
316 316 | "com.amazonaws.ec2.synthetic",
|
317 317 | "ModifyInstanceAttributeInput",
|
318 318 | ),
|
319 319 | ::aws_smithy_schema::ShapeType::Structure,
|
320 - | "ena_support",
|
320 + | "EnaSupport",
|
321 321 | 16,
|
322 322 | )
|
323 323 | .with_xml_name("enaSupport");
|
324 324 | static MODIFYINSTANCEATTRIBUTEINPUT_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
325 325 | MODIFYINSTANCEATTRIBUTEINPUT_SCHEMA_ID,
|
326 326 | ::aws_smithy_schema::ShapeType::Structure,
|
327 327 | &[
|
328 328 | &MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_SOURCE_DEST_CHECK,
|
329 329 | &MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_DISABLE_API_STOP,
|
330 330 | &MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_DRY_RUN,
|
419 419 | ser.write_struct(&MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_SRIOV_NET_SUPPORT, val)?;
|
420 420 | }
|
421 421 | if let Some(ref val) = self.ena_support {
|
422 422 | ser.write_struct(&MODIFYINSTANCEATTRIBUTEINPUT_MEMBER_ENA_SUPPORT, val)?;
|
423 423 | }
|
424 424 | Ok(())
|
425 425 | }
|
426 426 | }
|
427 427 | impl ModifyInstanceAttributeInput {
|
428 428 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
429 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
430 - | deserializer: &mut D,
|
429 + | pub fn deserialize(
|
430 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
431 431 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
432 432 | #[allow(unused_variables, unused_mut)]
|
433 433 | let mut builder = Self::builder();
|
434 434 | #[allow(
|
435 435 | unused_variables,
|
436 436 | unreachable_code,
|
437 437 | clippy::single_match,
|
438 438 | clippy::match_single_binding,
|
439 439 | clippy::diverging_sub_expression
|
440 440 | )]
|
441 - | deserializer.read_struct(&MODIFYINSTANCEATTRIBUTEINPUT_SCHEMA, (), |_, member, deser| {
|
441 + | deserializer.read_struct(&MODIFYINSTANCEATTRIBUTEINPUT_SCHEMA, &mut |member, deser| {
|
442 442 | match member.member_index() {
|
443 443 | Some(0) => {
|
444 444 | builder.source_dest_check = Some(crate::types::AttributeBooleanValue::deserialize(deser)?);
|
445 445 | }
|
446 446 | Some(1) => {
|
447 447 | builder.disable_api_stop = Some(crate::types::AttributeBooleanValue::deserialize(deser)?);
|
448 448 | }
|
449 449 | Some(2) => {
|
450 450 | builder.dry_run = Some(deser.read_boolean(member)?);
|
451 451 | }
|
452 452 | Some(3) => {
|
453 453 | builder.instance_id = Some(deser.read_string(member)?);
|
454 454 | }
|
455 455 | Some(4) => {
|
456 456 | builder.attribute = Some(crate::types::InstanceAttributeName::from(deser.read_string(member)?.as_str()));
|
457 457 | }
|
458 458 | Some(5) => {
|
459 459 | builder.value = Some(deser.read_string(member)?);
|
460 460 | }
|
461 461 | Some(6) => {
|
462 462 | builder.block_device_mappings = Some({
|
463 - | let container = if let Some(cap) = deser.container_size() {
|
464 - | Vec::with_capacity(cap)
|
465 - | } else {
|
466 - | Vec::new()
|
467 - | };
|
468 - | deser.read_list(member, container, |mut list, deser| {
|
469 - | list.push(crate::types::InstanceBlockDeviceMappingSpecification::deserialize(deser)?);
|
470 - | Ok(list)
|
471 - | })?
|
463 + | let mut container = Vec::new();
|
464 + | deser.read_list(member, &mut |deser| {
|
465 + | container.push(crate::types::InstanceBlockDeviceMappingSpecification::deserialize(deser)?);
|
466 + | Ok(())
|
467 + | })?;
|
468 + | container
|
472 469 | });
|
473 470 | }
|
474 471 | Some(7) => {
|
475 472 | builder.disable_api_termination = Some(crate::types::AttributeBooleanValue::deserialize(deser)?);
|
476 473 | }
|
477 474 | Some(8) => {
|
478 475 | builder.instance_type = Some(crate::types::AttributeValue::deserialize(deser)?);
|
479 476 | }
|
480 477 | Some(9) => {
|
481 478 | builder.kernel = Some(crate::types::AttributeValue::deserialize(deser)?);
|
482 479 | }
|
483 480 | Some(10) => {
|
484 481 | builder.ramdisk = Some(crate::types::AttributeValue::deserialize(deser)?);
|
485 482 | }
|
486 483 | Some(11) => {
|
487 484 | builder.user_data = Some(crate::types::BlobAttributeValue::deserialize(deser)?);
|
488 485 | }
|
489 486 | Some(12) => {
|
490 487 | builder.instance_initiated_shutdown_behavior = Some(crate::types::AttributeValue::deserialize(deser)?);
|
491 488 | }
|
492 489 | Some(13) => {
|
493 - | builder.groups = Some({
|
494 - | let container = if let Some(cap) = deser.container_size() {
|
495 - | Vec::with_capacity(cap)
|
496 - | } else {
|
497 - | Vec::new()
|
498 - | };
|
499 - | deser.read_list(member, container, |mut list, deser| {
|
500 - | list.push(deser.read_string(member)?);
|
501 - | Ok(list)
|
502 - | })?
|
503 - | });
|
490 + | builder.groups = Some(deser.read_string_list(member)?);
|
504 491 | }
|
505 492 | Some(14) => {
|
506 493 | builder.ebs_optimized = Some(crate::types::AttributeBooleanValue::deserialize(deser)?);
|
507 494 | }
|
508 495 | Some(15) => {
|
509 496 | builder.sriov_net_support = Some(crate::types::AttributeValue::deserialize(deser)?);
|
510 497 | }
|
511 498 | Some(16) => {
|
512 499 | builder.ena_support = Some(crate::types::AttributeBooleanValue::deserialize(deser)?);
|
513 500 | }
|
514 501 | _ => {}
|
515 502 | }
|
516 503 | Ok(())
|
517 504 | })?;
|
505 + | builder.instance_id = builder.instance_id.or(Some(String::new()));
|
518 506 | builder
|
519 507 | .build()
|
520 508 | .map_err(|e| aws_smithy_schema::serde::SerdeError::Custom { message: e.to_string() })
|
521 509 | }
|
522 510 | }
|
511 + | impl ModifyInstanceAttributeInput {
|
512 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
513 + | pub fn deserialize_with_response(
|
514 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
515 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
516 + | _status: u16,
|
517 + | _body: &[u8],
|
518 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
519 + | Self::deserialize(deserializer)
|
520 + | }
|
521 + | }
|
523 522 | impl ModifyInstanceAttributeInput {
|
524 523 | /// Creates a new builder-style object to manufacture [`ModifyInstanceAttributeInput`](crate::operation::modify_instance_attribute::ModifyInstanceAttributeInput).
|
525 524 | pub fn builder() -> crate::operation::modify_instance_attribute::builders::ModifyInstanceAttributeInputBuilder {
|
526 525 | crate::operation::modify_instance_attribute::builders::ModifyInstanceAttributeInputBuilder::default()
|
527 526 | }
|
528 527 | }
|
529 528 |
|
530 529 | /// A builder for [`ModifyInstanceAttributeInput`](crate::operation::modify_instance_attribute::ModifyInstanceAttributeInput).
|
531 530 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
532 531 | #[non_exhaustive]
|