Enum aws_sdk_ec2::model::LocalStorageType
source · #[non_exhaustive]
pub enum LocalStorageType {
Hdd,
Ssd,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against LocalStorageType
, 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 localstoragetype = unimplemented!();
match localstoragetype {
LocalStorageType::Hdd => { /* ... */ },
LocalStorageType::Ssd => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when localstoragetype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant LocalStorageType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
LocalStorageType::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 LocalStorageType::NewFeature
is defined.
Specifically, when localstoragetype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on LocalStorageType::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
Hdd
Ssd
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl LocalStorageType
impl LocalStorageType
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
1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 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 5912 5913 5914 5915 5916 5917 5918 5919 5920 5921 5922 5923 5924 5925 5926 5927 5928 5929 5930 5931 5932 5933 5934 5935 5936 5937 5938 5939 5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 5980 5981 5982 5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 6012 6013 6014 6015 6016 6017 6018 6019 6020 6021 6022 6023 6024 6025 6026 6027 6028 6029 6030 6031 6032 6033 6034 6035 6036 6037 6038 6039 6040 6041 6042 6043 6044 6045 6046 6047 6048 6049 6050 6051 6052 6053 6054 6055 6056 6057 6058 6059 6060 6061 6062 6063 6064 6065 6066 6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 6141 6142 6143 6144 6145 6146 6147 6148 6149 6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195
pub fn serialize_structure_crate_model_instance_requirements_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceRequirementsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_460 = writer.prefix("VCpuCount");
if let Some(var_461) = &input.v_cpu_count {
crate::query_ser::serialize_structure_crate_model_v_cpu_count_range_request(
scope_460, var_461,
)?;
}
#[allow(unused_mut)]
let mut scope_462 = writer.prefix("MemoryMiB");
if let Some(var_463) = &input.memory_mi_b {
crate::query_ser::serialize_structure_crate_model_memory_mi_b_request(scope_462, var_463)?;
}
#[allow(unused_mut)]
let mut scope_464 = writer.prefix("CpuManufacturer");
if let Some(var_465) = &input.cpu_manufacturers {
let mut list_467 = scope_464.start_list(true, Some("item"));
for item_466 in var_465 {
#[allow(unused_mut)]
let mut entry_468 = list_467.entry();
entry_468.string(item_466.as_str());
}
list_467.finish();
}
#[allow(unused_mut)]
let mut scope_469 = writer.prefix("MemoryGiBPerVCpu");
if let Some(var_470) = &input.memory_gi_b_per_v_cpu {
crate::query_ser::serialize_structure_crate_model_memory_gi_b_per_v_cpu_request(
scope_469, var_470,
)?;
}
#[allow(unused_mut)]
let mut scope_471 = writer.prefix("ExcludedInstanceType");
if let Some(var_472) = &input.excluded_instance_types {
let mut list_474 = scope_471.start_list(true, Some("item"));
for item_473 in var_472 {
#[allow(unused_mut)]
let mut entry_475 = list_474.entry();
entry_475.string(item_473);
}
list_474.finish();
}
#[allow(unused_mut)]
let mut scope_476 = writer.prefix("InstanceGeneration");
if let Some(var_477) = &input.instance_generations {
let mut list_479 = scope_476.start_list(true, Some("item"));
for item_478 in var_477 {
#[allow(unused_mut)]
let mut entry_480 = list_479.entry();
entry_480.string(item_478.as_str());
}
list_479.finish();
}
#[allow(unused_mut)]
let mut scope_481 = writer.prefix("SpotMaxPricePercentageOverLowestPrice");
if let Some(var_482) = &input.spot_max_price_percentage_over_lowest_price {
scope_481.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_482).into()),
);
}
#[allow(unused_mut)]
let mut scope_483 = writer.prefix("OnDemandMaxPricePercentageOverLowestPrice");
if let Some(var_484) = &input.on_demand_max_price_percentage_over_lowest_price {
scope_483.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_484).into()),
);
}
#[allow(unused_mut)]
let mut scope_485 = writer.prefix("BareMetal");
if let Some(var_486) = &input.bare_metal {
scope_485.string(var_486.as_str());
}
#[allow(unused_mut)]
let mut scope_487 = writer.prefix("BurstablePerformance");
if let Some(var_488) = &input.burstable_performance {
scope_487.string(var_488.as_str());
}
#[allow(unused_mut)]
let mut scope_489 = writer.prefix("RequireHibernateSupport");
if let Some(var_490) = &input.require_hibernate_support {
scope_489.boolean(*var_490);
}
#[allow(unused_mut)]
let mut scope_491 = writer.prefix("NetworkInterfaceCount");
if let Some(var_492) = &input.network_interface_count {
crate::query_ser::serialize_structure_crate_model_network_interface_count_request(
scope_491, var_492,
)?;
}
#[allow(unused_mut)]
let mut scope_493 = writer.prefix("LocalStorage");
if let Some(var_494) = &input.local_storage {
scope_493.string(var_494.as_str());
}
#[allow(unused_mut)]
let mut scope_495 = writer.prefix("LocalStorageType");
if let Some(var_496) = &input.local_storage_types {
let mut list_498 = scope_495.start_list(true, Some("item"));
for item_497 in var_496 {
#[allow(unused_mut)]
let mut entry_499 = list_498.entry();
entry_499.string(item_497.as_str());
}
list_498.finish();
}
#[allow(unused_mut)]
let mut scope_500 = writer.prefix("TotalLocalStorageGB");
if let Some(var_501) = &input.total_local_storage_gb {
crate::query_ser::serialize_structure_crate_model_total_local_storage_gb_request(
scope_500, var_501,
)?;
}
#[allow(unused_mut)]
let mut scope_502 = writer.prefix("BaselineEbsBandwidthMbps");
if let Some(var_503) = &input.baseline_ebs_bandwidth_mbps {
crate::query_ser::serialize_structure_crate_model_baseline_ebs_bandwidth_mbps_request(
scope_502, var_503,
)?;
}
#[allow(unused_mut)]
let mut scope_504 = writer.prefix("AcceleratorType");
if let Some(var_505) = &input.accelerator_types {
let mut list_507 = scope_504.start_list(true, Some("item"));
for item_506 in var_505 {
#[allow(unused_mut)]
let mut entry_508 = list_507.entry();
entry_508.string(item_506.as_str());
}
list_507.finish();
}
#[allow(unused_mut)]
let mut scope_509 = writer.prefix("AcceleratorCount");
if let Some(var_510) = &input.accelerator_count {
crate::query_ser::serialize_structure_crate_model_accelerator_count_request(
scope_509, var_510,
)?;
}
#[allow(unused_mut)]
let mut scope_511 = writer.prefix("AcceleratorManufacturer");
if let Some(var_512) = &input.accelerator_manufacturers {
let mut list_514 = scope_511.start_list(true, Some("item"));
for item_513 in var_512 {
#[allow(unused_mut)]
let mut entry_515 = list_514.entry();
entry_515.string(item_513.as_str());
}
list_514.finish();
}
#[allow(unused_mut)]
let mut scope_516 = writer.prefix("AcceleratorName");
if let Some(var_517) = &input.accelerator_names {
let mut list_519 = scope_516.start_list(true, Some("item"));
for item_518 in var_517 {
#[allow(unused_mut)]
let mut entry_520 = list_519.entry();
entry_520.string(item_518.as_str());
}
list_519.finish();
}
#[allow(unused_mut)]
let mut scope_521 = writer.prefix("AcceleratorTotalMemoryMiB");
if let Some(var_522) = &input.accelerator_total_memory_mi_b {
crate::query_ser::serialize_structure_crate_model_accelerator_total_memory_mi_b_request(
scope_521, var_522,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_requirements_with_metadata_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceRequirementsWithMetadataRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_523 = writer.prefix("ArchitectureType");
if let Some(var_524) = &input.architecture_types {
let mut list_526 = scope_523.start_list(true, Some("item"));
for item_525 in var_524 {
#[allow(unused_mut)]
let mut entry_527 = list_526.entry();
entry_527.string(item_525.as_str());
}
list_526.finish();
}
#[allow(unused_mut)]
let mut scope_528 = writer.prefix("VirtualizationType");
if let Some(var_529) = &input.virtualization_types {
let mut list_531 = scope_528.start_list(true, Some("item"));
for item_530 in var_529 {
#[allow(unused_mut)]
let mut entry_532 = list_531.entry();
entry_532.string(item_530.as_str());
}
list_531.finish();
}
#[allow(unused_mut)]
let mut scope_533 = writer.prefix("InstanceRequirements");
if let Some(var_534) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements_request(
scope_533, var_534,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_client_data(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ClientData,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_535 = writer.prefix("Comment");
if let Some(var_536) = &input.comment {
scope_535.string(var_536);
}
#[allow(unused_mut)]
let mut scope_537 = writer.prefix("UploadEnd");
if let Some(var_538) = &input.upload_end {
scope_537.date_time(var_538, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_539 = writer.prefix("UploadSize");
if let Some(var_540) = &input.upload_size {
scope_539.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_540).into()),
);
}
#[allow(unused_mut)]
let mut scope_541 = writer.prefix("UploadStart");
if let Some(var_542) = &input.upload_start {
scope_541.date_time(var_542, aws_smithy_types::date_time::Format::DateTime)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_image_disk_container(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ImageDiskContainer,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_543 = writer.prefix("Description");
if let Some(var_544) = &input.description {
scope_543.string(var_544);
}
#[allow(unused_mut)]
let mut scope_545 = writer.prefix("DeviceName");
if let Some(var_546) = &input.device_name {
scope_545.string(var_546);
}
#[allow(unused_mut)]
let mut scope_547 = writer.prefix("Format");
if let Some(var_548) = &input.format {
scope_547.string(var_548);
}
#[allow(unused_mut)]
let mut scope_549 = writer.prefix("SnapshotId");
if let Some(var_550) = &input.snapshot_id {
scope_549.string(var_550);
}
#[allow(unused_mut)]
let mut scope_551 = writer.prefix("Url");
if let Some(var_552) = &input.url {
scope_551.string(var_552);
}
#[allow(unused_mut)]
let mut scope_553 = writer.prefix("UserBucket");
if let Some(var_554) = &input.user_bucket {
crate::query_ser::serialize_structure_crate_model_user_bucket(scope_553, var_554)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_import_image_license_configuration_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ImportImageLicenseConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_555 = writer.prefix("LicenseConfigurationArn");
if let Some(var_556) = &input.license_configuration_arn {
scope_555.string(var_556);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_disk_image(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DiskImage,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_557 = writer.prefix("Description");
if let Some(var_558) = &input.description {
scope_557.string(var_558);
}
#[allow(unused_mut)]
let mut scope_559 = writer.prefix("Image");
if let Some(var_560) = &input.image {
crate::query_ser::serialize_structure_crate_model_disk_image_detail(scope_559, var_560)?;
}
#[allow(unused_mut)]
let mut scope_561 = writer.prefix("Volume");
if let Some(var_562) = &input.volume {
crate::query_ser::serialize_structure_crate_model_volume_detail(scope_561, var_562)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_import_instance_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ImportInstanceLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_563 = writer.prefix("AdditionalInfo");
if let Some(var_564) = &input.additional_info {
scope_563.string(var_564);
}
#[allow(unused_mut)]
let mut scope_565 = writer.prefix("Architecture");
if let Some(var_566) = &input.architecture {
scope_565.string(var_566.as_str());
}
#[allow(unused_mut)]
let mut scope_567 = writer.prefix("GroupId");
if let Some(var_568) = &input.group_ids {
let mut list_570 = scope_567.start_list(true, Some("SecurityGroupId"));
for item_569 in var_568 {
#[allow(unused_mut)]
let mut entry_571 = list_570.entry();
entry_571.string(item_569);
}
list_570.finish();
}
#[allow(unused_mut)]
let mut scope_572 = writer.prefix("GroupName");
if let Some(var_573) = &input.group_names {
let mut list_575 = scope_572.start_list(true, Some("SecurityGroup"));
for item_574 in var_573 {
#[allow(unused_mut)]
let mut entry_576 = list_575.entry();
entry_576.string(item_574);
}
list_575.finish();
}
#[allow(unused_mut)]
let mut scope_577 = writer.prefix("InstanceInitiatedShutdownBehavior");
if let Some(var_578) = &input.instance_initiated_shutdown_behavior {
scope_577.string(var_578.as_str());
}
#[allow(unused_mut)]
let mut scope_579 = writer.prefix("InstanceType");
if let Some(var_580) = &input.instance_type {
scope_579.string(var_580.as_str());
}
#[allow(unused_mut)]
let mut scope_581 = writer.prefix("Monitoring");
if let Some(var_582) = &input.monitoring {
scope_581.boolean(*var_582);
}
#[allow(unused_mut)]
let mut scope_583 = writer.prefix("Placement");
if let Some(var_584) = &input.placement {
crate::query_ser::serialize_structure_crate_model_placement(scope_583, var_584)?;
}
#[allow(unused_mut)]
let mut scope_585 = writer.prefix("PrivateIpAddress");
if let Some(var_586) = &input.private_ip_address {
scope_585.string(var_586);
}
#[allow(unused_mut)]
let mut scope_587 = writer.prefix("SubnetId");
if let Some(var_588) = &input.subnet_id {
scope_587.string(var_588);
}
#[allow(unused_mut)]
let mut scope_589 = writer.prefix("UserData");
if let Some(var_590) = &input.user_data {
crate::query_ser::serialize_structure_crate_model_user_data(scope_589, var_590)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_snapshot_disk_container(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SnapshotDiskContainer,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_591 = writer.prefix("Description");
if let Some(var_592) = &input.description {
scope_591.string(var_592);
}
#[allow(unused_mut)]
let mut scope_593 = writer.prefix("Format");
if let Some(var_594) = &input.format {
scope_593.string(var_594);
}
#[allow(unused_mut)]
let mut scope_595 = writer.prefix("Url");
if let Some(var_596) = &input.url {
scope_595.string(var_596);
}
#[allow(unused_mut)]
let mut scope_597 = writer.prefix("UserBucket");
if let Some(var_598) = &input.user_bucket {
crate::query_ser::serialize_structure_crate_model_user_bucket(scope_597, var_598)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_disk_image_detail(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DiskImageDetail,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_599 = writer.prefix("Bytes");
if let Some(var_600) = &input.bytes {
scope_599.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_600).into()),
);
}
#[allow(unused_mut)]
let mut scope_601 = writer.prefix("Format");
if let Some(var_602) = &input.format {
scope_601.string(var_602.as_str());
}
#[allow(unused_mut)]
let mut scope_603 = writer.prefix("ImportManifestUrl");
if let Some(var_604) = &input.import_manifest_url {
scope_603.string(var_604);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_volume_detail(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::VolumeDetail,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_605 = writer.prefix("Size");
if let Some(var_606) = &input.size {
scope_605.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_606).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_dns_servers_options_modify_structure(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DnsServersOptionsModifyStructure,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_607 = writer.prefix("CustomDnsServers");
if let Some(var_608) = &input.custom_dns_servers {
let mut list_610 = scope_607.start_list(true, Some("item"));
for item_609 in var_608 {
#[allow(unused_mut)]
let mut entry_611 = list_610.entry();
entry_611.string(item_609);
}
list_610.finish();
}
#[allow(unused_mut)]
let mut scope_612 = writer.prefix("Enabled");
if let Some(var_613) = &input.enabled {
scope_612.boolean(*var_613);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_load_permission_modifications(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LoadPermissionModifications,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_614 = writer.prefix("Add");
if let Some(var_615) = &input.add {
let mut list_617 = scope_614.start_list(true, Some("item"));
for item_616 in var_615 {
#[allow(unused_mut)]
let mut entry_618 = list_617.entry();
crate::query_ser::serialize_structure_crate_model_load_permission_request(
entry_618, item_616,
)?;
}
list_617.finish();
}
#[allow(unused_mut)]
let mut scope_619 = writer.prefix("Remove");
if let Some(var_620) = &input.remove {
let mut list_622 = scope_619.start_list(true, Some("item"));
for item_621 in var_620 {
#[allow(unused_mut)]
let mut entry_623 = list_622.entry();
crate::query_ser::serialize_structure_crate_model_load_permission_request(
entry_623, item_621,
)?;
}
list_622.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_attribute_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AttributeValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_624 = writer.prefix("Value");
if let Some(var_625) = &input.value {
scope_624.string(var_625);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_permission_modifications(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchPermissionModifications,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_626 = writer.prefix("Add");
if let Some(var_627) = &input.add {
let mut list_629 = scope_626.start_list(true, Some("item"));
for item_628 in var_627 {
#[allow(unused_mut)]
let mut entry_630 = list_629.entry();
crate::query_ser::serialize_structure_crate_model_launch_permission(
entry_630, item_628,
)?;
}
list_629.finish();
}
#[allow(unused_mut)]
let mut scope_631 = writer.prefix("Remove");
if let Some(var_632) = &input.remove {
let mut list_634 = scope_631.start_list(true, Some("item"));
for item_633 in var_632 {
#[allow(unused_mut)]
let mut entry_635 = list_634.entry();
crate::query_ser::serialize_structure_crate_model_launch_permission(
entry_635, item_633,
)?;
}
list_634.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_attribute_boolean_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AttributeBooleanValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_636 = writer.prefix("Value");
if let Some(var_637) = &input.value {
scope_636.boolean(*var_637);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_block_device_mapping_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceBlockDeviceMappingSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_638 = writer.prefix("DeviceName");
if let Some(var_639) = &input.device_name {
scope_638.string(var_639);
}
#[allow(unused_mut)]
let mut scope_640 = writer.prefix("Ebs");
if let Some(var_641) = &input.ebs {
crate::query_ser::serialize_structure_crate_model_ebs_instance_block_device_specification(
scope_640, var_641,
)?;
}
#[allow(unused_mut)]
let mut scope_642 = writer.prefix("NoDevice");
if let Some(var_643) = &input.no_device {
scope_642.string(var_643);
}
#[allow(unused_mut)]
let mut scope_644 = writer.prefix("VirtualName");
if let Some(var_645) = &input.virtual_name {
scope_644.string(var_645);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_blob_attribute_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::BlobAttributeValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_646 = writer.prefix("Value");
if let Some(var_647) = &input.value {
scope_646.string(&aws_smithy_types::base64::encode(var_647));
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_capacity_reservation_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CapacityReservationSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_648 = writer.prefix("CapacityReservationPreference");
if let Some(var_649) = &input.capacity_reservation_preference {
scope_648.string(var_649.as_str());
}
#[allow(unused_mut)]
let mut scope_650 = writer.prefix("CapacityReservationTarget");
if let Some(var_651) = &input.capacity_reservation_target {
crate::query_ser::serialize_structure_crate_model_capacity_reservation_target(
scope_650, var_651,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_credit_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceCreditSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_652 = writer.prefix("InstanceId");
if let Some(var_653) = &input.instance_id {
scope_652.string(var_653);
}
#[allow(unused_mut)]
let mut scope_654 = writer.prefix("CpuCredits");
if let Some(var_655) = &input.cpu_credits {
scope_654.string(var_655);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_remove_ipam_operating_region(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RemoveIpamOperatingRegion,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_656 = writer.prefix("RegionName");
if let Some(var_657) = &input.region_name {
scope_656.string(var_657);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_remove_prefix_list_entry(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RemovePrefixListEntry,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_658 = writer.prefix("Cidr");
if let Some(var_659) = &input.cidr {
scope_658.string(var_659);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_network_interface_attachment_changes(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::NetworkInterfaceAttachmentChanges,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_660 = writer.prefix("AttachmentId");
if let Some(var_661) = &input.attachment_id {
scope_660.string(var_661);
}
#[allow(unused_mut)]
let mut scope_662 = writer.prefix("DeleteOnTermination");
if let Some(var_663) = &input.delete_on_termination {
scope_662.boolean(*var_663);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_reserved_instances_configuration(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ReservedInstancesConfiguration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_664 = writer.prefix("AvailabilityZone");
if let Some(var_665) = &input.availability_zone {
scope_664.string(var_665);
}
#[allow(unused_mut)]
let mut scope_666 = writer.prefix("InstanceCount");
if let Some(var_667) = &input.instance_count {
scope_666.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_667).into()),
);
}
#[allow(unused_mut)]
let mut scope_668 = writer.prefix("InstanceType");
if let Some(var_669) = &input.instance_type {
scope_668.string(var_669.as_str());
}
#[allow(unused_mut)]
let mut scope_670 = writer.prefix("Platform");
if let Some(var_671) = &input.platform {
scope_670.string(var_671);
}
#[allow(unused_mut)]
let mut scope_672 = writer.prefix("Scope");
if let Some(var_673) = &input.scope {
scope_672.string(var_673.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_update(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SecurityGroupRuleUpdate,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_674 = writer.prefix("SecurityGroupRuleId");
if let Some(var_675) = &input.security_group_rule_id {
scope_674.string(var_675);
}
#[allow(unused_mut)]
let mut scope_676 = writer.prefix("SecurityGroupRule");
if let Some(var_677) = &input.security_group_rule {
crate::query_ser::serialize_structure_crate_model_security_group_rule_request(
scope_676, var_677,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_volume_permission_modifications(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateVolumePermissionModifications,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_678 = writer.prefix("Add");
if let Some(var_679) = &input.add {
let mut list_681 = scope_678.start_list(true, Some("item"));
for item_680 in var_679 {
#[allow(unused_mut)]
let mut entry_682 = list_681.entry();
crate::query_ser::serialize_structure_crate_model_create_volume_permission(
entry_682, item_680,
)?;
}
list_681.finish();
}
#[allow(unused_mut)]
let mut scope_683 = writer.prefix("Remove");
if let Some(var_684) = &input.remove {
let mut list_686 = scope_683.start_list(true, Some("item"));
for item_685 in var_684 {
#[allow(unused_mut)]
let mut entry_687 = list_686.entry();
crate::query_ser::serialize_structure_crate_model_create_volume_permission(
entry_687, item_685,
)?;
}
list_686.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_config(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_688 = writer.prefix("LaunchTemplateSpecification");
if let Some(var_689) = &input.launch_template_specification {
crate::query_ser::serialize_structure_crate_model_fleet_launch_template_specification(
scope_688, var_689,
)?;
}
#[allow(unused_mut)]
let mut scope_690 = writer.prefix("Overrides");
if let Some(var_691) = &input.overrides {
let mut list_693 = scope_690.start_list(true, Some("item"));
for item_692 in var_691 {
#[allow(unused_mut)]
let mut entry_694 = list_693.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_overrides(
entry_694, item_692,
)?;
}
list_693.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_transit_gateway_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyTransitGatewayOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_695 = writer.prefix("AddTransitGatewayCidrBlocks");
if let Some(var_696) = &input.add_transit_gateway_cidr_blocks {
let mut list_698 = scope_695.start_list(true, Some("item"));
for item_697 in var_696 {
#[allow(unused_mut)]
let mut entry_699 = list_698.entry();
entry_699.string(item_697);
}
list_698.finish();
}
#[allow(unused_mut)]
let mut scope_700 = writer.prefix("RemoveTransitGatewayCidrBlocks");
if let Some(var_701) = &input.remove_transit_gateway_cidr_blocks {
let mut list_703 = scope_700.start_list(true, Some("item"));
for item_702 in var_701 {
#[allow(unused_mut)]
let mut entry_704 = list_703.entry();
entry_704.string(item_702);
}
list_703.finish();
}
#[allow(unused_mut)]
let mut scope_705 = writer.prefix("VpnEcmpSupport");
if let Some(var_706) = &input.vpn_ecmp_support {
scope_705.string(var_706.as_str());
}
#[allow(unused_mut)]
let mut scope_707 = writer.prefix("DnsSupport");
if let Some(var_708) = &input.dns_support {
scope_707.string(var_708.as_str());
}
#[allow(unused_mut)]
let mut scope_709 = writer.prefix("AutoAcceptSharedAttachments");
if let Some(var_710) = &input.auto_accept_shared_attachments {
scope_709.string(var_710.as_str());
}
#[allow(unused_mut)]
let mut scope_711 = writer.prefix("DefaultRouteTableAssociation");
if let Some(var_712) = &input.default_route_table_association {
scope_711.string(var_712.as_str());
}
#[allow(unused_mut)]
let mut scope_713 = writer.prefix("AssociationDefaultRouteTableId");
if let Some(var_714) = &input.association_default_route_table_id {
scope_713.string(var_714);
}
#[allow(unused_mut)]
let mut scope_715 = writer.prefix("DefaultRouteTablePropagation");
if let Some(var_716) = &input.default_route_table_propagation {
scope_715.string(var_716.as_str());
}
#[allow(unused_mut)]
let mut scope_717 = writer.prefix("PropagationDefaultRouteTableId");
if let Some(var_718) = &input.propagation_default_route_table_id {
scope_717.string(var_718);
}
#[allow(unused_mut)]
let mut scope_719 = writer.prefix("AmazonSideAsn");
if let Some(var_720) = &input.amazon_side_asn {
scope_719.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_720).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_transit_gateway_vpc_attachment_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyTransitGatewayVpcAttachmentRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_721 = writer.prefix("DnsSupport");
if let Some(var_722) = &input.dns_support {
scope_721.string(var_722.as_str());
}
#[allow(unused_mut)]
let mut scope_723 = writer.prefix("Ipv6Support");
if let Some(var_724) = &input.ipv6_support {
scope_723.string(var_724.as_str());
}
#[allow(unused_mut)]
let mut scope_725 = writer.prefix("ApplianceModeSupport");
if let Some(var_726) = &input.appliance_mode_support {
scope_725.string(var_726.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_peering_connection_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PeeringConnectionOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_727 = writer.prefix("AllowDnsResolutionFromRemoteVpc");
if let Some(var_728) = &input.allow_dns_resolution_from_remote_vpc {
scope_727.boolean(*var_728);
}
#[allow(unused_mut)]
let mut scope_729 = writer.prefix("AllowEgressFromLocalClassicLinkToRemoteVpc");
if let Some(var_730) = &input.allow_egress_from_local_classic_link_to_remote_vpc {
scope_729.boolean(*var_730);
}
#[allow(unused_mut)]
let mut scope_731 = writer.prefix("AllowEgressFromLocalVpcToRemoteClassicLink");
if let Some(var_732) = &input.allow_egress_from_local_vpc_to_remote_classic_link {
scope_731.boolean(*var_732);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_modify_vpn_tunnel_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ModifyVpnTunnelOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_733 = writer.prefix("TunnelInsideCidr");
if let Some(var_734) = &input.tunnel_inside_cidr {
scope_733.string(var_734);
}
#[allow(unused_mut)]
let mut scope_735 = writer.prefix("TunnelInsideIpv6Cidr");
if let Some(var_736) = &input.tunnel_inside_ipv6_cidr {
scope_735.string(var_736);
}
#[allow(unused_mut)]
let mut scope_737 = writer.prefix("PreSharedKey");
if let Some(var_738) = &input.pre_shared_key {
scope_737.string(var_738);
}
#[allow(unused_mut)]
let mut scope_739 = writer.prefix("Phase1LifetimeSeconds");
if let Some(var_740) = &input.phase1_lifetime_seconds {
scope_739.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_740).into()),
);
}
#[allow(unused_mut)]
let mut scope_741 = writer.prefix("Phase2LifetimeSeconds");
if let Some(var_742) = &input.phase2_lifetime_seconds {
scope_741.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_742).into()),
);
}
#[allow(unused_mut)]
let mut scope_743 = writer.prefix("RekeyMarginTimeSeconds");
if let Some(var_744) = &input.rekey_margin_time_seconds {
scope_743.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_744).into()),
);
}
#[allow(unused_mut)]
let mut scope_745 = writer.prefix("RekeyFuzzPercentage");
if let Some(var_746) = &input.rekey_fuzz_percentage {
scope_745.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_746).into()),
);
}
#[allow(unused_mut)]
let mut scope_747 = writer.prefix("ReplayWindowSize");
if let Some(var_748) = &input.replay_window_size {
scope_747.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_748).into()),
);
}
#[allow(unused_mut)]
let mut scope_749 = writer.prefix("DPDTimeoutSeconds");
if let Some(var_750) = &input.dpd_timeout_seconds {
scope_749.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_750).into()),
);
}
#[allow(unused_mut)]
let mut scope_751 = writer.prefix("DPDTimeoutAction");
if let Some(var_752) = &input.dpd_timeout_action {
scope_751.string(var_752);
}
#[allow(unused_mut)]
let mut scope_753 = writer.prefix("Phase1EncryptionAlgorithm");
if let Some(var_754) = &input.phase1_encryption_algorithms {
let mut list_756 = scope_753.start_list(true, Some("item"));
for item_755 in var_754 {
#[allow(unused_mut)]
let mut entry_757 = list_756.entry();
crate::query_ser::serialize_structure_crate_model_phase1_encryption_algorithms_request_list_value(entry_757, item_755)?;
}
list_756.finish();
}
#[allow(unused_mut)]
let mut scope_758 = writer.prefix("Phase2EncryptionAlgorithm");
if let Some(var_759) = &input.phase2_encryption_algorithms {
let mut list_761 = scope_758.start_list(true, Some("item"));
for item_760 in var_759 {
#[allow(unused_mut)]
let mut entry_762 = list_761.entry();
crate::query_ser::serialize_structure_crate_model_phase2_encryption_algorithms_request_list_value(entry_762, item_760)?;
}
list_761.finish();
}
#[allow(unused_mut)]
let mut scope_763 = writer.prefix("Phase1IntegrityAlgorithm");
if let Some(var_764) = &input.phase1_integrity_algorithms {
let mut list_766 = scope_763.start_list(true, Some("item"));
for item_765 in var_764 {
#[allow(unused_mut)]
let mut entry_767 = list_766.entry();
crate::query_ser::serialize_structure_crate_model_phase1_integrity_algorithms_request_list_value(entry_767, item_765)?;
}
list_766.finish();
}
#[allow(unused_mut)]
let mut scope_768 = writer.prefix("Phase2IntegrityAlgorithm");
if let Some(var_769) = &input.phase2_integrity_algorithms {
let mut list_771 = scope_768.start_list(true, Some("item"));
for item_770 in var_769 {
#[allow(unused_mut)]
let mut entry_772 = list_771.entry();
crate::query_ser::serialize_structure_crate_model_phase2_integrity_algorithms_request_list_value(entry_772, item_770)?;
}
list_771.finish();
}
#[allow(unused_mut)]
let mut scope_773 = writer.prefix("Phase1DHGroupNumber");
if let Some(var_774) = &input.phase1_dh_group_numbers {
let mut list_776 = scope_773.start_list(true, Some("item"));
for item_775 in var_774 {
#[allow(unused_mut)]
let mut entry_777 = list_776.entry();
crate::query_ser::serialize_structure_crate_model_phase1_dh_group_numbers_request_list_value(entry_777, item_775)?;
}
list_776.finish();
}
#[allow(unused_mut)]
let mut scope_778 = writer.prefix("Phase2DHGroupNumber");
if let Some(var_779) = &input.phase2_dh_group_numbers {
let mut list_781 = scope_778.start_list(true, Some("item"));
for item_780 in var_779 {
#[allow(unused_mut)]
let mut entry_782 = list_781.entry();
crate::query_ser::serialize_structure_crate_model_phase2_dh_group_numbers_request_list_value(entry_782, item_780)?;
}
list_781.finish();
}
#[allow(unused_mut)]
let mut scope_783 = writer.prefix("IKEVersion");
if let Some(var_784) = &input.ike_versions {
let mut list_786 = scope_783.start_list(true, Some("item"));
for item_785 in var_784 {
#[allow(unused_mut)]
let mut entry_787 = list_786.entry();
crate::query_ser::serialize_structure_crate_model_ike_versions_request_list_value(
entry_787, item_785,
)?;
}
list_786.finish();
}
#[allow(unused_mut)]
let mut scope_788 = writer.prefix("StartupAction");
if let Some(var_789) = &input.startup_action {
scope_788.string(var_789);
}
#[allow(unused_mut)]
let mut scope_790 = writer.prefix("LogOptions");
if let Some(var_791) = &input.log_options {
crate::query_ser::serialize_structure_crate_model_vpn_tunnel_log_options_specification(
scope_790, var_791,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_cidr_authorization_context(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CidrAuthorizationContext,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_792 = writer.prefix("Message");
if let Some(var_793) = &input.message {
scope_792.string(var_793);
}
#[allow(unused_mut)]
let mut scope_794 = writer.prefix("Signature");
if let Some(var_795) = &input.signature {
scope_794.string(var_795);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipam_cidr_authorization_context(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IpamCidrAuthorizationContext,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_796 = writer.prefix("Message");
if let Some(var_797) = &input.message {
scope_796.string(var_797);
}
#[allow(unused_mut)]
let mut scope_798 = writer.prefix("Signature");
if let Some(var_799) = &input.signature {
scope_798.string(var_799);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_reserved_instance_limit_price(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ReservedInstanceLimitPrice,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_800 = writer.prefix("Amount");
if let Some(var_801) = &input.amount {
scope_800.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_801).into()),
);
}
#[allow(unused_mut)]
let mut scope_802 = writer.prefix("CurrencyCode");
if let Some(var_803) = &input.currency_code {
scope_802.string(var_803.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_purchase_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PurchaseRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_804 = writer.prefix("InstanceCount");
if let Some(var_805) = &input.instance_count {
scope_804.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_805).into()),
);
}
#[allow(unused_mut)]
let mut scope_806 = writer.prefix("PurchaseToken");
if let Some(var_807) = &input.purchase_token {
scope_806.string(var_807);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_register_instance_tag_attribute_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RegisterInstanceTagAttributeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_808 = writer.prefix("IncludeAllTagsOfInstance");
if let Some(var_809) = &input.include_all_tags_of_instance {
scope_808.boolean(*var_809);
}
#[allow(unused_mut)]
let mut scope_810 = writer.prefix("InstanceTagKey");
if let Some(var_811) = &input.instance_tag_keys {
let mut list_813 = scope_810.start_list(true, Some("item"));
for item_812 in var_811 {
#[allow(unused_mut)]
let mut entry_814 = list_813.entry();
entry_814.string(item_812);
}
list_813.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_fleet_request_config_data(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotFleetRequestConfigData,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_815 = writer.prefix("AllocationStrategy");
if let Some(var_816) = &input.allocation_strategy {
scope_815.string(var_816.as_str());
}
#[allow(unused_mut)]
let mut scope_817 = writer.prefix("OnDemandAllocationStrategy");
if let Some(var_818) = &input.on_demand_allocation_strategy {
scope_817.string(var_818.as_str());
}
#[allow(unused_mut)]
let mut scope_819 = writer.prefix("SpotMaintenanceStrategies");
if let Some(var_820) = &input.spot_maintenance_strategies {
crate::query_ser::serialize_structure_crate_model_spot_maintenance_strategies(
scope_819, var_820,
)?;
}
#[allow(unused_mut)]
let mut scope_821 = writer.prefix("ClientToken");
if let Some(var_822) = &input.client_token {
scope_821.string(var_822);
}
#[allow(unused_mut)]
let mut scope_823 = writer.prefix("ExcessCapacityTerminationPolicy");
if let Some(var_824) = &input.excess_capacity_termination_policy {
scope_823.string(var_824.as_str());
}
#[allow(unused_mut)]
let mut scope_825 = writer.prefix("FulfilledCapacity");
if let Some(var_826) = &input.fulfilled_capacity {
scope_825.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_826).into()),
);
}
#[allow(unused_mut)]
let mut scope_827 = writer.prefix("OnDemandFulfilledCapacity");
if let Some(var_828) = &input.on_demand_fulfilled_capacity {
scope_827.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_828).into()),
);
}
#[allow(unused_mut)]
let mut scope_829 = writer.prefix("IamFleetRole");
if let Some(var_830) = &input.iam_fleet_role {
scope_829.string(var_830);
}
#[allow(unused_mut)]
let mut scope_831 = writer.prefix("LaunchSpecifications");
if let Some(var_832) = &input.launch_specifications {
let mut list_834 = scope_831.start_list(true, Some("item"));
for item_833 in var_832 {
#[allow(unused_mut)]
let mut entry_835 = list_834.entry();
crate::query_ser::serialize_structure_crate_model_spot_fleet_launch_specification(
entry_835, item_833,
)?;
}
list_834.finish();
}
#[allow(unused_mut)]
let mut scope_836 = writer.prefix("LaunchTemplateConfigs");
if let Some(var_837) = &input.launch_template_configs {
let mut list_839 = scope_836.start_list(true, Some("item"));
for item_838 in var_837 {
#[allow(unused_mut)]
let mut entry_840 = list_839.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_config(
entry_840, item_838,
)?;
}
list_839.finish();
}
#[allow(unused_mut)]
let mut scope_841 = writer.prefix("SpotPrice");
if let Some(var_842) = &input.spot_price {
scope_841.string(var_842);
}
#[allow(unused_mut)]
let mut scope_843 = writer.prefix("TargetCapacity");
if let Some(var_844) = &input.target_capacity {
scope_843.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_844).into()),
);
}
#[allow(unused_mut)]
let mut scope_845 = writer.prefix("OnDemandTargetCapacity");
if let Some(var_846) = &input.on_demand_target_capacity {
scope_845.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_846).into()),
);
}
#[allow(unused_mut)]
let mut scope_847 = writer.prefix("OnDemandMaxTotalPrice");
if let Some(var_848) = &input.on_demand_max_total_price {
scope_847.string(var_848);
}
#[allow(unused_mut)]
let mut scope_849 = writer.prefix("SpotMaxTotalPrice");
if let Some(var_850) = &input.spot_max_total_price {
scope_849.string(var_850);
}
#[allow(unused_mut)]
let mut scope_851 = writer.prefix("TerminateInstancesWithExpiration");
if let Some(var_852) = &input.terminate_instances_with_expiration {
scope_851.boolean(*var_852);
}
#[allow(unused_mut)]
let mut scope_853 = writer.prefix("Type");
if let Some(var_854) = &input.r#type {
scope_853.string(var_854.as_str());
}
#[allow(unused_mut)]
let mut scope_855 = writer.prefix("ValidFrom");
if let Some(var_856) = &input.valid_from {
scope_855.date_time(var_856, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_857 = writer.prefix("ValidUntil");
if let Some(var_858) = &input.valid_until {
scope_857.date_time(var_858, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_859 = writer.prefix("ReplaceUnhealthyInstances");
if let Some(var_860) = &input.replace_unhealthy_instances {
scope_859.boolean(*var_860);
}
#[allow(unused_mut)]
let mut scope_861 = writer.prefix("InstanceInterruptionBehavior");
if let Some(var_862) = &input.instance_interruption_behavior {
scope_861.string(var_862.as_str());
}
#[allow(unused_mut)]
let mut scope_863 = writer.prefix("LoadBalancersConfig");
if let Some(var_864) = &input.load_balancers_config {
crate::query_ser::serialize_structure_crate_model_load_balancers_config(
scope_863, var_864,
)?;
}
#[allow(unused_mut)]
let mut scope_865 = writer.prefix("InstancePoolsToUseCount");
if let Some(var_866) = &input.instance_pools_to_use_count {
scope_865.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_866).into()),
);
}
#[allow(unused_mut)]
let mut scope_867 = writer.prefix("Context");
if let Some(var_868) = &input.context {
scope_867.string(var_868);
}
#[allow(unused_mut)]
let mut scope_869 = writer.prefix("TargetCapacityUnitType");
if let Some(var_870) = &input.target_capacity_unit_type {
scope_869.string(var_870.as_str());
}
#[allow(unused_mut)]
let mut scope_871 = writer.prefix("TagSpecification");
if let Some(var_872) = &input.tag_specifications {
let mut list_874 = scope_871.start_list(true, Some("item"));
for item_873 in var_872 {
#[allow(unused_mut)]
let mut entry_875 = list_874.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_875, item_873,
)?;
}
list_874.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_request_spot_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RequestSpotLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_876 = writer.prefix("SecurityGroupId");
if let Some(var_877) = &input.security_group_ids {
let mut list_879 = scope_876.start_list(true, Some("item"));
for item_878 in var_877 {
#[allow(unused_mut)]
let mut entry_880 = list_879.entry();
entry_880.string(item_878);
}
list_879.finish();
}
#[allow(unused_mut)]
let mut scope_881 = writer.prefix("SecurityGroup");
if let Some(var_882) = &input.security_groups {
let mut list_884 = scope_881.start_list(true, Some("item"));
for item_883 in var_882 {
#[allow(unused_mut)]
let mut entry_885 = list_884.entry();
entry_885.string(item_883);
}
list_884.finish();
}
#[allow(unused_mut)]
let mut scope_886 = writer.prefix("AddressingType");
if let Some(var_887) = &input.addressing_type {
scope_886.string(var_887);
}
#[allow(unused_mut)]
let mut scope_888 = writer.prefix("BlockDeviceMapping");
if let Some(var_889) = &input.block_device_mappings {
let mut list_891 = scope_888.start_list(true, Some("item"));
for item_890 in var_889 {
#[allow(unused_mut)]
let mut entry_892 = list_891.entry();
crate::query_ser::serialize_structure_crate_model_block_device_mapping(
entry_892, item_890,
)?;
}
list_891.finish();
}
#[allow(unused_mut)]
let mut scope_893 = writer.prefix("EbsOptimized");
if let Some(var_894) = &input.ebs_optimized {
scope_893.boolean(*var_894);
}
#[allow(unused_mut)]
let mut scope_895 = writer.prefix("IamInstanceProfile");
if let Some(var_896) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_iam_instance_profile_specification(
scope_895, var_896,
)?;
}
#[allow(unused_mut)]
let mut scope_897 = writer.prefix("ImageId");
if let Some(var_898) = &input.image_id {
scope_897.string(var_898);
}
#[allow(unused_mut)]
let mut scope_899 = writer.prefix("InstanceType");
if let Some(var_900) = &input.instance_type {
scope_899.string(var_900.as_str());
}
#[allow(unused_mut)]
let mut scope_901 = writer.prefix("KernelId");
if let Some(var_902) = &input.kernel_id {
scope_901.string(var_902);
}
#[allow(unused_mut)]
let mut scope_903 = writer.prefix("KeyName");
if let Some(var_904) = &input.key_name {
scope_903.string(var_904);
}
#[allow(unused_mut)]
let mut scope_905 = writer.prefix("Monitoring");
if let Some(var_906) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_run_instances_monitoring_enabled(
scope_905, var_906,
)?;
}
#[allow(unused_mut)]
let mut scope_907 = writer.prefix("NetworkInterface");
if let Some(var_908) = &input.network_interfaces {
let mut list_910 = scope_907.start_list(true, Some("item"));
for item_909 in var_908 {
#[allow(unused_mut)]
let mut entry_911 = list_910.entry();
crate::query_ser::serialize_structure_crate_model_instance_network_interface_specification(entry_911, item_909)?;
}
list_910.finish();
}
#[allow(unused_mut)]
let mut scope_912 = writer.prefix("Placement");
if let Some(var_913) = &input.placement {
crate::query_ser::serialize_structure_crate_model_spot_placement(scope_912, var_913)?;
}
#[allow(unused_mut)]
let mut scope_914 = writer.prefix("RamdiskId");
if let Some(var_915) = &input.ramdisk_id {
scope_914.string(var_915);
}
#[allow(unused_mut)]
let mut scope_916 = writer.prefix("SubnetId");
if let Some(var_917) = &input.subnet_id {
scope_916.string(var_917);
}
#[allow(unused_mut)]
let mut scope_918 = writer.prefix("UserData");
if let Some(var_919) = &input.user_data {
scope_918.string(var_919);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_run_instances_monitoring_enabled(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RunInstancesMonitoringEnabled,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_920 = writer.prefix("Enabled");
if let Some(var_921) = &input.enabled {
scope_920.boolean(*var_921);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_placement(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Placement,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_922 = writer.prefix("AvailabilityZone");
if let Some(var_923) = &input.availability_zone {
scope_922.string(var_923);
}
#[allow(unused_mut)]
let mut scope_924 = writer.prefix("Affinity");
if let Some(var_925) = &input.affinity {
scope_924.string(var_925);
}
#[allow(unused_mut)]
let mut scope_926 = writer.prefix("GroupName");
if let Some(var_927) = &input.group_name {
scope_926.string(var_927);
}
#[allow(unused_mut)]
let mut scope_928 = writer.prefix("PartitionNumber");
if let Some(var_929) = &input.partition_number {
scope_928.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_929).into()),
);
}
#[allow(unused_mut)]
let mut scope_930 = writer.prefix("HostId");
if let Some(var_931) = &input.host_id {
scope_930.string(var_931);
}
#[allow(unused_mut)]
let mut scope_932 = writer.prefix("Tenancy");
if let Some(var_933) = &input.tenancy {
scope_932.string(var_933.as_str());
}
#[allow(unused_mut)]
let mut scope_934 = writer.prefix("SpreadDomain");
if let Some(var_935) = &input.spread_domain {
scope_934.string(var_935);
}
#[allow(unused_mut)]
let mut scope_936 = writer.prefix("HostResourceGroupArn");
if let Some(var_937) = &input.host_resource_group_arn {
scope_936.string(var_937);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_network_interface_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceNetworkInterfaceSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_938 = writer.prefix("AssociatePublicIpAddress");
if let Some(var_939) = &input.associate_public_ip_address {
scope_938.boolean(*var_939);
}
#[allow(unused_mut)]
let mut scope_940 = writer.prefix("DeleteOnTermination");
if let Some(var_941) = &input.delete_on_termination {
scope_940.boolean(*var_941);
}
#[allow(unused_mut)]
let mut scope_942 = writer.prefix("Description");
if let Some(var_943) = &input.description {
scope_942.string(var_943);
}
#[allow(unused_mut)]
let mut scope_944 = writer.prefix("DeviceIndex");
if let Some(var_945) = &input.device_index {
scope_944.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_945).into()),
);
}
#[allow(unused_mut)]
let mut scope_946 = writer.prefix("SecurityGroupId");
if let Some(var_947) = &input.groups {
let mut list_949 = scope_946.start_list(true, Some("SecurityGroupId"));
for item_948 in var_947 {
#[allow(unused_mut)]
let mut entry_950 = list_949.entry();
entry_950.string(item_948);
}
list_949.finish();
}
#[allow(unused_mut)]
let mut scope_951 = writer.prefix("Ipv6AddressCount");
if let Some(var_952) = &input.ipv6_address_count {
scope_951.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_952).into()),
);
}
#[allow(unused_mut)]
let mut scope_953 = writer.prefix("Ipv6Addresses");
if let Some(var_954) = &input.ipv6_addresses {
let mut list_956 = scope_953.start_list(true, Some("item"));
for item_955 in var_954 {
#[allow(unused_mut)]
let mut entry_957 = list_956.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address(
entry_957, item_955,
)?;
}
list_956.finish();
}
#[allow(unused_mut)]
let mut scope_958 = writer.prefix("NetworkInterfaceId");
if let Some(var_959) = &input.network_interface_id {
scope_958.string(var_959);
}
#[allow(unused_mut)]
let mut scope_960 = writer.prefix("PrivateIpAddress");
if let Some(var_961) = &input.private_ip_address {
scope_960.string(var_961);
}
#[allow(unused_mut)]
let mut scope_962 = writer.prefix("PrivateIpAddresses");
if let Some(var_963) = &input.private_ip_addresses {
let mut list_965 = scope_962.start_list(true, Some("item"));
for item_964 in var_963 {
#[allow(unused_mut)]
let mut entry_966 = list_965.entry();
crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
entry_966, item_964,
)?;
}
list_965.finish();
}
#[allow(unused_mut)]
let mut scope_967 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_968) = &input.secondary_private_ip_address_count {
scope_967.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_968).into()),
);
}
#[allow(unused_mut)]
let mut scope_969 = writer.prefix("SubnetId");
if let Some(var_970) = &input.subnet_id {
scope_969.string(var_970);
}
#[allow(unused_mut)]
let mut scope_971 = writer.prefix("AssociateCarrierIpAddress");
if let Some(var_972) = &input.associate_carrier_ip_address {
scope_971.boolean(*var_972);
}
#[allow(unused_mut)]
let mut scope_973 = writer.prefix("InterfaceType");
if let Some(var_974) = &input.interface_type {
scope_973.string(var_974);
}
#[allow(unused_mut)]
let mut scope_975 = writer.prefix("NetworkCardIndex");
if let Some(var_976) = &input.network_card_index {
scope_975.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_976).into()),
);
}
#[allow(unused_mut)]
let mut scope_977 = writer.prefix("Ipv4Prefix");
if let Some(var_978) = &input.ipv4_prefixes {
let mut list_980 = scope_977.start_list(true, Some("item"));
for item_979 in var_978 {
#[allow(unused_mut)]
let mut entry_981 = list_980.entry();
crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
entry_981, item_979,
)?;
}
list_980.finish();
}
#[allow(unused_mut)]
let mut scope_982 = writer.prefix("Ipv4PrefixCount");
if let Some(var_983) = &input.ipv4_prefix_count {
scope_982.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_983).into()),
);
}
#[allow(unused_mut)]
let mut scope_984 = writer.prefix("Ipv6Prefix");
if let Some(var_985) = &input.ipv6_prefixes {
let mut list_987 = scope_984.start_list(true, Some("item"));
for item_986 in var_985 {
#[allow(unused_mut)]
let mut entry_988 = list_987.entry();
crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
entry_988, item_986,
)?;
}
list_987.finish();
}
#[allow(unused_mut)]
let mut scope_989 = writer.prefix("Ipv6PrefixCount");
if let Some(var_990) = &input.ipv6_prefix_count {
scope_989.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_990).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_elastic_gpu_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ElasticGpuSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_991 = writer.prefix("Type");
if let Some(var_992) = &input.r#type {
scope_991.string(var_992);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_elastic_inference_accelerator(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ElasticInferenceAccelerator,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_993 = writer.prefix("Type");
if let Some(var_994) = &input.r#type {
scope_993.string(var_994);
}
#[allow(unused_mut)]
let mut scope_995 = writer.prefix("Count");
if let Some(var_996) = &input.count {
scope_995.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_996).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_997 = writer.prefix("LaunchTemplateId");
if let Some(var_998) = &input.launch_template_id {
scope_997.string(var_998);
}
#[allow(unused_mut)]
let mut scope_999 = writer.prefix("LaunchTemplateName");
if let Some(var_1000) = &input.launch_template_name {
scope_999.string(var_1000);
}
#[allow(unused_mut)]
let mut scope_1001 = writer.prefix("Version");
if let Some(var_1002) = &input.version {
scope_1001.string(var_1002);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_market_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1003 = writer.prefix("MarketType");
if let Some(var_1004) = &input.market_type {
scope_1003.string(var_1004.as_str());
}
#[allow(unused_mut)]
let mut scope_1005 = writer.prefix("SpotOptions");
if let Some(var_1006) = &input.spot_options {
crate::query_ser::serialize_structure_crate_model_spot_market_options(
scope_1005, var_1006,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_credit_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreditSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1007 = writer.prefix("CpuCredits");
if let Some(var_1008) = &input.cpu_credits {
scope_1007.string(var_1008);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_cpu_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CpuOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1009 = writer.prefix("CoreCount");
if let Some(var_1010) = &input.core_count {
scope_1009.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1010).into()),
);
}
#[allow(unused_mut)]
let mut scope_1011 = writer.prefix("ThreadsPerCore");
if let Some(var_1012) = &input.threads_per_core {
scope_1011.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1012).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_hibernation_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::HibernationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1013 = writer.prefix("Configured");
if let Some(var_1014) = &input.configured {
scope_1013.boolean(*var_1014);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_license_configuration_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LicenseConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1015 = writer.prefix("LicenseConfigurationArn");
if let Some(var_1016) = &input.license_configuration_arn {
scope_1015.string(var_1016);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_metadata_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMetadataOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1017 = writer.prefix("HttpTokens");
if let Some(var_1018) = &input.http_tokens {
scope_1017.string(var_1018.as_str());
}
#[allow(unused_mut)]
let mut scope_1019 = writer.prefix("HttpPutResponseHopLimit");
if let Some(var_1020) = &input.http_put_response_hop_limit {
scope_1019.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1020).into()),
);
}
#[allow(unused_mut)]
let mut scope_1021 = writer.prefix("HttpEndpoint");
if let Some(var_1022) = &input.http_endpoint {
scope_1021.string(var_1022.as_str());
}
#[allow(unused_mut)]
let mut scope_1023 = writer.prefix("HttpProtocolIpv6");
if let Some(var_1024) = &input.http_protocol_ipv6 {
scope_1023.string(var_1024.as_str());
}
#[allow(unused_mut)]
let mut scope_1025 = writer.prefix("InstanceMetadataTags");
if let Some(var_1026) = &input.instance_metadata_tags {
scope_1025.string(var_1026.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_enclave_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::EnclaveOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1027 = writer.prefix("Enabled");
if let Some(var_1028) = &input.enabled {
scope_1027.boolean(*var_1028);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_private_dns_name_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PrivateDnsNameOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1029 = writer.prefix("HostnameType");
if let Some(var_1030) = &input.hostname_type {
scope_1029.string(var_1030.as_str());
}
#[allow(unused_mut)]
let mut scope_1031 = writer.prefix("EnableResourceNameDnsARecord");
if let Some(var_1032) = &input.enable_resource_name_dns_a_record {
scope_1031.boolean(*var_1032);
}
#[allow(unused_mut)]
let mut scope_1033 = writer.prefix("EnableResourceNameDnsAAAARecord");
if let Some(var_1034) = &input.enable_resource_name_dns_aaaa_record {
scope_1033.boolean(*var_1034);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_maintenance_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceMaintenanceOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1035 = writer.prefix("AutoRecovery");
if let Some(var_1036) = &input.auto_recovery {
scope_1035.string(var_1036.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1037 = writer.prefix("BlockDeviceMapping");
if let Some(var_1038) = &input.block_device_mappings {
let mut list_1040 = scope_1037.start_list(true, Some("BlockDeviceMapping"));
for item_1039 in var_1038 {
#[allow(unused_mut)]
let mut entry_1041 = list_1040.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_block_device_mapping(entry_1041, item_1039)?;
}
list_1040.finish();
}
#[allow(unused_mut)]
let mut scope_1042 = writer.prefix("EbsOptimized");
if let Some(var_1043) = &input.ebs_optimized {
scope_1042.boolean(*var_1043);
}
#[allow(unused_mut)]
let mut scope_1044 = writer.prefix("IamInstanceProfile");
if let Some(var_1045) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_iam_instance_profile(
scope_1044, var_1045,
)?;
}
#[allow(unused_mut)]
let mut scope_1046 = writer.prefix("ImageId");
if let Some(var_1047) = &input.image_id {
scope_1046.string(var_1047);
}
#[allow(unused_mut)]
let mut scope_1048 = writer.prefix("InstanceType");
if let Some(var_1049) = &input.instance_type {
scope_1048.string(var_1049);
}
#[allow(unused_mut)]
let mut scope_1050 = writer.prefix("KernelId");
if let Some(var_1051) = &input.kernel_id {
scope_1050.string(var_1051);
}
#[allow(unused_mut)]
let mut scope_1052 = writer.prefix("KeyName");
if let Some(var_1053) = &input.key_name {
scope_1052.string(var_1053);
}
#[allow(unused_mut)]
let mut scope_1054 = writer.prefix("Monitoring");
if let Some(var_1055) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_monitoring(
scope_1054, var_1055,
)?;
}
#[allow(unused_mut)]
let mut scope_1056 = writer.prefix("NetworkInterface");
if let Some(var_1057) = &input.network_interfaces {
let mut list_1059 = scope_1056.start_list(true, Some("NetworkInterface"));
for item_1058 in var_1057 {
#[allow(unused_mut)]
let mut entry_1060 = list_1059.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_network_interface(entry_1060, item_1058)?;
}
list_1059.finish();
}
#[allow(unused_mut)]
let mut scope_1061 = writer.prefix("Placement");
if let Some(var_1062) = &input.placement {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_placement(
scope_1061, var_1062,
)?;
}
#[allow(unused_mut)]
let mut scope_1063 = writer.prefix("RamdiskId");
if let Some(var_1064) = &input.ramdisk_id {
scope_1063.string(var_1064);
}
#[allow(unused_mut)]
let mut scope_1065 = writer.prefix("SecurityGroupId");
if let Some(var_1066) = &input.security_group_ids {
let mut list_1068 = scope_1065.start_list(true, Some("SecurityGroupId"));
for item_1067 in var_1066 {
#[allow(unused_mut)]
let mut entry_1069 = list_1068.entry();
entry_1069.string(item_1067);
}
list_1068.finish();
}
#[allow(unused_mut)]
let mut scope_1070 = writer.prefix("SubnetId");
if let Some(var_1071) = &input.subnet_id {
scope_1070.string(var_1071);
}
#[allow(unused_mut)]
let mut scope_1072 = writer.prefix("UserData");
if let Some(var_1073) = &input.user_data {
scope_1072.string(var_1073);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_description(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SecurityGroupRuleDescription,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1074 = writer.prefix("SecurityGroupRuleId");
if let Some(var_1075) = &input.security_group_rule_id {
scope_1074.string(var_1075);
}
#[allow(unused_mut)]
let mut scope_1076 = writer.prefix("Description");
if let Some(var_1077) = &input.description {
scope_1076.string(var_1077);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ip_range(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IpRange,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1078 = writer.prefix("CidrIp");
if let Some(var_1079) = &input.cidr_ip {
scope_1078.string(var_1079);
}
#[allow(unused_mut)]
let mut scope_1080 = writer.prefix("Description");
if let Some(var_1081) = &input.description {
scope_1080.string(var_1081);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipv6_range(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Ipv6Range,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1082 = writer.prefix("CidrIpv6");
if let Some(var_1083) = &input.cidr_ipv6 {
scope_1082.string(var_1083);
}
#[allow(unused_mut)]
let mut scope_1084 = writer.prefix("Description");
if let Some(var_1085) = &input.description {
scope_1084.string(var_1085);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_prefix_list_id(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PrefixListId,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1086 = writer.prefix("Description");
if let Some(var_1087) = &input.description {
scope_1086.string(var_1087);
}
#[allow(unused_mut)]
let mut scope_1088 = writer.prefix("PrefixListId");
if let Some(var_1089) = &input.prefix_list_id {
scope_1088.string(var_1089);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_user_id_group_pair(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::UserIdGroupPair,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1090 = writer.prefix("Description");
if let Some(var_1091) = &input.description {
scope_1090.string(var_1091);
}
#[allow(unused_mut)]
let mut scope_1092 = writer.prefix("GroupId");
if let Some(var_1093) = &input.group_id {
scope_1092.string(var_1093);
}
#[allow(unused_mut)]
let mut scope_1094 = writer.prefix("GroupName");
if let Some(var_1095) = &input.group_name {
scope_1094.string(var_1095);
}
#[allow(unused_mut)]
let mut scope_1096 = writer.prefix("PeeringStatus");
if let Some(var_1097) = &input.peering_status {
scope_1096.string(var_1097);
}
#[allow(unused_mut)]
let mut scope_1098 = writer.prefix("UserId");
if let Some(var_1099) = &input.user_id {
scope_1098.string(var_1099);
}
#[allow(unused_mut)]
let mut scope_1100 = writer.prefix("VpcId");
if let Some(var_1101) = &input.vpc_id {
scope_1100.string(var_1101);
}
#[allow(unused_mut)]
let mut scope_1102 = writer.prefix("VpcPeeringConnectionId");
if let Some(var_1103) = &input.vpc_peering_connection_id {
scope_1102.string(var_1103);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_s3_storage(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::S3Storage,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1104 = writer.prefix("AWSAccessKeyId");
if let Some(var_1105) = &input.aws_access_key_id {
scope_1104.string(var_1105);
}
#[allow(unused_mut)]
let mut scope_1106 = writer.prefix("Bucket");
if let Some(var_1107) = &input.bucket {
scope_1106.string(var_1107);
}
#[allow(unused_mut)]
let mut scope_1108 = writer.prefix("Prefix");
if let Some(var_1109) = &input.prefix {
scope_1108.string(var_1109);
}
#[allow(unused_mut)]
let mut scope_1110 = writer.prefix("UploadPolicy");
if let Some(var_1111) = &input.upload_policy {
scope_1110.string(&aws_smithy_types::base64::encode(var_1111));
}
#[allow(unused_mut)]
let mut scope_1112 = writer.prefix("UploadPolicySignature");
if let Some(var_1113) = &input.upload_policy_signature {
scope_1112.string(var_1113);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_directory_service_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DirectoryServiceAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1114 = writer.prefix("DirectoryId");
if let Some(var_1115) = &input.directory_id {
scope_1114.string(var_1115);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_certificate_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CertificateAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1116 = writer.prefix("ClientRootCertificateChainArn");
if let Some(var_1117) = &input.client_root_certificate_chain_arn {
scope_1116.string(var_1117);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_federated_authentication_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FederatedAuthenticationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1118 = writer.prefix("SAMLProviderArn");
if let Some(var_1119) = &input.saml_provider_arn {
scope_1118.string(var_1119);
}
#[allow(unused_mut)]
let mut scope_1120 = writer.prefix("SelfServiceSAMLProviderArn");
if let Some(var_1121) = &input.self_service_saml_provider_arn {
scope_1120.string(var_1121);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_spot_maintenance_strategies_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetSpotMaintenanceStrategiesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1122 = writer.prefix("CapacityRebalance");
if let Some(var_1123) = &input.capacity_rebalance {
crate::query_ser::serialize_structure_crate_model_fleet_spot_capacity_rebalance_request(
scope_1122, var_1123,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_capacity_reservation_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CapacityReservationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1124 = writer.prefix("UsageStrategy");
if let Some(var_1125) = &input.usage_strategy {
scope_1124.string(var_1125.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetLaunchTemplateSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1126 = writer.prefix("LaunchTemplateId");
if let Some(var_1127) = &input.launch_template_id {
scope_1126.string(var_1127);
}
#[allow(unused_mut)]
let mut scope_1128 = writer.prefix("LaunchTemplateName");
if let Some(var_1129) = &input.launch_template_name {
scope_1128.string(var_1129);
}
#[allow(unused_mut)]
let mut scope_1130 = writer.prefix("Version");
if let Some(var_1131) = &input.version {
scope_1130.string(var_1131);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_overrides_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetLaunchTemplateOverridesRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1132 = writer.prefix("InstanceType");
if let Some(var_1133) = &input.instance_type {
scope_1132.string(var_1133.as_str());
}
#[allow(unused_mut)]
let mut scope_1134 = writer.prefix("MaxPrice");
if let Some(var_1135) = &input.max_price {
scope_1134.string(var_1135);
}
#[allow(unused_mut)]
let mut scope_1136 = writer.prefix("SubnetId");
if let Some(var_1137) = &input.subnet_id {
scope_1136.string(var_1137);
}
#[allow(unused_mut)]
let mut scope_1138 = writer.prefix("AvailabilityZone");
if let Some(var_1139) = &input.availability_zone {
scope_1138.string(var_1139);
}
#[allow(unused_mut)]
let mut scope_1140 = writer.prefix("WeightedCapacity");
if let Some(var_1141) = &input.weighted_capacity {
scope_1140.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1141).into()),
);
}
#[allow(unused_mut)]
let mut scope_1142 = writer.prefix("Priority");
if let Some(var_1143) = &input.priority {
scope_1142.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1143).into()),
);
}
#[allow(unused_mut)]
let mut scope_1144 = writer.prefix("Placement");
if let Some(var_1145) = &input.placement {
crate::query_ser::serialize_structure_crate_model_placement(scope_1144, var_1145)?;
}
#[allow(unused_mut)]
let mut scope_1146 = writer.prefix("InstanceRequirements");
if let Some(var_1147) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements_request(
scope_1146, var_1147,
)?;
}
#[allow(unused_mut)]
let mut scope_1148 = writer.prefix("ImageId");
if let Some(var_1149) = &input.image_id {
scope_1148.string(var_1149);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ebs_block_device(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::EbsBlockDevice,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1150 = writer.prefix("DeleteOnTermination");
if let Some(var_1151) = &input.delete_on_termination {
scope_1150.boolean(*var_1151);
}
#[allow(unused_mut)]
let mut scope_1152 = writer.prefix("Iops");
if let Some(var_1153) = &input.iops {
scope_1152.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1153).into()),
);
}
#[allow(unused_mut)]
let mut scope_1154 = writer.prefix("SnapshotId");
if let Some(var_1155) = &input.snapshot_id {
scope_1154.string(var_1155);
}
#[allow(unused_mut)]
let mut scope_1156 = writer.prefix("VolumeSize");
if let Some(var_1157) = &input.volume_size {
scope_1156.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1157).into()),
);
}
#[allow(unused_mut)]
let mut scope_1158 = writer.prefix("VolumeType");
if let Some(var_1159) = &input.volume_type {
scope_1158.string(var_1159.as_str());
}
#[allow(unused_mut)]
let mut scope_1160 = writer.prefix("KmsKeyId");
if let Some(var_1161) = &input.kms_key_id {
scope_1160.string(var_1161);
}
#[allow(unused_mut)]
let mut scope_1162 = writer.prefix("Throughput");
if let Some(var_1163) = &input.throughput {
scope_1162.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1163).into()),
);
}
#[allow(unused_mut)]
let mut scope_1164 = writer.prefix("OutpostArn");
if let Some(var_1165) = &input.outpost_arn {
scope_1164.string(var_1165);
}
#[allow(unused_mut)]
let mut scope_1166 = writer.prefix("Encrypted");
if let Some(var_1167) = &input.encrypted {
scope_1166.boolean(*var_1167);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_iam_instance_profile_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateIamInstanceProfileSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1168 = writer.prefix("Arn");
if let Some(var_1169) = &input.arn {
scope_1168.string(var_1169);
}
#[allow(unused_mut)]
let mut scope_1170 = writer.prefix("Name");
if let Some(var_1171) = &input.name {
scope_1170.string(var_1171);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_block_device_mapping_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateBlockDeviceMappingRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1172 = writer.prefix("DeviceName");
if let Some(var_1173) = &input.device_name {
scope_1172.string(var_1173);
}
#[allow(unused_mut)]
let mut scope_1174 = writer.prefix("VirtualName");
if let Some(var_1175) = &input.virtual_name {
scope_1174.string(var_1175);
}
#[allow(unused_mut)]
let mut scope_1176 = writer.prefix("Ebs");
if let Some(var_1177) = &input.ebs {
crate::query_ser::serialize_structure_crate_model_launch_template_ebs_block_device_request(
scope_1176, var_1177,
)?;
}
#[allow(unused_mut)]
let mut scope_1178 = writer.prefix("NoDevice");
if let Some(var_1179) = &input.no_device {
scope_1178.string(var_1179);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_network_interface_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceNetworkInterfaceSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1180 = writer.prefix("AssociateCarrierIpAddress");
if let Some(var_1181) = &input.associate_carrier_ip_address {
scope_1180.boolean(*var_1181);
}
#[allow(unused_mut)]
let mut scope_1182 = writer.prefix("AssociatePublicIpAddress");
if let Some(var_1183) = &input.associate_public_ip_address {
scope_1182.boolean(*var_1183);
}
#[allow(unused_mut)]
let mut scope_1184 = writer.prefix("DeleteOnTermination");
if let Some(var_1185) = &input.delete_on_termination {
scope_1184.boolean(*var_1185);
}
#[allow(unused_mut)]
let mut scope_1186 = writer.prefix("Description");
if let Some(var_1187) = &input.description {
scope_1186.string(var_1187);
}
#[allow(unused_mut)]
let mut scope_1188 = writer.prefix("DeviceIndex");
if let Some(var_1189) = &input.device_index {
scope_1188.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1189).into()),
);
}
#[allow(unused_mut)]
let mut scope_1190 = writer.prefix("SecurityGroupId");
if let Some(var_1191) = &input.groups {
let mut list_1193 = scope_1190.start_list(true, Some("SecurityGroupId"));
for item_1192 in var_1191 {
#[allow(unused_mut)]
let mut entry_1194 = list_1193.entry();
entry_1194.string(item_1192);
}
list_1193.finish();
}
#[allow(unused_mut)]
let mut scope_1195 = writer.prefix("InterfaceType");
if let Some(var_1196) = &input.interface_type {
scope_1195.string(var_1196);
}
#[allow(unused_mut)]
let mut scope_1197 = writer.prefix("Ipv6AddressCount");
if let Some(var_1198) = &input.ipv6_address_count {
scope_1197.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1198).into()),
);
}
#[allow(unused_mut)]
let mut scope_1199 = writer.prefix("Ipv6Addresses");
if let Some(var_1200) = &input.ipv6_addresses {
let mut list_1202 = scope_1199.start_list(true, Some("InstanceIpv6Address"));
for item_1201 in var_1200 {
#[allow(unused_mut)]
let mut entry_1203 = list_1202.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address_request(
entry_1203, item_1201,
)?;
}
list_1202.finish();
}
#[allow(unused_mut)]
let mut scope_1204 = writer.prefix("NetworkInterfaceId");
if let Some(var_1205) = &input.network_interface_id {
scope_1204.string(var_1205);
}
#[allow(unused_mut)]
let mut scope_1206 = writer.prefix("PrivateIpAddress");
if let Some(var_1207) = &input.private_ip_address {
scope_1206.string(var_1207);
}
#[allow(unused_mut)]
let mut scope_1208 = writer.prefix("PrivateIpAddresses");
if let Some(var_1209) = &input.private_ip_addresses {
let mut list_1211 = scope_1208.start_list(true, Some("item"));
for item_1210 in var_1209 {
#[allow(unused_mut)]
let mut entry_1212 = list_1211.entry();
crate::query_ser::serialize_structure_crate_model_private_ip_address_specification(
entry_1212, item_1210,
)?;
}
list_1211.finish();
}
#[allow(unused_mut)]
let mut scope_1213 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_1214) = &input.secondary_private_ip_address_count {
scope_1213.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1214).into()),
);
}
#[allow(unused_mut)]
let mut scope_1215 = writer.prefix("SubnetId");
if let Some(var_1216) = &input.subnet_id {
scope_1215.string(var_1216);
}
#[allow(unused_mut)]
let mut scope_1217 = writer.prefix("NetworkCardIndex");
if let Some(var_1218) = &input.network_card_index {
scope_1217.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1218).into()),
);
}
#[allow(unused_mut)]
let mut scope_1219 = writer.prefix("Ipv4Prefix");
if let Some(var_1220) = &input.ipv4_prefixes {
let mut list_1222 = scope_1219.start_list(true, Some("item"));
for item_1221 in var_1220 {
#[allow(unused_mut)]
let mut entry_1223 = list_1222.entry();
crate::query_ser::serialize_structure_crate_model_ipv4_prefix_specification_request(
entry_1223, item_1221,
)?;
}
list_1222.finish();
}
#[allow(unused_mut)]
let mut scope_1224 = writer.prefix("Ipv4PrefixCount");
if let Some(var_1225) = &input.ipv4_prefix_count {
scope_1224.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1225).into()),
);
}
#[allow(unused_mut)]
let mut scope_1226 = writer.prefix("Ipv6Prefix");
if let Some(var_1227) = &input.ipv6_prefixes {
let mut list_1229 = scope_1226.start_list(true, Some("item"));
for item_1228 in var_1227 {
#[allow(unused_mut)]
let mut entry_1230 = list_1229.entry();
crate::query_ser::serialize_structure_crate_model_ipv6_prefix_specification_request(
entry_1230, item_1228,
)?;
}
list_1229.finish();
}
#[allow(unused_mut)]
let mut scope_1231 = writer.prefix("Ipv6PrefixCount");
if let Some(var_1232) = &input.ipv6_prefix_count {
scope_1231.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1232).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_templates_monitoring_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplatesMonitoringRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1233 = writer.prefix("Enabled");
if let Some(var_1234) = &input.enabled {
scope_1233.boolean(*var_1234);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_placement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplatePlacementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1235 = writer.prefix("AvailabilityZone");
if let Some(var_1236) = &input.availability_zone {
scope_1235.string(var_1236);
}
#[allow(unused_mut)]
let mut scope_1237 = writer.prefix("Affinity");
if let Some(var_1238) = &input.affinity {
scope_1237.string(var_1238);
}
#[allow(unused_mut)]
let mut scope_1239 = writer.prefix("GroupName");
if let Some(var_1240) = &input.group_name {
scope_1239.string(var_1240);
}
#[allow(unused_mut)]
let mut scope_1241 = writer.prefix("HostId");
if let Some(var_1242) = &input.host_id {
scope_1241.string(var_1242);
}
#[allow(unused_mut)]
let mut scope_1243 = writer.prefix("Tenancy");
if let Some(var_1244) = &input.tenancy {
scope_1243.string(var_1244.as_str());
}
#[allow(unused_mut)]
let mut scope_1245 = writer.prefix("SpreadDomain");
if let Some(var_1246) = &input.spread_domain {
scope_1245.string(var_1246);
}
#[allow(unused_mut)]
let mut scope_1247 = writer.prefix("HostResourceGroupArn");
if let Some(var_1248) = &input.host_resource_group_arn {
scope_1247.string(var_1248);
}
#[allow(unused_mut)]
let mut scope_1249 = writer.prefix("PartitionNumber");
if let Some(var_1250) = &input.partition_number {
scope_1249.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1250).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_tag_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateTagSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1251 = writer.prefix("ResourceType");
if let Some(var_1252) = &input.resource_type {
scope_1251.string(var_1252.as_str());
}
#[allow(unused_mut)]
let mut scope_1253 = writer.prefix("Tag");
if let Some(var_1254) = &input.tags {
let mut list_1256 = scope_1253.start_list(true, Some("item"));
for item_1255 in var_1254 {
#[allow(unused_mut)]
let mut entry_1257 = list_1256.entry();
crate::query_ser::serialize_structure_crate_model_tag(entry_1257, item_1255)?;
}
list_1256.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_elastic_inference_accelerator(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateElasticInferenceAccelerator,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1258 = writer.prefix("Type");
if let Some(var_1259) = &input.r#type {
scope_1258.string(var_1259);
}
#[allow(unused_mut)]
let mut scope_1260 = writer.prefix("Count");
if let Some(var_1261) = &input.count {
scope_1260.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1261).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_market_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1262 = writer.prefix("MarketType");
if let Some(var_1263) = &input.market_type {
scope_1262.string(var_1263.as_str());
}
#[allow(unused_mut)]
let mut scope_1264 = writer.prefix("SpotOptions");
if let Some(var_1265) = &input.spot_options {
crate::query_ser::serialize_structure_crate_model_launch_template_spot_market_options_request(scope_1264, var_1265)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_cpu_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateCpuOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1266 = writer.prefix("CoreCount");
if let Some(var_1267) = &input.core_count {
scope_1266.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1267).into()),
);
}
#[allow(unused_mut)]
let mut scope_1268 = writer.prefix("ThreadsPerCore");
if let Some(var_1269) = &input.threads_per_core {
scope_1268.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1269).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_capacity_reservation_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateCapacityReservationSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1270 = writer.prefix("CapacityReservationPreference");
if let Some(var_1271) = &input.capacity_reservation_preference {
scope_1270.string(var_1271.as_str());
}
#[allow(unused_mut)]
let mut scope_1272 = writer.prefix("CapacityReservationTarget");
if let Some(var_1273) = &input.capacity_reservation_target {
crate::query_ser::serialize_structure_crate_model_capacity_reservation_target(
scope_1272, var_1273,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_license_configuration_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateLicenseConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1274 = writer.prefix("LicenseConfigurationArn");
if let Some(var_1275) = &input.license_configuration_arn {
scope_1274.string(var_1275);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_hibernation_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateHibernationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1276 = writer.prefix("Configured");
if let Some(var_1277) = &input.configured {
scope_1276.boolean(*var_1277);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_metadata_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceMetadataOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1278 = writer.prefix("HttpTokens");
if let Some(var_1279) = &input.http_tokens {
scope_1278.string(var_1279.as_str());
}
#[allow(unused_mut)]
let mut scope_1280 = writer.prefix("HttpPutResponseHopLimit");
if let Some(var_1281) = &input.http_put_response_hop_limit {
scope_1280.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1281).into()),
);
}
#[allow(unused_mut)]
let mut scope_1282 = writer.prefix("HttpEndpoint");
if let Some(var_1283) = &input.http_endpoint {
scope_1282.string(var_1283.as_str());
}
#[allow(unused_mut)]
let mut scope_1284 = writer.prefix("HttpProtocolIpv6");
if let Some(var_1285) = &input.http_protocol_ipv6 {
scope_1284.string(var_1285.as_str());
}
#[allow(unused_mut)]
let mut scope_1286 = writer.prefix("InstanceMetadataTags");
if let Some(var_1287) = &input.instance_metadata_tags {
scope_1286.string(var_1287.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_enclave_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateEnclaveOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1288 = writer.prefix("Enabled");
if let Some(var_1289) = &input.enabled {
scope_1288.boolean(*var_1289);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_private_dns_name_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplatePrivateDnsNameOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1290 = writer.prefix("HostnameType");
if let Some(var_1291) = &input.hostname_type {
scope_1290.string(var_1291.as_str());
}
#[allow(unused_mut)]
let mut scope_1292 = writer.prefix("EnableResourceNameDnsARecord");
if let Some(var_1293) = &input.enable_resource_name_dns_a_record {
scope_1292.boolean(*var_1293);
}
#[allow(unused_mut)]
let mut scope_1294 = writer.prefix("EnableResourceNameDnsAAAARecord");
if let Some(var_1295) = &input.enable_resource_name_dns_aaaa_record {
scope_1294.boolean(*var_1295);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_instance_maintenance_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateInstanceMaintenanceOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1296 = writer.prefix("AutoRecovery");
if let Some(var_1297) = &input.auto_recovery {
scope_1296.string(var_1297.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_path_statement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PathStatementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1298 = writer.prefix("PacketHeaderStatement");
if let Some(var_1299) = &input.packet_header_statement {
crate::query_ser::serialize_structure_crate_model_packet_header_statement_request(
scope_1298, var_1299,
)?;
}
#[allow(unused_mut)]
let mut scope_1300 = writer.prefix("ResourceStatement");
if let Some(var_1301) = &input.resource_statement {
crate::query_ser::serialize_structure_crate_model_resource_statement_request(
scope_1300, var_1301,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_through_resources_statement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ThroughResourcesStatementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1302 = writer.prefix("ResourceStatement");
if let Some(var_1303) = &input.resource_statement {
crate::query_ser::serialize_structure_crate_model_resource_statement_request(
scope_1302, var_1303,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_vpn_tunnel_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::VpnTunnelOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1304 = writer.prefix("TunnelInsideCidr");
if let Some(var_1305) = &input.tunnel_inside_cidr {
scope_1304.string(var_1305);
}
#[allow(unused_mut)]
let mut scope_1306 = writer.prefix("TunnelInsideIpv6Cidr");
if let Some(var_1307) = &input.tunnel_inside_ipv6_cidr {
scope_1306.string(var_1307);
}
#[allow(unused_mut)]
let mut scope_1308 = writer.prefix("PreSharedKey");
if let Some(var_1309) = &input.pre_shared_key {
scope_1308.string(var_1309);
}
#[allow(unused_mut)]
let mut scope_1310 = writer.prefix("Phase1LifetimeSeconds");
if let Some(var_1311) = &input.phase1_lifetime_seconds {
scope_1310.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1311).into()),
);
}
#[allow(unused_mut)]
let mut scope_1312 = writer.prefix("Phase2LifetimeSeconds");
if let Some(var_1313) = &input.phase2_lifetime_seconds {
scope_1312.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1313).into()),
);
}
#[allow(unused_mut)]
let mut scope_1314 = writer.prefix("RekeyMarginTimeSeconds");
if let Some(var_1315) = &input.rekey_margin_time_seconds {
scope_1314.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1315).into()),
);
}
#[allow(unused_mut)]
let mut scope_1316 = writer.prefix("RekeyFuzzPercentage");
if let Some(var_1317) = &input.rekey_fuzz_percentage {
scope_1316.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1317).into()),
);
}
#[allow(unused_mut)]
let mut scope_1318 = writer.prefix("ReplayWindowSize");
if let Some(var_1319) = &input.replay_window_size {
scope_1318.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1319).into()),
);
}
#[allow(unused_mut)]
let mut scope_1320 = writer.prefix("DPDTimeoutSeconds");
if let Some(var_1321) = &input.dpd_timeout_seconds {
scope_1320.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1321).into()),
);
}
#[allow(unused_mut)]
let mut scope_1322 = writer.prefix("DPDTimeoutAction");
if let Some(var_1323) = &input.dpd_timeout_action {
scope_1322.string(var_1323);
}
#[allow(unused_mut)]
let mut scope_1324 = writer.prefix("Phase1EncryptionAlgorithm");
if let Some(var_1325) = &input.phase1_encryption_algorithms {
let mut list_1327 = scope_1324.start_list(true, Some("item"));
for item_1326 in var_1325 {
#[allow(unused_mut)]
let mut entry_1328 = list_1327.entry();
crate::query_ser::serialize_structure_crate_model_phase1_encryption_algorithms_request_list_value(entry_1328, item_1326)?;
}
list_1327.finish();
}
#[allow(unused_mut)]
let mut scope_1329 = writer.prefix("Phase2EncryptionAlgorithm");
if let Some(var_1330) = &input.phase2_encryption_algorithms {
let mut list_1332 = scope_1329.start_list(true, Some("item"));
for item_1331 in var_1330 {
#[allow(unused_mut)]
let mut entry_1333 = list_1332.entry();
crate::query_ser::serialize_structure_crate_model_phase2_encryption_algorithms_request_list_value(entry_1333, item_1331)?;
}
list_1332.finish();
}
#[allow(unused_mut)]
let mut scope_1334 = writer.prefix("Phase1IntegrityAlgorithm");
if let Some(var_1335) = &input.phase1_integrity_algorithms {
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_phase1_integrity_algorithms_request_list_value(entry_1338, item_1336)?;
}
list_1337.finish();
}
#[allow(unused_mut)]
let mut scope_1339 = writer.prefix("Phase2IntegrityAlgorithm");
if let Some(var_1340) = &input.phase2_integrity_algorithms {
let mut list_1342 = scope_1339.start_list(true, Some("item"));
for item_1341 in var_1340 {
#[allow(unused_mut)]
let mut entry_1343 = list_1342.entry();
crate::query_ser::serialize_structure_crate_model_phase2_integrity_algorithms_request_list_value(entry_1343, item_1341)?;
}
list_1342.finish();
}
#[allow(unused_mut)]
let mut scope_1344 = writer.prefix("Phase1DHGroupNumber");
if let Some(var_1345) = &input.phase1_dh_group_numbers {
let mut list_1347 = scope_1344.start_list(true, Some("item"));
for item_1346 in var_1345 {
#[allow(unused_mut)]
let mut entry_1348 = list_1347.entry();
crate::query_ser::serialize_structure_crate_model_phase1_dh_group_numbers_request_list_value(entry_1348, item_1346)?;
}
list_1347.finish();
}
#[allow(unused_mut)]
let mut scope_1349 = writer.prefix("Phase2DHGroupNumber");
if let Some(var_1350) = &input.phase2_dh_group_numbers {
let mut list_1352 = scope_1349.start_list(true, Some("item"));
for item_1351 in var_1350 {
#[allow(unused_mut)]
let mut entry_1353 = list_1352.entry();
crate::query_ser::serialize_structure_crate_model_phase2_dh_group_numbers_request_list_value(entry_1353, item_1351)?;
}
list_1352.finish();
}
#[allow(unused_mut)]
let mut scope_1354 = writer.prefix("IKEVersion");
if let Some(var_1355) = &input.ike_versions {
let mut list_1357 = scope_1354.start_list(true, Some("item"));
for item_1356 in var_1355 {
#[allow(unused_mut)]
let mut entry_1358 = list_1357.entry();
crate::query_ser::serialize_structure_crate_model_ike_versions_request_list_value(
entry_1358, item_1356,
)?;
}
list_1357.finish();
}
#[allow(unused_mut)]
let mut scope_1359 = writer.prefix("StartupAction");
if let Some(var_1360) = &input.startup_action {
scope_1359.string(var_1360);
}
#[allow(unused_mut)]
let mut scope_1361 = writer.prefix("LogOptions");
if let Some(var_1362) = &input.log_options {
crate::query_ser::serialize_structure_crate_model_vpn_tunnel_log_options_specification(
scope_1361, var_1362,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_athena_integration(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AthenaIntegration,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1363 = writer.prefix("IntegrationResultS3DestinationArn");
if let Some(var_1364) = &input.integration_result_s3_destination_arn {
scope_1363.string(var_1364);
}
#[allow(unused_mut)]
let mut scope_1365 = writer.prefix("PartitionLoadFrequency");
if let Some(var_1366) = &input.partition_load_frequency {
scope_1365.string(var_1366.as_str());
}
#[allow(unused_mut)]
let mut scope_1367 = writer.prefix("PartitionStartDate");
if let Some(var_1368) = &input.partition_start_date {
scope_1367.date_time(var_1368, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_1369 = writer.prefix("PartitionEndDate");
if let Some(var_1370) = &input.partition_end_date {
scope_1369.date_time(var_1370, aws_smithy_types::date_time::Format::DateTime)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_v_cpu_count_range_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::VCpuCountRangeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1371 = writer.prefix("Min");
if let Some(var_1372) = &input.min {
scope_1371.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1372).into()),
);
}
#[allow(unused_mut)]
let mut scope_1373 = writer.prefix("Max");
if let Some(var_1374) = &input.max {
scope_1373.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1374).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_memory_mi_b_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::MemoryMiBRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1375 = writer.prefix("Min");
if let Some(var_1376) = &input.min {
scope_1375.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1376).into()),
);
}
#[allow(unused_mut)]
let mut scope_1377 = writer.prefix("Max");
if let Some(var_1378) = &input.max {
scope_1377.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1378).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_memory_gi_b_per_v_cpu_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::MemoryGiBPerVCpuRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1379 = writer.prefix("Min");
if let Some(var_1380) = &input.min {
scope_1379.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1380).into()),
);
}
#[allow(unused_mut)]
let mut scope_1381 = writer.prefix("Max");
if let Some(var_1382) = &input.max {
scope_1381.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1382).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_network_interface_count_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::NetworkInterfaceCountRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1383 = writer.prefix("Min");
if let Some(var_1384) = &input.min {
scope_1383.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1384).into()),
);
}
#[allow(unused_mut)]
let mut scope_1385 = writer.prefix("Max");
if let Some(var_1386) = &input.max {
scope_1385.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1386).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_total_local_storage_gb_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::TotalLocalStorageGbRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1387 = writer.prefix("Min");
if let Some(var_1388) = &input.min {
scope_1387.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1388).into()),
);
}
#[allow(unused_mut)]
let mut scope_1389 = writer.prefix("Max");
if let Some(var_1390) = &input.max {
scope_1389.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1390).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_baseline_ebs_bandwidth_mbps_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::BaselineEbsBandwidthMbpsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1391 = writer.prefix("Min");
if let Some(var_1392) = &input.min {
scope_1391.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1392).into()),
);
}
#[allow(unused_mut)]
let mut scope_1393 = writer.prefix("Max");
if let Some(var_1394) = &input.max {
scope_1393.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1394).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_accelerator_count_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AcceleratorCountRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1395 = writer.prefix("Min");
if let Some(var_1396) = &input.min {
scope_1395.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1396).into()),
);
}
#[allow(unused_mut)]
let mut scope_1397 = writer.prefix("Max");
if let Some(var_1398) = &input.max {
scope_1397.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1398).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_accelerator_total_memory_mi_b_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AcceleratorTotalMemoryMiBRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1399 = writer.prefix("Min");
if let Some(var_1400) = &input.min {
scope_1399.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1400).into()),
);
}
#[allow(unused_mut)]
let mut scope_1401 = writer.prefix("Max");
if let Some(var_1402) = &input.max {
scope_1401.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1402).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_user_bucket(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::UserBucket,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1403 = writer.prefix("S3Bucket");
if let Some(var_1404) = &input.s3_bucket {
scope_1403.string(var_1404);
}
#[allow(unused_mut)]
let mut scope_1405 = writer.prefix("S3Key");
if let Some(var_1406) = &input.s3_key {
scope_1405.string(var_1406);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_user_data(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::UserData,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1407 = writer.prefix("Data");
if let Some(var_1408) = &input.data {
scope_1407.string(var_1408);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_load_permission_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LoadPermissionRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1409 = writer.prefix("Group");
if let Some(var_1410) = &input.group {
scope_1409.string(var_1410.as_str());
}
#[allow(unused_mut)]
let mut scope_1411 = writer.prefix("UserId");
if let Some(var_1412) = &input.user_id {
scope_1411.string(var_1412);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_permission(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchPermission,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1413 = writer.prefix("Group");
if let Some(var_1414) = &input.group {
scope_1413.string(var_1414.as_str());
}
#[allow(unused_mut)]
let mut scope_1415 = writer.prefix("UserId");
if let Some(var_1416) = &input.user_id {
scope_1415.string(var_1416);
}
#[allow(unused_mut)]
let mut scope_1417 = writer.prefix("OrganizationArn");
if let Some(var_1418) = &input.organization_arn {
scope_1417.string(var_1418);
}
#[allow(unused_mut)]
let mut scope_1419 = writer.prefix("OrganizationalUnitArn");
if let Some(var_1420) = &input.organizational_unit_arn {
scope_1419.string(var_1420);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ebs_instance_block_device_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::EbsInstanceBlockDeviceSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1421 = writer.prefix("DeleteOnTermination");
if let Some(var_1422) = &input.delete_on_termination {
scope_1421.boolean(*var_1422);
}
#[allow(unused_mut)]
let mut scope_1423 = writer.prefix("VolumeId");
if let Some(var_1424) = &input.volume_id {
scope_1423.string(var_1424);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_capacity_reservation_target(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CapacityReservationTarget,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1425 = writer.prefix("CapacityReservationId");
if let Some(var_1426) = &input.capacity_reservation_id {
scope_1425.string(var_1426);
}
#[allow(unused_mut)]
let mut scope_1427 = writer.prefix("CapacityReservationResourceGroupArn");
if let Some(var_1428) = &input.capacity_reservation_resource_group_arn {
scope_1427.string(var_1428);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_security_group_rule_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SecurityGroupRuleRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1429 = writer.prefix("IpProtocol");
if let Some(var_1430) = &input.ip_protocol {
scope_1429.string(var_1430);
}
#[allow(unused_mut)]
let mut scope_1431 = writer.prefix("FromPort");
if let Some(var_1432) = &input.from_port {
scope_1431.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1432).into()),
);
}
#[allow(unused_mut)]
let mut scope_1433 = writer.prefix("ToPort");
if let Some(var_1434) = &input.to_port {
scope_1433.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1434).into()),
);
}
#[allow(unused_mut)]
let mut scope_1435 = writer.prefix("CidrIpv4");
if let Some(var_1436) = &input.cidr_ipv4 {
scope_1435.string(var_1436);
}
#[allow(unused_mut)]
let mut scope_1437 = writer.prefix("CidrIpv6");
if let Some(var_1438) = &input.cidr_ipv6 {
scope_1437.string(var_1438);
}
#[allow(unused_mut)]
let mut scope_1439 = writer.prefix("PrefixListId");
if let Some(var_1440) = &input.prefix_list_id {
scope_1439.string(var_1440);
}
#[allow(unused_mut)]
let mut scope_1441 = writer.prefix("ReferencedGroupId");
if let Some(var_1442) = &input.referenced_group_id {
scope_1441.string(var_1442);
}
#[allow(unused_mut)]
let mut scope_1443 = writer.prefix("Description");
if let Some(var_1444) = &input.description {
scope_1443.string(var_1444);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_volume_permission(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateVolumePermission,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1445 = writer.prefix("Group");
if let Some(var_1446) = &input.group {
scope_1445.string(var_1446.as_str());
}
#[allow(unused_mut)]
let mut scope_1447 = writer.prefix("UserId");
if let Some(var_1448) = &input.user_id {
scope_1447.string(var_1448);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_launch_template_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetLaunchTemplateSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1449 = writer.prefix("LaunchTemplateId");
if let Some(var_1450) = &input.launch_template_id {
scope_1449.string(var_1450);
}
#[allow(unused_mut)]
let mut scope_1451 = writer.prefix("LaunchTemplateName");
if let Some(var_1452) = &input.launch_template_name {
scope_1451.string(var_1452);
}
#[allow(unused_mut)]
let mut scope_1453 = writer.prefix("Version");
if let Some(var_1454) = &input.version {
scope_1453.string(var_1454);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_overrides(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateOverrides,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1455 = writer.prefix("InstanceType");
if let Some(var_1456) = &input.instance_type {
scope_1455.string(var_1456.as_str());
}
#[allow(unused_mut)]
let mut scope_1457 = writer.prefix("SpotPrice");
if let Some(var_1458) = &input.spot_price {
scope_1457.string(var_1458);
}
#[allow(unused_mut)]
let mut scope_1459 = writer.prefix("SubnetId");
if let Some(var_1460) = &input.subnet_id {
scope_1459.string(var_1460);
}
#[allow(unused_mut)]
let mut scope_1461 = writer.prefix("AvailabilityZone");
if let Some(var_1462) = &input.availability_zone {
scope_1461.string(var_1462);
}
#[allow(unused_mut)]
let mut scope_1463 = writer.prefix("WeightedCapacity");
if let Some(var_1464) = &input.weighted_capacity {
scope_1463.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1464).into()),
);
}
#[allow(unused_mut)]
let mut scope_1465 = writer.prefix("Priority");
if let Some(var_1466) = &input.priority {
scope_1465.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1466).into()),
);
}
#[allow(unused_mut)]
let mut scope_1467 = writer.prefix("InstanceRequirements");
if let Some(var_1468) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements(
scope_1467, var_1468,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase1_encryption_algorithms_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase1EncryptionAlgorithmsRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1469 = writer.prefix("Value");
if let Some(var_1470) = &input.value {
scope_1469.string(var_1470);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase2_encryption_algorithms_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase2EncryptionAlgorithmsRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1471 = writer.prefix("Value");
if let Some(var_1472) = &input.value {
scope_1471.string(var_1472);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase1_integrity_algorithms_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase1IntegrityAlgorithmsRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1473 = writer.prefix("Value");
if let Some(var_1474) = &input.value {
scope_1473.string(var_1474);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase2_integrity_algorithms_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase2IntegrityAlgorithmsRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1475 = writer.prefix("Value");
if let Some(var_1476) = &input.value {
scope_1475.string(var_1476);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase1_dh_group_numbers_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase1DhGroupNumbersRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1477 = writer.prefix("Value");
if let Some(var_1478) = &input.value {
scope_1477.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1478).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_phase2_dh_group_numbers_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Phase2DhGroupNumbersRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1479 = writer.prefix("Value");
if let Some(var_1480) = &input.value {
scope_1479.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1480).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ike_versions_request_list_value(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IkeVersionsRequestListValue,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1481 = writer.prefix("Value");
if let Some(var_1482) = &input.value {
scope_1481.string(var_1482);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_vpn_tunnel_log_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::VpnTunnelLogOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1483 = writer.prefix("CloudWatchLogOptions");
if let Some(var_1484) = &input.cloud_watch_log_options {
crate::query_ser::serialize_structure_crate_model_cloud_watch_log_options_specification(
scope_1483, var_1484,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_maintenance_strategies(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotMaintenanceStrategies,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1485 = writer.prefix("CapacityRebalance");
if let Some(var_1486) = &input.capacity_rebalance {
crate::query_ser::serialize_structure_crate_model_spot_capacity_rebalance(
scope_1485, var_1486,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_fleet_launch_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotFleetLaunchSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1487 = writer.prefix("GroupSet");
if let Some(var_1488) = &input.security_groups {
let mut list_1490 = scope_1487.start_list(true, Some("item"));
for item_1489 in var_1488 {
#[allow(unused_mut)]
let mut entry_1491 = list_1490.entry();
crate::query_ser::serialize_structure_crate_model_group_identifier(
entry_1491, item_1489,
)?;
}
list_1490.finish();
}
#[allow(unused_mut)]
let mut scope_1492 = writer.prefix("AddressingType");
if let Some(var_1493) = &input.addressing_type {
scope_1492.string(var_1493);
}
#[allow(unused_mut)]
let mut scope_1494 = writer.prefix("BlockDeviceMapping");
if let Some(var_1495) = &input.block_device_mappings {
let mut list_1497 = scope_1494.start_list(true, Some("item"));
for item_1496 in var_1495 {
#[allow(unused_mut)]
let mut entry_1498 = list_1497.entry();
crate::query_ser::serialize_structure_crate_model_block_device_mapping(
entry_1498, item_1496,
)?;
}
list_1497.finish();
}
#[allow(unused_mut)]
let mut scope_1499 = writer.prefix("EbsOptimized");
if let Some(var_1500) = &input.ebs_optimized {
scope_1499.boolean(*var_1500);
}
#[allow(unused_mut)]
let mut scope_1501 = writer.prefix("IamInstanceProfile");
if let Some(var_1502) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_iam_instance_profile_specification(
scope_1501, var_1502,
)?;
}
#[allow(unused_mut)]
let mut scope_1503 = writer.prefix("ImageId");
if let Some(var_1504) = &input.image_id {
scope_1503.string(var_1504);
}
#[allow(unused_mut)]
let mut scope_1505 = writer.prefix("InstanceType");
if let Some(var_1506) = &input.instance_type {
scope_1505.string(var_1506.as_str());
}
#[allow(unused_mut)]
let mut scope_1507 = writer.prefix("KernelId");
if let Some(var_1508) = &input.kernel_id {
scope_1507.string(var_1508);
}
#[allow(unused_mut)]
let mut scope_1509 = writer.prefix("KeyName");
if let Some(var_1510) = &input.key_name {
scope_1509.string(var_1510);
}
#[allow(unused_mut)]
let mut scope_1511 = writer.prefix("Monitoring");
if let Some(var_1512) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_spot_fleet_monitoring(
scope_1511, var_1512,
)?;
}
#[allow(unused_mut)]
let mut scope_1513 = writer.prefix("NetworkInterfaceSet");
if let Some(var_1514) = &input.network_interfaces {
let mut list_1516 = scope_1513.start_list(true, Some("item"));
for item_1515 in var_1514 {
#[allow(unused_mut)]
let mut entry_1517 = list_1516.entry();
crate::query_ser::serialize_structure_crate_model_instance_network_interface_specification(entry_1517, item_1515)?;
}
list_1516.finish();
}
#[allow(unused_mut)]
let mut scope_1518 = writer.prefix("Placement");
if let Some(var_1519) = &input.placement {
crate::query_ser::serialize_structure_crate_model_spot_placement(scope_1518, var_1519)?;
}
#[allow(unused_mut)]
let mut scope_1520 = writer.prefix("RamdiskId");
if let Some(var_1521) = &input.ramdisk_id {
scope_1520.string(var_1521);
}
#[allow(unused_mut)]
let mut scope_1522 = writer.prefix("SpotPrice");
if let Some(var_1523) = &input.spot_price {
scope_1522.string(var_1523);
}
#[allow(unused_mut)]
let mut scope_1524 = writer.prefix("SubnetId");
if let Some(var_1525) = &input.subnet_id {
scope_1524.string(var_1525);
}
#[allow(unused_mut)]
let mut scope_1526 = writer.prefix("UserData");
if let Some(var_1527) = &input.user_data {
scope_1526.string(var_1527);
}
#[allow(unused_mut)]
let mut scope_1528 = writer.prefix("WeightedCapacity");
if let Some(var_1529) = &input.weighted_capacity {
scope_1528.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_1529).into()),
);
}
#[allow(unused_mut)]
let mut scope_1530 = writer.prefix("TagSpecificationSet");
if let Some(var_1531) = &input.tag_specifications {
let mut list_1533 = scope_1530.start_list(true, Some("item"));
for item_1532 in var_1531 {
#[allow(unused_mut)]
let mut entry_1534 = list_1533.entry();
crate::query_ser::serialize_structure_crate_model_spot_fleet_tag_specification(
entry_1534, item_1532,
)?;
}
list_1533.finish();
}
#[allow(unused_mut)]
let mut scope_1535 = writer.prefix("InstanceRequirements");
if let Some(var_1536) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements(
scope_1535, var_1536,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_load_balancers_config(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LoadBalancersConfig,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1537 = writer.prefix("ClassicLoadBalancersConfig");
if let Some(var_1538) = &input.classic_load_balancers_config {
crate::query_ser::serialize_structure_crate_model_classic_load_balancers_config(
scope_1537, var_1538,
)?;
}
#[allow(unused_mut)]
let mut scope_1539 = writer.prefix("TargetGroupsConfig");
if let Some(var_1540) = &input.target_groups_config {
crate::query_ser::serialize_structure_crate_model_target_groups_config(
scope_1539, var_1540,
)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_placement(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotPlacement,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1541 = writer.prefix("AvailabilityZone");
if let Some(var_1542) = &input.availability_zone {
scope_1541.string(var_1542);
}
#[allow(unused_mut)]
let mut scope_1543 = writer.prefix("GroupName");
if let Some(var_1544) = &input.group_name {
scope_1543.string(var_1544);
}
#[allow(unused_mut)]
let mut scope_1545 = writer.prefix("Tenancy");
if let Some(var_1546) = &input.tenancy {
scope_1545.string(var_1546.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_spot_market_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SpotMarketOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1547 = writer.prefix("MaxPrice");
if let Some(var_1548) = &input.max_price {
scope_1547.string(var_1548);
}
#[allow(unused_mut)]
let mut scope_1549 = writer.prefix("SpotInstanceType");
if let Some(var_1550) = &input.spot_instance_type {
scope_1549.string(var_1550.as_str());
}
#[allow(unused_mut)]
let mut scope_1551 = writer.prefix("BlockDurationMinutes");
if let Some(var_1552) = &input.block_duration_minutes {
scope_1551.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1552).into()),
);
}
#[allow(unused_mut)]
let mut scope_1553 = writer.prefix("ValidUntil");
if let Some(var_1554) = &input.valid_until {
scope_1553.date_time(var_1554, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_1555 = writer.prefix("InstanceInterruptionBehavior");
if let Some(var_1556) = &input.instance_interruption_behavior {
scope_1555.string(var_1556.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_block_device_mapping(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesBlockDeviceMapping,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1557 = writer.prefix("DeviceName");
if let Some(var_1558) = &input.device_name {
scope_1557.string(var_1558);
}
#[allow(unused_mut)]
let mut scope_1559 = writer.prefix("Ebs");
if let Some(var_1560) = &input.ebs {
crate::query_ser::serialize_structure_crate_model_scheduled_instances_ebs(
scope_1559, var_1560,
)?;
}
#[allow(unused_mut)]
let mut scope_1561 = writer.prefix("NoDevice");
if let Some(var_1562) = &input.no_device {
scope_1561.string(var_1562);
}
#[allow(unused_mut)]
let mut scope_1563 = writer.prefix("VirtualName");
if let Some(var_1564) = &input.virtual_name {
scope_1563.string(var_1564);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_iam_instance_profile(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesIamInstanceProfile,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1565 = writer.prefix("Arn");
if let Some(var_1566) = &input.arn {
scope_1565.string(var_1566);
}
#[allow(unused_mut)]
let mut scope_1567 = writer.prefix("Name");
if let Some(var_1568) = &input.name {
scope_1567.string(var_1568);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_monitoring(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesMonitoring,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1569 = writer.prefix("Enabled");
if let Some(var_1570) = &input.enabled {
scope_1569.boolean(*var_1570);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_network_interface(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesNetworkInterface,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1571 = writer.prefix("AssociatePublicIpAddress");
if let Some(var_1572) = &input.associate_public_ip_address {
scope_1571.boolean(*var_1572);
}
#[allow(unused_mut)]
let mut scope_1573 = writer.prefix("DeleteOnTermination");
if let Some(var_1574) = &input.delete_on_termination {
scope_1573.boolean(*var_1574);
}
#[allow(unused_mut)]
let mut scope_1575 = writer.prefix("Description");
if let Some(var_1576) = &input.description {
scope_1575.string(var_1576);
}
#[allow(unused_mut)]
let mut scope_1577 = writer.prefix("DeviceIndex");
if let Some(var_1578) = &input.device_index {
scope_1577.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1578).into()),
);
}
#[allow(unused_mut)]
let mut scope_1579 = writer.prefix("Group");
if let Some(var_1580) = &input.groups {
let mut list_1582 = scope_1579.start_list(true, Some("SecurityGroupId"));
for item_1581 in var_1580 {
#[allow(unused_mut)]
let mut entry_1583 = list_1582.entry();
entry_1583.string(item_1581);
}
list_1582.finish();
}
#[allow(unused_mut)]
let mut scope_1584 = writer.prefix("Ipv6AddressCount");
if let Some(var_1585) = &input.ipv6_address_count {
scope_1584.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1585).into()),
);
}
#[allow(unused_mut)]
let mut scope_1586 = writer.prefix("Ipv6Address");
if let Some(var_1587) = &input.ipv6_addresses {
let mut list_1589 = scope_1586.start_list(true, Some("Ipv6Address"));
for item_1588 in var_1587 {
#[allow(unused_mut)]
let mut entry_1590 = list_1589.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_ipv6_address(
entry_1590, item_1588,
)?;
}
list_1589.finish();
}
#[allow(unused_mut)]
let mut scope_1591 = writer.prefix("NetworkInterfaceId");
if let Some(var_1592) = &input.network_interface_id {
scope_1591.string(var_1592);
}
#[allow(unused_mut)]
let mut scope_1593 = writer.prefix("PrivateIpAddress");
if let Some(var_1594) = &input.private_ip_address {
scope_1593.string(var_1594);
}
#[allow(unused_mut)]
let mut scope_1595 = writer.prefix("PrivateIpAddressConfig");
if let Some(var_1596) = &input.private_ip_address_configs {
let mut list_1598 = scope_1595.start_list(true, Some("PrivateIpAddressConfigSet"));
for item_1597 in var_1596 {
#[allow(unused_mut)]
let mut entry_1599 = list_1598.entry();
crate::query_ser::serialize_structure_crate_model_scheduled_instances_private_ip_address_config(entry_1599, item_1597)?;
}
list_1598.finish();
}
#[allow(unused_mut)]
let mut scope_1600 = writer.prefix("SecondaryPrivateIpAddressCount");
if let Some(var_1601) = &input.secondary_private_ip_address_count {
scope_1600.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1601).into()),
);
}
#[allow(unused_mut)]
let mut scope_1602 = writer.prefix("SubnetId");
if let Some(var_1603) = &input.subnet_id {
scope_1602.string(var_1603);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instances_placement(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstancesPlacement,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1604 = writer.prefix("AvailabilityZone");
if let Some(var_1605) = &input.availability_zone {
scope_1604.string(var_1605);
}
#[allow(unused_mut)]
let mut scope_1606 = writer.prefix("GroupName");
if let Some(var_1607) = &input.group_name {
scope_1606.string(var_1607);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fleet_spot_capacity_rebalance_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FleetSpotCapacityRebalanceRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1608 = writer.prefix("ReplacementStrategy");
if let Some(var_1609) = &input.replacement_strategy {
scope_1608.string(var_1609.as_str());
}
#[allow(unused_mut)]
let mut scope_1610 = writer.prefix("TerminationDelay");
if let Some(var_1611) = &input.termination_delay {
scope_1610.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1611).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_ebs_block_device_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateEbsBlockDeviceRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1612 = writer.prefix("Encrypted");
if let Some(var_1613) = &input.encrypted {
scope_1612.boolean(*var_1613);
}
#[allow(unused_mut)]
let mut scope_1614 = writer.prefix("DeleteOnTermination");
if let Some(var_1615) = &input.delete_on_termination {
scope_1614.boolean(*var_1615);
}
#[allow(unused_mut)]
let mut scope_1616 = writer.prefix("Iops");
if let Some(var_1617) = &input.iops {
scope_1616.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1617).into()),
);
}
#[allow(unused_mut)]
let mut scope_1618 = writer.prefix("KmsKeyId");
if let Some(var_1619) = &input.kms_key_id {
scope_1618.string(var_1619);
}
#[allow(unused_mut)]
let mut scope_1620 = writer.prefix("SnapshotId");
if let Some(var_1621) = &input.snapshot_id {
scope_1620.string(var_1621);
}
#[allow(unused_mut)]
let mut scope_1622 = writer.prefix("VolumeSize");
if let Some(var_1623) = &input.volume_size {
scope_1622.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1623).into()),
);
}
#[allow(unused_mut)]
let mut scope_1624 = writer.prefix("VolumeType");
if let Some(var_1625) = &input.volume_type {
scope_1624.string(var_1625.as_str());
}
#[allow(unused_mut)]
let mut scope_1626 = writer.prefix("Throughput");
if let Some(var_1627) = &input.throughput {
scope_1626.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1627).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_ipv6_address_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceIpv6AddressRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1628 = writer.prefix("Ipv6Address");
if let Some(var_1629) = &input.ipv6_address {
scope_1628.string(var_1629);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_launch_template_spot_market_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::LaunchTemplateSpotMarketOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1630 = writer.prefix("MaxPrice");
if let Some(var_1631) = &input.max_price {
scope_1630.string(var_1631);
}
#[allow(unused_mut)]
let mut scope_1632 = writer.prefix("SpotInstanceType");
if let Some(var_1633) = &input.spot_instance_type {
scope_1632.string(var_1633.as_str());
}
#[allow(unused_mut)]
let mut scope_1634 = writer.prefix("BlockDurationMinutes");
if let Some(var_1635) = &input.block_duration_minutes {
scope_1634.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1635).into()),
);
}
#[allow(unused_mut)]
let mut scope_1636 = writer.prefix("ValidUntil");
if let Some(var_1637) = &input.valid_until {
scope_1636.date_time(var_1637, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_1638 = writer.prefix("InstanceInterruptionBehavior");
if let Some(var_1639) = &input.instance_interruption_behavior {
scope_1638.string(var_1639.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_packet_header_statement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PacketHeaderStatementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1640 = writer.prefix("SourceAddress");
if let Some(var_1641) = &input.source_addresses {
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();
entry_1644.string(item_1642);
}
list_1643.finish();
}
#[allow(unused_mut)]
let mut scope_1645 = writer.prefix("DestinationAddress");
if let Some(var_1646) = &input.destination_addresses {
let mut list_1648 = scope_1645.start_list(true, Some("item"));
for item_1647 in var_1646 {
#[allow(unused_mut)]
let mut entry_1649 = list_1648.entry();
entry_1649.string(item_1647);
}
list_1648.finish();
}
#[allow(unused_mut)]
let mut scope_1650 = writer.prefix("SourcePort");
if let Some(var_1651) = &input.source_ports {
let mut list_1653 = scope_1650.start_list(true, Some("item"));
for item_1652 in var_1651 {
#[allow(unused_mut)]
let mut entry_1654 = list_1653.entry();
entry_1654.string(item_1652);
}
list_1653.finish();
}
#[allow(unused_mut)]
let mut scope_1655 = writer.prefix("DestinationPort");
if let Some(var_1656) = &input.destination_ports {
let mut list_1658 = scope_1655.start_list(true, Some("item"));
for item_1657 in var_1656 {
#[allow(unused_mut)]
let mut entry_1659 = list_1658.entry();
entry_1659.string(item_1657);
}
list_1658.finish();
}
#[allow(unused_mut)]
let mut scope_1660 = writer.prefix("SourcePrefixList");
if let Some(var_1661) = &input.source_prefix_lists {
let mut list_1663 = scope_1660.start_list(true, Some("item"));
for item_1662 in var_1661 {
#[allow(unused_mut)]
let mut entry_1664 = list_1663.entry();
entry_1664.string(item_1662);
}
list_1663.finish();
}
#[allow(unused_mut)]
let mut scope_1665 = writer.prefix("DestinationPrefixList");
if let Some(var_1666) = &input.destination_prefix_lists {
let mut list_1668 = scope_1665.start_list(true, Some("item"));
for item_1667 in var_1666 {
#[allow(unused_mut)]
let mut entry_1669 = list_1668.entry();
entry_1669.string(item_1667);
}
list_1668.finish();
}
#[allow(unused_mut)]
let mut scope_1670 = writer.prefix("Protocol");
if let Some(var_1671) = &input.protocols {
let mut list_1673 = scope_1670.start_list(true, Some("item"));
for item_1672 in var_1671 {
#[allow(unused_mut)]
let mut entry_1674 = list_1673.entry();
entry_1674.string(item_1672.as_str());
}
list_1673.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_resource_statement_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ResourceStatementRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1675 = writer.prefix("Resource");
if let Some(var_1676) = &input.resources {
let mut list_1678 = scope_1675.start_list(true, Some("item"));
for item_1677 in var_1676 {
#[allow(unused_mut)]
let mut entry_1679 = list_1678.entry();
entry_1679.string(item_1677);
}
list_1678.finish();
}
#[allow(unused_mut)]
let mut scope_1680 = writer.prefix("ResourceType");
if let Some(var_1681) = &input.resource_types {
let mut list_1683 = scope_1680.start_list(true, Some("item"));
for item_1682 in var_1681 {
#[allow(unused_mut)]
let mut entry_1684 = list_1683.entry();
entry_1684.string(item_1682);
}
list_1683.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_requirements(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceRequirements,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_1685 = writer.prefix("VCpuCount");
if let Some(var_1686) = &input.v_cpu_count {
crate::query_ser::serialize_structure_crate_model_v_cpu_count_range(scope_1685, var_1686)?;
}
#[allow(unused_mut)]
let mut scope_1687 = writer.prefix("MemoryMiB");
if let Some(var_1688) = &input.memory_mi_b {
crate::query_ser::serialize_structure_crate_model_memory_mi_b(scope_1687, var_1688)?;
}
#[allow(unused_mut)]
let mut scope_1689 = writer.prefix("CpuManufacturerSet");
if let Some(var_1690) = &input.cpu_manufacturers {
let mut list_1692 = scope_1689.start_list(true, Some("item"));
for item_1691 in var_1690 {
#[allow(unused_mut)]
let mut entry_1693 = list_1692.entry();
entry_1693.string(item_1691.as_str());
}
list_1692.finish();
}
#[allow(unused_mut)]
let mut scope_1694 = writer.prefix("MemoryGiBPerVCpu");
if let Some(var_1695) = &input.memory_gi_b_per_v_cpu {
crate::query_ser::serialize_structure_crate_model_memory_gi_b_per_v_cpu(
scope_1694, var_1695,
)?;
}
#[allow(unused_mut)]
let mut scope_1696 = writer.prefix("ExcludedInstanceTypeSet");
if let Some(var_1697) = &input.excluded_instance_types {
let mut list_1699 = scope_1696.start_list(true, Some("item"));
for item_1698 in var_1697 {
#[allow(unused_mut)]
let mut entry_1700 = list_1699.entry();
entry_1700.string(item_1698);
}
list_1699.finish();
}
#[allow(unused_mut)]
let mut scope_1701 = writer.prefix("InstanceGenerationSet");
if let Some(var_1702) = &input.instance_generations {
let mut list_1704 = scope_1701.start_list(true, Some("item"));
for item_1703 in var_1702 {
#[allow(unused_mut)]
let mut entry_1705 = list_1704.entry();
entry_1705.string(item_1703.as_str());
}
list_1704.finish();
}
#[allow(unused_mut)]
let mut scope_1706 = writer.prefix("SpotMaxPricePercentageOverLowestPrice");
if let Some(var_1707) = &input.spot_max_price_percentage_over_lowest_price {
scope_1706.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1707).into()),
);
}
#[allow(unused_mut)]
let mut scope_1708 = writer.prefix("OnDemandMaxPricePercentageOverLowestPrice");
if let Some(var_1709) = &input.on_demand_max_price_percentage_over_lowest_price {
scope_1708.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_1709).into()),
);
}
#[allow(unused_mut)]
let mut scope_1710 = writer.prefix("BareMetal");
if let Some(var_1711) = &input.bare_metal {
scope_1710.string(var_1711.as_str());
}
#[allow(unused_mut)]
let mut scope_1712 = writer.prefix("BurstablePerformance");
if let Some(var_1713) = &input.burstable_performance {
scope_1712.string(var_1713.as_str());
}
#[allow(unused_mut)]
let mut scope_1714 = writer.prefix("RequireHibernateSupport");
if let Some(var_1715) = &input.require_hibernate_support {
scope_1714.boolean(*var_1715);
}
#[allow(unused_mut)]
let mut scope_1716 = writer.prefix("NetworkInterfaceCount");
if let Some(var_1717) = &input.network_interface_count {
crate::query_ser::serialize_structure_crate_model_network_interface_count(
scope_1716, var_1717,
)?;
}
#[allow(unused_mut)]
let mut scope_1718 = writer.prefix("LocalStorage");
if let Some(var_1719) = &input.local_storage {
scope_1718.string(var_1719.as_str());
}
#[allow(unused_mut)]
let mut scope_1720 = writer.prefix("LocalStorageTypeSet");
if let Some(var_1721) = &input.local_storage_types {
let mut list_1723 = scope_1720.start_list(true, Some("item"));
for item_1722 in var_1721 {
#[allow(unused_mut)]
let mut entry_1724 = list_1723.entry();
entry_1724.string(item_1722.as_str());
}
list_1723.finish();
}
#[allow(unused_mut)]
let mut scope_1725 = writer.prefix("TotalLocalStorageGB");
if let Some(var_1726) = &input.total_local_storage_gb {
crate::query_ser::serialize_structure_crate_model_total_local_storage_gb(
scope_1725, var_1726,
)?;
}
#[allow(unused_mut)]
let mut scope_1727 = writer.prefix("BaselineEbsBandwidthMbps");
if let Some(var_1728) = &input.baseline_ebs_bandwidth_mbps {
crate::query_ser::serialize_structure_crate_model_baseline_ebs_bandwidth_mbps(
scope_1727, var_1728,
)?;
}
#[allow(unused_mut)]
let mut scope_1729 = writer.prefix("AcceleratorTypeSet");
if let Some(var_1730) = &input.accelerator_types {
let mut list_1732 = scope_1729.start_list(true, Some("item"));
for item_1731 in var_1730 {
#[allow(unused_mut)]
let mut entry_1733 = list_1732.entry();
entry_1733.string(item_1731.as_str());
}
list_1732.finish();
}
#[allow(unused_mut)]
let mut scope_1734 = writer.prefix("AcceleratorCount");
if let Some(var_1735) = &input.accelerator_count {
crate::query_ser::serialize_structure_crate_model_accelerator_count(scope_1734, var_1735)?;
}
#[allow(unused_mut)]
let mut scope_1736 = writer.prefix("AcceleratorManufacturerSet");
if let Some(var_1737) = &input.accelerator_manufacturers {
let mut list_1739 = scope_1736.start_list(true, Some("item"));
for item_1738 in var_1737 {
#[allow(unused_mut)]
let mut entry_1740 = list_1739.entry();
entry_1740.string(item_1738.as_str());
}
list_1739.finish();
}
#[allow(unused_mut)]
let mut scope_1741 = writer.prefix("AcceleratorNameSet");
if let Some(var_1742) = &input.accelerator_names {
let mut list_1744 = scope_1741.start_list(true, Some("item"));
for item_1743 in var_1742 {
#[allow(unused_mut)]
let mut entry_1745 = list_1744.entry();
entry_1745.string(item_1743.as_str());
}
list_1744.finish();
}
#[allow(unused_mut)]
let mut scope_1746 = writer.prefix("AcceleratorTotalMemoryMiB");
if let Some(var_1747) = &input.accelerator_total_memory_mi_b {
crate::query_ser::serialize_structure_crate_model_accelerator_total_memory_mi_b(
scope_1746, var_1747,
)?;
}
Ok(())
}
Trait Implementations§
source§impl AsRef<str> for LocalStorageType
impl AsRef<str> for LocalStorageType
source§impl Clone for LocalStorageType
impl Clone for LocalStorageType
source§fn clone(&self) -> LocalStorageType
fn clone(&self) -> LocalStorageType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LocalStorageType
impl Debug for LocalStorageType
source§impl From<&str> for LocalStorageType
impl From<&str> for LocalStorageType
source§impl FromStr for LocalStorageType
impl FromStr for LocalStorageType
source§impl Hash for LocalStorageType
impl Hash for LocalStorageType
source§impl Ord for LocalStorageType
impl Ord for LocalStorageType
source§fn cmp(&self, other: &LocalStorageType) -> Ordering
fn cmp(&self, other: &LocalStorageType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<LocalStorageType> for LocalStorageType
impl PartialEq<LocalStorageType> for LocalStorageType
source§fn eq(&self, other: &LocalStorageType) -> bool
fn eq(&self, other: &LocalStorageType) -> bool
source§impl PartialOrd<LocalStorageType> for LocalStorageType
impl PartialOrd<LocalStorageType> for LocalStorageType
source§fn partial_cmp(&self, other: &LocalStorageType) -> Option<Ordering>
fn partial_cmp(&self, other: &LocalStorageType) -> 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 LocalStorageType
impl StructuralEq for LocalStorageType
impl StructuralPartialEq for LocalStorageType
Auto Trait Implementations§
impl RefUnwindSafe for LocalStorageType
impl Send for LocalStorageType
impl Sync for LocalStorageType
impl Unpin for LocalStorageType
impl UnwindSafe for LocalStorageType
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.