258 258 | "com.amazonaws.ec2",
|
259 259 | "SpotFleetRequestConfigData",
|
260 260 | );
|
261 261 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_ALLOCATION_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
262 262 | ::aws_smithy_schema::ShapeId::from_static(
|
263 263 | "com.amazonaws.ec2#SpotFleetRequestConfigData$AllocationStrategy",
|
264 264 | "com.amazonaws.ec2",
|
265 265 | "SpotFleetRequestConfigData",
|
266 266 | ),
|
267 267 | ::aws_smithy_schema::ShapeType::String,
|
268 - | "allocation_strategy",
|
268 + | "AllocationStrategy",
|
269 269 | 0,
|
270 270 | )
|
271 271 | .with_xml_name("allocationStrategy");
|
272 272 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_ON_DEMAND_ALLOCATION_STRATEGY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
273 273 | ::aws_smithy_schema::ShapeId::from_static(
|
274 274 | "com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandAllocationStrategy",
|
275 275 | "com.amazonaws.ec2",
|
276 276 | "SpotFleetRequestConfigData",
|
277 277 | ),
|
278 278 | ::aws_smithy_schema::ShapeType::String,
|
279 - | "on_demand_allocation_strategy",
|
279 + | "OnDemandAllocationStrategy",
|
280 280 | 1,
|
281 281 | )
|
282 282 | .with_xml_name("onDemandAllocationStrategy");
|
283 283 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_SPOT_MAINTENANCE_STRATEGIES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
284 284 | ::aws_smithy_schema::ShapeId::from_static(
|
285 285 | "com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaintenanceStrategies",
|
286 286 | "com.amazonaws.ec2",
|
287 287 | "SpotFleetRequestConfigData",
|
288 288 | ),
|
289 289 | ::aws_smithy_schema::ShapeType::Structure,
|
290 - | "spot_maintenance_strategies",
|
290 + | "SpotMaintenanceStrategies",
|
291 291 | 2,
|
292 292 | )
|
293 293 | .with_xml_name("spotMaintenanceStrategies");
|
294 294 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_CLIENT_TOKEN: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
295 295 | ::aws_smithy_schema::ShapeId::from_static(
|
296 296 | "com.amazonaws.ec2#SpotFleetRequestConfigData$ClientToken",
|
297 297 | "com.amazonaws.ec2",
|
298 298 | "SpotFleetRequestConfigData",
|
299 299 | ),
|
300 300 | ::aws_smithy_schema::ShapeType::String,
|
301 - | "client_token",
|
301 + | "ClientToken",
|
302 302 | 3,
|
303 303 | )
|
304 304 | .with_xml_name("clientToken");
|
305 305 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_EXCESS_CAPACITY_TERMINATION_POLICY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
306 306 | ::aws_smithy_schema::ShapeId::from_static(
|
307 307 | "com.amazonaws.ec2#SpotFleetRequestConfigData$ExcessCapacityTerminationPolicy",
|
308 308 | "com.amazonaws.ec2",
|
309 309 | "SpotFleetRequestConfigData",
|
310 310 | ),
|
311 311 | ::aws_smithy_schema::ShapeType::String,
|
312 - | "excess_capacity_termination_policy",
|
312 + | "ExcessCapacityTerminationPolicy",
|
313 313 | 4,
|
314 314 | )
|
315 315 | .with_xml_name("excessCapacityTerminationPolicy");
|
316 316 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_FULFILLED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
317 317 | ::aws_smithy_schema::ShapeId::from_static(
|
318 318 | "com.amazonaws.ec2#SpotFleetRequestConfigData$FulfilledCapacity",
|
319 319 | "com.amazonaws.ec2",
|
320 320 | "SpotFleetRequestConfigData",
|
321 321 | ),
|
322 322 | ::aws_smithy_schema::ShapeType::Double,
|
323 - | "fulfilled_capacity",
|
323 + | "FulfilledCapacity",
|
324 324 | 5,
|
325 325 | )
|
326 326 | .with_xml_name("fulfilledCapacity");
|
327 327 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_ON_DEMAND_FULFILLED_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
328 328 | ::aws_smithy_schema::ShapeId::from_static(
|
329 329 | "com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandFulfilledCapacity",
|
330 330 | "com.amazonaws.ec2",
|
331 331 | "SpotFleetRequestConfigData",
|
332 332 | ),
|
333 333 | ::aws_smithy_schema::ShapeType::Double,
|
334 - | "on_demand_fulfilled_capacity",
|
334 + | "OnDemandFulfilledCapacity",
|
335 335 | 6,
|
336 336 | )
|
337 337 | .with_xml_name("onDemandFulfilledCapacity");
|
338 338 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_IAM_FLEET_ROLE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
339 339 | ::aws_smithy_schema::ShapeId::from_static(
|
340 340 | "com.amazonaws.ec2#SpotFleetRequestConfigData$IamFleetRole",
|
341 341 | "com.amazonaws.ec2",
|
342 342 | "SpotFleetRequestConfigData",
|
343 343 | ),
|
344 344 | ::aws_smithy_schema::ShapeType::String,
|
345 - | "iam_fleet_role",
|
345 + | "IamFleetRole",
|
346 346 | 7,
|
347 347 | )
|
348 348 | .with_xml_name("iamFleetRole");
|
349 349 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_LAUNCH_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
350 350 | ::aws_smithy_schema::ShapeId::from_static(
|
351 351 | "com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchSpecifications",
|
352 352 | "com.amazonaws.ec2",
|
353 353 | "SpotFleetRequestConfigData",
|
354 354 | ),
|
355 355 | ::aws_smithy_schema::ShapeType::List,
|
356 - | "launch_specifications",
|
356 + | "LaunchSpecifications",
|
357 357 | 8,
|
358 358 | )
|
359 359 | .with_xml_name("launchSpecifications");
|
360 360 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_LAUNCH_TEMPLATE_CONFIGS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
361 361 | ::aws_smithy_schema::ShapeId::from_static(
|
362 362 | "com.amazonaws.ec2#SpotFleetRequestConfigData$LaunchTemplateConfigs",
|
363 363 | "com.amazonaws.ec2",
|
364 364 | "SpotFleetRequestConfigData",
|
365 365 | ),
|
366 366 | ::aws_smithy_schema::ShapeType::List,
|
367 - | "launch_template_configs",
|
367 + | "LaunchTemplateConfigs",
|
368 368 | 9,
|
369 369 | )
|
370 370 | .with_xml_name("launchTemplateConfigs");
|
371 371 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_SPOT_PRICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
372 372 | ::aws_smithy_schema::ShapeId::from_static(
|
373 373 | "com.amazonaws.ec2#SpotFleetRequestConfigData$SpotPrice",
|
374 374 | "com.amazonaws.ec2",
|
375 375 | "SpotFleetRequestConfigData",
|
376 376 | ),
|
377 377 | ::aws_smithy_schema::ShapeType::String,
|
378 - | "spot_price",
|
378 + | "SpotPrice",
|
379 379 | 10,
|
380 380 | )
|
381 381 | .with_xml_name("spotPrice");
|
382 382 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_TARGET_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
383 383 | ::aws_smithy_schema::ShapeId::from_static(
|
384 384 | "com.amazonaws.ec2#SpotFleetRequestConfigData$TargetCapacity",
|
385 385 | "com.amazonaws.ec2",
|
386 386 | "SpotFleetRequestConfigData",
|
387 387 | ),
|
388 388 | ::aws_smithy_schema::ShapeType::Integer,
|
389 - | "target_capacity",
|
389 + | "TargetCapacity",
|
390 390 | 11,
|
391 391 | )
|
392 392 | .with_xml_name("targetCapacity");
|
393 393 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_ON_DEMAND_TARGET_CAPACITY: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
394 394 | ::aws_smithy_schema::ShapeId::from_static(
|
395 395 | "com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandTargetCapacity",
|
396 396 | "com.amazonaws.ec2",
|
397 397 | "SpotFleetRequestConfigData",
|
398 398 | ),
|
399 399 | ::aws_smithy_schema::ShapeType::Integer,
|
400 - | "on_demand_target_capacity",
|
400 + | "OnDemandTargetCapacity",
|
401 401 | 12,
|
402 402 | )
|
403 403 | .with_xml_name("onDemandTargetCapacity");
|
404 404 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_ON_DEMAND_MAX_TOTAL_PRICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
405 405 | ::aws_smithy_schema::ShapeId::from_static(
|
406 406 | "com.amazonaws.ec2#SpotFleetRequestConfigData$OnDemandMaxTotalPrice",
|
407 407 | "com.amazonaws.ec2",
|
408 408 | "SpotFleetRequestConfigData",
|
409 409 | ),
|
410 410 | ::aws_smithy_schema::ShapeType::String,
|
411 - | "on_demand_max_total_price",
|
411 + | "OnDemandMaxTotalPrice",
|
412 412 | 13,
|
413 413 | )
|
414 414 | .with_xml_name("onDemandMaxTotalPrice");
|
415 415 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_SPOT_MAX_TOTAL_PRICE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
416 416 | ::aws_smithy_schema::ShapeId::from_static(
|
417 417 | "com.amazonaws.ec2#SpotFleetRequestConfigData$SpotMaxTotalPrice",
|
418 418 | "com.amazonaws.ec2",
|
419 419 | "SpotFleetRequestConfigData",
|
420 420 | ),
|
421 421 | ::aws_smithy_schema::ShapeType::String,
|
422 - | "spot_max_total_price",
|
422 + | "SpotMaxTotalPrice",
|
423 423 | 14,
|
424 424 | )
|
425 425 | .with_xml_name("spotMaxTotalPrice");
|
426 426 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_TERMINATE_INSTANCES_WITH_EXPIRATION: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
427 427 | ::aws_smithy_schema::ShapeId::from_static(
|
428 428 | "com.amazonaws.ec2#SpotFleetRequestConfigData$TerminateInstancesWithExpiration",
|
429 429 | "com.amazonaws.ec2",
|
430 430 | "SpotFleetRequestConfigData",
|
431 431 | ),
|
432 432 | ::aws_smithy_schema::ShapeType::Boolean,
|
433 - | "terminate_instances_with_expiration",
|
433 + | "TerminateInstancesWithExpiration",
|
434 434 | 15,
|
435 435 | )
|
436 436 | .with_xml_name("terminateInstancesWithExpiration");
|
437 437 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
438 438 | ::aws_smithy_schema::ShapeId::from_static(
|
439 439 | "com.amazonaws.ec2#SpotFleetRequestConfigData$Type",
|
440 440 | "com.amazonaws.ec2",
|
441 441 | "SpotFleetRequestConfigData",
|
442 442 | ),
|
443 443 | ::aws_smithy_schema::ShapeType::String,
|
444 - | "r##type",
|
444 + | "Type",
|
445 445 | 16,
|
446 446 | )
|
447 447 | .with_xml_name("type");
|
448 448 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_VALID_FROM: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
449 449 | ::aws_smithy_schema::ShapeId::from_static(
|
450 450 | "com.amazonaws.ec2#SpotFleetRequestConfigData$ValidFrom",
|
451 451 | "com.amazonaws.ec2",
|
452 452 | "SpotFleetRequestConfigData",
|
453 453 | ),
|
454 454 | ::aws_smithy_schema::ShapeType::Timestamp,
|
455 - | "valid_from",
|
455 + | "ValidFrom",
|
456 456 | 17,
|
457 457 | )
|
458 458 | .with_xml_name("validFrom");
|
459 459 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_VALID_UNTIL: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
460 460 | ::aws_smithy_schema::ShapeId::from_static(
|
461 461 | "com.amazonaws.ec2#SpotFleetRequestConfigData$ValidUntil",
|
462 462 | "com.amazonaws.ec2",
|
463 463 | "SpotFleetRequestConfigData",
|
464 464 | ),
|
465 465 | ::aws_smithy_schema::ShapeType::Timestamp,
|
466 - | "valid_until",
|
466 + | "ValidUntil",
|
467 467 | 18,
|
468 468 | )
|
469 469 | .with_xml_name("validUntil");
|
470 470 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_REPLACE_UNHEALTHY_INSTANCES: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
471 471 | ::aws_smithy_schema::ShapeId::from_static(
|
472 472 | "com.amazonaws.ec2#SpotFleetRequestConfigData$ReplaceUnhealthyInstances",
|
473 473 | "com.amazonaws.ec2",
|
474 474 | "SpotFleetRequestConfigData",
|
475 475 | ),
|
476 476 | ::aws_smithy_schema::ShapeType::Boolean,
|
477 - | "replace_unhealthy_instances",
|
477 + | "ReplaceUnhealthyInstances",
|
478 478 | 19,
|
479 479 | )
|
480 480 | .with_xml_name("replaceUnhealthyInstances");
|
481 481 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_INSTANCE_INTERRUPTION_BEHAVIOR: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
482 482 | ::aws_smithy_schema::ShapeId::from_static(
|
483 483 | "com.amazonaws.ec2#SpotFleetRequestConfigData$InstanceInterruptionBehavior",
|
484 484 | "com.amazonaws.ec2",
|
485 485 | "SpotFleetRequestConfigData",
|
486 486 | ),
|
487 487 | ::aws_smithy_schema::ShapeType::String,
|
488 - | "instance_interruption_behavior",
|
488 + | "InstanceInterruptionBehavior",
|
489 489 | 20,
|
490 490 | )
|
491 491 | .with_xml_name("instanceInterruptionBehavior");
|
492 492 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_LOAD_BALANCERS_CONFIG: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
493 493 | ::aws_smithy_schema::ShapeId::from_static(
|
494 494 | "com.amazonaws.ec2#SpotFleetRequestConfigData$LoadBalancersConfig",
|
495 495 | "com.amazonaws.ec2",
|
496 496 | "SpotFleetRequestConfigData",
|
497 497 | ),
|
498 498 | ::aws_smithy_schema::ShapeType::Structure,
|
499 - | "load_balancers_config",
|
499 + | "LoadBalancersConfig",
|
500 500 | 21,
|
501 501 | )
|
502 502 | .with_xml_name("loadBalancersConfig");
|
503 503 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_INSTANCE_POOLS_TO_USE_COUNT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
504 504 | ::aws_smithy_schema::ShapeId::from_static(
|
505 505 | "com.amazonaws.ec2#SpotFleetRequestConfigData$InstancePoolsToUseCount",
|
506 506 | "com.amazonaws.ec2",
|
507 507 | "SpotFleetRequestConfigData",
|
508 508 | ),
|
509 509 | ::aws_smithy_schema::ShapeType::Integer,
|
510 - | "instance_pools_to_use_count",
|
510 + | "InstancePoolsToUseCount",
|
511 511 | 22,
|
512 512 | )
|
513 513 | .with_xml_name("instancePoolsToUseCount");
|
514 514 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_CONTEXT: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
515 515 | ::aws_smithy_schema::ShapeId::from_static(
|
516 516 | "com.amazonaws.ec2#SpotFleetRequestConfigData$Context",
|
517 517 | "com.amazonaws.ec2",
|
518 518 | "SpotFleetRequestConfigData",
|
519 519 | ),
|
520 520 | ::aws_smithy_schema::ShapeType::String,
|
521 - | "context",
|
521 + | "Context",
|
522 522 | 23,
|
523 523 | )
|
524 524 | .with_xml_name("context");
|
525 525 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_TARGET_CAPACITY_UNIT_TYPE: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
526 526 | ::aws_smithy_schema::ShapeId::from_static(
|
527 527 | "com.amazonaws.ec2#SpotFleetRequestConfigData$TargetCapacityUnitType",
|
528 528 | "com.amazonaws.ec2",
|
529 529 | "SpotFleetRequestConfigData",
|
530 530 | ),
|
531 531 | ::aws_smithy_schema::ShapeType::String,
|
532 - | "target_capacity_unit_type",
|
532 + | "TargetCapacityUnitType",
|
533 533 | 24,
|
534 534 | )
|
535 535 | .with_xml_name("targetCapacityUnitType");
|
536 536 | static SPOTFLEETREQUESTCONFIGDATA_MEMBER_TAG_SPECIFICATIONS: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_member(
|
537 537 | ::aws_smithy_schema::ShapeId::from_static(
|
538 538 | "com.amazonaws.ec2#SpotFleetRequestConfigData$TagSpecifications",
|
539 539 | "com.amazonaws.ec2",
|
540 540 | "SpotFleetRequestConfigData",
|
541 541 | ),
|
542 542 | ::aws_smithy_schema::ShapeType::List,
|
543 - | "tag_specifications",
|
543 + | "TagSpecifications",
|
544 544 | 25,
|
545 545 | )
|
546 546 | .with_xml_name("TagSpecification");
|
547 547 | static SPOTFLEETREQUESTCONFIGDATA_SCHEMA: ::aws_smithy_schema::Schema = ::aws_smithy_schema::Schema::new_struct(
|
548 548 | SPOTFLEETREQUESTCONFIGDATA_SCHEMA_ID,
|
549 549 | ::aws_smithy_schema::ShapeType::Structure,
|
550 550 | &[
|
551 551 | &SPOTFLEETREQUESTCONFIGDATA_MEMBER_ALLOCATION_STRATEGY,
|
552 552 | &SPOTFLEETREQUESTCONFIGDATA_MEMBER_ON_DEMAND_ALLOCATION_STRATEGY,
|
553 553 | &SPOTFLEETREQUESTCONFIGDATA_MEMBER_SPOT_MAINTENANCE_STRATEGIES,
|
686 686 | }
|
687 687 | Ok(())
|
688 688 | },
|
689 689 | )?;
|
690 690 | }
|
691 691 | Ok(())
|
692 692 | }
|
693 693 | }
|
694 694 | impl SpotFleetRequestConfigData {
|
695 695 | /// Deserializes this structure from a [`ShapeDeserializer`].
|
696 - | pub fn deserialize<D: ::aws_smithy_schema::serde::ShapeDeserializer>(
|
697 - | deserializer: &mut D,
|
696 + | pub fn deserialize(
|
697 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
698 698 | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
699 699 | #[allow(unused_variables, unused_mut)]
|
700 700 | let mut builder = Self::builder();
|
701 701 | #[allow(
|
702 702 | unused_variables,
|
703 703 | unreachable_code,
|
704 704 | clippy::single_match,
|
705 705 | clippy::match_single_binding,
|
706 706 | clippy::diverging_sub_expression
|
707 707 | )]
|
708 - | deserializer.read_struct(&SPOTFLEETREQUESTCONFIGDATA_SCHEMA, (), |_, member, deser| {
|
708 + | deserializer.read_struct(&SPOTFLEETREQUESTCONFIGDATA_SCHEMA, &mut |member, deser| {
|
709 709 | match member.member_index() {
|
710 710 | Some(0) => {
|
711 711 | builder.allocation_strategy = Some(crate::types::AllocationStrategy::from(deser.read_string(member)?.as_str()));
|
712 712 | }
|
713 713 | Some(1) => {
|
714 714 | builder.on_demand_allocation_strategy = Some(crate::types::OnDemandAllocationStrategy::from(deser.read_string(member)?.as_str()));
|
715 715 | }
|
716 716 | Some(2) => {
|
717 717 | builder.spot_maintenance_strategies = Some(crate::types::SpotMaintenanceStrategies::deserialize(deser)?);
|
718 718 | }
|
719 719 | Some(3) => {
|
720 720 | builder.client_token = Some(deser.read_string(member)?);
|
721 721 | }
|
722 722 | Some(4) => {
|
723 723 | builder.excess_capacity_termination_policy =
|
724 724 | Some(crate::types::ExcessCapacityTerminationPolicy::from(deser.read_string(member)?.as_str()));
|
725 725 | }
|
726 726 | Some(5) => {
|
727 727 | builder.fulfilled_capacity = Some(deser.read_double(member)?);
|
728 728 | }
|
729 729 | Some(6) => {
|
730 730 | builder.on_demand_fulfilled_capacity = Some(deser.read_double(member)?);
|
731 731 | }
|
732 732 | Some(7) => {
|
733 733 | builder.iam_fleet_role = Some(deser.read_string(member)?);
|
734 734 | }
|
735 735 | Some(8) => {
|
736 736 | builder.launch_specifications = Some({
|
737 - | let container = if let Some(cap) = deser.container_size() {
|
738 - | Vec::with_capacity(cap)
|
739 - | } else {
|
740 - | Vec::new()
|
741 - | };
|
742 - | deser.read_list(member, container, |mut list, deser| {
|
743 - | list.push(crate::types::SpotFleetLaunchSpecification::deserialize(deser)?);
|
744 - | Ok(list)
|
745 - | })?
|
737 + | let mut container = Vec::new();
|
738 + | deser.read_list(member, &mut |deser| {
|
739 + | container.push(crate::types::SpotFleetLaunchSpecification::deserialize(deser)?);
|
740 + | Ok(())
|
741 + | })?;
|
742 + | container
|
746 743 | });
|
747 744 | }
|
748 745 | Some(9) => {
|
749 746 | builder.launch_template_configs = Some({
|
750 - | let container = if let Some(cap) = deser.container_size() {
|
751 - | Vec::with_capacity(cap)
|
752 - | } else {
|
753 - | Vec::new()
|
754 - | };
|
755 - | deser.read_list(member, container, |mut list, deser| {
|
756 - | list.push(crate::types::LaunchTemplateConfig::deserialize(deser)?);
|
757 - | Ok(list)
|
758 - | })?
|
747 + | let mut container = Vec::new();
|
748 + | deser.read_list(member, &mut |deser| {
|
749 + | container.push(crate::types::LaunchTemplateConfig::deserialize(deser)?);
|
750 + | Ok(())
|
751 + | })?;
|
752 + | container
|
759 753 | });
|
760 754 | }
|
761 755 | Some(10) => {
|
762 756 | builder.spot_price = Some(deser.read_string(member)?);
|
763 757 | }
|
764 758 | Some(11) => {
|
765 759 | builder.target_capacity = Some(deser.read_integer(member)?);
|
766 760 | }
|
767 761 | Some(12) => {
|
768 762 | builder.on_demand_target_capacity = Some(deser.read_integer(member)?);
|
769 763 | }
|
770 764 | Some(13) => {
|
771 765 | builder.on_demand_max_total_price = Some(deser.read_string(member)?);
|
772 766 | }
|
773 767 | Some(14) => {
|
774 768 | builder.spot_max_total_price = Some(deser.read_string(member)?);
|
775 769 | }
|
776 770 | Some(15) => {
|
777 771 | builder.terminate_instances_with_expiration = Some(deser.read_boolean(member)?);
|
778 772 | }
|
779 773 | Some(16) => {
|
780 774 | builder.r#type = Some(crate::types::FleetType::from(deser.read_string(member)?.as_str()));
|
781 775 | }
|
782 776 | Some(17) => {
|
783 777 | builder.valid_from = Some(deser.read_timestamp(member)?);
|
784 778 | }
|
785 779 | Some(18) => {
|
786 780 | builder.valid_until = Some(deser.read_timestamp(member)?);
|
787 781 | }
|
788 782 | Some(19) => {
|
789 783 | builder.replace_unhealthy_instances = Some(deser.read_boolean(member)?);
|
790 784 | }
|
791 785 | Some(20) => {
|
792 786 | builder.instance_interruption_behavior =
|
793 787 | Some(crate::types::InstanceInterruptionBehavior::from(deser.read_string(member)?.as_str()));
|
794 788 | }
|
795 789 | Some(21) => {
|
796 790 | builder.load_balancers_config = Some(crate::types::LoadBalancersConfig::deserialize(deser)?);
|
797 791 | }
|
798 792 | Some(22) => {
|
799 793 | builder.instance_pools_to_use_count = Some(deser.read_integer(member)?);
|
800 794 | }
|
801 795 | Some(23) => {
|
802 796 | builder.context = Some(deser.read_string(member)?);
|
803 797 | }
|
804 798 | Some(24) => {
|
805 799 | builder.target_capacity_unit_type = Some(crate::types::TargetCapacityUnitType::from(deser.read_string(member)?.as_str()));
|
806 800 | }
|
807 801 | Some(25) => {
|
808 802 | builder.tag_specifications = Some({
|
809 - | let container = if let Some(cap) = deser.container_size() {
|
810 - | Vec::with_capacity(cap)
|
811 - | } else {
|
812 - | Vec::new()
|
813 - | };
|
814 - | deser.read_list(member, container, |mut list, deser| {
|
815 - | list.push(crate::types::TagSpecification::deserialize(deser)?);
|
816 - | Ok(list)
|
817 - | })?
|
803 + | let mut container = Vec::new();
|
804 + | deser.read_list(member, &mut |deser| {
|
805 + | container.push(crate::types::TagSpecification::deserialize(deser)?);
|
806 + | Ok(())
|
807 + | })?;
|
808 + | container
|
818 809 | });
|
819 810 | }
|
820 811 | _ => {}
|
821 812 | }
|
822 813 | Ok(())
|
823 814 | })?;
|
824 815 | Ok(builder.build())
|
825 816 | }
|
826 817 | }
|
818 + | impl SpotFleetRequestConfigData {
|
819 + | /// Deserializes this structure from a body deserializer and HTTP response.
|
820 + | pub fn deserialize_with_response(
|
821 + | deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
|
822 + | _headers: &::aws_smithy_runtime_api::http::Headers,
|
823 + | _status: u16,
|
824 + | _body: &[u8],
|
825 + | ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
|
826 + | Self::deserialize(deserializer)
|
827 + | }
|
828 + | }
|
827 829 | impl SpotFleetRequestConfigData {
|
828 830 | /// Creates a new builder-style object to manufacture [`SpotFleetRequestConfigData`](crate::types::SpotFleetRequestConfigData).
|
829 831 | pub fn builder() -> crate::types::builders::SpotFleetRequestConfigDataBuilder {
|
830 832 | crate::types::builders::SpotFleetRequestConfigDataBuilder::default()
|
831 833 | }
|
832 834 | }
|
833 835 |
|
834 836 | /// A builder for [`SpotFleetRequestConfigData`](crate::types::SpotFleetRequestConfigData).
|
835 837 | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
836 838 | #[non_exhaustive]
|