265 265 | }
|
266 266 | static CAPACITYRESERVATION_SCHEMA_ID: ::aws_smithy_schema::ShapeId =
|
267 267 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#CapacityReservation", "com.amazonaws.ec2", "CapacityReservation");
|
268 268 | static CAPACITYRESERVATION_MEMBER_CAPACITY_RESERVATION_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
269 269 | ::aws_smithy_schema::ShapeId::from_static(
|
270 270 | "com.amazonaws.ec2#CapacityReservation$CapacityReservationId",
|
271 271 | "com.amazonaws.ec2",
|
272 272 | "CapacityReservation",
|
273 273 | ),
|
274 274 | ::aws_smithy_schema::ShapeType::String,
|
275 - | "capacity_reservation_id",
|
275 + | "CapacityReservationId",
|
276 276 | 0,
|
277 277 | )
|
278 278 | .with_xml_name("capacityReservationId");
|
279 279 | static CAPACITYRESERVATION_MEMBER_OWNER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
280 280 | ::aws_smithy_schema::ShapeId::from_static(
|
281 281 | "com.amazonaws.ec2#CapacityReservation$OwnerId",
|
282 282 | "com.amazonaws.ec2",
|
283 283 | "CapacityReservation",
|
284 284 | ),
|
285 285 | ::aws_smithy_schema::ShapeType::String,
|
286 - | "owner_id",
|
286 + | "OwnerId",
|
287 287 | 1,
|
288 288 | )
|
289 289 | .with_xml_name("ownerId");
|
290 290 | static CAPACITYRESERVATION_MEMBER_CAPACITY_RESERVATION_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
291 291 | ::aws_smithy_schema::ShapeId::from_static(
|
292 292 | "com.amazonaws.ec2#CapacityReservation$CapacityReservationArn",
|
293 293 | "com.amazonaws.ec2",
|
294 294 | "CapacityReservation",
|
295 295 | ),
|
296 296 | ::aws_smithy_schema::ShapeType::String,
|
297 - | "capacity_reservation_arn",
|
297 + | "CapacityReservationArn",
|
298 298 | 2,
|
299 299 | )
|
300 300 | .with_xml_name("capacityReservationArn");
|
301 301 | static CAPACITYRESERVATION_MEMBER_AVAILABILITY_ZONE_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
302 302 | ::aws_smithy_schema::ShapeId::from_static(
|
303 303 | "com.amazonaws.ec2#CapacityReservation$AvailabilityZoneId",
|
304 304 | "com.amazonaws.ec2",
|
305 305 | "CapacityReservation",
|
306 306 | ),
|
307 307 | ::aws_smithy_schema::ShapeType::String,
|
308 - | "availability_zone_id",
|
308 + | "AvailabilityZoneId",
|
309 309 | 3,
|
310 310 | )
|
311 311 | .with_xml_name("availabilityZoneId");
|
312 312 | static CAPACITYRESERVATION_MEMBER_INSTANCE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
313 313 | ::aws_smithy_schema::ShapeId::from_static(
|
314 314 | "com.amazonaws.ec2#CapacityReservation$InstanceType",
|
315 315 | "com.amazonaws.ec2",
|
316 316 | "CapacityReservation",
|
317 317 | ),
|
318 318 | ::aws_smithy_schema::ShapeType::String,
|
319 - | "instance_type",
|
319 + | "InstanceType",
|
320 320 | 4,
|
321 321 | )
|
322 322 | .with_xml_name("instanceType");
|
323 323 | static CAPACITYRESERVATION_MEMBER_INSTANCE_PLATFORM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
324 324 | ::aws_smithy_schema::ShapeId::from_static(
|
325 325 | "com.amazonaws.ec2#CapacityReservation$InstancePlatform",
|
326 326 | "com.amazonaws.ec2",
|
327 327 | "CapacityReservation",
|
328 328 | ),
|
329 329 | ::aws_smithy_schema::ShapeType::String,
|
330 - | "instance_platform",
|
330 + | "InstancePlatform",
|
331 331 | 5,
|
332 332 | )
|
333 333 | .with_xml_name("instancePlatform");
|
334 334 | static CAPACITYRESERVATION_MEMBER_AVAILABILITY_ZONE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
335 335 | ::aws_smithy_schema::ShapeId::from_static(
|
336 336 | "com.amazonaws.ec2#CapacityReservation$AvailabilityZone",
|
337 337 | "com.amazonaws.ec2",
|
338 338 | "CapacityReservation",
|
339 339 | ),
|
340 340 | ::aws_smithy_schema::ShapeType::String,
|
341 - | "availability_zone",
|
341 + | "AvailabilityZone",
|
342 342 | 6,
|
343 343 | )
|
344 344 | .with_xml_name("availabilityZone");
|
345 345 | static CAPACITYRESERVATION_MEMBER_TENANCY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
346 346 | ::aws_smithy_schema::ShapeId::from_static(
|
347 347 | "com.amazonaws.ec2#CapacityReservation$Tenancy",
|
348 348 | "com.amazonaws.ec2",
|
349 349 | "CapacityReservation",
|
350 350 | ),
|
351 351 | ::aws_smithy_schema::ShapeType::String,
|
352 - | "tenancy",
|
352 + | "Tenancy",
|
353 353 | 7,
|
354 354 | )
|
355 355 | .with_xml_name("tenancy");
|
356 356 | static CAPACITYRESERVATION_MEMBER_TOTAL_INSTANCE_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
357 357 | ::aws_smithy_schema::ShapeId::from_static(
|
358 358 | "com.amazonaws.ec2#CapacityReservation$TotalInstanceCount",
|
359 359 | "com.amazonaws.ec2",
|
360 360 | "CapacityReservation",
|
361 361 | ),
|
362 362 | ::aws_smithy_schema::ShapeType::Integer,
|
363 - | "total_instance_count",
|
363 + | "TotalInstanceCount",
|
364 364 | 8,
|
365 365 | )
|
366 366 | .with_xml_name("totalInstanceCount");
|
367 367 | static CAPACITYRESERVATION_MEMBER_AVAILABLE_INSTANCE_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
368 368 | ::aws_smithy_schema::ShapeId::from_static(
|
369 369 | "com.amazonaws.ec2#CapacityReservation$AvailableInstanceCount",
|
370 370 | "com.amazonaws.ec2",
|
371 371 | "CapacityReservation",
|
372 372 | ),
|
373 373 | ::aws_smithy_schema::ShapeType::Integer,
|
374 - | "available_instance_count",
|
374 + | "AvailableInstanceCount",
|
375 375 | 9,
|
376 376 | )
|
377 377 | .with_xml_name("availableInstanceCount");
|
378 378 | static CAPACITYRESERVATION_MEMBER_EBS_OPTIMIZED: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
379 379 | ::aws_smithy_schema::ShapeId::from_static(
|
380 380 | "com.amazonaws.ec2#CapacityReservation$EbsOptimized",
|
381 381 | "com.amazonaws.ec2",
|
382 382 | "CapacityReservation",
|
383 383 | ),
|
384 384 | ::aws_smithy_schema::ShapeType::Boolean,
|
385 - | "ebs_optimized",
|
385 + | "EbsOptimized",
|
386 386 | 10,
|
387 387 | )
|
388 388 | .with_xml_name("ebsOptimized");
|
389 389 | static CAPACITYRESERVATION_MEMBER_EPHEMERAL_STORAGE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
390 390 | ::aws_smithy_schema::ShapeId::from_static(
|
391 391 | "com.amazonaws.ec2#CapacityReservation$EphemeralStorage",
|
392 392 | "com.amazonaws.ec2",
|
393 393 | "CapacityReservation",
|
394 394 | ),
|
395 395 | ::aws_smithy_schema::ShapeType::Boolean,
|
396 - | "ephemeral_storage",
|
396 + | "EphemeralStorage",
|
397 397 | 11,
|
398 398 | )
|
399 399 | .with_xml_name("ephemeralStorage");
|
400 400 | static CAPACITYRESERVATION_MEMBER_STATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
401 401 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#CapacityReservation$State", "com.amazonaws.ec2", "CapacityReservation"),
|
402 402 | ::aws_smithy_schema::ShapeType::String,
|
403 - | "state",
|
403 + | "State",
|
404 404 | 12,
|
405 405 | )
|
406 406 | .with_xml_name("state");
|
407 407 | static CAPACITYRESERVATION_MEMBER_START_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
408 408 | ::aws_smithy_schema::ShapeId::from_static(
|
409 409 | "com.amazonaws.ec2#CapacityReservation$StartDate",
|
410 410 | "com.amazonaws.ec2",
|
411 411 | "CapacityReservation",
|
412 412 | ),
|
413 413 | ::aws_smithy_schema::ShapeType::Timestamp,
|
414 - | "start_date",
|
414 + | "StartDate",
|
415 415 | 13,
|
416 416 | )
|
417 417 | .with_xml_name("startDate");
|
418 418 | static CAPACITYRESERVATION_MEMBER_END_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
419 419 | ::aws_smithy_schema::ShapeId::from_static(
|
420 420 | "com.amazonaws.ec2#CapacityReservation$EndDate",
|
421 421 | "com.amazonaws.ec2",
|
422 422 | "CapacityReservation",
|
423 423 | ),
|
424 424 | ::aws_smithy_schema::ShapeType::Timestamp,
|
425 - | "end_date",
|
425 + | "EndDate",
|
426 426 | 14,
|
427 427 | )
|
428 428 | .with_xml_name("endDate");
|
429 429 | static CAPACITYRESERVATION_MEMBER_END_DATE_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
430 430 | ::aws_smithy_schema::ShapeId::from_static(
|
431 431 | "com.amazonaws.ec2#CapacityReservation$EndDateType",
|
432 432 | "com.amazonaws.ec2",
|
433 433 | "CapacityReservation",
|
434 434 | ),
|
435 435 | ::aws_smithy_schema::ShapeType::String,
|
436 - | "end_date_type",
|
436 + | "EndDateType",
|
437 437 | 15,
|
438 438 | )
|
439 439 | .with_xml_name("endDateType");
|
440 440 | static CAPACITYRESERVATION_MEMBER_INSTANCE_MATCH_CRITERIA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
441 441 | ::aws_smithy_schema::ShapeId::from_static(
|
442 442 | "com.amazonaws.ec2#CapacityReservation$InstanceMatchCriteria",
|
443 443 | "com.amazonaws.ec2",
|
444 444 | "CapacityReservation",
|
445 445 | ),
|
446 446 | ::aws_smithy_schema::ShapeType::String,
|
447 - | "instance_match_criteria",
|
447 + | "InstanceMatchCriteria",
|
448 448 | 16,
|
449 449 | )
|
450 450 | .with_xml_name("instanceMatchCriteria");
|
451 451 | static CAPACITYRESERVATION_MEMBER_CREATE_DATE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
452 452 | ::aws_smithy_schema::ShapeId::from_static(
|
453 453 | "com.amazonaws.ec2#CapacityReservation$CreateDate",
|
454 454 | "com.amazonaws.ec2",
|
455 455 | "CapacityReservation",
|
456 456 | ),
|
457 457 | ::aws_smithy_schema::ShapeType::Timestamp,
|
458 - | "create_date",
|
458 + | "CreateDate",
|
459 459 | 17,
|
460 460 | )
|
461 461 | .with_xml_name("createDate");
|
462 462 | static CAPACITYRESERVATION_MEMBER_TAGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
463 463 | ::aws_smithy_schema::ShapeId::from_static("com.amazonaws.ec2#CapacityReservation$Tags", "com.amazonaws.ec2", "CapacityReservation"),
|
464 464 | ::aws_smithy_schema::ShapeType::List,
|
465 - | "tags",
|
465 + | "Tags",
|
466 466 | 18,
|
467 467 | )
|
468 468 | .with_xml_name("tagSet");
|
469 469 | static CAPACITYRESERVATION_MEMBER_OUTPOST_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
470 470 | ::aws_smithy_schema::ShapeId::from_static(
|
471 471 | "com.amazonaws.ec2#CapacityReservation$OutpostArn",
|
472 472 | "com.amazonaws.ec2",
|
473 473 | "CapacityReservation",
|
474 474 | ),
|
475 475 | ::aws_smithy_schema::ShapeType::String,
|
476 - | "outpost_arn",
|
476 + | "OutpostArn",
|
477 477 | 19,
|
478 478 | )
|
479 479 | .with_xml_name("outpostArn");
|
480 480 | static CAPACITYRESERVATION_MEMBER_CAPACITY_RESERVATION_FLEET_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
481 481 | ::aws_smithy_schema::ShapeId::from_static(
|
482 482 | "com.amazonaws.ec2#CapacityReservation$CapacityReservationFleetId",
|
483 483 | "com.amazonaws.ec2",
|
484 484 | "CapacityReservation",
|
485 485 | ),
|
486 486 | ::aws_smithy_schema::ShapeType::String,
|
487 - | "capacity_reservation_fleet_id",
|
487 + | "CapacityReservationFleetId",
|
488 488 | 20,
|
489 489 | )
|
490 490 | .with_xml_name("capacityReservationFleetId");
|
491 491 | static CAPACITYRESERVATION_MEMBER_PLACEMENT_GROUP_ARN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
492 492 | ::aws_smithy_schema::ShapeId::from_static(
|
493 493 | "com.amazonaws.ec2#CapacityReservation$PlacementGroupArn",
|
494 494 | "com.amazonaws.ec2",
|
495 495 | "CapacityReservation",
|
496 496 | ),
|
497 497 | ::aws_smithy_schema::ShapeType::String,
|
498 - | "placement_group_arn",
|
498 + | "PlacementGroupArn",
|
499 499 | 21,
|
500 500 | )
|
501 501 | .with_xml_name("placementGroupArn");
|
502 502 | static CAPACITYRESERVATION_MEMBER_CAPACITY_ALLOCATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
503 503 | ::aws_smithy_schema::ShapeId::from_static(
|
504 504 | "com.amazonaws.ec2#CapacityReservation$CapacityAllocations",
|
505 505 | "com.amazonaws.ec2",
|
506 506 | "CapacityReservation",
|
507 507 | ),
|
508 508 | ::aws_smithy_schema::ShapeType::List,
|
509 - | "capacity_allocations",
|
509 + | "CapacityAllocations",
|
510 510 | 22,
|
511 511 | )
|
512 512 | .with_xml_name("capacityAllocationSet");
|
513 513 | static CAPACITYRESERVATION_MEMBER_RESERVATION_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
514 514 | ::aws_smithy_schema::ShapeId::from_static(
|
515 515 | "com.amazonaws.ec2#CapacityReservation$ReservationType",
|
516 516 | "com.amazonaws.ec2",
|
517 517 | "CapacityReservation",
|
518 518 | ),
|
519 519 | ::aws_smithy_schema::ShapeType::String,
|
520 - | "reservation_type",
|
520 + | "ReservationType",
|
521 521 | 23,
|
522 522 | )
|
523 523 | .with_xml_name("reservationType");
|
524 524 | static CAPACITYRESERVATION_MEMBER_UNUSED_RESERVATION_BILLING_OWNER_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
525 525 | ::aws_smithy_schema::ShapeId::from_static(
|
526 526 | "com.amazonaws.ec2#CapacityReservation$UnusedReservationBillingOwnerId",
|
527 527 | "com.amazonaws.ec2",
|
528 528 | "CapacityReservation",
|
529 529 | ),
|
530 530 | ::aws_smithy_schema::ShapeType::String,
|
531 - | "unused_reservation_billing_owner_id",
|
531 + | "UnusedReservationBillingOwnerId",
|
532 532 | 24,
|
533 533 | )
|
534 534 | .with_xml_name("unusedReservationBillingOwnerId");
|
535 535 | static CAPACITYRESERVATION_MEMBER_COMMITMENT_INFO: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
536 536 | ::aws_smithy_schema::ShapeId::from_static(
|
537 537 | "com.amazonaws.ec2#CapacityReservation$CommitmentInfo",
|
538 538 | "com.amazonaws.ec2",
|
539 539 | "CapacityReservation",
|
540 540 | ),
|
541 541 | ::aws_smithy_schema::ShapeType::Structure,
|
542 - | "commitment_info",
|
542 + | "CommitmentInfo",
|
543 543 | 25,
|
544 544 | )
|
545 545 | .with_xml_name("commitmentInfo");
|
546 546 | static CAPACITYRESERVATION_MEMBER_DELIVERY_PREFERENCE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
547 547 | ::aws_smithy_schema::ShapeId::from_static(
|
548 548 | "com.amazonaws.ec2#CapacityReservation$DeliveryPreference",
|
549 549 | "com.amazonaws.ec2",
|
550 550 | "CapacityReservation",
|
551 551 | ),
|
552 552 | ::aws_smithy_schema::ShapeType::String,
|
553 - | "delivery_preference",
|
553 + | "DeliveryPreference",
|
554 554 | 26,
|
555 555 | )
|
556 556 | .with_xml_name("deliveryPreference");
|
557 557 | static CAPACITYRESERVATION_MEMBER_CAPACITY_BLOCK_ID: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
558 558 | ::aws_smithy_schema::ShapeId::from_static(
|
559 559 | "com.amazonaws.ec2#CapacityReservation$CapacityBlockId",
|
560 560 | "com.amazonaws.ec2",
|
561 561 | "CapacityReservation",
|
562 562 | ),
|
563 563 | ::aws_smithy_schema::ShapeType::String,
|
564 - | "capacity_block_id",
|
564 + | "CapacityBlockId",
|
565 565 | 27,
|
566 566 | )
|
567 567 | .with_xml_name("capacityBlockId");
|
568 568 | static CAPACITYRESERVATION_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
569 569 | CAPACITYRESERVATION_SCHEMA_ID,
|
570 570 | ::aws_smithy_schema::ShapeType::Structure,
|
571 571 | &[
|
572 572 | &CAPACITYRESERVATION_MEMBER_CAPACITY_RESERVATION_ID,
|
573 573 | &CAPACITYRESERVATION_MEMBER_OWNER_ID,
|
574 574 | &CAPACITYRESERVATION_MEMBER_CAPACITY_RESERVATION_ARN,
|
707 707 | ser.write_string(&CAPACITYRESERVATION_MEMBER_DELIVERY_PREFERENCE, val.as_str())?;
|
708 708 | }
|
709 709 | if let Some(ref val) = self.capacity_block_id {
|
710 710 | ser.write_string(&CAPACITYRESERVATION_MEMBER_CAPACITY_BLOCK_ID, val)?;
|
711 711 | }
|
712 712 | Ok(())
|
713 713 | }
|
714 714 | }
|
715 715 | impl CapacityReservation {
|
716 716 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
717 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
718 - | deserializer: &mut D,
|
717 + | pub fn deserialize(
|
718 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
719 719 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
720 720 | #[allow(unused_variables, unused_mut)]
|
721 721 | let mut builder = Self::builder();
|
722 722 | #[allow(
|
723 723 | unused_variables,
|
724 724 | unreachable_code,
|
725 725 | clippy::single_match,
|
726 726 | clippy::match_single_binding,
|
727 727 | clippy::diverging_sub_expression
|
728 728 | )]
|
729 - | deserializer.read_struct(&CAPACITYRESERVATION_SCHEMA, (), |_, member, deser| {
|
729 + | deserializer.read_struct(&CAPACITYRESERVATION_SCHEMA, &mut |member, deser| {
|
730 730 | match member.member_index() {
|
731 731 | Some(0) => {
|
732 732 | builder.capacity_reservation_id = Some(deser.read_string(member)?);
|
733 733 | }
|
734 734 | Some(1) => {
|
735 735 | builder.owner_id = Some(deser.read_string(member)?);
|
736 736 | }
|
737 737 | Some(2) => {
|
738 738 | builder.capacity_reservation_arn = Some(deser.read_string(member)?);
|
739 739 | }
|
740 740 | Some(3) => {
|
741 741 | builder.availability_zone_id = Some(deser.read_string(member)?);
|
742 742 | }
|
743 743 | Some(4) => {
|
744 744 | builder.instance_type = Some(deser.read_string(member)?);
|
745 745 | }
|
746 746 | Some(5) => {
|
747 747 | builder.instance_platform = Some(crate::types::CapacityReservationInstancePlatform::from(
|
748 748 | deser.read_string(member)?.as_str(),
|
749 749 | ));
|
750 750 | }
|
751 751 | Some(6) => {
|
752 752 | builder.availability_zone = Some(deser.read_string(member)?);
|
753 753 | }
|
754 754 | Some(7) => {
|
755 755 | builder.tenancy = Some(crate::types::CapacityReservationTenancy::from(deser.read_string(member)?.as_str()));
|
756 756 | }
|
757 757 | Some(8) => {
|
758 758 | builder.total_instance_count = Some(deser.read_integer(member)?);
|
759 759 | }
|
760 760 | Some(9) => {
|
761 761 | builder.available_instance_count = Some(deser.read_integer(member)?);
|
762 762 | }
|
763 763 | Some(10) => {
|
764 764 | builder.ebs_optimized = Some(deser.read_boolean(member)?);
|
765 765 | }
|
766 766 | Some(11) => {
|
767 767 | builder.ephemeral_storage = Some(deser.read_boolean(member)?);
|
768 768 | }
|
769 769 | Some(12) => {
|
770 770 | builder.state = Some(crate::types::CapacityReservationState::from(deser.read_string(member)?.as_str()));
|
771 771 | }
|
772 772 | Some(13) => {
|
773 773 | builder.start_date = Some(deser.read_timestamp(member)?);
|
774 774 | }
|
775 775 | Some(14) => {
|
776 776 | builder.end_date = Some(deser.read_timestamp(member)?);
|
777 777 | }
|
778 778 | Some(15) => {
|
779 779 | builder.end_date_type = Some(crate::types::EndDateType::from(deser.read_string(member)?.as_str()));
|
780 780 | }
|
781 781 | Some(16) => {
|
782 782 | builder.instance_match_criteria = Some(crate::types::InstanceMatchCriteria::from(deser.read_string(member)?.as_str()));
|
783 783 | }
|
784 784 | Some(17) => {
|
785 785 | builder.create_date = Some(deser.read_timestamp(member)?);
|
786 786 | }
|
787 787 | Some(18) => {
|
788 788 | builder.tags = Some({
|
789 - | let container = if let Some(cap) = deser.container_size() {
|
790 - | Vec::with_capacity(cap)
|
791 - | } else {
|
792 - | Vec::new()
|
793 - | };
|
794 - | deser.read_list(member, container, |mut list, deser| {
|
795 - | list.push(crate::types::Tag::deserialize(deser)?);
|
796 - | Ok(list)
|
797 - | })?
|
789 + | let mut container = Vec::new();
|
790 + | deser.read_list(member, &mut |deser| {
|
791 + | container.push(crate::types::Tag::deserialize(deser)?);
|
792 + | Ok(())
|
793 + | })?;
|
794 + | container
|
798 795 | });
|
799 796 | }
|
800 797 | Some(19) => {
|
801 798 | builder.outpost_arn = Some(deser.read_string(member)?);
|
802 799 | }
|
803 800 | Some(20) => {
|
804 801 | builder.capacity_reservation_fleet_id = Some(deser.read_string(member)?);
|
805 802 | }
|
806 803 | Some(21) => {
|
807 804 | builder.placement_group_arn = Some(deser.read_string(member)?);
|
808 805 | }
|
809 806 | Some(22) => {
|
810 807 | builder.capacity_allocations = Some({
|
811 - | let container = if let Some(cap) = deser.container_size() {
|
812 - | Vec::with_capacity(cap)
|
813 - | } else {
|
814 - | Vec::new()
|
815 - | };
|
816 - | deser.read_list(member, container, |mut list, deser| {
|
817 - | list.push(crate::types::CapacityAllocation::deserialize(deser)?);
|
818 - | Ok(list)
|
819 - | })?
|
808 + | let mut container = Vec::new();
|
809 + | deser.read_list(member, &mut |deser| {
|
810 + | container.push(crate::types::CapacityAllocation::deserialize(deser)?);
|
811 + | Ok(())
|
812 + | })?;
|
813 + | container
|
820 814 | });
|
821 815 | }
|
822 816 | Some(23) => {
|
823 817 | builder.reservation_type = Some(crate::types::CapacityReservationType::from(deser.read_string(member)?.as_str()));
|
824 818 | }
|
825 819 | Some(24) => {
|
826 820 | builder.unused_reservation_billing_owner_id = Some(deser.read_string(member)?);
|
827 821 | }
|
828 822 | Some(25) => {
|
829 823 | builder.commitment_info = Some(crate::types::CapacityReservationCommitmentInfo::deserialize(deser)?);
|
830 824 | }
|
831 825 | Some(26) => {
|
832 826 | builder.delivery_preference = Some(crate::types::CapacityReservationDeliveryPreference::from(
|
833 827 | deser.read_string(member)?.as_str(),
|
834 828 | ));
|
835 829 | }
|
836 830 | Some(27) => {
|
837 831 | builder.capacity_block_id = Some(deser.read_string(member)?);
|
838 832 | }
|
839 833 | _ => {}
|
840 834 | }
|
841 835 | Ok(())
|
842 836 | })?;
|
843 837 | Ok(builder.build())
|
844 838 | }
|
845 839 | }
|
840 + | impl CapacityReservation {
|
841 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
842 + | pub fn deserialize_with_response(
|
843 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
844 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
845 + | _status: u16,
|
846 + | _body: &[u8],
|
847 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
848 + | Self::deserialize(deserializer)
|
849 + | }
|
850 + | }
|
846 851 | impl CapacityReservation {
|
847 852 | /// Creates a new builder-style object to manufacture [`CapacityReservation`](crate::types::CapacityReservation).
|
848 853 | pub fn builder() -> crate::types::builders::CapacityReservationBuilder {
|
849 854 | crate::types::builders::CapacityReservationBuilder::default()
|
850 855 | }
|
851 856 | }
|
852 857 |
|
853 858 | /// A builder for [`CapacityReservation`](crate::types::CapacityReservation).
|
854 859 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
855 860 | #[non_exhaustive]
|