Enum aws_sdk_ec2::model::GatewayType
source · #[non_exhaustive]
pub enum GatewayType {
Ipsec1,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against GatewayType
, 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 gatewaytype = unimplemented!();
match gatewaytype {
GatewayType::Ipsec1 => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when gatewaytype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant GatewayType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
GatewayType::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 GatewayType::NewFeature
is defined.
Specifically, when gatewaytype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on GatewayType::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
Ipsec1
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl GatewayType
impl GatewayType
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
2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 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 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 4798 4799 4800 4801 4802 4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 5008 5009 5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 5020 5021 5022 5023 5024 5025 5026 5027 5028 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038 5039 5040 5041 5042 5043 5044 5045 5046 5047 5048 5049 5050 5051 5052 5053 5054 5055 5056 5057 5058 5059 5060 5061 5062 5063 5064 5065 5066 5067 5068 5069 5070 5071 5072 5073 5074 5075 5076 5077 5078 5079 5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 5120 5121 5122 5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 5270 5271 5272 5273 5274 5275 5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 5316 5317 5318 5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 5348 5349 5350 5351 5352 5353 5354 5355 5356 5357 5358 5359 5360 5361 5362 5363 5364 5365 5366 5367 5368 5369 5370 5371 5372 5373 5374 5375 5376 5377 5378 5379 5380 5381 5382 5383 5384 5385 5386 5387 5388 5389 5390 5391 5392 5393 5394 5395 5396 5397 5398 5399 5400 5401 5402 5403 5404 5405 5406 5407 5408 5409 5410 5411 5412 5413 5414 5415 5416 5417 5418 5419 5420 5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 5546 5547 5548 5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 5578 5579 5580 5581 5582 5583 5584 5585 5586 5587 5588 5589 5590 5591 5592 5593 5594 5595 5596 5597 5598 5599 5600 5601 5602 5603 5604 5605 5606 5607 5608 5609 5610 5611 5612 5613 5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 5677 5678 5679 5680 5681 5682 5683 5684 5685 5686 5687 5688 5689 5690 5691 5692 5693 5694 5695 5696 5697 5698 5699 5700 5701 5702 5703 5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 5829 5830 5831 5832 5833 5834 5835 5836 5837 5838 5839 5840 5841 5842 5843 5844 5845 5846 5847 5848 5849 5850 5851 5852 5853 5854 5855 5856 5857 5858 5859 5860 5861 5862 5863 5864 5865 5866 5867 5868 5869 5870 5871 5872 5873 5874 5875 5876 5877 5878 5879 5880 5881 5882 5883 5884 5885 5886 5887 5888 5889 5890 5891 5892 5893 5894 5895 5896 5897 5898 5899 5900 5901 5902 5903 5904 5905 5906 5907 5908 5909 5910 5911
pub fn serialize_operation_crate_operation_create_customer_gateway(
input: &crate::input::CreateCustomerGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateCustomerGateway", "2016-11-15");
#[allow(unused_mut)]
let mut scope_628 = writer.prefix("BgpAsn");
if let Some(var_629) = &input.bgp_asn {
scope_628.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_629).into()),
);
}
#[allow(unused_mut)]
let mut scope_630 = writer.prefix("PublicIp");
if let Some(var_631) = &input.public_ip {
scope_630.string(var_631);
}
#[allow(unused_mut)]
let mut scope_632 = writer.prefix("CertificateArn");
if let Some(var_633) = &input.certificate_arn {
scope_632.string(var_633);
}
#[allow(unused_mut)]
let mut scope_634 = writer.prefix("Type");
if let Some(var_635) = &input.r#type {
scope_634.string(var_635.as_str());
}
#[allow(unused_mut)]
let mut scope_636 = writer.prefix("TagSpecification");
if let Some(var_637) = &input.tag_specifications {
let mut list_639 = scope_636.start_list(true, Some("item"));
for item_638 in var_637 {
#[allow(unused_mut)]
let mut entry_640 = list_639.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_640, item_638,
)?;
}
list_639.finish();
}
#[allow(unused_mut)]
let mut scope_641 = writer.prefix("DeviceName");
if let Some(var_642) = &input.device_name {
scope_641.string(var_642);
}
#[allow(unused_mut)]
let mut scope_643 = writer.prefix("IpAddress");
if let Some(var_644) = &input.ip_address {
scope_643.string(var_644);
}
#[allow(unused_mut)]
let mut scope_645 = writer.prefix("DryRun");
if let Some(var_646) = &input.dry_run {
scope_645.boolean(*var_646);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_default_subnet(
input: &crate::input::CreateDefaultSubnetInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateDefaultSubnet", "2016-11-15");
#[allow(unused_mut)]
let mut scope_647 = writer.prefix("AvailabilityZone");
if let Some(var_648) = &input.availability_zone {
scope_647.string(var_648);
}
#[allow(unused_mut)]
let mut scope_649 = writer.prefix("DryRun");
if let Some(var_650) = &input.dry_run {
scope_649.boolean(*var_650);
}
#[allow(unused_mut)]
let mut scope_651 = writer.prefix("Ipv6Native");
if let Some(var_652) = &input.ipv6_native {
scope_651.boolean(*var_652);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_default_vpc(
input: &crate::input::CreateDefaultVpcInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateDefaultVpc", "2016-11-15");
#[allow(unused_mut)]
let mut scope_653 = writer.prefix("DryRun");
if let Some(var_654) = &input.dry_run {
scope_653.boolean(*var_654);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_dhcp_options(
input: &crate::input::CreateDhcpOptionsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateDhcpOptions", "2016-11-15");
#[allow(unused_mut)]
let mut scope_655 = writer.prefix("DhcpConfiguration");
if let Some(var_656) = &input.dhcp_configurations {
let mut list_658 = scope_655.start_list(true, Some("item"));
for item_657 in var_656 {
#[allow(unused_mut)]
let mut entry_659 = list_658.entry();
crate::query_ser::serialize_structure_crate_model_new_dhcp_configuration(
entry_659, item_657,
)?;
}
list_658.finish();
}
#[allow(unused_mut)]
let mut scope_660 = writer.prefix("TagSpecification");
if let Some(var_661) = &input.tag_specifications {
let mut list_663 = scope_660.start_list(true, Some("item"));
for item_662 in var_661 {
#[allow(unused_mut)]
let mut entry_664 = list_663.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_664, item_662,
)?;
}
list_663.finish();
}
#[allow(unused_mut)]
let mut scope_665 = writer.prefix("DryRun");
if let Some(var_666) = &input.dry_run {
scope_665.boolean(*var_666);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_egress_only_internet_gateway(
input: &crate::input::CreateEgressOnlyInternetGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateEgressOnlyInternetGateway",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_667 = writer.prefix("ClientToken");
if let Some(var_668) = &input.client_token {
scope_667.string(var_668);
}
#[allow(unused_mut)]
let mut scope_669 = writer.prefix("DryRun");
if let Some(var_670) = &input.dry_run {
scope_669.boolean(*var_670);
}
#[allow(unused_mut)]
let mut scope_671 = writer.prefix("VpcId");
if let Some(var_672) = &input.vpc_id {
scope_671.string(var_672);
}
#[allow(unused_mut)]
let mut scope_673 = writer.prefix("TagSpecification");
if let Some(var_674) = &input.tag_specifications {
let mut list_676 = scope_673.start_list(true, Some("item"));
for item_675 in var_674 {
#[allow(unused_mut)]
let mut entry_677 = list_676.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_677, item_675,
)?;
}
list_676.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_fleet(
input: &crate::input::CreateFleetInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateFleet", "2016-11-15");
#[allow(unused_mut)]
let mut scope_678 = writer.prefix("DryRun");
if let Some(var_679) = &input.dry_run {
scope_678.boolean(*var_679);
}
#[allow(unused_mut)]
let mut scope_680 = writer.prefix("ClientToken");
if let Some(var_681) = &input.client_token {
scope_680.string(var_681);
}
#[allow(unused_mut)]
let mut scope_682 = writer.prefix("SpotOptions");
if let Some(var_683) = &input.spot_options {
crate::query_ser::serialize_structure_crate_model_spot_options_request(scope_682, var_683)?;
}
#[allow(unused_mut)]
let mut scope_684 = writer.prefix("OnDemandOptions");
if let Some(var_685) = &input.on_demand_options {
crate::query_ser::serialize_structure_crate_model_on_demand_options_request(
scope_684, var_685,
)?;
}
#[allow(unused_mut)]
let mut scope_686 = writer.prefix("ExcessCapacityTerminationPolicy");
if let Some(var_687) = &input.excess_capacity_termination_policy {
scope_686.string(var_687.as_str());
}
#[allow(unused_mut)]
let mut scope_688 = writer.prefix("LaunchTemplateConfigs");
if let Some(var_689) = &input.launch_template_configs {
let mut list_691 = scope_688.start_list(true, Some("item"));
for item_690 in var_689 {
#[allow(unused_mut)]
let mut entry_692 = list_691.entry();
crate::query_ser::serialize_structure_crate_model_fleet_launch_template_config_request(
entry_692, item_690,
)?;
}
list_691.finish();
}
#[allow(unused_mut)]
let mut scope_693 = writer.prefix("TargetCapacitySpecification");
if let Some(var_694) = &input.target_capacity_specification {
crate::query_ser::serialize_structure_crate_model_target_capacity_specification_request(
scope_693, var_694,
)?;
}
#[allow(unused_mut)]
let mut scope_695 = writer.prefix("TerminateInstancesWithExpiration");
if let Some(var_696) = &input.terminate_instances_with_expiration {
scope_695.boolean(*var_696);
}
#[allow(unused_mut)]
let mut scope_697 = writer.prefix("Type");
if let Some(var_698) = &input.r#type {
scope_697.string(var_698.as_str());
}
#[allow(unused_mut)]
let mut scope_699 = writer.prefix("ValidFrom");
if let Some(var_700) = &input.valid_from {
scope_699.date_time(var_700, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_701 = writer.prefix("ValidUntil");
if let Some(var_702) = &input.valid_until {
scope_701.date_time(var_702, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_703 = writer.prefix("ReplaceUnhealthyInstances");
if let Some(var_704) = &input.replace_unhealthy_instances {
scope_703.boolean(*var_704);
}
#[allow(unused_mut)]
let mut scope_705 = writer.prefix("TagSpecification");
if let Some(var_706) = &input.tag_specifications {
let mut list_708 = scope_705.start_list(true, Some("item"));
for item_707 in var_706 {
#[allow(unused_mut)]
let mut entry_709 = list_708.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_709, item_707,
)?;
}
list_708.finish();
}
#[allow(unused_mut)]
let mut scope_710 = writer.prefix("Context");
if let Some(var_711) = &input.context {
scope_710.string(var_711);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_flow_logs(
input: &crate::input::CreateFlowLogsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateFlowLogs", "2016-11-15");
#[allow(unused_mut)]
let mut scope_712 = writer.prefix("DryRun");
if let Some(var_713) = &input.dry_run {
scope_712.boolean(*var_713);
}
#[allow(unused_mut)]
let mut scope_714 = writer.prefix("ClientToken");
if let Some(var_715) = &input.client_token {
scope_714.string(var_715);
}
#[allow(unused_mut)]
let mut scope_716 = writer.prefix("DeliverLogsPermissionArn");
if let Some(var_717) = &input.deliver_logs_permission_arn {
scope_716.string(var_717);
}
#[allow(unused_mut)]
let mut scope_718 = writer.prefix("DeliverCrossAccountRole");
if let Some(var_719) = &input.deliver_cross_account_role {
scope_718.string(var_719);
}
#[allow(unused_mut)]
let mut scope_720 = writer.prefix("LogGroupName");
if let Some(var_721) = &input.log_group_name {
scope_720.string(var_721);
}
#[allow(unused_mut)]
let mut scope_722 = writer.prefix("ResourceId");
if let Some(var_723) = &input.resource_ids {
let mut list_725 = scope_722.start_list(true, Some("item"));
for item_724 in var_723 {
#[allow(unused_mut)]
let mut entry_726 = list_725.entry();
entry_726.string(item_724);
}
list_725.finish();
}
#[allow(unused_mut)]
let mut scope_727 = writer.prefix("ResourceType");
if let Some(var_728) = &input.resource_type {
scope_727.string(var_728.as_str());
}
#[allow(unused_mut)]
let mut scope_729 = writer.prefix("TrafficType");
if let Some(var_730) = &input.traffic_type {
scope_729.string(var_730.as_str());
}
#[allow(unused_mut)]
let mut scope_731 = writer.prefix("LogDestinationType");
if let Some(var_732) = &input.log_destination_type {
scope_731.string(var_732.as_str());
}
#[allow(unused_mut)]
let mut scope_733 = writer.prefix("LogDestination");
if let Some(var_734) = &input.log_destination {
scope_733.string(var_734);
}
#[allow(unused_mut)]
let mut scope_735 = writer.prefix("LogFormat");
if let Some(var_736) = &input.log_format {
scope_735.string(var_736);
}
#[allow(unused_mut)]
let mut scope_737 = writer.prefix("TagSpecification");
if let Some(var_738) = &input.tag_specifications {
let mut list_740 = scope_737.start_list(true, Some("item"));
for item_739 in var_738 {
#[allow(unused_mut)]
let mut entry_741 = list_740.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_741, item_739,
)?;
}
list_740.finish();
}
#[allow(unused_mut)]
let mut scope_742 = writer.prefix("MaxAggregationInterval");
if let Some(var_743) = &input.max_aggregation_interval {
scope_742.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_743).into()),
);
}
#[allow(unused_mut)]
let mut scope_744 = writer.prefix("DestinationOptions");
if let Some(var_745) = &input.destination_options {
crate::query_ser::serialize_structure_crate_model_destination_options_request(
scope_744, var_745,
)?;
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_fpga_image(
input: &crate::input::CreateFpgaImageInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateFpgaImage", "2016-11-15");
#[allow(unused_mut)]
let mut scope_746 = writer.prefix("DryRun");
if let Some(var_747) = &input.dry_run {
scope_746.boolean(*var_747);
}
#[allow(unused_mut)]
let mut scope_748 = writer.prefix("InputStorageLocation");
if let Some(var_749) = &input.input_storage_location {
crate::query_ser::serialize_structure_crate_model_storage_location(scope_748, var_749)?;
}
#[allow(unused_mut)]
let mut scope_750 = writer.prefix("LogsStorageLocation");
if let Some(var_751) = &input.logs_storage_location {
crate::query_ser::serialize_structure_crate_model_storage_location(scope_750, var_751)?;
}
#[allow(unused_mut)]
let mut scope_752 = writer.prefix("Description");
if let Some(var_753) = &input.description {
scope_752.string(var_753);
}
#[allow(unused_mut)]
let mut scope_754 = writer.prefix("Name");
if let Some(var_755) = &input.name {
scope_754.string(var_755);
}
#[allow(unused_mut)]
let mut scope_756 = writer.prefix("ClientToken");
if let Some(var_757) = &input.client_token {
scope_756.string(var_757);
}
#[allow(unused_mut)]
let mut scope_758 = writer.prefix("TagSpecification");
if let Some(var_759) = &input.tag_specifications {
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_tag_specification(
entry_762, item_760,
)?;
}
list_761.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_image(
input: &crate::input::CreateImageInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateImage", "2016-11-15");
#[allow(unused_mut)]
let mut scope_763 = writer.prefix("BlockDeviceMapping");
if let Some(var_764) = &input.block_device_mappings {
let mut list_766 = scope_763.start_list(true, Some("BlockDeviceMapping"));
for item_765 in var_764 {
#[allow(unused_mut)]
let mut entry_767 = list_766.entry();
crate::query_ser::serialize_structure_crate_model_block_device_mapping(
entry_767, item_765,
)?;
}
list_766.finish();
}
#[allow(unused_mut)]
let mut scope_768 = writer.prefix("Description");
if let Some(var_769) = &input.description {
scope_768.string(var_769);
}
#[allow(unused_mut)]
let mut scope_770 = writer.prefix("DryRun");
if let Some(var_771) = &input.dry_run {
scope_770.boolean(*var_771);
}
#[allow(unused_mut)]
let mut scope_772 = writer.prefix("InstanceId");
if let Some(var_773) = &input.instance_id {
scope_772.string(var_773);
}
#[allow(unused_mut)]
let mut scope_774 = writer.prefix("Name");
if let Some(var_775) = &input.name {
scope_774.string(var_775);
}
#[allow(unused_mut)]
let mut scope_776 = writer.prefix("NoReboot");
if let Some(var_777) = &input.no_reboot {
scope_776.boolean(*var_777);
}
#[allow(unused_mut)]
let mut scope_778 = writer.prefix("TagSpecification");
if let Some(var_779) = &input.tag_specifications {
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_tag_specification(
entry_782, item_780,
)?;
}
list_781.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_instance_event_window(
input: &crate::input::CreateInstanceEventWindowInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateInstanceEventWindow", "2016-11-15");
#[allow(unused_mut)]
let mut scope_783 = writer.prefix("DryRun");
if let Some(var_784) = &input.dry_run {
scope_783.boolean(*var_784);
}
#[allow(unused_mut)]
let mut scope_785 = writer.prefix("Name");
if let Some(var_786) = &input.name {
scope_785.string(var_786);
}
#[allow(unused_mut)]
let mut scope_787 = writer.prefix("TimeRange");
if let Some(var_788) = &input.time_ranges {
let mut list_790 = scope_787.start_list(true, None);
for item_789 in var_788 {
#[allow(unused_mut)]
let mut entry_791 = list_790.entry();
crate::query_ser::serialize_structure_crate_model_instance_event_window_time_range_request(entry_791, item_789)?;
}
list_790.finish();
}
#[allow(unused_mut)]
let mut scope_792 = writer.prefix("CronExpression");
if let Some(var_793) = &input.cron_expression {
scope_792.string(var_793);
}
#[allow(unused_mut)]
let mut scope_794 = writer.prefix("TagSpecification");
if let Some(var_795) = &input.tag_specifications {
let mut list_797 = scope_794.start_list(true, Some("item"));
for item_796 in var_795 {
#[allow(unused_mut)]
let mut entry_798 = list_797.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_798, item_796,
)?;
}
list_797.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_instance_export_task(
input: &crate::input::CreateInstanceExportTaskInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateInstanceExportTask", "2016-11-15");
#[allow(unused_mut)]
let mut scope_799 = writer.prefix("Description");
if let Some(var_800) = &input.description {
scope_799.string(var_800);
}
#[allow(unused_mut)]
let mut scope_801 = writer.prefix("ExportToS3");
if let Some(var_802) = &input.export_to_s3_task {
crate::query_ser::serialize_structure_crate_model_export_to_s3_task_specification(
scope_801, var_802,
)?;
}
#[allow(unused_mut)]
let mut scope_803 = writer.prefix("InstanceId");
if let Some(var_804) = &input.instance_id {
scope_803.string(var_804);
}
#[allow(unused_mut)]
let mut scope_805 = writer.prefix("TargetEnvironment");
if let Some(var_806) = &input.target_environment {
scope_805.string(var_806.as_str());
}
#[allow(unused_mut)]
let mut scope_807 = writer.prefix("TagSpecification");
if let Some(var_808) = &input.tag_specifications {
let mut list_810 = scope_807.start_list(true, Some("item"));
for item_809 in var_808 {
#[allow(unused_mut)]
let mut entry_811 = list_810.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_811, item_809,
)?;
}
list_810.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_internet_gateway(
input: &crate::input::CreateInternetGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateInternetGateway", "2016-11-15");
#[allow(unused_mut)]
let mut scope_812 = writer.prefix("TagSpecification");
if let Some(var_813) = &input.tag_specifications {
let mut list_815 = scope_812.start_list(true, Some("item"));
for item_814 in var_813 {
#[allow(unused_mut)]
let mut entry_816 = list_815.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_816, item_814,
)?;
}
list_815.finish();
}
#[allow(unused_mut)]
let mut scope_817 = writer.prefix("DryRun");
if let Some(var_818) = &input.dry_run {
scope_817.boolean(*var_818);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_ipam(
input: &crate::input::CreateIpamInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateIpam", "2016-11-15");
#[allow(unused_mut)]
let mut scope_819 = writer.prefix("DryRun");
if let Some(var_820) = &input.dry_run {
scope_819.boolean(*var_820);
}
#[allow(unused_mut)]
let mut scope_821 = writer.prefix("Description");
if let Some(var_822) = &input.description {
scope_821.string(var_822);
}
#[allow(unused_mut)]
let mut scope_823 = writer.prefix("OperatingRegion");
if let Some(var_824) = &input.operating_regions {
let mut list_826 = scope_823.start_list(true, None);
for item_825 in var_824 {
#[allow(unused_mut)]
let mut entry_827 = list_826.entry();
crate::query_ser::serialize_structure_crate_model_add_ipam_operating_region(
entry_827, item_825,
)?;
}
list_826.finish();
}
#[allow(unused_mut)]
let mut scope_828 = writer.prefix("TagSpecification");
if let Some(var_829) = &input.tag_specifications {
let mut list_831 = scope_828.start_list(true, Some("item"));
for item_830 in var_829 {
#[allow(unused_mut)]
let mut entry_832 = list_831.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_832, item_830,
)?;
}
list_831.finish();
}
#[allow(unused_mut)]
let mut scope_833 = writer.prefix("ClientToken");
if let Some(var_834) = &input.client_token {
scope_833.string(var_834);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_ipam_pool(
input: &crate::input::CreateIpamPoolInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateIpamPool", "2016-11-15");
#[allow(unused_mut)]
let mut scope_835 = writer.prefix("DryRun");
if let Some(var_836) = &input.dry_run {
scope_835.boolean(*var_836);
}
#[allow(unused_mut)]
let mut scope_837 = writer.prefix("IpamScopeId");
if let Some(var_838) = &input.ipam_scope_id {
scope_837.string(var_838);
}
#[allow(unused_mut)]
let mut scope_839 = writer.prefix("Locale");
if let Some(var_840) = &input.locale {
scope_839.string(var_840);
}
#[allow(unused_mut)]
let mut scope_841 = writer.prefix("SourceIpamPoolId");
if let Some(var_842) = &input.source_ipam_pool_id {
scope_841.string(var_842);
}
#[allow(unused_mut)]
let mut scope_843 = writer.prefix("Description");
if let Some(var_844) = &input.description {
scope_843.string(var_844);
}
#[allow(unused_mut)]
let mut scope_845 = writer.prefix("AddressFamily");
if let Some(var_846) = &input.address_family {
scope_845.string(var_846.as_str());
}
#[allow(unused_mut)]
let mut scope_847 = writer.prefix("AutoImport");
if let Some(var_848) = &input.auto_import {
scope_847.boolean(*var_848);
}
#[allow(unused_mut)]
let mut scope_849 = writer.prefix("PubliclyAdvertisable");
if let Some(var_850) = &input.publicly_advertisable {
scope_849.boolean(*var_850);
}
#[allow(unused_mut)]
let mut scope_851 = writer.prefix("AllocationMinNetmaskLength");
if let Some(var_852) = &input.allocation_min_netmask_length {
scope_851.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_852).into()),
);
}
#[allow(unused_mut)]
let mut scope_853 = writer.prefix("AllocationMaxNetmaskLength");
if let Some(var_854) = &input.allocation_max_netmask_length {
scope_853.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_854).into()),
);
}
#[allow(unused_mut)]
let mut scope_855 = writer.prefix("AllocationDefaultNetmaskLength");
if let Some(var_856) = &input.allocation_default_netmask_length {
scope_855.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_856).into()),
);
}
#[allow(unused_mut)]
let mut scope_857 = writer.prefix("AllocationResourceTag");
if let Some(var_858) = &input.allocation_resource_tags {
let mut list_860 = scope_857.start_list(true, Some("item"));
for item_859 in var_858 {
#[allow(unused_mut)]
let mut entry_861 = list_860.entry();
crate::query_ser::serialize_structure_crate_model_request_ipam_resource_tag(
entry_861, item_859,
)?;
}
list_860.finish();
}
#[allow(unused_mut)]
let mut scope_862 = writer.prefix("TagSpecification");
if let Some(var_863) = &input.tag_specifications {
let mut list_865 = scope_862.start_list(true, Some("item"));
for item_864 in var_863 {
#[allow(unused_mut)]
let mut entry_866 = list_865.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_866, item_864,
)?;
}
list_865.finish();
}
#[allow(unused_mut)]
let mut scope_867 = writer.prefix("ClientToken");
if let Some(var_868) = &input.client_token {
scope_867.string(var_868);
}
#[allow(unused_mut)]
let mut scope_869 = writer.prefix("AwsService");
if let Some(var_870) = &input.aws_service {
scope_869.string(var_870.as_str());
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_ipam_scope(
input: &crate::input::CreateIpamScopeInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateIpamScope", "2016-11-15");
#[allow(unused_mut)]
let mut scope_871 = writer.prefix("DryRun");
if let Some(var_872) = &input.dry_run {
scope_871.boolean(*var_872);
}
#[allow(unused_mut)]
let mut scope_873 = writer.prefix("IpamId");
if let Some(var_874) = &input.ipam_id {
scope_873.string(var_874);
}
#[allow(unused_mut)]
let mut scope_875 = writer.prefix("Description");
if let Some(var_876) = &input.description {
scope_875.string(var_876);
}
#[allow(unused_mut)]
let mut scope_877 = writer.prefix("TagSpecification");
if let Some(var_878) = &input.tag_specifications {
let mut list_880 = scope_877.start_list(true, Some("item"));
for item_879 in var_878 {
#[allow(unused_mut)]
let mut entry_881 = list_880.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_881, item_879,
)?;
}
list_880.finish();
}
#[allow(unused_mut)]
let mut scope_882 = writer.prefix("ClientToken");
if let Some(var_883) = &input.client_token {
scope_882.string(var_883);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_key_pair(
input: &crate::input::CreateKeyPairInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateKeyPair", "2016-11-15");
#[allow(unused_mut)]
let mut scope_884 = writer.prefix("KeyName");
if let Some(var_885) = &input.key_name {
scope_884.string(var_885);
}
#[allow(unused_mut)]
let mut scope_886 = writer.prefix("DryRun");
if let Some(var_887) = &input.dry_run {
scope_886.boolean(*var_887);
}
#[allow(unused_mut)]
let mut scope_888 = writer.prefix("KeyType");
if let Some(var_889) = &input.key_type {
scope_888.string(var_889.as_str());
}
#[allow(unused_mut)]
let mut scope_890 = writer.prefix("TagSpecification");
if let Some(var_891) = &input.tag_specifications {
let mut list_893 = scope_890.start_list(true, Some("item"));
for item_892 in var_891 {
#[allow(unused_mut)]
let mut entry_894 = list_893.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_894, item_892,
)?;
}
list_893.finish();
}
#[allow(unused_mut)]
let mut scope_895 = writer.prefix("KeyFormat");
if let Some(var_896) = &input.key_format {
scope_895.string(var_896.as_str());
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_launch_template(
input: &crate::input::CreateLaunchTemplateInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateLaunchTemplate", "2016-11-15");
#[allow(unused_mut)]
let mut scope_897 = writer.prefix("DryRun");
if let Some(var_898) = &input.dry_run {
scope_897.boolean(*var_898);
}
#[allow(unused_mut)]
let mut scope_899 = writer.prefix("ClientToken");
if let Some(var_900) = &input.client_token {
scope_899.string(var_900);
}
#[allow(unused_mut)]
let mut scope_901 = writer.prefix("LaunchTemplateName");
if let Some(var_902) = &input.launch_template_name {
scope_901.string(var_902);
}
#[allow(unused_mut)]
let mut scope_903 = writer.prefix("VersionDescription");
if let Some(var_904) = &input.version_description {
scope_903.string(var_904);
}
#[allow(unused_mut)]
let mut scope_905 = writer.prefix("LaunchTemplateData");
if let Some(var_906) = &input.launch_template_data {
crate::query_ser::serialize_structure_crate_model_request_launch_template_data(
scope_905, var_906,
)?;
}
#[allow(unused_mut)]
let mut scope_907 = writer.prefix("TagSpecification");
if let Some(var_908) = &input.tag_specifications {
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_tag_specification(
entry_911, item_909,
)?;
}
list_910.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_launch_template_version(
input: &crate::input::CreateLaunchTemplateVersionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateLaunchTemplateVersion", "2016-11-15");
#[allow(unused_mut)]
let mut scope_912 = writer.prefix("DryRun");
if let Some(var_913) = &input.dry_run {
scope_912.boolean(*var_913);
}
#[allow(unused_mut)]
let mut scope_914 = writer.prefix("ClientToken");
if let Some(var_915) = &input.client_token {
scope_914.string(var_915);
}
#[allow(unused_mut)]
let mut scope_916 = writer.prefix("LaunchTemplateId");
if let Some(var_917) = &input.launch_template_id {
scope_916.string(var_917);
}
#[allow(unused_mut)]
let mut scope_918 = writer.prefix("LaunchTemplateName");
if let Some(var_919) = &input.launch_template_name {
scope_918.string(var_919);
}
#[allow(unused_mut)]
let mut scope_920 = writer.prefix("SourceVersion");
if let Some(var_921) = &input.source_version {
scope_920.string(var_921);
}
#[allow(unused_mut)]
let mut scope_922 = writer.prefix("VersionDescription");
if let Some(var_923) = &input.version_description {
scope_922.string(var_923);
}
#[allow(unused_mut)]
let mut scope_924 = writer.prefix("LaunchTemplateData");
if let Some(var_925) = &input.launch_template_data {
crate::query_ser::serialize_structure_crate_model_request_launch_template_data(
scope_924, var_925,
)?;
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_local_gateway_route(
input: &crate::input::CreateLocalGatewayRouteInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateLocalGatewayRoute", "2016-11-15");
#[allow(unused_mut)]
let mut scope_926 = writer.prefix("DestinationCidrBlock");
if let Some(var_927) = &input.destination_cidr_block {
scope_926.string(var_927);
}
#[allow(unused_mut)]
let mut scope_928 = writer.prefix("LocalGatewayRouteTableId");
if let Some(var_929) = &input.local_gateway_route_table_id {
scope_928.string(var_929);
}
#[allow(unused_mut)]
let mut scope_930 = writer.prefix("LocalGatewayVirtualInterfaceGroupId");
if let Some(var_931) = &input.local_gateway_virtual_interface_group_id {
scope_930.string(var_931);
}
#[allow(unused_mut)]
let mut scope_932 = writer.prefix("DryRun");
if let Some(var_933) = &input.dry_run {
scope_932.boolean(*var_933);
}
#[allow(unused_mut)]
let mut scope_934 = writer.prefix("NetworkInterfaceId");
if let Some(var_935) = &input.network_interface_id {
scope_934.string(var_935);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_local_gateway_route_table(
input: &crate::input::CreateLocalGatewayRouteTableInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateLocalGatewayRouteTable", "2016-11-15");
#[allow(unused_mut)]
let mut scope_936 = writer.prefix("LocalGatewayId");
if let Some(var_937) = &input.local_gateway_id {
scope_936.string(var_937);
}
#[allow(unused_mut)]
let mut scope_938 = writer.prefix("Mode");
if let Some(var_939) = &input.mode {
scope_938.string(var_939.as_str());
}
#[allow(unused_mut)]
let mut scope_940 = writer.prefix("TagSpecification");
if let Some(var_941) = &input.tag_specifications {
let mut list_943 = scope_940.start_list(true, Some("item"));
for item_942 in var_941 {
#[allow(unused_mut)]
let mut entry_944 = list_943.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_944, item_942,
)?;
}
list_943.finish();
}
#[allow(unused_mut)]
let mut scope_945 = writer.prefix("DryRun");
if let Some(var_946) = &input.dry_run {
scope_945.boolean(*var_946);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_local_gateway_route_table_virtual_interface_group_association(
input: &crate::input::CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateLocalGatewayRouteTableVirtualInterfaceGroupAssociation",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_947 = writer.prefix("LocalGatewayRouteTableId");
if let Some(var_948) = &input.local_gateway_route_table_id {
scope_947.string(var_948);
}
#[allow(unused_mut)]
let mut scope_949 = writer.prefix("LocalGatewayVirtualInterfaceGroupId");
if let Some(var_950) = &input.local_gateway_virtual_interface_group_id {
scope_949.string(var_950);
}
#[allow(unused_mut)]
let mut scope_951 = writer.prefix("TagSpecification");
if let Some(var_952) = &input.tag_specifications {
let mut list_954 = scope_951.start_list(true, Some("item"));
for item_953 in var_952 {
#[allow(unused_mut)]
let mut entry_955 = list_954.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_955, item_953,
)?;
}
list_954.finish();
}
#[allow(unused_mut)]
let mut scope_956 = writer.prefix("DryRun");
if let Some(var_957) = &input.dry_run {
scope_956.boolean(*var_957);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_local_gateway_route_table_vpc_association(
input: &crate::input::CreateLocalGatewayRouteTableVpcAssociationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateLocalGatewayRouteTableVpcAssociation",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_958 = writer.prefix("LocalGatewayRouteTableId");
if let Some(var_959) = &input.local_gateway_route_table_id {
scope_958.string(var_959);
}
#[allow(unused_mut)]
let mut scope_960 = writer.prefix("VpcId");
if let Some(var_961) = &input.vpc_id {
scope_960.string(var_961);
}
#[allow(unused_mut)]
let mut scope_962 = writer.prefix("TagSpecification");
if let Some(var_963) = &input.tag_specifications {
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_tag_specification(
entry_966, item_964,
)?;
}
list_965.finish();
}
#[allow(unused_mut)]
let mut scope_967 = writer.prefix("DryRun");
if let Some(var_968) = &input.dry_run {
scope_967.boolean(*var_968);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_managed_prefix_list(
input: &crate::input::CreateManagedPrefixListInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateManagedPrefixList", "2016-11-15");
#[allow(unused_mut)]
let mut scope_969 = writer.prefix("DryRun");
if let Some(var_970) = &input.dry_run {
scope_969.boolean(*var_970);
}
#[allow(unused_mut)]
let mut scope_971 = writer.prefix("PrefixListName");
if let Some(var_972) = &input.prefix_list_name {
scope_971.string(var_972);
}
#[allow(unused_mut)]
let mut scope_973 = writer.prefix("Entry");
if let Some(var_974) = &input.entries {
let mut list_976 = scope_973.start_list(true, None);
for item_975 in var_974 {
#[allow(unused_mut)]
let mut entry_977 = list_976.entry();
crate::query_ser::serialize_structure_crate_model_add_prefix_list_entry(
entry_977, item_975,
)?;
}
list_976.finish();
}
#[allow(unused_mut)]
let mut scope_978 = writer.prefix("MaxEntries");
if let Some(var_979) = &input.max_entries {
scope_978.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_979).into()),
);
}
#[allow(unused_mut)]
let mut scope_980 = writer.prefix("TagSpecification");
if let Some(var_981) = &input.tag_specifications {
let mut list_983 = scope_980.start_list(true, Some("item"));
for item_982 in var_981 {
#[allow(unused_mut)]
let mut entry_984 = list_983.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_984, item_982,
)?;
}
list_983.finish();
}
#[allow(unused_mut)]
let mut scope_985 = writer.prefix("AddressFamily");
if let Some(var_986) = &input.address_family {
scope_985.string(var_986);
}
#[allow(unused_mut)]
let mut scope_987 = writer.prefix("ClientToken");
if let Some(var_988) = &input.client_token {
scope_987.string(var_988);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_nat_gateway(
input: &crate::input::CreateNatGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateNatGateway", "2016-11-15");
#[allow(unused_mut)]
let mut scope_989 = writer.prefix("AllocationId");
if let Some(var_990) = &input.allocation_id {
scope_989.string(var_990);
}
#[allow(unused_mut)]
let mut scope_991 = writer.prefix("ClientToken");
if let Some(var_992) = &input.client_token {
scope_991.string(var_992);
}
#[allow(unused_mut)]
let mut scope_993 = writer.prefix("DryRun");
if let Some(var_994) = &input.dry_run {
scope_993.boolean(*var_994);
}
#[allow(unused_mut)]
let mut scope_995 = writer.prefix("SubnetId");
if let Some(var_996) = &input.subnet_id {
scope_995.string(var_996);
}
#[allow(unused_mut)]
let mut scope_997 = writer.prefix("TagSpecification");
if let Some(var_998) = &input.tag_specifications {
let mut list_1000 = scope_997.start_list(true, Some("item"));
for item_999 in var_998 {
#[allow(unused_mut)]
let mut entry_1001 = list_1000.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1001, item_999,
)?;
}
list_1000.finish();
}
#[allow(unused_mut)]
let mut scope_1002 = writer.prefix("ConnectivityType");
if let Some(var_1003) = &input.connectivity_type {
scope_1002.string(var_1003.as_str());
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_acl(
input: &crate::input::CreateNetworkAclInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateNetworkAcl", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1004 = writer.prefix("DryRun");
if let Some(var_1005) = &input.dry_run {
scope_1004.boolean(*var_1005);
}
#[allow(unused_mut)]
let mut scope_1006 = writer.prefix("VpcId");
if let Some(var_1007) = &input.vpc_id {
scope_1006.string(var_1007);
}
#[allow(unused_mut)]
let mut scope_1008 = writer.prefix("TagSpecification");
if let Some(var_1009) = &input.tag_specifications {
let mut list_1011 = scope_1008.start_list(true, Some("item"));
for item_1010 in var_1009 {
#[allow(unused_mut)]
let mut entry_1012 = list_1011.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1012, item_1010,
)?;
}
list_1011.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_acl_entry(
input: &crate::input::CreateNetworkAclEntryInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateNetworkAclEntry", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1013 = writer.prefix("CidrBlock");
if let Some(var_1014) = &input.cidr_block {
scope_1013.string(var_1014);
}
#[allow(unused_mut)]
let mut scope_1015 = writer.prefix("DryRun");
if let Some(var_1016) = &input.dry_run {
scope_1015.boolean(*var_1016);
}
#[allow(unused_mut)]
let mut scope_1017 = writer.prefix("Egress");
if let Some(var_1018) = &input.egress {
scope_1017.boolean(*var_1018);
}
#[allow(unused_mut)]
let mut scope_1019 = writer.prefix("Icmp");
if let Some(var_1020) = &input.icmp_type_code {
crate::query_ser::serialize_structure_crate_model_icmp_type_code(scope_1019, var_1020)?;
}
#[allow(unused_mut)]
let mut scope_1021 = writer.prefix("Ipv6CidrBlock");
if let Some(var_1022) = &input.ipv6_cidr_block {
scope_1021.string(var_1022);
}
#[allow(unused_mut)]
let mut scope_1023 = writer.prefix("NetworkAclId");
if let Some(var_1024) = &input.network_acl_id {
scope_1023.string(var_1024);
}
#[allow(unused_mut)]
let mut scope_1025 = writer.prefix("PortRange");
if let Some(var_1026) = &input.port_range {
crate::query_ser::serialize_structure_crate_model_port_range(scope_1025, var_1026)?;
}
#[allow(unused_mut)]
let mut scope_1027 = writer.prefix("Protocol");
if let Some(var_1028) = &input.protocol {
scope_1027.string(var_1028);
}
#[allow(unused_mut)]
let mut scope_1029 = writer.prefix("RuleAction");
if let Some(var_1030) = &input.rule_action {
scope_1029.string(var_1030.as_str());
}
#[allow(unused_mut)]
let mut scope_1031 = writer.prefix("RuleNumber");
if let Some(var_1032) = &input.rule_number {
scope_1031.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1032).into()),
);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_insights_access_scope(
input: &crate::input::CreateNetworkInsightsAccessScopeInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateNetworkInsightsAccessScope",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1033 = writer.prefix("MatchPath");
if let Some(var_1034) = &input.match_paths {
let mut list_1036 = scope_1033.start_list(true, Some("item"));
for item_1035 in var_1034 {
#[allow(unused_mut)]
let mut entry_1037 = list_1036.entry();
crate::query_ser::serialize_structure_crate_model_access_scope_path_request(
entry_1037, item_1035,
)?;
}
list_1036.finish();
}
#[allow(unused_mut)]
let mut scope_1038 = writer.prefix("ExcludePath");
if let Some(var_1039) = &input.exclude_paths {
let mut list_1041 = scope_1038.start_list(true, Some("item"));
for item_1040 in var_1039 {
#[allow(unused_mut)]
let mut entry_1042 = list_1041.entry();
crate::query_ser::serialize_structure_crate_model_access_scope_path_request(
entry_1042, item_1040,
)?;
}
list_1041.finish();
}
#[allow(unused_mut)]
let mut scope_1043 = writer.prefix("ClientToken");
if let Some(var_1044) = &input.client_token {
scope_1043.string(var_1044);
}
#[allow(unused_mut)]
let mut scope_1045 = writer.prefix("TagSpecification");
if let Some(var_1046) = &input.tag_specifications {
let mut list_1048 = scope_1045.start_list(true, Some("item"));
for item_1047 in var_1046 {
#[allow(unused_mut)]
let mut entry_1049 = list_1048.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1049, item_1047,
)?;
}
list_1048.finish();
}
#[allow(unused_mut)]
let mut scope_1050 = writer.prefix("DryRun");
if let Some(var_1051) = &input.dry_run {
scope_1050.boolean(*var_1051);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_insights_path(
input: &crate::input::CreateNetworkInsightsPathInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateNetworkInsightsPath", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1052 = writer.prefix("SourceIp");
if let Some(var_1053) = &input.source_ip {
scope_1052.string(var_1053);
}
#[allow(unused_mut)]
let mut scope_1054 = writer.prefix("DestinationIp");
if let Some(var_1055) = &input.destination_ip {
scope_1054.string(var_1055);
}
#[allow(unused_mut)]
let mut scope_1056 = writer.prefix("Source");
if let Some(var_1057) = &input.source {
scope_1056.string(var_1057);
}
#[allow(unused_mut)]
let mut scope_1058 = writer.prefix("Destination");
if let Some(var_1059) = &input.destination {
scope_1058.string(var_1059);
}
#[allow(unused_mut)]
let mut scope_1060 = writer.prefix("Protocol");
if let Some(var_1061) = &input.protocol {
scope_1060.string(var_1061.as_str());
}
#[allow(unused_mut)]
let mut scope_1062 = writer.prefix("DestinationPort");
if let Some(var_1063) = &input.destination_port {
scope_1062.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1063).into()),
);
}
#[allow(unused_mut)]
let mut scope_1064 = writer.prefix("TagSpecification");
if let Some(var_1065) = &input.tag_specifications {
let mut list_1067 = scope_1064.start_list(true, Some("item"));
for item_1066 in var_1065 {
#[allow(unused_mut)]
let mut entry_1068 = list_1067.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1068, item_1066,
)?;
}
list_1067.finish();
}
#[allow(unused_mut)]
let mut scope_1069 = writer.prefix("DryRun");
if let Some(var_1070) = &input.dry_run {
scope_1069.boolean(*var_1070);
}
#[allow(unused_mut)]
let mut scope_1071 = writer.prefix("ClientToken");
if let Some(var_1072) = &input.client_token {
scope_1071.string(var_1072);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_interface(
input: &crate::input::CreateNetworkInterfaceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateNetworkInterface", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1073 = writer.prefix("Description");
if let Some(var_1074) = &input.description {
scope_1073.string(var_1074);
}
#[allow(unused_mut)]
let mut scope_1075 = writer.prefix("DryRun");
if let Some(var_1076) = &input.dry_run {
scope_1075.boolean(*var_1076);
}
#[allow(unused_mut)]
let mut scope_1077 = writer.prefix("SecurityGroupId");
if let Some(var_1078) = &input.groups {
let mut list_1080 = scope_1077.start_list(true, Some("SecurityGroupId"));
for item_1079 in var_1078 {
#[allow(unused_mut)]
let mut entry_1081 = list_1080.entry();
entry_1081.string(item_1079);
}
list_1080.finish();
}
#[allow(unused_mut)]
let mut scope_1082 = writer.prefix("Ipv6AddressCount");
if let Some(var_1083) = &input.ipv6_address_count {
scope_1082.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1083).into()),
);
}
#[allow(unused_mut)]
let mut scope_1084 = writer.prefix("Ipv6Addresses");
if let Some(var_1085) = &input.ipv6_addresses {
let mut list_1087 = scope_1084.start_list(true, Some("item"));
for item_1086 in var_1085 {
#[allow(unused_mut)]
let mut entry_1088 = list_1087.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address(
entry_1088, item_1086,
)?;
}
list_1087.finish();
}
#[allow(unused_mut)]
let mut scope_1089 = writer.prefix("PrivateIpAddress");
if let Some(var_1090) = &input.private_ip_address {
scope_1089.string(var_1090);
}
#[allow(unused_mut)]
let mut scope_1091 = writer.prefix("PrivateIpAddresses");
if let Some(var_1092) = &input.private_ip_addresses {
let mut list_1094 = scope_1091.start_list(true, Some("item"));
for item_1093 in var_1092 {
#[allow(unused_mut)]
let mut entry_1095 = list_1094.entry();
crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
entry_1095, item_1093,
)?;
}
list_1094.finish();
}
#[allow(unused_mut)]
let mut scope_1096 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_1097) = &input.secondary_private_ip_address_count {
scope_1096.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1097).into()),
);
}
#[allow(unused_mut)]
let mut scope_1098 = writer.prefix("Ipv4Prefix");
if let Some(var_1099) = &input.ipv4_prefixes {
let mut list_1101 = scope_1098.start_list(true, Some("item"));
for item_1100 in var_1099 {
#[allow(unused_mut)]
let mut entry_1102 = list_1101.entry();
crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
entry_1102, item_1100,
)?;
}
list_1101.finish();
}
#[allow(unused_mut)]
let mut scope_1103 = writer.prefix("Ipv4PrefixCount");
if let Some(var_1104) = &input.ipv4_prefix_count {
scope_1103.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1104).into()),
);
}
#[allow(unused_mut)]
let mut scope_1105 = writer.prefix("Ipv6Prefix");
if let Some(var_1106) = &input.ipv6_prefixes {
let mut list_1108 = scope_1105.start_list(true, Some("item"));
for item_1107 in var_1106 {
#[allow(unused_mut)]
let mut entry_1109 = list_1108.entry();
crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
entry_1109, item_1107,
)?;
}
list_1108.finish();
}
#[allow(unused_mut)]
let mut scope_1110 = writer.prefix("Ipv6PrefixCount");
if let Some(var_1111) = &input.ipv6_prefix_count {
scope_1110.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1111).into()),
);
}
#[allow(unused_mut)]
let mut scope_1112 = writer.prefix("InterfaceType");
if let Some(var_1113) = &input.interface_type {
scope_1112.string(var_1113.as_str());
}
#[allow(unused_mut)]
let mut scope_1114 = writer.prefix("SubnetId");
if let Some(var_1115) = &input.subnet_id {
scope_1114.string(var_1115);
}
#[allow(unused_mut)]
let mut scope_1116 = writer.prefix("TagSpecification");
if let Some(var_1117) = &input.tag_specifications {
let mut list_1119 = scope_1116.start_list(true, Some("item"));
for item_1118 in var_1117 {
#[allow(unused_mut)]
let mut entry_1120 = list_1119.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1120, item_1118,
)?;
}
list_1119.finish();
}
#[allow(unused_mut)]
let mut scope_1121 = writer.prefix("ClientToken");
if let Some(var_1122) = &input.client_token {
scope_1121.string(var_1122);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_network_interface_permission(
input: &crate::input::CreateNetworkInterfacePermissionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateNetworkInterfacePermission",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1123 = writer.prefix("NetworkInterfaceId");
if let Some(var_1124) = &input.network_interface_id {
scope_1123.string(var_1124);
}
#[allow(unused_mut)]
let mut scope_1125 = writer.prefix("AwsAccountId");
if let Some(var_1126) = &input.aws_account_id {
scope_1125.string(var_1126);
}
#[allow(unused_mut)]
let mut scope_1127 = writer.prefix("AwsService");
if let Some(var_1128) = &input.aws_service {
scope_1127.string(var_1128);
}
#[allow(unused_mut)]
let mut scope_1129 = writer.prefix("Permission");
if let Some(var_1130) = &input.permission {
scope_1129.string(var_1130.as_str());
}
#[allow(unused_mut)]
let mut scope_1131 = writer.prefix("DryRun");
if let Some(var_1132) = &input.dry_run {
scope_1131.boolean(*var_1132);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_placement_group(
input: &crate::input::CreatePlacementGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreatePlacementGroup", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1133 = writer.prefix("DryRun");
if let Some(var_1134) = &input.dry_run {
scope_1133.boolean(*var_1134);
}
#[allow(unused_mut)]
let mut scope_1135 = writer.prefix("GroupName");
if let Some(var_1136) = &input.group_name {
scope_1135.string(var_1136);
}
#[allow(unused_mut)]
let mut scope_1137 = writer.prefix("Strategy");
if let Some(var_1138) = &input.strategy {
scope_1137.string(var_1138.as_str());
}
#[allow(unused_mut)]
let mut scope_1139 = writer.prefix("PartitionCount");
if let Some(var_1140) = &input.partition_count {
scope_1139.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1140).into()),
);
}
#[allow(unused_mut)]
let mut scope_1141 = writer.prefix("TagSpecification");
if let Some(var_1142) = &input.tag_specifications {
let mut list_1144 = scope_1141.start_list(true, Some("item"));
for item_1143 in var_1142 {
#[allow(unused_mut)]
let mut entry_1145 = list_1144.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1145, item_1143,
)?;
}
list_1144.finish();
}
#[allow(unused_mut)]
let mut scope_1146 = writer.prefix("SpreadLevel");
if let Some(var_1147) = &input.spread_level {
scope_1146.string(var_1147.as_str());
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_public_ipv4_pool(
input: &crate::input::CreatePublicIpv4PoolInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreatePublicIpv4Pool", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1148 = writer.prefix("DryRun");
if let Some(var_1149) = &input.dry_run {
scope_1148.boolean(*var_1149);
}
#[allow(unused_mut)]
let mut scope_1150 = writer.prefix("TagSpecification");
if let Some(var_1151) = &input.tag_specifications {
let mut list_1153 = scope_1150.start_list(true, Some("item"));
for item_1152 in var_1151 {
#[allow(unused_mut)]
let mut entry_1154 = list_1153.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1154, item_1152,
)?;
}
list_1153.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_replace_root_volume_task(
input: &crate::input::CreateReplaceRootVolumeTaskInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateReplaceRootVolumeTask", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1155 = writer.prefix("InstanceId");
if let Some(var_1156) = &input.instance_id {
scope_1155.string(var_1156);
}
#[allow(unused_mut)]
let mut scope_1157 = writer.prefix("SnapshotId");
if let Some(var_1158) = &input.snapshot_id {
scope_1157.string(var_1158);
}
#[allow(unused_mut)]
let mut scope_1159 = writer.prefix("ClientToken");
if let Some(var_1160) = &input.client_token {
scope_1159.string(var_1160);
}
#[allow(unused_mut)]
let mut scope_1161 = writer.prefix("DryRun");
if let Some(var_1162) = &input.dry_run {
scope_1161.boolean(*var_1162);
}
#[allow(unused_mut)]
let mut scope_1163 = writer.prefix("TagSpecification");
if let Some(var_1164) = &input.tag_specifications {
let mut list_1166 = scope_1163.start_list(true, Some("item"));
for item_1165 in var_1164 {
#[allow(unused_mut)]
let mut entry_1167 = list_1166.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1167, item_1165,
)?;
}
list_1166.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_reserved_instances_listing(
input: &crate::input::CreateReservedInstancesListingInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateReservedInstancesListing",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1168 = writer.prefix("ClientToken");
if let Some(var_1169) = &input.client_token {
scope_1168.string(var_1169);
}
#[allow(unused_mut)]
let mut scope_1170 = writer.prefix("InstanceCount");
if let Some(var_1171) = &input.instance_count {
scope_1170.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1171).into()),
);
}
#[allow(unused_mut)]
let mut scope_1172 = writer.prefix("PriceSchedules");
if let Some(var_1173) = &input.price_schedules {
let mut list_1175 = scope_1172.start_list(true, Some("item"));
for item_1174 in var_1173 {
#[allow(unused_mut)]
let mut entry_1176 = list_1175.entry();
crate::query_ser::serialize_structure_crate_model_price_schedule_specification(
entry_1176, item_1174,
)?;
}
list_1175.finish();
}
#[allow(unused_mut)]
let mut scope_1177 = writer.prefix("ReservedInstancesId");
if let Some(var_1178) = &input.reserved_instances_id {
scope_1177.string(var_1178);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_restore_image_task(
input: &crate::input::CreateRestoreImageTaskInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateRestoreImageTask", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1179 = writer.prefix("Bucket");
if let Some(var_1180) = &input.bucket {
scope_1179.string(var_1180);
}
#[allow(unused_mut)]
let mut scope_1181 = writer.prefix("ObjectKey");
if let Some(var_1182) = &input.object_key {
scope_1181.string(var_1182);
}
#[allow(unused_mut)]
let mut scope_1183 = writer.prefix("Name");
if let Some(var_1184) = &input.name {
scope_1183.string(var_1184);
}
#[allow(unused_mut)]
let mut scope_1185 = writer.prefix("TagSpecification");
if let Some(var_1186) = &input.tag_specifications {
let mut list_1188 = scope_1185.start_list(true, Some("item"));
for item_1187 in var_1186 {
#[allow(unused_mut)]
let mut entry_1189 = list_1188.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1189, item_1187,
)?;
}
list_1188.finish();
}
#[allow(unused_mut)]
let mut scope_1190 = writer.prefix("DryRun");
if let Some(var_1191) = &input.dry_run {
scope_1190.boolean(*var_1191);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_route(
input: &crate::input::CreateRouteInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateRoute", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1192 = writer.prefix("DestinationCidrBlock");
if let Some(var_1193) = &input.destination_cidr_block {
scope_1192.string(var_1193);
}
#[allow(unused_mut)]
let mut scope_1194 = writer.prefix("DestinationIpv6CidrBlock");
if let Some(var_1195) = &input.destination_ipv6_cidr_block {
scope_1194.string(var_1195);
}
#[allow(unused_mut)]
let mut scope_1196 = writer.prefix("DestinationPrefixListId");
if let Some(var_1197) = &input.destination_prefix_list_id {
scope_1196.string(var_1197);
}
#[allow(unused_mut)]
let mut scope_1198 = writer.prefix("DryRun");
if let Some(var_1199) = &input.dry_run {
scope_1198.boolean(*var_1199);
}
#[allow(unused_mut)]
let mut scope_1200 = writer.prefix("VpcEndpointId");
if let Some(var_1201) = &input.vpc_endpoint_id {
scope_1200.string(var_1201);
}
#[allow(unused_mut)]
let mut scope_1202 = writer.prefix("EgressOnlyInternetGatewayId");
if let Some(var_1203) = &input.egress_only_internet_gateway_id {
scope_1202.string(var_1203);
}
#[allow(unused_mut)]
let mut scope_1204 = writer.prefix("GatewayId");
if let Some(var_1205) = &input.gateway_id {
scope_1204.string(var_1205);
}
#[allow(unused_mut)]
let mut scope_1206 = writer.prefix("InstanceId");
if let Some(var_1207) = &input.instance_id {
scope_1206.string(var_1207);
}
#[allow(unused_mut)]
let mut scope_1208 = writer.prefix("NatGatewayId");
if let Some(var_1209) = &input.nat_gateway_id {
scope_1208.string(var_1209);
}
#[allow(unused_mut)]
let mut scope_1210 = writer.prefix("TransitGatewayId");
if let Some(var_1211) = &input.transit_gateway_id {
scope_1210.string(var_1211);
}
#[allow(unused_mut)]
let mut scope_1212 = writer.prefix("LocalGatewayId");
if let Some(var_1213) = &input.local_gateway_id {
scope_1212.string(var_1213);
}
#[allow(unused_mut)]
let mut scope_1214 = writer.prefix("CarrierGatewayId");
if let Some(var_1215) = &input.carrier_gateway_id {
scope_1214.string(var_1215);
}
#[allow(unused_mut)]
let mut scope_1216 = writer.prefix("NetworkInterfaceId");
if let Some(var_1217) = &input.network_interface_id {
scope_1216.string(var_1217);
}
#[allow(unused_mut)]
let mut scope_1218 = writer.prefix("RouteTableId");
if let Some(var_1219) = &input.route_table_id {
scope_1218.string(var_1219);
}
#[allow(unused_mut)]
let mut scope_1220 = writer.prefix("VpcPeeringConnectionId");
if let Some(var_1221) = &input.vpc_peering_connection_id {
scope_1220.string(var_1221);
}
#[allow(unused_mut)]
let mut scope_1222 = writer.prefix("CoreNetworkArn");
if let Some(var_1223) = &input.core_network_arn {
scope_1222.string(var_1223);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_route_table(
input: &crate::input::CreateRouteTableInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateRouteTable", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1224 = writer.prefix("DryRun");
if let Some(var_1225) = &input.dry_run {
scope_1224.boolean(*var_1225);
}
#[allow(unused_mut)]
let mut scope_1226 = writer.prefix("VpcId");
if let Some(var_1227) = &input.vpc_id {
scope_1226.string(var_1227);
}
#[allow(unused_mut)]
let mut scope_1228 = writer.prefix("TagSpecification");
if let Some(var_1229) = &input.tag_specifications {
let mut list_1231 = scope_1228.start_list(true, Some("item"));
for item_1230 in var_1229 {
#[allow(unused_mut)]
let mut entry_1232 = list_1231.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1232, item_1230,
)?;
}
list_1231.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_security_group(
input: &crate::input::CreateSecurityGroupInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateSecurityGroup", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1233 = writer.prefix("GroupDescription");
if let Some(var_1234) = &input.description {
scope_1233.string(var_1234);
}
#[allow(unused_mut)]
let mut scope_1235 = writer.prefix("GroupName");
if let Some(var_1236) = &input.group_name {
scope_1235.string(var_1236);
}
#[allow(unused_mut)]
let mut scope_1237 = writer.prefix("VpcId");
if let Some(var_1238) = &input.vpc_id {
scope_1237.string(var_1238);
}
#[allow(unused_mut)]
let mut scope_1239 = writer.prefix("TagSpecification");
if let Some(var_1240) = &input.tag_specifications {
let mut list_1242 = scope_1239.start_list(true, Some("item"));
for item_1241 in var_1240 {
#[allow(unused_mut)]
let mut entry_1243 = list_1242.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1243, item_1241,
)?;
}
list_1242.finish();
}
#[allow(unused_mut)]
let mut scope_1244 = writer.prefix("DryRun");
if let Some(var_1245) = &input.dry_run {
scope_1244.boolean(*var_1245);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_snapshot(
input: &crate::input::CreateSnapshotInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateSnapshot", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1246 = writer.prefix("Description");
if let Some(var_1247) = &input.description {
scope_1246.string(var_1247);
}
#[allow(unused_mut)]
let mut scope_1248 = writer.prefix("OutpostArn");
if let Some(var_1249) = &input.outpost_arn {
scope_1248.string(var_1249);
}
#[allow(unused_mut)]
let mut scope_1250 = writer.prefix("VolumeId");
if let Some(var_1251) = &input.volume_id {
scope_1250.string(var_1251);
}
#[allow(unused_mut)]
let mut scope_1252 = writer.prefix("TagSpecification");
if let Some(var_1253) = &input.tag_specifications {
let mut list_1255 = scope_1252.start_list(true, Some("item"));
for item_1254 in var_1253 {
#[allow(unused_mut)]
let mut entry_1256 = list_1255.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1256, item_1254,
)?;
}
list_1255.finish();
}
#[allow(unused_mut)]
let mut scope_1257 = writer.prefix("DryRun");
if let Some(var_1258) = &input.dry_run {
scope_1257.boolean(*var_1258);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_snapshots(
input: &crate::input::CreateSnapshotsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateSnapshots", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1259 = writer.prefix("Description");
if let Some(var_1260) = &input.description {
scope_1259.string(var_1260);
}
#[allow(unused_mut)]
let mut scope_1261 = writer.prefix("InstanceSpecification");
if let Some(var_1262) = &input.instance_specification {
crate::query_ser::serialize_structure_crate_model_instance_specification(
scope_1261, var_1262,
)?;
}
#[allow(unused_mut)]
let mut scope_1263 = writer.prefix("OutpostArn");
if let Some(var_1264) = &input.outpost_arn {
scope_1263.string(var_1264);
}
#[allow(unused_mut)]
let mut scope_1265 = writer.prefix("TagSpecification");
if let Some(var_1266) = &input.tag_specifications {
let mut list_1268 = scope_1265.start_list(true, Some("item"));
for item_1267 in var_1266 {
#[allow(unused_mut)]
let mut entry_1269 = list_1268.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1269, item_1267,
)?;
}
list_1268.finish();
}
#[allow(unused_mut)]
let mut scope_1270 = writer.prefix("DryRun");
if let Some(var_1271) = &input.dry_run {
scope_1270.boolean(*var_1271);
}
#[allow(unused_mut)]
let mut scope_1272 = writer.prefix("CopyTagsFromSource");
if let Some(var_1273) = &input.copy_tags_from_source {
scope_1272.string(var_1273.as_str());
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_spot_datafeed_subscription(
input: &crate::input::CreateSpotDatafeedSubscriptionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateSpotDatafeedSubscription",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1274 = writer.prefix("Bucket");
if let Some(var_1275) = &input.bucket {
scope_1274.string(var_1275);
}
#[allow(unused_mut)]
let mut scope_1276 = writer.prefix("DryRun");
if let Some(var_1277) = &input.dry_run {
scope_1276.boolean(*var_1277);
}
#[allow(unused_mut)]
let mut scope_1278 = writer.prefix("Prefix");
if let Some(var_1279) = &input.prefix {
scope_1278.string(var_1279);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_store_image_task(
input: &crate::input::CreateStoreImageTaskInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateStoreImageTask", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1280 = writer.prefix("ImageId");
if let Some(var_1281) = &input.image_id {
scope_1280.string(var_1281);
}
#[allow(unused_mut)]
let mut scope_1282 = writer.prefix("Bucket");
if let Some(var_1283) = &input.bucket {
scope_1282.string(var_1283);
}
#[allow(unused_mut)]
let mut scope_1284 = writer.prefix("S3ObjectTag");
if let Some(var_1285) = &input.s3_object_tags {
let mut list_1287 = scope_1284.start_list(true, Some("item"));
for item_1286 in var_1285 {
#[allow(unused_mut)]
let mut entry_1288 = list_1287.entry();
crate::query_ser::serialize_structure_crate_model_s3_object_tag(entry_1288, item_1286)?;
}
list_1287.finish();
}
#[allow(unused_mut)]
let mut scope_1289 = writer.prefix("DryRun");
if let Some(var_1290) = &input.dry_run {
scope_1289.boolean(*var_1290);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_subnet(
input: &crate::input::CreateSubnetInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateSubnet", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1291 = writer.prefix("TagSpecification");
if let Some(var_1292) = &input.tag_specifications {
let mut list_1294 = scope_1291.start_list(true, Some("item"));
for item_1293 in var_1292 {
#[allow(unused_mut)]
let mut entry_1295 = list_1294.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1295, item_1293,
)?;
}
list_1294.finish();
}
#[allow(unused_mut)]
let mut scope_1296 = writer.prefix("AvailabilityZone");
if let Some(var_1297) = &input.availability_zone {
scope_1296.string(var_1297);
}
#[allow(unused_mut)]
let mut scope_1298 = writer.prefix("AvailabilityZoneId");
if let Some(var_1299) = &input.availability_zone_id {
scope_1298.string(var_1299);
}
#[allow(unused_mut)]
let mut scope_1300 = writer.prefix("CidrBlock");
if let Some(var_1301) = &input.cidr_block {
scope_1300.string(var_1301);
}
#[allow(unused_mut)]
let mut scope_1302 = writer.prefix("Ipv6CidrBlock");
if let Some(var_1303) = &input.ipv6_cidr_block {
scope_1302.string(var_1303);
}
#[allow(unused_mut)]
let mut scope_1304 = writer.prefix("OutpostArn");
if let Some(var_1305) = &input.outpost_arn {
scope_1304.string(var_1305);
}
#[allow(unused_mut)]
let mut scope_1306 = writer.prefix("VpcId");
if let Some(var_1307) = &input.vpc_id {
scope_1306.string(var_1307);
}
#[allow(unused_mut)]
let mut scope_1308 = writer.prefix("DryRun");
if let Some(var_1309) = &input.dry_run {
scope_1308.boolean(*var_1309);
}
#[allow(unused_mut)]
let mut scope_1310 = writer.prefix("Ipv6Native");
if let Some(var_1311) = &input.ipv6_native {
scope_1310.boolean(*var_1311);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_subnet_cidr_reservation(
input: &crate::input::CreateSubnetCidrReservationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateSubnetCidrReservation", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1312 = writer.prefix("SubnetId");
if let Some(var_1313) = &input.subnet_id {
scope_1312.string(var_1313);
}
#[allow(unused_mut)]
let mut scope_1314 = writer.prefix("Cidr");
if let Some(var_1315) = &input.cidr {
scope_1314.string(var_1315);
}
#[allow(unused_mut)]
let mut scope_1316 = writer.prefix("ReservationType");
if let Some(var_1317) = &input.reservation_type {
scope_1316.string(var_1317.as_str());
}
#[allow(unused_mut)]
let mut scope_1318 = writer.prefix("Description");
if let Some(var_1319) = &input.description {
scope_1318.string(var_1319);
}
#[allow(unused_mut)]
let mut scope_1320 = writer.prefix("DryRun");
if let Some(var_1321) = &input.dry_run {
scope_1320.boolean(*var_1321);
}
#[allow(unused_mut)]
let mut scope_1322 = writer.prefix("TagSpecification");
if let Some(var_1323) = &input.tag_specifications {
let mut list_1325 = scope_1322.start_list(true, Some("item"));
for item_1324 in var_1323 {
#[allow(unused_mut)]
let mut entry_1326 = list_1325.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1326, item_1324,
)?;
}
list_1325.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_tags(
input: &crate::input::CreateTagsInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateTags", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1327 = writer.prefix("DryRun");
if let Some(var_1328) = &input.dry_run {
scope_1327.boolean(*var_1328);
}
#[allow(unused_mut)]
let mut scope_1329 = writer.prefix("ResourceId");
if let Some(var_1330) = &input.resources {
let mut list_1332 = scope_1329.start_list(true, None);
for item_1331 in var_1330 {
#[allow(unused_mut)]
let mut entry_1333 = list_1332.entry();
entry_1333.string(item_1331);
}
list_1332.finish();
}
#[allow(unused_mut)]
let mut scope_1334 = writer.prefix("Tag");
if let Some(var_1335) = &input.tags {
let mut list_1337 = scope_1334.start_list(true, Some("item"));
for item_1336 in var_1335 {
#[allow(unused_mut)]
let mut entry_1338 = list_1337.entry();
crate::query_ser::serialize_structure_crate_model_tag(entry_1338, item_1336)?;
}
list_1337.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_traffic_mirror_filter(
input: &crate::input::CreateTrafficMirrorFilterInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTrafficMirrorFilter", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1339 = writer.prefix("Description");
if let Some(var_1340) = &input.description {
scope_1339.string(var_1340);
}
#[allow(unused_mut)]
let mut scope_1341 = writer.prefix("TagSpecification");
if let Some(var_1342) = &input.tag_specifications {
let mut list_1344 = scope_1341.start_list(true, Some("item"));
for item_1343 in var_1342 {
#[allow(unused_mut)]
let mut entry_1345 = list_1344.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1345, item_1343,
)?;
}
list_1344.finish();
}
#[allow(unused_mut)]
let mut scope_1346 = writer.prefix("DryRun");
if let Some(var_1347) = &input.dry_run {
scope_1346.boolean(*var_1347);
}
#[allow(unused_mut)]
let mut scope_1348 = writer.prefix("ClientToken");
if let Some(var_1349) = &input.client_token {
scope_1348.string(var_1349);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_traffic_mirror_filter_rule(
input: &crate::input::CreateTrafficMirrorFilterRuleInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTrafficMirrorFilterRule", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1350 = writer.prefix("TrafficMirrorFilterId");
if let Some(var_1351) = &input.traffic_mirror_filter_id {
scope_1350.string(var_1351);
}
#[allow(unused_mut)]
let mut scope_1352 = writer.prefix("TrafficDirection");
if let Some(var_1353) = &input.traffic_direction {
scope_1352.string(var_1353.as_str());
}
#[allow(unused_mut)]
let mut scope_1354 = writer.prefix("RuleNumber");
if let Some(var_1355) = &input.rule_number {
scope_1354.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1355).into()),
);
}
#[allow(unused_mut)]
let mut scope_1356 = writer.prefix("RuleAction");
if let Some(var_1357) = &input.rule_action {
scope_1356.string(var_1357.as_str());
}
#[allow(unused_mut)]
let mut scope_1358 = writer.prefix("DestinationPortRange");
if let Some(var_1359) = &input.destination_port_range {
crate::query_ser::serialize_structure_crate_model_traffic_mirror_port_range_request(
scope_1358, var_1359,
)?;
}
#[allow(unused_mut)]
let mut scope_1360 = writer.prefix("SourcePortRange");
if let Some(var_1361) = &input.source_port_range {
crate::query_ser::serialize_structure_crate_model_traffic_mirror_port_range_request(
scope_1360, var_1361,
)?;
}
#[allow(unused_mut)]
let mut scope_1362 = writer.prefix("Protocol");
if let Some(var_1363) = &input.protocol {
scope_1362.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1363).into()),
);
}
#[allow(unused_mut)]
let mut scope_1364 = writer.prefix("DestinationCidrBlock");
if let Some(var_1365) = &input.destination_cidr_block {
scope_1364.string(var_1365);
}
#[allow(unused_mut)]
let mut scope_1366 = writer.prefix("SourceCidrBlock");
if let Some(var_1367) = &input.source_cidr_block {
scope_1366.string(var_1367);
}
#[allow(unused_mut)]
let mut scope_1368 = writer.prefix("Description");
if let Some(var_1369) = &input.description {
scope_1368.string(var_1369);
}
#[allow(unused_mut)]
let mut scope_1370 = writer.prefix("DryRun");
if let Some(var_1371) = &input.dry_run {
scope_1370.boolean(*var_1371);
}
#[allow(unused_mut)]
let mut scope_1372 = writer.prefix("ClientToken");
if let Some(var_1373) = &input.client_token {
scope_1372.string(var_1373);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_traffic_mirror_session(
input: &crate::input::CreateTrafficMirrorSessionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTrafficMirrorSession", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1374 = writer.prefix("NetworkInterfaceId");
if let Some(var_1375) = &input.network_interface_id {
scope_1374.string(var_1375);
}
#[allow(unused_mut)]
let mut scope_1376 = writer.prefix("TrafficMirrorTargetId");
if let Some(var_1377) = &input.traffic_mirror_target_id {
scope_1376.string(var_1377);
}
#[allow(unused_mut)]
let mut scope_1378 = writer.prefix("TrafficMirrorFilterId");
if let Some(var_1379) = &input.traffic_mirror_filter_id {
scope_1378.string(var_1379);
}
#[allow(unused_mut)]
let mut scope_1380 = writer.prefix("PacketLength");
if let Some(var_1381) = &input.packet_length {
scope_1380.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1381).into()),
);
}
#[allow(unused_mut)]
let mut scope_1382 = writer.prefix("SessionNumber");
if let Some(var_1383) = &input.session_number {
scope_1382.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1383).into()),
);
}
#[allow(unused_mut)]
let mut scope_1384 = writer.prefix("VirtualNetworkId");
if let Some(var_1385) = &input.virtual_network_id {
scope_1384.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1385).into()),
);
}
#[allow(unused_mut)]
let mut scope_1386 = writer.prefix("Description");
if let Some(var_1387) = &input.description {
scope_1386.string(var_1387);
}
#[allow(unused_mut)]
let mut scope_1388 = writer.prefix("TagSpecification");
if let Some(var_1389) = &input.tag_specifications {
let mut list_1391 = scope_1388.start_list(true, Some("item"));
for item_1390 in var_1389 {
#[allow(unused_mut)]
let mut entry_1392 = list_1391.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1392, item_1390,
)?;
}
list_1391.finish();
}
#[allow(unused_mut)]
let mut scope_1393 = writer.prefix("DryRun");
if let Some(var_1394) = &input.dry_run {
scope_1393.boolean(*var_1394);
}
#[allow(unused_mut)]
let mut scope_1395 = writer.prefix("ClientToken");
if let Some(var_1396) = &input.client_token {
scope_1395.string(var_1396);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_traffic_mirror_target(
input: &crate::input::CreateTrafficMirrorTargetInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTrafficMirrorTarget", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1397 = writer.prefix("NetworkInterfaceId");
if let Some(var_1398) = &input.network_interface_id {
scope_1397.string(var_1398);
}
#[allow(unused_mut)]
let mut scope_1399 = writer.prefix("NetworkLoadBalancerArn");
if let Some(var_1400) = &input.network_load_balancer_arn {
scope_1399.string(var_1400);
}
#[allow(unused_mut)]
let mut scope_1401 = writer.prefix("Description");
if let Some(var_1402) = &input.description {
scope_1401.string(var_1402);
}
#[allow(unused_mut)]
let mut scope_1403 = writer.prefix("TagSpecification");
if let Some(var_1404) = &input.tag_specifications {
let mut list_1406 = scope_1403.start_list(true, Some("item"));
for item_1405 in var_1404 {
#[allow(unused_mut)]
let mut entry_1407 = list_1406.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1407, item_1405,
)?;
}
list_1406.finish();
}
#[allow(unused_mut)]
let mut scope_1408 = writer.prefix("DryRun");
if let Some(var_1409) = &input.dry_run {
scope_1408.boolean(*var_1409);
}
#[allow(unused_mut)]
let mut scope_1410 = writer.prefix("ClientToken");
if let Some(var_1411) = &input.client_token {
scope_1410.string(var_1411);
}
#[allow(unused_mut)]
let mut scope_1412 = writer.prefix("GatewayLoadBalancerEndpointId");
if let Some(var_1413) = &input.gateway_load_balancer_endpoint_id {
scope_1412.string(var_1413);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway(
input: &crate::input::CreateTransitGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTransitGateway", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1414 = writer.prefix("Description");
if let Some(var_1415) = &input.description {
scope_1414.string(var_1415);
}
#[allow(unused_mut)]
let mut scope_1416 = writer.prefix("Options");
if let Some(var_1417) = &input.options {
crate::query_ser::serialize_structure_crate_model_transit_gateway_request_options(
scope_1416, var_1417,
)?;
}
#[allow(unused_mut)]
let mut scope_1418 = writer.prefix("TagSpecification");
if let Some(var_1419) = &input.tag_specifications {
let mut list_1421 = scope_1418.start_list(true, Some("item"));
for item_1420 in var_1419 {
#[allow(unused_mut)]
let mut entry_1422 = list_1421.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1422, item_1420,
)?;
}
list_1421.finish();
}
#[allow(unused_mut)]
let mut scope_1423 = writer.prefix("DryRun");
if let Some(var_1424) = &input.dry_run {
scope_1423.boolean(*var_1424);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_connect(
input: &crate::input::CreateTransitGatewayConnectInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTransitGatewayConnect", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1425 = writer.prefix("TransportTransitGatewayAttachmentId");
if let Some(var_1426) = &input.transport_transit_gateway_attachment_id {
scope_1425.string(var_1426);
}
#[allow(unused_mut)]
let mut scope_1427 = writer.prefix("Options");
if let Some(var_1428) = &input.options {
crate::query_ser::serialize_structure_crate_model_create_transit_gateway_connect_request_options(scope_1427, var_1428)?;
}
#[allow(unused_mut)]
let mut scope_1429 = writer.prefix("TagSpecification");
if let Some(var_1430) = &input.tag_specifications {
let mut list_1432 = scope_1429.start_list(true, Some("item"));
for item_1431 in var_1430 {
#[allow(unused_mut)]
let mut entry_1433 = list_1432.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1433, item_1431,
)?;
}
list_1432.finish();
}
#[allow(unused_mut)]
let mut scope_1434 = writer.prefix("DryRun");
if let Some(var_1435) = &input.dry_run {
scope_1434.boolean(*var_1435);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_connect_peer(
input: &crate::input::CreateTransitGatewayConnectPeerInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayConnectPeer",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1436 = writer.prefix("TransitGatewayAttachmentId");
if let Some(var_1437) = &input.transit_gateway_attachment_id {
scope_1436.string(var_1437);
}
#[allow(unused_mut)]
let mut scope_1438 = writer.prefix("TransitGatewayAddress");
if let Some(var_1439) = &input.transit_gateway_address {
scope_1438.string(var_1439);
}
#[allow(unused_mut)]
let mut scope_1440 = writer.prefix("PeerAddress");
if let Some(var_1441) = &input.peer_address {
scope_1440.string(var_1441);
}
#[allow(unused_mut)]
let mut scope_1442 = writer.prefix("BgpOptions");
if let Some(var_1443) = &input.bgp_options {
crate::query_ser::serialize_structure_crate_model_transit_gateway_connect_request_bgp_options(scope_1442, var_1443)?;
}
#[allow(unused_mut)]
let mut scope_1444 = writer.prefix("InsideCidrBlocks");
if let Some(var_1445) = &input.inside_cidr_blocks {
let mut list_1447 = scope_1444.start_list(true, Some("item"));
for item_1446 in var_1445 {
#[allow(unused_mut)]
let mut entry_1448 = list_1447.entry();
entry_1448.string(item_1446);
}
list_1447.finish();
}
#[allow(unused_mut)]
let mut scope_1449 = writer.prefix("TagSpecification");
if let Some(var_1450) = &input.tag_specifications {
let mut list_1452 = scope_1449.start_list(true, Some("item"));
for item_1451 in var_1450 {
#[allow(unused_mut)]
let mut entry_1453 = list_1452.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1453, item_1451,
)?;
}
list_1452.finish();
}
#[allow(unused_mut)]
let mut scope_1454 = writer.prefix("DryRun");
if let Some(var_1455) = &input.dry_run {
scope_1454.boolean(*var_1455);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_multicast_domain(
input: &crate::input::CreateTransitGatewayMulticastDomainInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayMulticastDomain",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1456 = writer.prefix("TransitGatewayId");
if let Some(var_1457) = &input.transit_gateway_id {
scope_1456.string(var_1457);
}
#[allow(unused_mut)]
let mut scope_1458 = writer.prefix("Options");
if let Some(var_1459) = &input.options {
crate::query_ser::serialize_structure_crate_model_create_transit_gateway_multicast_domain_request_options(scope_1458, var_1459)?;
}
#[allow(unused_mut)]
let mut scope_1460 = writer.prefix("TagSpecification");
if let Some(var_1461) = &input.tag_specifications {
let mut list_1463 = scope_1460.start_list(true, Some("item"));
for item_1462 in var_1461 {
#[allow(unused_mut)]
let mut entry_1464 = list_1463.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1464, item_1462,
)?;
}
list_1463.finish();
}
#[allow(unused_mut)]
let mut scope_1465 = writer.prefix("DryRun");
if let Some(var_1466) = &input.dry_run {
scope_1465.boolean(*var_1466);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_peering_attachment(
input: &crate::input::CreateTransitGatewayPeeringAttachmentInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayPeeringAttachment",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1467 = writer.prefix("TransitGatewayId");
if let Some(var_1468) = &input.transit_gateway_id {
scope_1467.string(var_1468);
}
#[allow(unused_mut)]
let mut scope_1469 = writer.prefix("PeerTransitGatewayId");
if let Some(var_1470) = &input.peer_transit_gateway_id {
scope_1469.string(var_1470);
}
#[allow(unused_mut)]
let mut scope_1471 = writer.prefix("PeerAccountId");
if let Some(var_1472) = &input.peer_account_id {
scope_1471.string(var_1472);
}
#[allow(unused_mut)]
let mut scope_1473 = writer.prefix("PeerRegion");
if let Some(var_1474) = &input.peer_region {
scope_1473.string(var_1474);
}
#[allow(unused_mut)]
let mut scope_1475 = writer.prefix("Options");
if let Some(var_1476) = &input.options {
crate::query_ser::serialize_structure_crate_model_create_transit_gateway_peering_attachment_request_options(scope_1475, var_1476)?;
}
#[allow(unused_mut)]
let mut scope_1477 = writer.prefix("TagSpecification");
if let Some(var_1478) = &input.tag_specifications {
let mut list_1480 = scope_1477.start_list(true, Some("item"));
for item_1479 in var_1478 {
#[allow(unused_mut)]
let mut entry_1481 = list_1480.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1481, item_1479,
)?;
}
list_1480.finish();
}
#[allow(unused_mut)]
let mut scope_1482 = writer.prefix("DryRun");
if let Some(var_1483) = &input.dry_run {
scope_1482.boolean(*var_1483);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_policy_table(
input: &crate::input::CreateTransitGatewayPolicyTableInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayPolicyTable",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1484 = writer.prefix("TransitGatewayId");
if let Some(var_1485) = &input.transit_gateway_id {
scope_1484.string(var_1485);
}
#[allow(unused_mut)]
let mut scope_1486 = writer.prefix("TagSpecifications");
if let Some(var_1487) = &input.tag_specifications {
let mut list_1489 = scope_1486.start_list(true, Some("item"));
for item_1488 in var_1487 {
#[allow(unused_mut)]
let mut entry_1490 = list_1489.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1490, item_1488,
)?;
}
list_1489.finish();
}
#[allow(unused_mut)]
let mut scope_1491 = writer.prefix("DryRun");
if let Some(var_1492) = &input.dry_run {
scope_1491.boolean(*var_1492);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_prefix_list_reference(
input: &crate::input::CreateTransitGatewayPrefixListReferenceInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayPrefixListReference",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1493 = writer.prefix("TransitGatewayRouteTableId");
if let Some(var_1494) = &input.transit_gateway_route_table_id {
scope_1493.string(var_1494);
}
#[allow(unused_mut)]
let mut scope_1495 = writer.prefix("PrefixListId");
if let Some(var_1496) = &input.prefix_list_id {
scope_1495.string(var_1496);
}
#[allow(unused_mut)]
let mut scope_1497 = writer.prefix("TransitGatewayAttachmentId");
if let Some(var_1498) = &input.transit_gateway_attachment_id {
scope_1497.string(var_1498);
}
#[allow(unused_mut)]
let mut scope_1499 = writer.prefix("Blackhole");
if let Some(var_1500) = &input.blackhole {
scope_1499.boolean(*var_1500);
}
#[allow(unused_mut)]
let mut scope_1501 = writer.prefix("DryRun");
if let Some(var_1502) = &input.dry_run {
scope_1501.boolean(*var_1502);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_route(
input: &crate::input::CreateTransitGatewayRouteInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateTransitGatewayRoute", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1503 = writer.prefix("DestinationCidrBlock");
if let Some(var_1504) = &input.destination_cidr_block {
scope_1503.string(var_1504);
}
#[allow(unused_mut)]
let mut scope_1505 = writer.prefix("TransitGatewayRouteTableId");
if let Some(var_1506) = &input.transit_gateway_route_table_id {
scope_1505.string(var_1506);
}
#[allow(unused_mut)]
let mut scope_1507 = writer.prefix("TransitGatewayAttachmentId");
if let Some(var_1508) = &input.transit_gateway_attachment_id {
scope_1507.string(var_1508);
}
#[allow(unused_mut)]
let mut scope_1509 = writer.prefix("Blackhole");
if let Some(var_1510) = &input.blackhole {
scope_1509.boolean(*var_1510);
}
#[allow(unused_mut)]
let mut scope_1511 = writer.prefix("DryRun");
if let Some(var_1512) = &input.dry_run {
scope_1511.boolean(*var_1512);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_route_table(
input: &crate::input::CreateTransitGatewayRouteTableInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayRouteTable",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1513 = writer.prefix("TransitGatewayId");
if let Some(var_1514) = &input.transit_gateway_id {
scope_1513.string(var_1514);
}
#[allow(unused_mut)]
let mut scope_1515 = writer.prefix("TagSpecifications");
if let Some(var_1516) = &input.tag_specifications {
let mut list_1518 = scope_1515.start_list(true, Some("item"));
for item_1517 in var_1516 {
#[allow(unused_mut)]
let mut entry_1519 = list_1518.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1519, item_1517,
)?;
}
list_1518.finish();
}
#[allow(unused_mut)]
let mut scope_1520 = writer.prefix("DryRun");
if let Some(var_1521) = &input.dry_run {
scope_1520.boolean(*var_1521);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_route_table_announcement(
input: &crate::input::CreateTransitGatewayRouteTableAnnouncementInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayRouteTableAnnouncement",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1522 = writer.prefix("TransitGatewayRouteTableId");
if let Some(var_1523) = &input.transit_gateway_route_table_id {
scope_1522.string(var_1523);
}
#[allow(unused_mut)]
let mut scope_1524 = writer.prefix("PeeringAttachmentId");
if let Some(var_1525) = &input.peering_attachment_id {
scope_1524.string(var_1525);
}
#[allow(unused_mut)]
let mut scope_1526 = writer.prefix("TagSpecification");
if let Some(var_1527) = &input.tag_specifications {
let mut list_1529 = scope_1526.start_list(true, Some("item"));
for item_1528 in var_1527 {
#[allow(unused_mut)]
let mut entry_1530 = list_1529.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1530, item_1528,
)?;
}
list_1529.finish();
}
#[allow(unused_mut)]
let mut scope_1531 = writer.prefix("DryRun");
if let Some(var_1532) = &input.dry_run {
scope_1531.boolean(*var_1532);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_transit_gateway_vpc_attachment(
input: &crate::input::CreateTransitGatewayVpcAttachmentInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateTransitGatewayVpcAttachment",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1533 = writer.prefix("TransitGatewayId");
if let Some(var_1534) = &input.transit_gateway_id {
scope_1533.string(var_1534);
}
#[allow(unused_mut)]
let mut scope_1535 = writer.prefix("VpcId");
if let Some(var_1536) = &input.vpc_id {
scope_1535.string(var_1536);
}
#[allow(unused_mut)]
let mut scope_1537 = writer.prefix("SubnetIds");
if let Some(var_1538) = &input.subnet_ids {
let mut list_1540 = scope_1537.start_list(true, Some("item"));
for item_1539 in var_1538 {
#[allow(unused_mut)]
let mut entry_1541 = list_1540.entry();
entry_1541.string(item_1539);
}
list_1540.finish();
}
#[allow(unused_mut)]
let mut scope_1542 = writer.prefix("Options");
if let Some(var_1543) = &input.options {
crate::query_ser::serialize_structure_crate_model_create_transit_gateway_vpc_attachment_request_options(scope_1542, var_1543)?;
}
#[allow(unused_mut)]
let mut scope_1544 = writer.prefix("TagSpecifications");
if let Some(var_1545) = &input.tag_specifications {
let mut list_1547 = scope_1544.start_list(true, Some("item"));
for item_1546 in var_1545 {
#[allow(unused_mut)]
let mut entry_1548 = list_1547.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1548, item_1546,
)?;
}
list_1547.finish();
}
#[allow(unused_mut)]
let mut scope_1549 = writer.prefix("DryRun");
if let Some(var_1550) = &input.dry_run {
scope_1549.boolean(*var_1550);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_volume(
input: &crate::input::CreateVolumeInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateVolume", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1551 = writer.prefix("AvailabilityZone");
if let Some(var_1552) = &input.availability_zone {
scope_1551.string(var_1552);
}
#[allow(unused_mut)]
let mut scope_1553 = writer.prefix("Encrypted");
if let Some(var_1554) = &input.encrypted {
scope_1553.boolean(*var_1554);
}
#[allow(unused_mut)]
let mut scope_1555 = writer.prefix("Iops");
if let Some(var_1556) = &input.iops {
scope_1555.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1556).into()),
);
}
#[allow(unused_mut)]
let mut scope_1557 = writer.prefix("KmsKeyId");
if let Some(var_1558) = &input.kms_key_id {
scope_1557.string(var_1558);
}
#[allow(unused_mut)]
let mut scope_1559 = writer.prefix("OutpostArn");
if let Some(var_1560) = &input.outpost_arn {
scope_1559.string(var_1560);
}
#[allow(unused_mut)]
let mut scope_1561 = writer.prefix("Size");
if let Some(var_1562) = &input.size {
scope_1561.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1562).into()),
);
}
#[allow(unused_mut)]
let mut scope_1563 = writer.prefix("SnapshotId");
if let Some(var_1564) = &input.snapshot_id {
scope_1563.string(var_1564);
}
#[allow(unused_mut)]
let mut scope_1565 = writer.prefix("VolumeType");
if let Some(var_1566) = &input.volume_type {
scope_1565.string(var_1566.as_str());
}
#[allow(unused_mut)]
let mut scope_1567 = writer.prefix("DryRun");
if let Some(var_1568) = &input.dry_run {
scope_1567.boolean(*var_1568);
}
#[allow(unused_mut)]
let mut scope_1569 = writer.prefix("TagSpecification");
if let Some(var_1570) = &input.tag_specifications {
let mut list_1572 = scope_1569.start_list(true, Some("item"));
for item_1571 in var_1570 {
#[allow(unused_mut)]
let mut entry_1573 = list_1572.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1573, item_1571,
)?;
}
list_1572.finish();
}
#[allow(unused_mut)]
let mut scope_1574 = writer.prefix("MultiAttachEnabled");
if let Some(var_1575) = &input.multi_attach_enabled {
scope_1574.boolean(*var_1575);
}
#[allow(unused_mut)]
let mut scope_1576 = writer.prefix("Throughput");
if let Some(var_1577) = &input.throughput {
scope_1576.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1577).into()),
);
}
#[allow(unused_mut)]
let mut scope_1578 = writer.prefix("ClientToken");
if let Some(var_1579) = &input.client_token {
scope_1578.string(var_1579);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpc(
input: &crate::input::CreateVpcInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateVpc", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1580 = writer.prefix("CidrBlock");
if let Some(var_1581) = &input.cidr_block {
scope_1580.string(var_1581);
}
#[allow(unused_mut)]
let mut scope_1582 = writer.prefix("AmazonProvidedIpv6CidrBlock");
if let Some(var_1583) = &input.amazon_provided_ipv6_cidr_block {
scope_1582.boolean(*var_1583);
}
#[allow(unused_mut)]
let mut scope_1584 = writer.prefix("Ipv6Pool");
if let Some(var_1585) = &input.ipv6_pool {
scope_1584.string(var_1585);
}
#[allow(unused_mut)]
let mut scope_1586 = writer.prefix("Ipv6CidrBlock");
if let Some(var_1587) = &input.ipv6_cidr_block {
scope_1586.string(var_1587);
}
#[allow(unused_mut)]
let mut scope_1588 = writer.prefix("Ipv4IpamPoolId");
if let Some(var_1589) = &input.ipv4_ipam_pool_id {
scope_1588.string(var_1589);
}
#[allow(unused_mut)]
let mut scope_1590 = writer.prefix("Ipv4NetmaskLength");
if let Some(var_1591) = &input.ipv4_netmask_length {
scope_1590.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1591).into()),
);
}
#[allow(unused_mut)]
let mut scope_1592 = writer.prefix("Ipv6IpamPoolId");
if let Some(var_1593) = &input.ipv6_ipam_pool_id {
scope_1592.string(var_1593);
}
#[allow(unused_mut)]
let mut scope_1594 = writer.prefix("Ipv6NetmaskLength");
if let Some(var_1595) = &input.ipv6_netmask_length {
scope_1594.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1595).into()),
);
}
#[allow(unused_mut)]
let mut scope_1596 = writer.prefix("DryRun");
if let Some(var_1597) = &input.dry_run {
scope_1596.boolean(*var_1597);
}
#[allow(unused_mut)]
let mut scope_1598 = writer.prefix("InstanceTenancy");
if let Some(var_1599) = &input.instance_tenancy {
scope_1598.string(var_1599.as_str());
}
#[allow(unused_mut)]
let mut scope_1600 = writer.prefix("Ipv6CidrBlockNetworkBorderGroup");
if let Some(var_1601) = &input.ipv6_cidr_block_network_border_group {
scope_1600.string(var_1601);
}
#[allow(unused_mut)]
let mut scope_1602 = writer.prefix("TagSpecification");
if let Some(var_1603) = &input.tag_specifications {
let mut list_1605 = scope_1602.start_list(true, Some("item"));
for item_1604 in var_1603 {
#[allow(unused_mut)]
let mut entry_1606 = list_1605.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1606, item_1604,
)?;
}
list_1605.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpc_endpoint(
input: &crate::input::CreateVpcEndpointInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateVpcEndpoint", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1607 = writer.prefix("DryRun");
if let Some(var_1608) = &input.dry_run {
scope_1607.boolean(*var_1608);
}
#[allow(unused_mut)]
let mut scope_1609 = writer.prefix("VpcEndpointType");
if let Some(var_1610) = &input.vpc_endpoint_type {
scope_1609.string(var_1610.as_str());
}
#[allow(unused_mut)]
let mut scope_1611 = writer.prefix("VpcId");
if let Some(var_1612) = &input.vpc_id {
scope_1611.string(var_1612);
}
#[allow(unused_mut)]
let mut scope_1613 = writer.prefix("ServiceName");
if let Some(var_1614) = &input.service_name {
scope_1613.string(var_1614);
}
#[allow(unused_mut)]
let mut scope_1615 = writer.prefix("PolicyDocument");
if let Some(var_1616) = &input.policy_document {
scope_1615.string(var_1616);
}
#[allow(unused_mut)]
let mut scope_1617 = writer.prefix("RouteTableId");
if let Some(var_1618) = &input.route_table_ids {
let mut list_1620 = scope_1617.start_list(true, Some("item"));
for item_1619 in var_1618 {
#[allow(unused_mut)]
let mut entry_1621 = list_1620.entry();
entry_1621.string(item_1619);
}
list_1620.finish();
}
#[allow(unused_mut)]
let mut scope_1622 = writer.prefix("SubnetId");
if let Some(var_1623) = &input.subnet_ids {
let mut list_1625 = scope_1622.start_list(true, Some("item"));
for item_1624 in var_1623 {
#[allow(unused_mut)]
let mut entry_1626 = list_1625.entry();
entry_1626.string(item_1624);
}
list_1625.finish();
}
#[allow(unused_mut)]
let mut scope_1627 = writer.prefix("SecurityGroupId");
if let Some(var_1628) = &input.security_group_ids {
let mut list_1630 = scope_1627.start_list(true, Some("item"));
for item_1629 in var_1628 {
#[allow(unused_mut)]
let mut entry_1631 = list_1630.entry();
entry_1631.string(item_1629);
}
list_1630.finish();
}
#[allow(unused_mut)]
let mut scope_1632 = writer.prefix("IpAddressType");
if let Some(var_1633) = &input.ip_address_type {
scope_1632.string(var_1633.as_str());
}
#[allow(unused_mut)]
let mut scope_1634 = writer.prefix("DnsOptions");
if let Some(var_1635) = &input.dns_options {
crate::query_ser::serialize_structure_crate_model_dns_options_specification(
scope_1634, var_1635,
)?;
}
#[allow(unused_mut)]
let mut scope_1636 = writer.prefix("ClientToken");
if let Some(var_1637) = &input.client_token {
scope_1636.string(var_1637);
}
#[allow(unused_mut)]
let mut scope_1638 = writer.prefix("PrivateDnsEnabled");
if let Some(var_1639) = &input.private_dns_enabled {
scope_1638.boolean(*var_1639);
}
#[allow(unused_mut)]
let mut scope_1640 = writer.prefix("TagSpecification");
if let Some(var_1641) = &input.tag_specifications {
let mut list_1643 = scope_1640.start_list(true, Some("item"));
for item_1642 in var_1641 {
#[allow(unused_mut)]
let mut entry_1644 = list_1643.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1644, item_1642,
)?;
}
list_1643.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpc_endpoint_connection_notification(
input: &crate::input::CreateVpcEndpointConnectionNotificationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateVpcEndpointConnectionNotification",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1645 = writer.prefix("DryRun");
if let Some(var_1646) = &input.dry_run {
scope_1645.boolean(*var_1646);
}
#[allow(unused_mut)]
let mut scope_1647 = writer.prefix("ServiceId");
if let Some(var_1648) = &input.service_id {
scope_1647.string(var_1648);
}
#[allow(unused_mut)]
let mut scope_1649 = writer.prefix("VpcEndpointId");
if let Some(var_1650) = &input.vpc_endpoint_id {
scope_1649.string(var_1650);
}
#[allow(unused_mut)]
let mut scope_1651 = writer.prefix("ConnectionNotificationArn");
if let Some(var_1652) = &input.connection_notification_arn {
scope_1651.string(var_1652);
}
#[allow(unused_mut)]
let mut scope_1653 = writer.prefix("ConnectionEvents");
if let Some(var_1654) = &input.connection_events {
let mut list_1656 = scope_1653.start_list(true, Some("item"));
for item_1655 in var_1654 {
#[allow(unused_mut)]
let mut entry_1657 = list_1656.entry();
entry_1657.string(item_1655);
}
list_1656.finish();
}
#[allow(unused_mut)]
let mut scope_1658 = writer.prefix("ClientToken");
if let Some(var_1659) = &input.client_token {
scope_1658.string(var_1659);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpc_endpoint_service_configuration(
input: &crate::input::CreateVpcEndpointServiceConfigurationInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(
&mut out,
"CreateVpcEndpointServiceConfiguration",
"2016-11-15",
);
#[allow(unused_mut)]
let mut scope_1660 = writer.prefix("DryRun");
if let Some(var_1661) = &input.dry_run {
scope_1660.boolean(*var_1661);
}
#[allow(unused_mut)]
let mut scope_1662 = writer.prefix("AcceptanceRequired");
if let Some(var_1663) = &input.acceptance_required {
scope_1662.boolean(*var_1663);
}
#[allow(unused_mut)]
let mut scope_1664 = writer.prefix("PrivateDnsName");
if let Some(var_1665) = &input.private_dns_name {
scope_1664.string(var_1665);
}
#[allow(unused_mut)]
let mut scope_1666 = writer.prefix("NetworkLoadBalancerArn");
if let Some(var_1667) = &input.network_load_balancer_arns {
let mut list_1669 = scope_1666.start_list(true, Some("item"));
for item_1668 in var_1667 {
#[allow(unused_mut)]
let mut entry_1670 = list_1669.entry();
entry_1670.string(item_1668);
}
list_1669.finish();
}
#[allow(unused_mut)]
let mut scope_1671 = writer.prefix("GatewayLoadBalancerArn");
if let Some(var_1672) = &input.gateway_load_balancer_arns {
let mut list_1674 = scope_1671.start_list(true, Some("item"));
for item_1673 in var_1672 {
#[allow(unused_mut)]
let mut entry_1675 = list_1674.entry();
entry_1675.string(item_1673);
}
list_1674.finish();
}
#[allow(unused_mut)]
let mut scope_1676 = writer.prefix("SupportedIpAddressType");
if let Some(var_1677) = &input.supported_ip_address_types {
let mut list_1679 = scope_1676.start_list(true, Some("item"));
for item_1678 in var_1677 {
#[allow(unused_mut)]
let mut entry_1680 = list_1679.entry();
entry_1680.string(item_1678);
}
list_1679.finish();
}
#[allow(unused_mut)]
let mut scope_1681 = writer.prefix("ClientToken");
if let Some(var_1682) = &input.client_token {
scope_1681.string(var_1682);
}
#[allow(unused_mut)]
let mut scope_1683 = writer.prefix("TagSpecification");
if let Some(var_1684) = &input.tag_specifications {
let mut list_1686 = scope_1683.start_list(true, Some("item"));
for item_1685 in var_1684 {
#[allow(unused_mut)]
let mut entry_1687 = list_1686.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1687, item_1685,
)?;
}
list_1686.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpc_peering_connection(
input: &crate::input::CreateVpcPeeringConnectionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateVpcPeeringConnection", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1688 = writer.prefix("DryRun");
if let Some(var_1689) = &input.dry_run {
scope_1688.boolean(*var_1689);
}
#[allow(unused_mut)]
let mut scope_1690 = writer.prefix("PeerOwnerId");
if let Some(var_1691) = &input.peer_owner_id {
scope_1690.string(var_1691);
}
#[allow(unused_mut)]
let mut scope_1692 = writer.prefix("PeerVpcId");
if let Some(var_1693) = &input.peer_vpc_id {
scope_1692.string(var_1693);
}
#[allow(unused_mut)]
let mut scope_1694 = writer.prefix("VpcId");
if let Some(var_1695) = &input.vpc_id {
scope_1694.string(var_1695);
}
#[allow(unused_mut)]
let mut scope_1696 = writer.prefix("PeerRegion");
if let Some(var_1697) = &input.peer_region {
scope_1696.string(var_1697);
}
#[allow(unused_mut)]
let mut scope_1698 = writer.prefix("TagSpecification");
if let Some(var_1699) = &input.tag_specifications {
let mut list_1701 = scope_1698.start_list(true, Some("item"));
for item_1700 in var_1699 {
#[allow(unused_mut)]
let mut entry_1702 = list_1701.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1702, item_1700,
)?;
}
list_1701.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpn_connection(
input: &crate::input::CreateVpnConnectionInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateVpnConnection", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1703 = writer.prefix("CustomerGatewayId");
if let Some(var_1704) = &input.customer_gateway_id {
scope_1703.string(var_1704);
}
#[allow(unused_mut)]
let mut scope_1705 = writer.prefix("Type");
if let Some(var_1706) = &input.r#type {
scope_1705.string(var_1706);
}
#[allow(unused_mut)]
let mut scope_1707 = writer.prefix("VpnGatewayId");
if let Some(var_1708) = &input.vpn_gateway_id {
scope_1707.string(var_1708);
}
#[allow(unused_mut)]
let mut scope_1709 = writer.prefix("TransitGatewayId");
if let Some(var_1710) = &input.transit_gateway_id {
scope_1709.string(var_1710);
}
#[allow(unused_mut)]
let mut scope_1711 = writer.prefix("DryRun");
if let Some(var_1712) = &input.dry_run {
scope_1711.boolean(*var_1712);
}
#[allow(unused_mut)]
let mut scope_1713 = writer.prefix("Options");
if let Some(var_1714) = &input.options {
crate::query_ser::serialize_structure_crate_model_vpn_connection_options_specification(
scope_1713, var_1714,
)?;
}
#[allow(unused_mut)]
let mut scope_1715 = writer.prefix("TagSpecification");
if let Some(var_1716) = &input.tag_specifications {
let mut list_1718 = scope_1715.start_list(true, Some("item"));
for item_1717 in var_1716 {
#[allow(unused_mut)]
let mut entry_1719 = list_1718.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1719, item_1717,
)?;
}
list_1718.finish();
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpn_connection_route(
input: &crate::input::CreateVpnConnectionRouteInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "CreateVpnConnectionRoute", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1720 = writer.prefix("DestinationCidrBlock");
if let Some(var_1721) = &input.destination_cidr_block {
scope_1720.string(var_1721);
}
#[allow(unused_mut)]
let mut scope_1722 = writer.prefix("VpnConnectionId");
if let Some(var_1723) = &input.vpn_connection_id {
scope_1722.string(var_1723);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
pub fn serialize_operation_crate_operation_create_vpn_gateway(
input: &crate::input::CreateVpnGatewayInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer = aws_smithy_query::QueryWriter::new(&mut out, "CreateVpnGateway", "2016-11-15");
#[allow(unused_mut)]
let mut scope_1724 = writer.prefix("AvailabilityZone");
if let Some(var_1725) = &input.availability_zone {
scope_1724.string(var_1725);
}
#[allow(unused_mut)]
let mut scope_1726 = writer.prefix("Type");
if let Some(var_1727) = &input.r#type {
scope_1726.string(var_1727.as_str());
}
#[allow(unused_mut)]
let mut scope_1728 = writer.prefix("TagSpecification");
if let Some(var_1729) = &input.tag_specifications {
let mut list_1731 = scope_1728.start_list(true, Some("item"));
for item_1730 in var_1729 {
#[allow(unused_mut)]
let mut entry_1732 = list_1731.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_1732, item_1730,
)?;
}
list_1731.finish();
}
#[allow(unused_mut)]
let mut scope_1733 = writer.prefix("AmazonSideAsn");
if let Some(var_1734) = &input.amazon_side_asn {
scope_1733.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1734).into()),
);
}
#[allow(unused_mut)]
let mut scope_1735 = writer.prefix("DryRun");
if let Some(var_1736) = &input.dry_run {
scope_1735.boolean(*var_1736);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
Trait Implementations§
source§impl AsRef<str> for GatewayType
impl AsRef<str> for GatewayType
source§impl Clone for GatewayType
impl Clone for GatewayType
source§fn clone(&self) -> GatewayType
fn clone(&self) -> GatewayType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GatewayType
impl Debug for GatewayType
source§impl From<&str> for GatewayType
impl From<&str> for GatewayType
source§impl FromStr for GatewayType
impl FromStr for GatewayType
source§impl Hash for GatewayType
impl Hash for GatewayType
source§impl Ord for GatewayType
impl Ord for GatewayType
source§fn cmp(&self, other: &GatewayType) -> Ordering
fn cmp(&self, other: &GatewayType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<GatewayType> for GatewayType
impl PartialEq<GatewayType> for GatewayType
source§fn eq(&self, other: &GatewayType) -> bool
fn eq(&self, other: &GatewayType) -> bool
source§impl PartialOrd<GatewayType> for GatewayType
impl PartialOrd<GatewayType> for GatewayType
source§fn partial_cmp(&self, other: &GatewayType) -> Option<Ordering>
fn partial_cmp(&self, other: &GatewayType) -> 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 GatewayType
impl StructuralEq for GatewayType
impl StructuralPartialEq for GatewayType
Auto Trait Implementations§
impl RefUnwindSafe for GatewayType
impl Send for GatewayType
impl Sync for GatewayType
impl Unpin for GatewayType
impl UnwindSafe for GatewayType
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.