#[non_exhaustive]
pub enum CapacityReservationPreference {
None,
Open,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against CapacityReservationPreference
, it is important to ensure
your code is forward-compatible. That is, if a match arm handles a case for a
feature that is supported by the service but has not been represented as an enum
variant in a current version of SDK, your code should continue to work when you
upgrade SDK to a future version in which the enum does include a variant for that
feature.
Here is an example of how you can make a match expression forward-compatible:
# let capacityreservationpreference = unimplemented!();
match capacityreservationpreference {
CapacityReservationPreference::None => { /* ... */ },
CapacityReservationPreference::Open => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when capacityreservationpreference
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant CapacityReservationPreference::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
CapacityReservationPreference::Unknown(UnknownVariantValue("NewFeature".to_owned()))
and calling as_str
on it yields "NewFeature"
.
This match expression is forward-compatible when executed with a newer
version of SDK where the variant CapacityReservationPreference::NewFeature
is defined.
Specifically, when capacityreservationpreference
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on CapacityReservationPreference::NewFeature
also yielding "NewFeature"
.
Explicitly matching on the Unknown
variant should
be avoided for two reasons:
- The inner data
UnknownVariantValue
is opaque, and no further information can be extracted. - It might inadvertently shadow other intended match arms.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None
Open
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl CapacityReservationPreference
impl CapacityReservationPreference
sourcepub fn as_str(&self) -> &str
pub fn as_str(&self) -> &str
Returns the &str
value of the enum member.
Examples found in repository?
More examples
2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462
pub fn serialize_structure_crate_model_capacity_reservation_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CapacityReservationSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_648 = writer.prefix("CapacityReservationPreference");
if let Some(var_649) = &input.capacity_reservation_preference {
scope_648.string(var_649.as_str());
}
#[allow(unused_mut)]
let mut scope_650 = writer.prefix("CapacityReservationTarget");
if let Some(var_651) = &input.capacity_reservation_target {
crate::query_ser::serialize_structure_crate_model_capacity_reservation_target(
scope_650, var_651,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_credit_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceCreditSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_652 = writer.prefix("InstanceId");
if let Some(var_653) = &input.instance_id {
scope_652.string(var_653);
}
#[allow(unused_mut)]
let mut scope_654 = writer.prefix("CpuCredits");
if let Some(var_655) = &input.cpu_credits {
scope_654.string(var_655);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_remove_ipam_operating_region(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RemoveIpamOperatingRegion,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_656 = writer.prefix("RegionName");
if let Some(var_657) = &input.region_name {
scope_656.string(var_657);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_remove_prefix_list_entry(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RemovePrefixListEntry,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_658 = writer.prefix("Cidr");
if let Some(var_659) = &input.cidr {
scope_658.string(var_659);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_network_interface_attachment_changes(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::NetworkInterfaceAttachmentChanges,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_660 = writer.prefix("AttachmentId");
if let Some(var_661) = &input.attachment_id {
scope_660.string(var_661);
}
#[allow(unused_mut)]
let mut scope_662 = writer.prefix("DeleteOnTermination");
if let Some(var_663) = &input.delete_on_termination {
scope_662.boolean(*var_663);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_reserved_instances_configuration(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ReservedInstancesConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_664 = writer.prefix("AvailabilityZone");
if let Some(var_665) = &input.availability_zone {
scope_664.string(var_665);
}
#[allow(unused_mut)]
let mut scope_666 = writer.prefix("InstanceCount");
if let Some(var_667) = &input.instance_count {
scope_666.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_667).into()),
);
}
#[allow(unused_mut)]
let mut scope_668 = writer.prefix("InstanceType");
if let Some(var_669) = &input.instance_type {
scope_668.string(var_669.as_str());
}
#[allow(unused_mut)]
let mut scope_670 = writer.prefix("Platform");
if let Some(var_671) = &input.platform {
scope_670.string(var_671);
}
#[allow(unused_mut)]
let mut scope_672 = writer.prefix("Scope");
if let Some(var_673) = &input.scope {
scope_672.string(var_673.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_update(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SecurityGroupRuleUpdate,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_674 = writer.prefix("SecurityGroupRuleId");
if let Some(var_675) = &input.security_group_rule_id {
scope_674.string(var_675);
}
#[allow(unused_mut)]
let mut scope_676 = writer.prefix("SecurityGroupRule");
if let Some(var_677) = &input.security_group_rule {
crate::query_ser::serialize_structure_crate_model_security_group_rule_request(
scope_676, var_677,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_volume_permission_modifications(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateVolumePermissionModifications,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_678 = writer.prefix("Add");
if let Some(var_679) = &input.add {
let mut list_681 = scope_678.start_list(true, Some("item"));
for item_680 in var_679 {
#[allow(unused_mut)]
let mut entry_682 = list_681.entry();
crate::query_ser::serialize_structure_crate_model_create_volume_permission(
entry_682, item_680,
)?;
}
list_681.finish();
}
#[allow(unused_mut)]
let mut scope_683 = writer.prefix("Remove");
if let Some(var_684) = &input.remove {
let mut list_686 = scope_683.start_list(true, Some("item"));
for item_685 in var_684 {
#[allow(unused_mut)]
let mut entry_687 = list_686.entry();
crate::query_ser::serialize_structure_crate_model_create_volume_permission(
entry_687, item_685,
)?;
}
list_686.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_config(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_688 = writer.prefix("LaunchTemplateSpecification");
if let Some(var_689) = &input.launch_template_specification {
crate::query_ser::serialize_structure_crate_model_fleet_launch_template_specification(
scope_688, var_689,
)?;
}
#[allow(unused_mut)]
let mut scope_690 = writer.prefix("Overrides");
if let Some(var_691) = &input.overrides {
let mut list_693 = scope_690.start_list(true, Some("item"));
for item_692 in var_691 {
#[allow(unused_mut)]
let mut entry_694 = list_693.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_overrides(
entry_694, item_692,
)?;
}
list_693.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_transit_gateway_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyTransitGatewayOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_695 = writer.prefix("AddTransitGatewayCidrBlocks");
if let Some(var_696) = &input.add_transit_gateway_cidr_blocks {
let mut list_698 = scope_695.start_list(true, Some("item"));
for item_697 in var_696 {
#[allow(unused_mut)]
let mut entry_699 = list_698.entry();
entry_699.string(item_697);
}
list_698.finish();
}
#[allow(unused_mut)]
let mut scope_700 = writer.prefix("RemoveTransitGatewayCidrBlocks");
if let Some(var_701) = &input.remove_transit_gateway_cidr_blocks {
let mut list_703 = scope_700.start_list(true, Some("item"));
for item_702 in var_701 {
#[allow(unused_mut)]
let mut entry_704 = list_703.entry();
entry_704.string(item_702);
}
list_703.finish();
}
#[allow(unused_mut)]
let mut scope_705 = writer.prefix("VpnEcmpSupport");
if let Some(var_706) = &input.vpn_ecmp_support {
scope_705.string(var_706.as_str());
}
#[allow(unused_mut)]
let mut scope_707 = writer.prefix("DnsSupport");
if let Some(var_708) = &input.dns_support {
scope_707.string(var_708.as_str());
}
#[allow(unused_mut)]
let mut scope_709 = writer.prefix("AutoAcceptSharedAttachments");
if let Some(var_710) = &input.auto_accept_shared_attachments {
scope_709.string(var_710.as_str());
}
#[allow(unused_mut)]
let mut scope_711 = writer.prefix("DefaultRouteTableAssociation");
if let Some(var_712) = &input.default_route_table_association {
scope_711.string(var_712.as_str());
}
#[allow(unused_mut)]
let mut scope_713 = writer.prefix("AssociationDefaultRouteTableId");
if let Some(var_714) = &input.association_default_route_table_id {
scope_713.string(var_714);
}
#[allow(unused_mut)]
let mut scope_715 = writer.prefix("DefaultRouteTablePropagation");
if let Some(var_716) = &input.default_route_table_propagation {
scope_715.string(var_716.as_str());
}
#[allow(unused_mut)]
let mut scope_717 = writer.prefix("PropagationDefaultRouteTableId");
if let Some(var_718) = &input.propagation_default_route_table_id {
scope_717.string(var_718);
}
#[allow(unused_mut)]
let mut scope_719 = writer.prefix("AmazonSideAsn");
if let Some(var_720) = &input.amazon_side_asn {
scope_719.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_720).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_transit_gateway_vpc_attachment_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_721 = writer.prefix("DnsSupport");
if let Some(var_722) = &input.dns_support {
scope_721.string(var_722.as_str());
}
#[allow(unused_mut)]
let mut scope_723 = writer.prefix("Ipv6Support");
if let Some(var_724) = &input.ipv6_support {
scope_723.string(var_724.as_str());
}
#[allow(unused_mut)]
let mut scope_725 = writer.prefix("ApplianceModeSupport");
if let Some(var_726) = &input.appliance_mode_support {
scope_725.string(var_726.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_peering_connection_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PeeringConnectionOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_727 = writer.prefix("AllowDnsResolutionFromRemoteVpc");
if let Some(var_728) = &input.allow_dns_resolution_from_remote_vpc {
scope_727.boolean(*var_728);
}
#[allow(unused_mut)]
let mut scope_729 = writer.prefix("AllowEgressFromLocalClassicLinkToRemoteVpc");
if let Some(var_730) = &input.allow_egress_from_local_classic_link_to_remote_vpc {
scope_729.boolean(*var_730);
}
#[allow(unused_mut)]
let mut scope_731 = writer.prefix("AllowEgressFromLocalVpcToRemoteClassicLink");
if let Some(var_732) = &input.allow_egress_from_local_vpc_to_remote_classic_link {
scope_731.boolean(*var_732);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_vpn_tunnel_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyVpnTunnelOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_733 = writer.prefix("TunnelInsideCidr");
if let Some(var_734) = &input.tunnel_inside_cidr {
scope_733.string(var_734);
}
#[allow(unused_mut)]
let mut scope_735 = writer.prefix("TunnelInsideIpv6Cidr");
if let Some(var_736) = &input.tunnel_inside_ipv6_cidr {
scope_735.string(var_736);
}
#[allow(unused_mut)]
let mut scope_737 = writer.prefix("PreSharedKey");
if let Some(var_738) = &input.pre_shared_key {
scope_737.string(var_738);
}
#[allow(unused_mut)]
let mut scope_739 = writer.prefix("Phase1LifetimeSeconds");
if let Some(var_740) = &input.phase1_lifetime_seconds {
scope_739.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_740).into()),
);
}
#[allow(unused_mut)]
let mut scope_741 = writer.prefix("Phase2LifetimeSeconds");
if let Some(var_742) = &input.phase2_lifetime_seconds {
scope_741.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_742).into()),
);
}
#[allow(unused_mut)]
let mut scope_743 = writer.prefix("RekeyMarginTimeSeconds");
if let Some(var_744) = &input.rekey_margin_time_seconds {
scope_743.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_744).into()),
);
}
#[allow(unused_mut)]
let mut scope_745 = writer.prefix("RekeyFuzzPercentage");
if let Some(var_746) = &input.rekey_fuzz_percentage {
scope_745.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_746).into()),
);
}
#[allow(unused_mut)]
let mut scope_747 = writer.prefix("ReplayWindowSize");
if let Some(var_748) = &input.replay_window_size {
scope_747.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_748).into()),
);
}
#[allow(unused_mut)]
let mut scope_749 = writer.prefix("DPDTimeoutSeconds");
if let Some(var_750) = &input.dpd_timeout_seconds {
scope_749.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_750).into()),
);
}
#[allow(unused_mut)]
let mut scope_751 = writer.prefix("DPDTimeoutAction");
if let Some(var_752) = &input.dpd_timeout_action {
scope_751.string(var_752);
}
#[allow(unused_mut)]
let mut scope_753 = writer.prefix("Phase1EncryptionAlgorithm");
if let Some(var_754) = &input.phase1_encryption_algorithms {
let mut list_756 = scope_753.start_list(true, Some("item"));
for item_755 in var_754 {
#[allow(unused_mut)]
let mut entry_757 = list_756.entry();
crate::query_ser::serialize_structure_crate_model_phase1_encryption_algorithms_request_list_value(entry_757, item_755)?;
}
list_756.finish();
}
#[allow(unused_mut)]
let mut scope_758 = writer.prefix("Phase2EncryptionAlgorithm");
if let Some(var_759) = &input.phase2_encryption_algorithms {
let mut list_761 = scope_758.start_list(true, Some("item"));
for item_760 in var_759 {
#[allow(unused_mut)]
let mut entry_762 = list_761.entry();
crate::query_ser::serialize_structure_crate_model_phase2_encryption_algorithms_request_list_value(entry_762, item_760)?;
}
list_761.finish();
}
#[allow(unused_mut)]
let mut scope_763 = writer.prefix("Phase1IntegrityAlgorithm");
if let Some(var_764) = &input.phase1_integrity_algorithms {
let mut list_766 = scope_763.start_list(true, Some("item"));
for item_765 in var_764 {
#[allow(unused_mut)]
let mut entry_767 = list_766.entry();
crate::query_ser::serialize_structure_crate_model_phase1_integrity_algorithms_request_list_value(entry_767, item_765)?;
}
list_766.finish();
}
#[allow(unused_mut)]
let mut scope_768 = writer.prefix("Phase2IntegrityAlgorithm");
if let Some(var_769) = &input.phase2_integrity_algorithms {
let mut list_771 = scope_768.start_list(true, Some("item"));
for item_770 in var_769 {
#[allow(unused_mut)]
let mut entry_772 = list_771.entry();
crate::query_ser::serialize_structure_crate_model_phase2_integrity_algorithms_request_list_value(entry_772, item_770)?;
}
list_771.finish();
}
#[allow(unused_mut)]
let mut scope_773 = writer.prefix("Phase1DHGroupNumber");
if let Some(var_774) = &input.phase1_dh_group_numbers {
let mut list_776 = scope_773.start_list(true, Some("item"));
for item_775 in var_774 {
#[allow(unused_mut)]
let mut entry_777 = list_776.entry();
crate::query_ser::serialize_structure_crate_model_phase1_dh_group_numbers_request_list_value(entry_777, item_775)?;
}
list_776.finish();
}
#[allow(unused_mut)]
let mut scope_778 = writer.prefix("Phase2DHGroupNumber");
if let Some(var_779) = &input.phase2_dh_group_numbers {
let mut list_781 = scope_778.start_list(true, Some("item"));
for item_780 in var_779 {
#[allow(unused_mut)]
let mut entry_782 = list_781.entry();
crate::query_ser::serialize_structure_crate_model_phase2_dh_group_numbers_request_list_value(entry_782, item_780)?;
}
list_781.finish();
}
#[allow(unused_mut)]
let mut scope_783 = writer.prefix("IKEVersion");
if let Some(var_784) = &input.ike_versions {
let mut list_786 = scope_783.start_list(true, Some("item"));
for item_785 in var_784 {
#[allow(unused_mut)]
let mut entry_787 = list_786.entry();
crate::query_ser::serialize_structure_crate_model_ike_versions_request_list_value(
entry_787, item_785,
)?;
}
list_786.finish();
}
#[allow(unused_mut)]
let mut scope_788 = writer.prefix("StartupAction");
if let Some(var_789) = &input.startup_action {
scope_788.string(var_789);
}
#[allow(unused_mut)]
let mut scope_790 = writer.prefix("LogOptions");
if let Some(var_791) = &input.log_options {
crate::query_ser::serialize_structure_crate_model_vpn_tunnel_log_options_specification(
scope_790, var_791,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_cidr_authorization_context(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CidrAuthorizationContext,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_792 = writer.prefix("Message");
if let Some(var_793) = &input.message {
scope_792.string(var_793);
}
#[allow(unused_mut)]
let mut scope_794 = writer.prefix("Signature");
if let Some(var_795) = &input.signature {
scope_794.string(var_795);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipam_cidr_authorization_context(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IpamCidrAuthorizationContext,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_796 = writer.prefix("Message");
if let Some(var_797) = &input.message {
scope_796.string(var_797);
}
#[allow(unused_mut)]
let mut scope_798 = writer.prefix("Signature");
if let Some(var_799) = &input.signature {
scope_798.string(var_799);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_reserved_instance_limit_price(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ReservedInstanceLimitPrice,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_800 = writer.prefix("Amount");
if let Some(var_801) = &input.amount {
scope_800.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_801).into()),
);
}
#[allow(unused_mut)]
let mut scope_802 = writer.prefix("CurrencyCode");
if let Some(var_803) = &input.currency_code {
scope_802.string(var_803.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_purchase_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PurchaseRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_804 = writer.prefix("InstanceCount");
if let Some(var_805) = &input.instance_count {
scope_804.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_805).into()),
);
}
#[allow(unused_mut)]
let mut scope_806 = writer.prefix("PurchaseToken");
if let Some(var_807) = &input.purchase_token {
scope_806.string(var_807);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_register_instance_tag_attribute_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RegisterInstanceTagAttributeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_808 = writer.prefix("IncludeAllTagsOfInstance");
if let Some(var_809) = &input.include_all_tags_of_instance {
scope_808.boolean(*var_809);
}
#[allow(unused_mut)]
let mut scope_810 = writer.prefix("InstanceTagKey");
if let Some(var_811) = &input.instance_tag_keys {
let mut list_813 = scope_810.start_list(true, Some("item"));
for item_812 in var_811 {
#[allow(unused_mut)]
let mut entry_814 = list_813.entry();
entry_814.string(item_812);
}
list_813.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_fleet_request_config_data(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotFleetRequestConfigData,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_815 = writer.prefix("AllocationStrategy");
if let Some(var_816) = &input.allocation_strategy {
scope_815.string(var_816.as_str());
}
#[allow(unused_mut)]
let mut scope_817 = writer.prefix("OnDemandAllocationStrategy");
if let Some(var_818) = &input.on_demand_allocation_strategy {
scope_817.string(var_818.as_str());
}
#[allow(unused_mut)]
let mut scope_819 = writer.prefix("SpotMaintenanceStrategies");
if let Some(var_820) = &input.spot_maintenance_strategies {
crate::query_ser::serialize_structure_crate_model_spot_maintenance_strategies(
scope_819, var_820,
)?;
}
#[allow(unused_mut)]
let mut scope_821 = writer.prefix("ClientToken");
if let Some(var_822) = &input.client_token {
scope_821.string(var_822);
}
#[allow(unused_mut)]
let mut scope_823 = writer.prefix("ExcessCapacityTerminationPolicy");
if let Some(var_824) = &input.excess_capacity_termination_policy {
scope_823.string(var_824.as_str());
}
#[allow(unused_mut)]
let mut scope_825 = writer.prefix("FulfilledCapacity");
if let Some(var_826) = &input.fulfilled_capacity {
scope_825.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_826).into()),
);
}
#[allow(unused_mut)]
let mut scope_827 = writer.prefix("OnDemandFulfilledCapacity");
if let Some(var_828) = &input.on_demand_fulfilled_capacity {
scope_827.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_828).into()),
);
}
#[allow(unused_mut)]
let mut scope_829 = writer.prefix("IamFleetRole");
if let Some(var_830) = &input.iam_fleet_role {
scope_829.string(var_830);
}
#[allow(unused_mut)]
let mut scope_831 = writer.prefix("LaunchSpecifications");
if let Some(var_832) = &input.launch_specifications {
let mut list_834 = scope_831.start_list(true, Some("item"));
for item_833 in var_832 {
#[allow(unused_mut)]
let mut entry_835 = list_834.entry();
crate::query_ser::serialize_structure_crate_model_spot_fleet_launch_specification(
entry_835, item_833,
)?;
}
list_834.finish();
}
#[allow(unused_mut)]
let mut scope_836 = writer.prefix("LaunchTemplateConfigs");
if let Some(var_837) = &input.launch_template_configs {
let mut list_839 = scope_836.start_list(true, Some("item"));
for item_838 in var_837 {
#[allow(unused_mut)]
let mut entry_840 = list_839.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_config(
entry_840, item_838,
)?;
}
list_839.finish();
}
#[allow(unused_mut)]
let mut scope_841 = writer.prefix("SpotPrice");
if let Some(var_842) = &input.spot_price {
scope_841.string(var_842);
}
#[allow(unused_mut)]
let mut scope_843 = writer.prefix("TargetCapacity");
if let Some(var_844) = &input.target_capacity {
scope_843.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_844).into()),
);
}
#[allow(unused_mut)]
let mut scope_845 = writer.prefix("OnDemandTargetCapacity");
if let Some(var_846) = &input.on_demand_target_capacity {
scope_845.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_846).into()),
);
}
#[allow(unused_mut)]
let mut scope_847 = writer.prefix("OnDemandMaxTotalPrice");
if let Some(var_848) = &input.on_demand_max_total_price {
scope_847.string(var_848);
}
#[allow(unused_mut)]
let mut scope_849 = writer.prefix("SpotMaxTotalPrice");
if let Some(var_850) = &input.spot_max_total_price {
scope_849.string(var_850);
}
#[allow(unused_mut)]
let mut scope_851 = writer.prefix("TerminateInstancesWithExpiration");
if let Some(var_852) = &input.terminate_instances_with_expiration {
scope_851.boolean(*var_852);
}
#[allow(unused_mut)]
let mut scope_853 = writer.prefix("Type");
if let Some(var_854) = &input.r#type {
scope_853.string(var_854.as_str());
}
#[allow(unused_mut)]
let mut scope_855 = writer.prefix("ValidFrom");
if let Some(var_856) = &input.valid_from {
scope_855.date_time(var_856, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_857 = writer.prefix("ValidUntil");
if let Some(var_858) = &input.valid_until {
scope_857.date_time(var_858, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_859 = writer.prefix("ReplaceUnhealthyInstances");
if let Some(var_860) = &input.replace_unhealthy_instances {
scope_859.boolean(*var_860);
}
#[allow(unused_mut)]
let mut scope_861 = writer.prefix("InstanceInterruptionBehavior");
if let Some(var_862) = &input.instance_interruption_behavior {
scope_861.string(var_862.as_str());
}
#[allow(unused_mut)]
let mut scope_863 = writer.prefix("LoadBalancersConfig");
if let Some(var_864) = &input.load_balancers_config {
crate::query_ser::serialize_structure_crate_model_load_balancers_config(
scope_863, var_864,
)?;
}
#[allow(unused_mut)]
let mut scope_865 = writer.prefix("InstancePoolsToUseCount");
if let Some(var_866) = &input.instance_pools_to_use_count {
scope_865.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_866).into()),
);
}
#[allow(unused_mut)]
let mut scope_867 = writer.prefix("Context");
if let Some(var_868) = &input.context {
scope_867.string(var_868);
}
#[allow(unused_mut)]
let mut scope_869 = writer.prefix("TargetCapacityUnitType");
if let Some(var_870) = &input.target_capacity_unit_type {
scope_869.string(var_870.as_str());
}
#[allow(unused_mut)]
let mut scope_871 = writer.prefix("TagSpecification");
if let Some(var_872) = &input.tag_specifications {
let mut list_874 = scope_871.start_list(true, Some("item"));
for item_873 in var_872 {
#[allow(unused_mut)]
let mut entry_875 = list_874.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_875, item_873,
)?;
}
list_874.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_request_spot_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RequestSpotLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_876 = writer.prefix("SecurityGroupId");
if let Some(var_877) = &input.security_group_ids {
let mut list_879 = scope_876.start_list(true, Some("item"));
for item_878 in var_877 {
#[allow(unused_mut)]
let mut entry_880 = list_879.entry();
entry_880.string(item_878);
}
list_879.finish();
}
#[allow(unused_mut)]
let mut scope_881 = writer.prefix("SecurityGroup");
if let Some(var_882) = &input.security_groups {
let mut list_884 = scope_881.start_list(true, Some("item"));
for item_883 in var_882 {
#[allow(unused_mut)]
let mut entry_885 = list_884.entry();
entry_885.string(item_883);
}
list_884.finish();
}
#[allow(unused_mut)]
let mut scope_886 = writer.prefix("AddressingType");
if let Some(var_887) = &input.addressing_type {
scope_886.string(var_887);
}
#[allow(unused_mut)]
let mut scope_888 = writer.prefix("BlockDeviceMapping");
if let Some(var_889) = &input.block_device_mappings {
let mut list_891 = scope_888.start_list(true, Some("item"));
for item_890 in var_889 {
#[allow(unused_mut)]
let mut entry_892 = list_891.entry();
crate::query_ser::serialize_structure_crate_model_block_device_mapping(
entry_892, item_890,
)?;
}
list_891.finish();
}
#[allow(unused_mut)]
let mut scope_893 = writer.prefix("EbsOptimized");
if let Some(var_894) = &input.ebs_optimized {
scope_893.boolean(*var_894);
}
#[allow(unused_mut)]
let mut scope_895 = writer.prefix("IamInstanceProfile");
if let Some(var_896) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_iam_instance_profile_specification(
scope_895, var_896,
)?;
}
#[allow(unused_mut)]
let mut scope_897 = writer.prefix("ImageId");
if let Some(var_898) = &input.image_id {
scope_897.string(var_898);
}
#[allow(unused_mut)]
let mut scope_899 = writer.prefix("InstanceType");
if let Some(var_900) = &input.instance_type {
scope_899.string(var_900.as_str());
}
#[allow(unused_mut)]
let mut scope_901 = writer.prefix("KernelId");
if let Some(var_902) = &input.kernel_id {
scope_901.string(var_902);
}
#[allow(unused_mut)]
let mut scope_903 = writer.prefix("KeyName");
if let Some(var_904) = &input.key_name {
scope_903.string(var_904);
}
#[allow(unused_mut)]
let mut scope_905 = writer.prefix("Monitoring");
if let Some(var_906) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_run_instances_monitoring_enabled(
scope_905, var_906,
)?;
}
#[allow(unused_mut)]
let mut scope_907 = writer.prefix("NetworkInterface");
if let Some(var_908) = &input.network_interfaces {
let mut list_910 = scope_907.start_list(true, Some("item"));
for item_909 in var_908 {
#[allow(unused_mut)]
let mut entry_911 = list_910.entry();
crate::query_ser::serialize_structure_crate_model_instance_network_interface_specification(entry_911, item_909)?;
}
list_910.finish();
}
#[allow(unused_mut)]
let mut scope_912 = writer.prefix("Placement");
if let Some(var_913) = &input.placement {
crate::query_ser::serialize_structure_crate_model_spot_placement(scope_912, var_913)?;
}
#[allow(unused_mut)]
let mut scope_914 = writer.prefix("RamdiskId");
if let Some(var_915) = &input.ramdisk_id {
scope_914.string(var_915);
}
#[allow(unused_mut)]
let mut scope_916 = writer.prefix("SubnetId");
if let Some(var_917) = &input.subnet_id {
scope_916.string(var_917);
}
#[allow(unused_mut)]
let mut scope_918 = writer.prefix("UserData");
if let Some(var_919) = &input.user_data {
scope_918.string(var_919);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_run_instances_monitoring_enabled(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RunInstancesMonitoringEnabled,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_920 = writer.prefix("Enabled");
if let Some(var_921) = &input.enabled {
scope_920.boolean(*var_921);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_placement(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Placement,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_922 = writer.prefix("AvailabilityZone");
if let Some(var_923) = &input.availability_zone {
scope_922.string(var_923);
}
#[allow(unused_mut)]
let mut scope_924 = writer.prefix("Affinity");
if let Some(var_925) = &input.affinity {
scope_924.string(var_925);
}
#[allow(unused_mut)]
let mut scope_926 = writer.prefix("GroupName");
if let Some(var_927) = &input.group_name {
scope_926.string(var_927);
}
#[allow(unused_mut)]
let mut scope_928 = writer.prefix("PartitionNumber");
if let Some(var_929) = &input.partition_number {
scope_928.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_929).into()),
);
}
#[allow(unused_mut)]
let mut scope_930 = writer.prefix("HostId");
if let Some(var_931) = &input.host_id {
scope_930.string(var_931);
}
#[allow(unused_mut)]
let mut scope_932 = writer.prefix("Tenancy");
if let Some(var_933) = &input.tenancy {
scope_932.string(var_933.as_str());
}
#[allow(unused_mut)]
let mut scope_934 = writer.prefix("SpreadDomain");
if let Some(var_935) = &input.spread_domain {
scope_934.string(var_935);
}
#[allow(unused_mut)]
let mut scope_936 = writer.prefix("HostResourceGroupArn");
if let Some(var_937) = &input.host_resource_group_arn {
scope_936.string(var_937);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_network_interface_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceNetworkInterfaceSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_938 = writer.prefix("AssociatePublicIpAddress");
if let Some(var_939) = &input.associate_public_ip_address {
scope_938.boolean(*var_939);
}
#[allow(unused_mut)]
let mut scope_940 = writer.prefix("DeleteOnTermination");
if let Some(var_941) = &input.delete_on_termination {
scope_940.boolean(*var_941);
}
#[allow(unused_mut)]
let mut scope_942 = writer.prefix("Description");
if let Some(var_943) = &input.description {
scope_942.string(var_943);
}
#[allow(unused_mut)]
let mut scope_944 = writer.prefix("DeviceIndex");
if let Some(var_945) = &input.device_index {
scope_944.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_945).into()),
);
}
#[allow(unused_mut)]
let mut scope_946 = writer.prefix("SecurityGroupId");
if let Some(var_947) = &input.groups {
let mut list_949 = scope_946.start_list(true, Some("SecurityGroupId"));
for item_948 in var_947 {
#[allow(unused_mut)]
let mut entry_950 = list_949.entry();
entry_950.string(item_948);
}
list_949.finish();
}
#[allow(unused_mut)]
let mut scope_951 = writer.prefix("Ipv6AddressCount");
if let Some(var_952) = &input.ipv6_address_count {
scope_951.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_952).into()),
);
}
#[allow(unused_mut)]
let mut scope_953 = writer.prefix("Ipv6Addresses");
if let Some(var_954) = &input.ipv6_addresses {
let mut list_956 = scope_953.start_list(true, Some("item"));
for item_955 in var_954 {
#[allow(unused_mut)]
let mut entry_957 = list_956.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address(
entry_957, item_955,
)?;
}
list_956.finish();
}
#[allow(unused_mut)]
let mut scope_958 = writer.prefix("NetworkInterfaceId");
if let Some(var_959) = &input.network_interface_id {
scope_958.string(var_959);
}
#[allow(unused_mut)]
let mut scope_960 = writer.prefix("PrivateIpAddress");
if let Some(var_961) = &input.private_ip_address {
scope_960.string(var_961);
}
#[allow(unused_mut)]
let mut scope_962 = writer.prefix("PrivateIpAddresses");
if let Some(var_963) = &input.private_ip_addresses {
let mut list_965 = scope_962.start_list(true, Some("item"));
for item_964 in var_963 {
#[allow(unused_mut)]
let mut entry_966 = list_965.entry();
crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
entry_966, item_964,
)?;
}
list_965.finish();
}
#[allow(unused_mut)]
let mut scope_967 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_968) = &input.secondary_private_ip_address_count {
scope_967.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_968).into()),
);
}
#[allow(unused_mut)]
let mut scope_969 = writer.prefix("SubnetId");
if let Some(var_970) = &input.subnet_id {
scope_969.string(var_970);
}
#[allow(unused_mut)]
let mut scope_971 = writer.prefix("AssociateCarrierIpAddress");
if let Some(var_972) = &input.associate_carrier_ip_address {
scope_971.boolean(*var_972);
}
#[allow(unused_mut)]
let mut scope_973 = writer.prefix("InterfaceType");
if let Some(var_974) = &input.interface_type {
scope_973.string(var_974);
}
#[allow(unused_mut)]
let mut scope_975 = writer.prefix("NetworkCardIndex");
if let Some(var_976) = &input.network_card_index {
scope_975.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_976).into()),
);
}
#[allow(unused_mut)]
let mut scope_977 = writer.prefix("Ipv4Prefix");
if let Some(var_978) = &input.ipv4_prefixes {
let mut list_980 = scope_977.start_list(true, Some("item"));
for item_979 in var_978 {
#[allow(unused_mut)]
let mut entry_981 = list_980.entry();
crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
entry_981, item_979,
)?;
}
list_980.finish();
}
#[allow(unused_mut)]
let mut scope_982 = writer.prefix("Ipv4PrefixCount");
if let Some(var_983) = &input.ipv4_prefix_count {
scope_982.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_983).into()),
);
}
#[allow(unused_mut)]
let mut scope_984 = writer.prefix("Ipv6Prefix");
if let Some(var_985) = &input.ipv6_prefixes {
let mut list_987 = scope_984.start_list(true, Some("item"));
for item_986 in var_985 {
#[allow(unused_mut)]
let mut entry_988 = list_987.entry();
crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
entry_988, item_986,
)?;
}
list_987.finish();
}
#[allow(unused_mut)]
let mut scope_989 = writer.prefix("Ipv6PrefixCount");
if let Some(var_990) = &input.ipv6_prefix_count {
scope_989.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_990).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_elastic_gpu_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ElasticGpuSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_991 = writer.prefix("Type");
if let Some(var_992) = &input.r#type {
scope_991.string(var_992);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_elastic_inference_accelerator(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ElasticInferenceAccelerator,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_993 = writer.prefix("Type");
if let Some(var_994) = &input.r#type {
scope_993.string(var_994);
}
#[allow(unused_mut)]
let mut scope_995 = writer.prefix("Count");
if let Some(var_996) = &input.count {
scope_995.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_996).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_997 = writer.prefix("LaunchTemplateId");
if let Some(var_998) = &input.launch_template_id {
scope_997.string(var_998);
}
#[allow(unused_mut)]
let mut scope_999 = writer.prefix("LaunchTemplateName");
if let Some(var_1000) = &input.launch_template_name {
scope_999.string(var_1000);
}
#[allow(unused_mut)]
let mut scope_1001 = writer.prefix("Version");
if let Some(var_1002) = &input.version {
scope_1001.string(var_1002);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_market_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1003 = writer.prefix("MarketType");
if let Some(var_1004) = &input.market_type {
scope_1003.string(var_1004.as_str());
}
#[allow(unused_mut)]
let mut scope_1005 = writer.prefix("SpotOptions");
if let Some(var_1006) = &input.spot_options {
crate::query_ser::serialize_structure_crate_model_spot_market_options(
scope_1005, var_1006,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_credit_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreditSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1007 = writer.prefix("CpuCredits");
if let Some(var_1008) = &input.cpu_credits {
scope_1007.string(var_1008);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_cpu_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CpuOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1009 = writer.prefix("CoreCount");
if let Some(var_1010) = &input.core_count {
scope_1009.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1010).into()),
);
}
#[allow(unused_mut)]
let mut scope_1011 = writer.prefix("ThreadsPerCore");
if let Some(var_1012) = &input.threads_per_core {
scope_1011.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1012).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_hibernation_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::HibernationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1013 = writer.prefix("Configured");
if let Some(var_1014) = &input.configured {
scope_1013.boolean(*var_1014);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_license_configuration_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LicenseConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1015 = writer.prefix("LicenseConfigurationArn");
if let Some(var_1016) = &input.license_configuration_arn {
scope_1015.string(var_1016);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_metadata_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMetadataOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1017 = writer.prefix("HttpTokens");
if let Some(var_1018) = &input.http_tokens {
scope_1017.string(var_1018.as_str());
}
#[allow(unused_mut)]
let mut scope_1019 = writer.prefix("HttpPutResponseHopLimit");
if let Some(var_1020) = &input.http_put_response_hop_limit {
scope_1019.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1020).into()),
);
}
#[allow(unused_mut)]
let mut scope_1021 = writer.prefix("HttpEndpoint");
if let Some(var_1022) = &input.http_endpoint {
scope_1021.string(var_1022.as_str());
}
#[allow(unused_mut)]
let mut scope_1023 = writer.prefix("HttpProtocolIpv6");
if let Some(var_1024) = &input.http_protocol_ipv6 {
scope_1023.string(var_1024.as_str());
}
#[allow(unused_mut)]
let mut scope_1025 = writer.prefix("InstanceMetadataTags");
if let Some(var_1026) = &input.instance_metadata_tags {
scope_1025.string(var_1026.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_enclave_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::EnclaveOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1027 = writer.prefix("Enabled");
if let Some(var_1028) = &input.enabled {
scope_1027.boolean(*var_1028);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_private_dns_name_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PrivateDnsNameOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1029 = writer.prefix("HostnameType");
if let Some(var_1030) = &input.hostname_type {
scope_1029.string(var_1030.as_str());
}
#[allow(unused_mut)]
let mut scope_1031 = writer.prefix("EnableResourceNameDnsARecord");
if let Some(var_1032) = &input.enable_resource_name_dns_a_record {
scope_1031.boolean(*var_1032);
}
#[allow(unused_mut)]
let mut scope_1033 = writer.prefix("EnableResourceNameDnsAAAARecord");
if let Some(var_1034) = &input.enable_resource_name_dns_aaaa_record {
scope_1033.boolean(*var_1034);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_maintenance_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMaintenanceOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1035 = writer.prefix("AutoRecovery");
if let Some(var_1036) = &input.auto_recovery {
scope_1035.string(var_1036.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1037 = writer.prefix("BlockDeviceMapping");
if let Some(var_1038) = &input.block_device_mappings {
let mut list_1040 = scope_1037.start_list(true, Some("BlockDeviceMapping"));
for item_1039 in var_1038 {
#[allow(unused_mut)]
let mut entry_1041 = list_1040.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_block_device_mapping(entry_1041, item_1039)?;
}
list_1040.finish();
}
#[allow(unused_mut)]
let mut scope_1042 = writer.prefix("EbsOptimized");
if let Some(var_1043) = &input.ebs_optimized {
scope_1042.boolean(*var_1043);
}
#[allow(unused_mut)]
let mut scope_1044 = writer.prefix("IamInstanceProfile");
if let Some(var_1045) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_iam_instance_profile(
scope_1044, var_1045,
)?;
}
#[allow(unused_mut)]
let mut scope_1046 = writer.prefix("ImageId");
if let Some(var_1047) = &input.image_id {
scope_1046.string(var_1047);
}
#[allow(unused_mut)]
let mut scope_1048 = writer.prefix("InstanceType");
if let Some(var_1049) = &input.instance_type {
scope_1048.string(var_1049);
}
#[allow(unused_mut)]
let mut scope_1050 = writer.prefix("KernelId");
if let Some(var_1051) = &input.kernel_id {
scope_1050.string(var_1051);
}
#[allow(unused_mut)]
let mut scope_1052 = writer.prefix("KeyName");
if let Some(var_1053) = &input.key_name {
scope_1052.string(var_1053);
}
#[allow(unused_mut)]
let mut scope_1054 = writer.prefix("Monitoring");
if let Some(var_1055) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_monitoring(
scope_1054, var_1055,
)?;
}
#[allow(unused_mut)]
let mut scope_1056 = writer.prefix("NetworkInterface");
if let Some(var_1057) = &input.network_interfaces {
let mut list_1059 = scope_1056.start_list(true, Some("NetworkInterface"));
for item_1058 in var_1057 {
#[allow(unused_mut)]
let mut entry_1060 = list_1059.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_network_interface(entry_1060, item_1058)?;
}
list_1059.finish();
}
#[allow(unused_mut)]
let mut scope_1061 = writer.prefix("Placement");
if let Some(var_1062) = &input.placement {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_placement(
scope_1061, var_1062,
)?;
}
#[allow(unused_mut)]
let mut scope_1063 = writer.prefix("RamdiskId");
if let Some(var_1064) = &input.ramdisk_id {
scope_1063.string(var_1064);
}
#[allow(unused_mut)]
let mut scope_1065 = writer.prefix("SecurityGroupId");
if let Some(var_1066) = &input.security_group_ids {
let mut list_1068 = scope_1065.start_list(true, Some("SecurityGroupId"));
for item_1067 in var_1066 {
#[allow(unused_mut)]
let mut entry_1069 = list_1068.entry();
entry_1069.string(item_1067);
}
list_1068.finish();
}
#[allow(unused_mut)]
let mut scope_1070 = writer.prefix("SubnetId");
if let Some(var_1071) = &input.subnet_id {
scope_1070.string(var_1071);
}
#[allow(unused_mut)]
let mut scope_1072 = writer.prefix("UserData");
if let Some(var_1073) = &input.user_data {
scope_1072.string(var_1073);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_description(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SecurityGroupRuleDescription,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1074 = writer.prefix("SecurityGroupRuleId");
if let Some(var_1075) = &input.security_group_rule_id {
scope_1074.string(var_1075);
}
#[allow(unused_mut)]
let mut scope_1076 = writer.prefix("Description");
if let Some(var_1077) = &input.description {
scope_1076.string(var_1077);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ip_range(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IpRange,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1078 = writer.prefix("CidrIp");
if let Some(var_1079) = &input.cidr_ip {
scope_1078.string(var_1079);
}
#[allow(unused_mut)]
let mut scope_1080 = writer.prefix("Description");
if let Some(var_1081) = &input.description {
scope_1080.string(var_1081);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipv6_range(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Ipv6Range,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1082 = writer.prefix("CidrIpv6");
if let Some(var_1083) = &input.cidr_ipv6 {
scope_1082.string(var_1083);
}
#[allow(unused_mut)]
let mut scope_1084 = writer.prefix("Description");
if let Some(var_1085) = &input.description {
scope_1084.string(var_1085);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_prefix_list_id(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PrefixListId,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1086 = writer.prefix("Description");
if let Some(var_1087) = &input.description {
scope_1086.string(var_1087);
}
#[allow(unused_mut)]
let mut scope_1088 = writer.prefix("PrefixListId");
if let Some(var_1089) = &input.prefix_list_id {
scope_1088.string(var_1089);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_user_id_group_pair(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::UserIdGroupPair,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1090 = writer.prefix("Description");
if let Some(var_1091) = &input.description {
scope_1090.string(var_1091);
}
#[allow(unused_mut)]
let mut scope_1092 = writer.prefix("GroupId");
if let Some(var_1093) = &input.group_id {
scope_1092.string(var_1093);
}
#[allow(unused_mut)]
let mut scope_1094 = writer.prefix("GroupName");
if let Some(var_1095) = &input.group_name {
scope_1094.string(var_1095);
}
#[allow(unused_mut)]
let mut scope_1096 = writer.prefix("PeeringStatus");
if let Some(var_1097) = &input.peering_status {
scope_1096.string(var_1097);
}
#[allow(unused_mut)]
let mut scope_1098 = writer.prefix("UserId");
if let Some(var_1099) = &input.user_id {
scope_1098.string(var_1099);
}
#[allow(unused_mut)]
let mut scope_1100 = writer.prefix("VpcId");
if let Some(var_1101) = &input.vpc_id {
scope_1100.string(var_1101);
}
#[allow(unused_mut)]
let mut scope_1102 = writer.prefix("VpcPeeringConnectionId");
if let Some(var_1103) = &input.vpc_peering_connection_id {
scope_1102.string(var_1103);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_s3_storage(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::S3Storage,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1104 = writer.prefix("AWSAccessKeyId");
if let Some(var_1105) = &input.aws_access_key_id {
scope_1104.string(var_1105);
}
#[allow(unused_mut)]
let mut scope_1106 = writer.prefix("Bucket");
if let Some(var_1107) = &input.bucket {
scope_1106.string(var_1107);
}
#[allow(unused_mut)]
let mut scope_1108 = writer.prefix("Prefix");
if let Some(var_1109) = &input.prefix {
scope_1108.string(var_1109);
}
#[allow(unused_mut)]
let mut scope_1110 = writer.prefix("UploadPolicy");
if let Some(var_1111) = &input.upload_policy {
scope_1110.string(&aws_smithy_types::base64::encode(var_1111));
}
#[allow(unused_mut)]
let mut scope_1112 = writer.prefix("UploadPolicySignature");
if let Some(var_1113) = &input.upload_policy_signature {
scope_1112.string(var_1113);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_directory_service_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DirectoryServiceAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1114 = writer.prefix("DirectoryId");
if let Some(var_1115) = &input.directory_id {
scope_1114.string(var_1115);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_certificate_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CertificateAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1116 = writer.prefix("ClientRootCertificateChainArn");
if let Some(var_1117) = &input.client_root_certificate_chain_arn {
scope_1116.string(var_1117);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_federated_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FederatedAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1118 = writer.prefix("SAMLProviderArn");
if let Some(var_1119) = &input.saml_provider_arn {
scope_1118.string(var_1119);
}
#[allow(unused_mut)]
let mut scope_1120 = writer.prefix("SelfServiceSAMLProviderArn");
if let Some(var_1121) = &input.self_service_saml_provider_arn {
scope_1120.string(var_1121);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_spot_maintenance_strategies_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetSpotMaintenanceStrategiesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1122 = writer.prefix("CapacityRebalance");
if let Some(var_1123) = &input.capacity_rebalance {
crate::query_ser::serialize_structure_crate_model_fleet_spot_capacity_rebalance_request(
scope_1122, var_1123,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_capacity_reservation_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CapacityReservationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1124 = writer.prefix("UsageStrategy");
if let Some(var_1125) = &input.usage_strategy {
scope_1124.string(var_1125.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetLaunchTemplateSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1126 = writer.prefix("LaunchTemplateId");
if let Some(var_1127) = &input.launch_template_id {
scope_1126.string(var_1127);
}
#[allow(unused_mut)]
let mut scope_1128 = writer.prefix("LaunchTemplateName");
if let Some(var_1129) = &input.launch_template_name {
scope_1128.string(var_1129);
}
#[allow(unused_mut)]
let mut scope_1130 = writer.prefix("Version");
if let Some(var_1131) = &input.version {
scope_1130.string(var_1131);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_overrides_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetLaunchTemplateOverridesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1132 = writer.prefix("InstanceType");
if let Some(var_1133) = &input.instance_type {
scope_1132.string(var_1133.as_str());
}
#[allow(unused_mut)]
let mut scope_1134 = writer.prefix("MaxPrice");
if let Some(var_1135) = &input.max_price {
scope_1134.string(var_1135);
}
#[allow(unused_mut)]
let mut scope_1136 = writer.prefix("SubnetId");
if let Some(var_1137) = &input.subnet_id {
scope_1136.string(var_1137);
}
#[allow(unused_mut)]
let mut scope_1138 = writer.prefix("AvailabilityZone");
if let Some(var_1139) = &input.availability_zone {
scope_1138.string(var_1139);
}
#[allow(unused_mut)]
let mut scope_1140 = writer.prefix("WeightedCapacity");
if let Some(var_1141) = &input.weighted_capacity {
scope_1140.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1141).into()),
);
}
#[allow(unused_mut)]
let mut scope_1142 = writer.prefix("Priority");
if let Some(var_1143) = &input.priority {
scope_1142.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1143).into()),
);
}
#[allow(unused_mut)]
let mut scope_1144 = writer.prefix("Placement");
if let Some(var_1145) = &input.placement {
crate::query_ser::serialize_structure_crate_model_placement(scope_1144, var_1145)?;
}
#[allow(unused_mut)]
let mut scope_1146 = writer.prefix("InstanceRequirements");
if let Some(var_1147) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements_request(
scope_1146, var_1147,
)?;
}
#[allow(unused_mut)]
let mut scope_1148 = writer.prefix("ImageId");
if let Some(var_1149) = &input.image_id {
scope_1148.string(var_1149);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ebs_block_device(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::EbsBlockDevice,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1150 = writer.prefix("DeleteOnTermination");
if let Some(var_1151) = &input.delete_on_termination {
scope_1150.boolean(*var_1151);
}
#[allow(unused_mut)]
let mut scope_1152 = writer.prefix("Iops");
if let Some(var_1153) = &input.iops {
scope_1152.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1153).into()),
);
}
#[allow(unused_mut)]
let mut scope_1154 = writer.prefix("SnapshotId");
if let Some(var_1155) = &input.snapshot_id {
scope_1154.string(var_1155);
}
#[allow(unused_mut)]
let mut scope_1156 = writer.prefix("VolumeSize");
if let Some(var_1157) = &input.volume_size {
scope_1156.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1157).into()),
);
}
#[allow(unused_mut)]
let mut scope_1158 = writer.prefix("VolumeType");
if let Some(var_1159) = &input.volume_type {
scope_1158.string(var_1159.as_str());
}
#[allow(unused_mut)]
let mut scope_1160 = writer.prefix("KmsKeyId");
if let Some(var_1161) = &input.kms_key_id {
scope_1160.string(var_1161);
}
#[allow(unused_mut)]
let mut scope_1162 = writer.prefix("Throughput");
if let Some(var_1163) = &input.throughput {
scope_1162.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1163).into()),
);
}
#[allow(unused_mut)]
let mut scope_1164 = writer.prefix("OutpostArn");
if let Some(var_1165) = &input.outpost_arn {
scope_1164.string(var_1165);
}
#[allow(unused_mut)]
let mut scope_1166 = writer.prefix("Encrypted");
if let Some(var_1167) = &input.encrypted {
scope_1166.boolean(*var_1167);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_iam_instance_profile_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1168 = writer.prefix("Arn");
if let Some(var_1169) = &input.arn {
scope_1168.string(var_1169);
}
#[allow(unused_mut)]
let mut scope_1170 = writer.prefix("Name");
if let Some(var_1171) = &input.name {
scope_1170.string(var_1171);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_block_device_mapping_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateBlockDeviceMappingRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1172 = writer.prefix("DeviceName");
if let Some(var_1173) = &input.device_name {
scope_1172.string(var_1173);
}
#[allow(unused_mut)]
let mut scope_1174 = writer.prefix("VirtualName");
if let Some(var_1175) = &input.virtual_name {
scope_1174.string(var_1175);
}
#[allow(unused_mut)]
let mut scope_1176 = writer.prefix("Ebs");
if let Some(var_1177) = &input.ebs {
crate::query_ser::serialize_structure_crate_model_launch_template_ebs_block_device_request(
scope_1176, var_1177,
)?;
}
#[allow(unused_mut)]
let mut scope_1178 = writer.prefix("NoDevice");
if let Some(var_1179) = &input.no_device {
scope_1178.string(var_1179);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_network_interface_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1180 = writer.prefix("AssociateCarrierIpAddress");
if let Some(var_1181) = &input.associate_carrier_ip_address {
scope_1180.boolean(*var_1181);
}
#[allow(unused_mut)]
let mut scope_1182 = writer.prefix("AssociatePublicIpAddress");
if let Some(var_1183) = &input.associate_public_ip_address {
scope_1182.boolean(*var_1183);
}
#[allow(unused_mut)]
let mut scope_1184 = writer.prefix("DeleteOnTermination");
if let Some(var_1185) = &input.delete_on_termination {
scope_1184.boolean(*var_1185);
}
#[allow(unused_mut)]
let mut scope_1186 = writer.prefix("Description");
if let Some(var_1187) = &input.description {
scope_1186.string(var_1187);
}
#[allow(unused_mut)]
let mut scope_1188 = writer.prefix("DeviceIndex");
if let Some(var_1189) = &input.device_index {
scope_1188.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1189).into()),
);
}
#[allow(unused_mut)]
let mut scope_1190 = writer.prefix("SecurityGroupId");
if let Some(var_1191) = &input.groups {
let mut list_1193 = scope_1190.start_list(true, Some("SecurityGroupId"));
for item_1192 in var_1191 {
#[allow(unused_mut)]
let mut entry_1194 = list_1193.entry();
entry_1194.string(item_1192);
}
list_1193.finish();
}
#[allow(unused_mut)]
let mut scope_1195 = writer.prefix("InterfaceType");
if let Some(var_1196) = &input.interface_type {
scope_1195.string(var_1196);
}
#[allow(unused_mut)]
let mut scope_1197 = writer.prefix("Ipv6AddressCount");
if let Some(var_1198) = &input.ipv6_address_count {
scope_1197.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1198).into()),
);
}
#[allow(unused_mut)]
let mut scope_1199 = writer.prefix("Ipv6Addresses");
if let Some(var_1200) = &input.ipv6_addresses {
let mut list_1202 = scope_1199.start_list(true, Some("InstanceIpv6Address"));
for item_1201 in var_1200 {
#[allow(unused_mut)]
let mut entry_1203 = list_1202.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address_request(
entry_1203, item_1201,
)?;
}
list_1202.finish();
}
#[allow(unused_mut)]
let mut scope_1204 = writer.prefix("NetworkInterfaceId");
if let Some(var_1205) = &input.network_interface_id {
scope_1204.string(var_1205);
}
#[allow(unused_mut)]
let mut scope_1206 = writer.prefix("PrivateIpAddress");
if let Some(var_1207) = &input.private_ip_address {
scope_1206.string(var_1207);
}
#[allow(unused_mut)]
let mut scope_1208 = writer.prefix("PrivateIpAddresses");
if let Some(var_1209) = &input.private_ip_addresses {
let mut list_1211 = scope_1208.start_list(true, Some("item"));
for item_1210 in var_1209 {
#[allow(unused_mut)]
let mut entry_1212 = list_1211.entry();
crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
entry_1212, item_1210,
)?;
}
list_1211.finish();
}
#[allow(unused_mut)]
let mut scope_1213 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_1214) = &input.secondary_private_ip_address_count {
scope_1213.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1214).into()),
);
}
#[allow(unused_mut)]
let mut scope_1215 = writer.prefix("SubnetId");
if let Some(var_1216) = &input.subnet_id {
scope_1215.string(var_1216);
}
#[allow(unused_mut)]
let mut scope_1217 = writer.prefix("NetworkCardIndex");
if let Some(var_1218) = &input.network_card_index {
scope_1217.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1218).into()),
);
}
#[allow(unused_mut)]
let mut scope_1219 = writer.prefix("Ipv4Prefix");
if let Some(var_1220) = &input.ipv4_prefixes {
let mut list_1222 = scope_1219.start_list(true, Some("item"));
for item_1221 in var_1220 {
#[allow(unused_mut)]
let mut entry_1223 = list_1222.entry();
crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
entry_1223, item_1221,
)?;
}
list_1222.finish();
}
#[allow(unused_mut)]
let mut scope_1224 = writer.prefix("Ipv4PrefixCount");
if let Some(var_1225) = &input.ipv4_prefix_count {
scope_1224.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1225).into()),
);
}
#[allow(unused_mut)]
let mut scope_1226 = writer.prefix("Ipv6Prefix");
if let Some(var_1227) = &input.ipv6_prefixes {
let mut list_1229 = scope_1226.start_list(true, Some("item"));
for item_1228 in var_1227 {
#[allow(unused_mut)]
let mut entry_1230 = list_1229.entry();
crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
entry_1230, item_1228,
)?;
}
list_1229.finish();
}
#[allow(unused_mut)]
let mut scope_1231 = writer.prefix("Ipv6PrefixCount");
if let Some(var_1232) = &input.ipv6_prefix_count {
scope_1231.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1232).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_templates_monitoring_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplatesMonitoringRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1233 = writer.prefix("Enabled");
if let Some(var_1234) = &input.enabled {
scope_1233.boolean(*var_1234);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_placement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplatePlacementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1235 = writer.prefix("AvailabilityZone");
if let Some(var_1236) = &input.availability_zone {
scope_1235.string(var_1236);
}
#[allow(unused_mut)]
let mut scope_1237 = writer.prefix("Affinity");
if let Some(var_1238) = &input.affinity {
scope_1237.string(var_1238);
}
#[allow(unused_mut)]
let mut scope_1239 = writer.prefix("GroupName");
if let Some(var_1240) = &input.group_name {
scope_1239.string(var_1240);
}
#[allow(unused_mut)]
let mut scope_1241 = writer.prefix("HostId");
if let Some(var_1242) = &input.host_id {
scope_1241.string(var_1242);
}
#[allow(unused_mut)]
let mut scope_1243 = writer.prefix("Tenancy");
if let Some(var_1244) = &input.tenancy {
scope_1243.string(var_1244.as_str());
}
#[allow(unused_mut)]
let mut scope_1245 = writer.prefix("SpreadDomain");
if let Some(var_1246) = &input.spread_domain {
scope_1245.string(var_1246);
}
#[allow(unused_mut)]
let mut scope_1247 = writer.prefix("HostResourceGroupArn");
if let Some(var_1248) = &input.host_resource_group_arn {
scope_1247.string(var_1248);
}
#[allow(unused_mut)]
let mut scope_1249 = writer.prefix("PartitionNumber");
if let Some(var_1250) = &input.partition_number {
scope_1249.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1250).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_tag_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateTagSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1251 = writer.prefix("ResourceType");
if let Some(var_1252) = &input.resource_type {
scope_1251.string(var_1252.as_str());
}
#[allow(unused_mut)]
let mut scope_1253 = writer.prefix("Tag");
if let Some(var_1254) = &input.tags {
let mut list_1256 = scope_1253.start_list(true, Some("item"));
for item_1255 in var_1254 {
#[allow(unused_mut)]
let mut entry_1257 = list_1256.entry();
crate::query_ser::serialize_structure_crate_model_tag(entry_1257, item_1255)?;
}
list_1256.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_elastic_inference_accelerator(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateElasticInferenceAccelerator,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1258 = writer.prefix("Type");
if let Some(var_1259) = &input.r#type {
scope_1258.string(var_1259);
}
#[allow(unused_mut)]
let mut scope_1260 = writer.prefix("Count");
if let Some(var_1261) = &input.count {
scope_1260.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1261).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_market_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1262 = writer.prefix("MarketType");
if let Some(var_1263) = &input.market_type {
scope_1262.string(var_1263.as_str());
}
#[allow(unused_mut)]
let mut scope_1264 = writer.prefix("SpotOptions");
if let Some(var_1265) = &input.spot_options {
crate::query_ser::serialize_structure_crate_model_launch_template_spot_market_options_request(scope_1264, var_1265)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_cpu_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateCpuOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1266 = writer.prefix("CoreCount");
if let Some(var_1267) = &input.core_count {
scope_1266.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1267).into()),
);
}
#[allow(unused_mut)]
let mut scope_1268 = writer.prefix("ThreadsPerCore");
if let Some(var_1269) = &input.threads_per_core {
scope_1268.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1269).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_capacity_reservation_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1270 = writer.prefix("CapacityReservationPreference");
if let Some(var_1271) = &input.capacity_reservation_preference {
scope_1270.string(var_1271.as_str());
}
#[allow(unused_mut)]
let mut scope_1272 = writer.prefix("CapacityReservationTarget");
if let Some(var_1273) = &input.capacity_reservation_target {
crate::query_ser::serialize_structure_crate_model_capacity_reservation_target(
scope_1272, var_1273,
)?;
}
Ok(())
}
Trait Implementations§
source§impl AsRef<str> for CapacityReservationPreference
impl AsRef<str> for CapacityReservationPreference
source§impl Clone for CapacityReservationPreference
impl Clone for CapacityReservationPreference
source§fn clone(&self) -> CapacityReservationPreference
fn clone(&self) -> CapacityReservationPreference
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl From<&str> for CapacityReservationPreference
impl From<&str> for CapacityReservationPreference
source§impl Hash for CapacityReservationPreference
impl Hash for CapacityReservationPreference
source§impl Ord for CapacityReservationPreference
impl Ord for CapacityReservationPreference
source§fn cmp(&self, other: &CapacityReservationPreference) -> Ordering
fn cmp(&self, other: &CapacityReservationPreference) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<CapacityReservationPreference> for CapacityReservationPreference
impl PartialEq<CapacityReservationPreference> for CapacityReservationPreference
source§fn eq(&self, other: &CapacityReservationPreference) -> bool
fn eq(&self, other: &CapacityReservationPreference) -> bool
source§impl PartialOrd<CapacityReservationPreference> for CapacityReservationPreference
impl PartialOrd<CapacityReservationPreference> for CapacityReservationPreference
source§fn partial_cmp(&self, other: &CapacityReservationPreference) -> Option<Ordering>
fn partial_cmp(&self, other: &CapacityReservationPreference) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for CapacityReservationPreference
impl StructuralEq for CapacityReservationPreference
impl StructuralPartialEq for CapacityReservationPreference
Auto Trait Implementations§
impl RefUnwindSafe for CapacityReservationPreference
impl Send for CapacityReservationPreference
impl Sync for CapacityReservationPreference
impl Unpin for CapacityReservationPreference
impl UnwindSafe for CapacityReservationPreference
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.