Enum aws_sdk_ec2::model::TargetCapacityUnitType
source · #[non_exhaustive]
pub enum TargetCapacityUnitType {
MemoryMib,
Units,
Vcpu,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against TargetCapacityUnitType
, 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 targetcapacityunittype = unimplemented!();
match targetcapacityunittype {
TargetCapacityUnitType::MemoryMib => { /* ... */ },
TargetCapacityUnitType::Units => { /* ... */ },
TargetCapacityUnitType::Vcpu => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when targetcapacityunittype
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant TargetCapacityUnitType::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
TargetCapacityUnitType::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 TargetCapacityUnitType::NewFeature
is defined.
Specifically, when targetcapacityunittype
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on TargetCapacityUnitType::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
MemoryMib
Units
Vcpu
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl TargetCapacityUnitType
impl TargetCapacityUnitType
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
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 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
pub fn serialize_structure_crate_model_target_capacity_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::TargetCapacitySpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_137 = writer.prefix("TotalTargetCapacity");
if let Some(var_138) = &input.total_target_capacity {
scope_137.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_138).into()),
);
}
#[allow(unused_mut)]
let mut scope_139 = writer.prefix("OnDemandTargetCapacity");
if let Some(var_140) = &input.on_demand_target_capacity {
scope_139.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_140).into()),
);
}
#[allow(unused_mut)]
let mut scope_141 = writer.prefix("SpotTargetCapacity");
if let Some(var_142) = &input.spot_target_capacity {
scope_141.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_142).into()),
);
}
#[allow(unused_mut)]
let mut scope_143 = writer.prefix("DefaultTargetCapacityType");
if let Some(var_144) = &input.default_target_capacity_type {
scope_143.string(var_144.as_str());
}
#[allow(unused_mut)]
let mut scope_145 = writer.prefix("TargetCapacityUnitType");
if let Some(var_146) = &input.target_capacity_unit_type {
scope_145.string(var_146.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_destination_options_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DestinationOptionsRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_147 = writer.prefix("FileFormat");
if let Some(var_148) = &input.file_format {
scope_147.string(var_148.as_str());
}
#[allow(unused_mut)]
let mut scope_149 = writer.prefix("HiveCompatiblePartitions");
if let Some(var_150) = &input.hive_compatible_partitions {
scope_149.boolean(*var_150);
}
#[allow(unused_mut)]
let mut scope_151 = writer.prefix("PerHourPartition");
if let Some(var_152) = &input.per_hour_partition {
scope_151.boolean(*var_152);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_storage_location(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::StorageLocation,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_153 = writer.prefix("Bucket");
if let Some(var_154) = &input.bucket {
scope_153.string(var_154);
}
#[allow(unused_mut)]
let mut scope_155 = writer.prefix("Key");
if let Some(var_156) = &input.key {
scope_155.string(var_156);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_block_device_mapping(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::BlockDeviceMapping,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_157 = writer.prefix("DeviceName");
if let Some(var_158) = &input.device_name {
scope_157.string(var_158);
}
#[allow(unused_mut)]
let mut scope_159 = writer.prefix("VirtualName");
if let Some(var_160) = &input.virtual_name {
scope_159.string(var_160);
}
#[allow(unused_mut)]
let mut scope_161 = writer.prefix("Ebs");
if let Some(var_162) = &input.ebs {
crate::query_ser::serialize_structure_crate_model_ebs_block_device(scope_161, var_162)?;
}
#[allow(unused_mut)]
let mut scope_163 = writer.prefix("NoDevice");
if let Some(var_164) = &input.no_device {
scope_163.string(var_164);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_event_window_time_range_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceEventWindowTimeRangeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_165 = writer.prefix("StartWeekDay");
if let Some(var_166) = &input.start_week_day {
scope_165.string(var_166.as_str());
}
#[allow(unused_mut)]
let mut scope_167 = writer.prefix("StartHour");
if let Some(var_168) = &input.start_hour {
scope_167.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_168).into()),
);
}
#[allow(unused_mut)]
let mut scope_169 = writer.prefix("EndWeekDay");
if let Some(var_170) = &input.end_week_day {
scope_169.string(var_170.as_str());
}
#[allow(unused_mut)]
let mut scope_171 = writer.prefix("EndHour");
if let Some(var_172) = &input.end_hour {
scope_171.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_172).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_export_to_s3_task_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ExportToS3TaskSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_173 = writer.prefix("ContainerFormat");
if let Some(var_174) = &input.container_format {
scope_173.string(var_174.as_str());
}
#[allow(unused_mut)]
let mut scope_175 = writer.prefix("DiskImageFormat");
if let Some(var_176) = &input.disk_image_format {
scope_175.string(var_176.as_str());
}
#[allow(unused_mut)]
let mut scope_177 = writer.prefix("S3Bucket");
if let Some(var_178) = &input.s3_bucket {
scope_177.string(var_178);
}
#[allow(unused_mut)]
let mut scope_179 = writer.prefix("S3Prefix");
if let Some(var_180) = &input.s3_prefix {
scope_179.string(var_180);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_add_ipam_operating_region(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AddIpamOperatingRegion,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_181 = writer.prefix("RegionName");
if let Some(var_182) = &input.region_name {
scope_181.string(var_182);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_request_ipam_resource_tag(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RequestIpamResourceTag,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_183 = writer.prefix("Key");
if let Some(var_184) = &input.key {
scope_183.string(var_184);
}
#[allow(unused_mut)]
let mut scope_185 = writer.prefix("Value");
if let Some(var_186) = &input.value {
scope_185.string(var_186);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_request_launch_template_data(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::RequestLaunchTemplateData,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_187 = writer.prefix("KernelId");
if let Some(var_188) = &input.kernel_id {
scope_187.string(var_188);
}
#[allow(unused_mut)]
let mut scope_189 = writer.prefix("EbsOptimized");
if let Some(var_190) = &input.ebs_optimized {
scope_189.boolean(*var_190);
}
#[allow(unused_mut)]
let mut scope_191 = writer.prefix("IamInstanceProfile");
if let Some(var_192) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_launch_template_iam_instance_profile_specification_request(scope_191, var_192)?;
}
#[allow(unused_mut)]
let mut scope_193 = writer.prefix("BlockDeviceMapping");
if let Some(var_194) = &input.block_device_mappings {
let mut list_196 = scope_193.start_list(true, Some("BlockDeviceMapping"));
for item_195 in var_194 {
#[allow(unused_mut)]
let mut entry_197 = list_196.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_block_device_mapping_request(entry_197, item_195)?;
}
list_196.finish();
}
#[allow(unused_mut)]
let mut scope_198 = writer.prefix("NetworkInterface");
if let Some(var_199) = &input.network_interfaces {
let mut list_201 =
scope_198.start_list(true, Some("InstanceNetworkInterfaceSpecification"));
for item_200 in var_199 {
#[allow(unused_mut)]
let mut entry_202 = list_201.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_instance_network_interface_specification_request(entry_202, item_200)?;
}
list_201.finish();
}
#[allow(unused_mut)]
let mut scope_203 = writer.prefix("ImageId");
if let Some(var_204) = &input.image_id {
scope_203.string(var_204);
}
#[allow(unused_mut)]
let mut scope_205 = writer.prefix("InstanceType");
if let Some(var_206) = &input.instance_type {
scope_205.string(var_206.as_str());
}
#[allow(unused_mut)]
let mut scope_207 = writer.prefix("KeyName");
if let Some(var_208) = &input.key_name {
scope_207.string(var_208);
}
#[allow(unused_mut)]
let mut scope_209 = writer.prefix("Monitoring");
if let Some(var_210) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_launch_templates_monitoring_request(
scope_209, var_210,
)?;
}
#[allow(unused_mut)]
let mut scope_211 = writer.prefix("Placement");
if let Some(var_212) = &input.placement {
crate::query_ser::serialize_structure_crate_model_launch_template_placement_request(
scope_211, var_212,
)?;
}
#[allow(unused_mut)]
let mut scope_213 = writer.prefix("RamDiskId");
if let Some(var_214) = &input.ram_disk_id {
scope_213.string(var_214);
}
#[allow(unused_mut)]
let mut scope_215 = writer.prefix("DisableApiTermination");
if let Some(var_216) = &input.disable_api_termination {
scope_215.boolean(*var_216);
}
#[allow(unused_mut)]
let mut scope_217 = writer.prefix("InstanceInitiatedShutdownBehavior");
if let Some(var_218) = &input.instance_initiated_shutdown_behavior {
scope_217.string(var_218.as_str());
}
#[allow(unused_mut)]
let mut scope_219 = writer.prefix("UserData");
if let Some(var_220) = &input.user_data {
scope_219.string(var_220);
}
#[allow(unused_mut)]
let mut scope_221 = writer.prefix("TagSpecification");
if let Some(var_222) = &input.tag_specifications {
let mut list_224 =
scope_221.start_list(true, Some("LaunchTemplateTagSpecificationRequest"));
for item_223 in var_222 {
#[allow(unused_mut)]
let mut entry_225 = list_224.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_tag_specification_request(entry_225, item_223)?;
}
list_224.finish();
}
#[allow(unused_mut)]
let mut scope_226 = writer.prefix("ElasticGpuSpecification");
if let Some(var_227) = &input.elastic_gpu_specifications {
let mut list_229 = scope_226.start_list(true, Some("ElasticGpuSpecification"));
for item_228 in var_227 {
#[allow(unused_mut)]
let mut entry_230 = list_229.entry();
crate::query_ser::serialize_structure_crate_model_elastic_gpu_specification(
entry_230, item_228,
)?;
}
list_229.finish();
}
#[allow(unused_mut)]
let mut scope_231 = writer.prefix("ElasticInferenceAccelerator");
if let Some(var_232) = &input.elastic_inference_accelerators {
let mut list_234 = scope_231.start_list(true, Some("item"));
for item_233 in var_232 {
#[allow(unused_mut)]
let mut entry_235 = list_234.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_elastic_inference_accelerator(entry_235, item_233)?;
}
list_234.finish();
}
#[allow(unused_mut)]
let mut scope_236 = writer.prefix("SecurityGroupId");
if let Some(var_237) = &input.security_group_ids {
let mut list_239 = scope_236.start_list(true, Some("SecurityGroupId"));
for item_238 in var_237 {
#[allow(unused_mut)]
let mut entry_240 = list_239.entry();
entry_240.string(item_238);
}
list_239.finish();
}
#[allow(unused_mut)]
let mut scope_241 = writer.prefix("SecurityGroup");
if let Some(var_242) = &input.security_groups {
let mut list_244 = scope_241.start_list(true, Some("SecurityGroup"));
for item_243 in var_242 {
#[allow(unused_mut)]
let mut entry_245 = list_244.entry();
entry_245.string(item_243);
}
list_244.finish();
}
#[allow(unused_mut)]
let mut scope_246 = writer.prefix("InstanceMarketOptions");
if let Some(var_247) = &input.instance_market_options {
crate::query_ser::serialize_structure_crate_model_launch_template_instance_market_options_request(scope_246, var_247)?;
}
#[allow(unused_mut)]
let mut scope_248 = writer.prefix("CreditSpecification");
if let Some(var_249) = &input.credit_specification {
crate::query_ser::serialize_structure_crate_model_credit_specification_request(
scope_248, var_249,
)?;
}
#[allow(unused_mut)]
let mut scope_250 = writer.prefix("CpuOptions");
if let Some(var_251) = &input.cpu_options {
crate::query_ser::serialize_structure_crate_model_launch_template_cpu_options_request(
scope_250, var_251,
)?;
}
#[allow(unused_mut)]
let mut scope_252 = writer.prefix("CapacityReservationSpecification");
if let Some(var_253) = &input.capacity_reservation_specification {
crate::query_ser::serialize_structure_crate_model_launch_template_capacity_reservation_specification_request(scope_252, var_253)?;
}
#[allow(unused_mut)]
let mut scope_254 = writer.prefix("LicenseSpecification");
if let Some(var_255) = &input.license_specifications {
let mut list_257 = scope_254.start_list(true, Some("item"));
for item_256 in var_255 {
#[allow(unused_mut)]
let mut entry_258 = list_257.entry();
crate::query_ser::serialize_structure_crate_model_launch_template_license_configuration_request(entry_258, item_256)?;
}
list_257.finish();
}
#[allow(unused_mut)]
let mut scope_259 = writer.prefix("HibernationOptions");
if let Some(var_260) = &input.hibernation_options {
crate::query_ser::serialize_structure_crate_model_launch_template_hibernation_options_request(scope_259, var_260)?;
}
#[allow(unused_mut)]
let mut scope_261 = writer.prefix("MetadataOptions");
if let Some(var_262) = &input.metadata_options {
crate::query_ser::serialize_structure_crate_model_launch_template_instance_metadata_options_request(scope_261, var_262)?;
}
#[allow(unused_mut)]
let mut scope_263 = writer.prefix("EnclaveOptions");
if let Some(var_264) = &input.enclave_options {
crate::query_ser::serialize_structure_crate_model_launch_template_enclave_options_request(
scope_263, var_264,
)?;
}
#[allow(unused_mut)]
let mut scope_265 = writer.prefix("InstanceRequirements");
if let Some(var_266) = &input.instance_requirements {
crate::query_ser::serialize_structure_crate_model_instance_requirements_request(
scope_265, var_266,
)?;
}
#[allow(unused_mut)]
let mut scope_267 = writer.prefix("PrivateDnsNameOptions");
if let Some(var_268) = &input.private_dns_name_options {
crate::query_ser::serialize_structure_crate_model_launch_template_private_dns_name_options_request(scope_267, var_268)?;
}
#[allow(unused_mut)]
let mut scope_269 = writer.prefix("MaintenanceOptions");
if let Some(var_270) = &input.maintenance_options {
crate::query_ser::serialize_structure_crate_model_launch_template_instance_maintenance_options_request(scope_269, var_270)?;
}
#[allow(unused_mut)]
let mut scope_271 = writer.prefix("DisableApiStop");
if let Some(var_272) = &input.disable_api_stop {
scope_271.boolean(*var_272);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_add_prefix_list_entry(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AddPrefixListEntry,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_273 = writer.prefix("Cidr");
if let Some(var_274) = &input.cidr {
scope_273.string(var_274);
}
#[allow(unused_mut)]
let mut scope_275 = writer.prefix("Description");
if let Some(var_276) = &input.description {
scope_275.string(var_276);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_icmp_type_code(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IcmpTypeCode,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_277 = writer.prefix("Code");
if let Some(var_278) = &input.code {
scope_277.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_278).into()),
);
}
#[allow(unused_mut)]
let mut scope_279 = writer.prefix("Type");
if let Some(var_280) = &input.r#type {
scope_279.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_280).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_port_range(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PortRange,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_281 = writer.prefix("From");
if let Some(var_282) = &input.from {
scope_281.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_282).into()),
);
}
#[allow(unused_mut)]
let mut scope_283 = writer.prefix("To");
if let Some(var_284) = &input.to {
scope_283.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_284).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_access_scope_path_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::AccessScopePathRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_285 = writer.prefix("Source");
if let Some(var_286) = &input.source {
crate::query_ser::serialize_structure_crate_model_path_statement_request(
scope_285, var_286,
)?;
}
#[allow(unused_mut)]
let mut scope_287 = writer.prefix("Destination");
if let Some(var_288) = &input.destination {
crate::query_ser::serialize_structure_crate_model_path_statement_request(
scope_287, var_288,
)?;
}
#[allow(unused_mut)]
let mut scope_289 = writer.prefix("ThroughResource");
if let Some(var_290) = &input.through_resources {
let mut list_292 = scope_289.start_list(true, Some("item"));
for item_291 in var_290 {
#[allow(unused_mut)]
let mut entry_293 = list_292.entry();
crate::query_ser::serialize_structure_crate_model_through_resources_statement_request(
entry_293, item_291,
)?;
}
list_292.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_ipv6_address(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceIpv6Address,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_294 = writer.prefix("Ipv6Address");
if let Some(var_295) = &input.ipv6_address {
scope_294.string(var_295);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_private_ip_address_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PrivateIpAddressSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_296 = writer.prefix("Primary");
if let Some(var_297) = &input.primary {
scope_296.boolean(*var_297);
}
#[allow(unused_mut)]
let mut scope_298 = writer.prefix("PrivateIpAddress");
if let Some(var_299) = &input.private_ip_address {
scope_298.string(var_299);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipv4_prefix_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Ipv4PrefixSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_300 = writer.prefix("Ipv4Prefix");
if let Some(var_301) = &input.ipv4_prefix {
scope_300.string(var_301);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_ipv6_prefix_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Ipv6PrefixSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_302 = writer.prefix("Ipv6Prefix");
if let Some(var_303) = &input.ipv6_prefix {
scope_302.string(var_303);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_price_schedule_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::PriceScheduleSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_304 = writer.prefix("CurrencyCode");
if let Some(var_305) = &input.currency_code {
scope_304.string(var_305.as_str());
}
#[allow(unused_mut)]
let mut scope_306 = writer.prefix("Price");
if let Some(var_307) = &input.price {
scope_306.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::Float((*var_307).into()),
);
}
#[allow(unused_mut)]
let mut scope_308 = writer.prefix("Term");
if let Some(var_309) = &input.term {
scope_308.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_309).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_310 = writer.prefix("InstanceId");
if let Some(var_311) = &input.instance_id {
scope_310.string(var_311);
}
#[allow(unused_mut)]
let mut scope_312 = writer.prefix("ExcludeBootVolume");
if let Some(var_313) = &input.exclude_boot_volume {
scope_312.boolean(*var_313);
}
#[allow(unused_mut)]
let mut scope_314 = writer.prefix("ExcludeDataVolumeId");
if let Some(var_315) = &input.exclude_data_volume_ids {
let mut list_317 = scope_314.start_list(true, Some("VolumeId"));
for item_316 in var_315 {
#[allow(unused_mut)]
let mut entry_318 = list_317.entry();
entry_318.string(item_316);
}
list_317.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_s3_object_tag(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::S3ObjectTag,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_319 = writer.prefix("Key");
if let Some(var_320) = &input.key {
scope_319.string(var_320);
}
#[allow(unused_mut)]
let mut scope_321 = writer.prefix("Value");
if let Some(var_322) = &input.value {
scope_321.string(var_322);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_tag(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Tag,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_323 = writer.prefix("Key");
if let Some(var_324) = &input.key {
scope_323.string(var_324);
}
#[allow(unused_mut)]
let mut scope_325 = writer.prefix("Value");
if let Some(var_326) = &input.value {
scope_325.string(var_326);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_traffic_mirror_port_range_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::TrafficMirrorPortRangeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_327 = writer.prefix("FromPort");
if let Some(var_328) = &input.from_port {
scope_327.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_328).into()),
);
}
#[allow(unused_mut)]
let mut scope_329 = writer.prefix("ToPort");
if let Some(var_330) = &input.to_port {
scope_329.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_330).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_transit_gateway_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::TransitGatewayRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_331 = writer.prefix("AmazonSideAsn");
if let Some(var_332) = &input.amazon_side_asn {
scope_331.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_332).into()),
);
}
#[allow(unused_mut)]
let mut scope_333 = writer.prefix("AutoAcceptSharedAttachments");
if let Some(var_334) = &input.auto_accept_shared_attachments {
scope_333.string(var_334.as_str());
}
#[allow(unused_mut)]
let mut scope_335 = writer.prefix("DefaultRouteTableAssociation");
if let Some(var_336) = &input.default_route_table_association {
scope_335.string(var_336.as_str());
}
#[allow(unused_mut)]
let mut scope_337 = writer.prefix("DefaultRouteTablePropagation");
if let Some(var_338) = &input.default_route_table_propagation {
scope_337.string(var_338.as_str());
}
#[allow(unused_mut)]
let mut scope_339 = writer.prefix("VpnEcmpSupport");
if let Some(var_340) = &input.vpn_ecmp_support {
scope_339.string(var_340.as_str());
}
#[allow(unused_mut)]
let mut scope_341 = writer.prefix("DnsSupport");
if let Some(var_342) = &input.dns_support {
scope_341.string(var_342.as_str());
}
#[allow(unused_mut)]
let mut scope_343 = writer.prefix("MulticastSupport");
if let Some(var_344) = &input.multicast_support {
scope_343.string(var_344.as_str());
}
#[allow(unused_mut)]
let mut scope_345 = writer.prefix("TransitGatewayCidrBlocks");
if let Some(var_346) = &input.transit_gateway_cidr_blocks {
let mut list_348 = scope_345.start_list(true, Some("item"));
for item_347 in var_346 {
#[allow(unused_mut)]
let mut entry_349 = list_348.entry();
entry_349.string(item_347);
}
list_348.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_transit_gateway_connect_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateTransitGatewayConnectRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_350 = writer.prefix("Protocol");
if let Some(var_351) = &input.protocol {
scope_350.string(var_351.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_transit_gateway_connect_request_bgp_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::TransitGatewayConnectRequestBgpOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_352 = writer.prefix("PeerAsn");
if let Some(var_353) = &input.peer_asn {
scope_352.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_353).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_transit_gateway_multicast_domain_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateTransitGatewayMulticastDomainRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_354 = writer.prefix("Igmpv2Support");
if let Some(var_355) = &input.igmpv2_support {
scope_354.string(var_355.as_str());
}
#[allow(unused_mut)]
let mut scope_356 = writer.prefix("StaticSourcesSupport");
if let Some(var_357) = &input.static_sources_support {
scope_356.string(var_357.as_str());
}
#[allow(unused_mut)]
let mut scope_358 = writer.prefix("AutoAcceptSharedAssociations");
if let Some(var_359) = &input.auto_accept_shared_associations {
scope_358.string(var_359.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_transit_gateway_peering_attachment_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateTransitGatewayPeeringAttachmentRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_360 = writer.prefix("DynamicRouting");
if let Some(var_361) = &input.dynamic_routing {
scope_360.string(var_361.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_create_transit_gateway_vpc_attachment_request_options(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::CreateTransitGatewayVpcAttachmentRequestOptions,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_362 = writer.prefix("DnsSupport");
if let Some(var_363) = &input.dns_support {
scope_362.string(var_363.as_str());
}
#[allow(unused_mut)]
let mut scope_364 = writer.prefix("Ipv6Support");
if let Some(var_365) = &input.ipv6_support {
scope_364.string(var_365.as_str());
}
#[allow(unused_mut)]
let mut scope_366 = writer.prefix("ApplianceModeSupport");
if let Some(var_367) = &input.appliance_mode_support {
scope_366.string(var_367.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_dns_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DnsOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_368 = writer.prefix("DnsRecordIpType");
if let Some(var_369) = &input.dns_record_ip_type {
scope_368.string(var_369.as_str());
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_vpn_connection_options_specification(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::VpnConnectionOptionsSpecification,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_370 = writer.prefix("EnableAcceleration");
if let Some(var_371) = &input.enable_acceleration {
scope_370.boolean(*var_371);
}
#[allow(unused_mut)]
let mut scope_372 = writer.prefix("StaticRoutesOnly");
if let Some(var_373) = &input.static_routes_only {
scope_372.boolean(*var_373);
}
#[allow(unused_mut)]
let mut scope_374 = writer.prefix("TunnelInsideIpVersion");
if let Some(var_375) = &input.tunnel_inside_ip_version {
scope_374.string(var_375.as_str());
}
#[allow(unused_mut)]
let mut scope_376 = writer.prefix("TunnelOptions");
if let Some(var_377) = &input.tunnel_options {
let mut list_379 = scope_376.start_list(true, None);
for item_378 in var_377 {
#[allow(unused_mut)]
let mut entry_380 = list_379.entry();
crate::query_ser::serialize_structure_crate_model_vpn_tunnel_options_specification(
entry_380, item_378,
)?;
}
list_379.finish();
}
#[allow(unused_mut)]
let mut scope_381 = writer.prefix("LocalIpv4NetworkCidr");
if let Some(var_382) = &input.local_ipv4_network_cidr {
scope_381.string(var_382);
}
#[allow(unused_mut)]
let mut scope_383 = writer.prefix("RemoteIpv4NetworkCidr");
if let Some(var_384) = &input.remote_ipv4_network_cidr {
scope_383.string(var_384);
}
#[allow(unused_mut)]
let mut scope_385 = writer.prefix("LocalIpv6NetworkCidr");
if let Some(var_386) = &input.local_ipv6_network_cidr {
scope_385.string(var_386);
}
#[allow(unused_mut)]
let mut scope_387 = writer.prefix("RemoteIpv6NetworkCidr");
if let Some(var_388) = &input.remote_ipv6_network_cidr {
scope_387.string(var_388);
}
#[allow(unused_mut)]
let mut scope_389 = writer.prefix("OutsideIpAddressType");
if let Some(var_390) = &input.outside_ip_address_type {
scope_389.string(var_390);
}
#[allow(unused_mut)]
let mut scope_391 = writer.prefix("TransportTransitGatewayAttachmentId");
if let Some(var_392) = &input.transport_transit_gateway_attachment_id {
scope_391.string(var_392);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_deregister_instance_tag_attribute_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::DeregisterInstanceTagAttributeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_393 = writer.prefix("IncludeAllTagsOfInstance");
if let Some(var_394) = &input.include_all_tags_of_instance {
scope_393.boolean(*var_394);
}
#[allow(unused_mut)]
let mut scope_395 = writer.prefix("InstanceTagKey");
if let Some(var_396) = &input.instance_tag_keys {
let mut list_398 = scope_395.start_list(true, Some("item"));
for item_397 in var_396 {
#[allow(unused_mut)]
let mut entry_399 = list_398.entry();
entry_399.string(item_397);
}
list_398.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_filter(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::Filter,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_400 = writer.prefix("Name");
if let Some(var_401) = &input.name {
scope_400.string(var_401);
}
#[allow(unused_mut)]
let mut scope_402 = writer.prefix("Value");
if let Some(var_403) = &input.values {
let mut list_405 = scope_402.start_list(true, Some("item"));
for item_404 in var_403 {
#[allow(unused_mut)]
let mut entry_406 = list_405.entry();
entry_406.string(item_404);
}
list_405.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_slot_date_time_range_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SlotDateTimeRangeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_407 = writer.prefix("EarliestTime");
if let Some(var_408) = &input.earliest_time {
scope_407.date_time(var_408, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_409 = writer.prefix("LatestTime");
if let Some(var_410) = &input.latest_time {
scope_409.date_time(var_410, aws_smithy_types::date_time::Format::DateTime)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_scheduled_instance_recurrence_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ScheduledInstanceRecurrenceRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_411 = writer.prefix("Frequency");
if let Some(var_412) = &input.frequency {
scope_411.string(var_412);
}
#[allow(unused_mut)]
let mut scope_413 = writer.prefix("Interval");
if let Some(var_414) = &input.interval {
scope_413.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_414).into()),
);
}
#[allow(unused_mut)]
let mut scope_415 = writer.prefix("OccurrenceDay");
if let Some(var_416) = &input.occurrence_days {
let mut list_418 = scope_415.start_list(true, Some("OccurenceDay"));
for item_417 in var_416 {
#[allow(unused_mut)]
let mut entry_419 = list_418.entry();
entry_419.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*item_417).into()),
);
}
list_418.finish();
}
#[allow(unused_mut)]
let mut scope_420 = writer.prefix("OccurrenceRelativeToEnd");
if let Some(var_421) = &input.occurrence_relative_to_end {
scope_420.boolean(*var_421);
}
#[allow(unused_mut)]
let mut scope_422 = writer.prefix("OccurrenceUnit");
if let Some(var_423) = &input.occurrence_unit {
scope_422.string(var_423);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_slot_start_time_range_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::SlotStartTimeRangeRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_424 = writer.prefix("EarliestTime");
if let Some(var_425) = &input.earliest_time {
scope_424.date_time(var_425, aws_smithy_types::date_time::Format::DateTime)?;
}
#[allow(unused_mut)]
let mut scope_426 = writer.prefix("LatestTime");
if let Some(var_427) = &input.latest_time {
scope_426.date_time(var_427, aws_smithy_types::date_time::Format::DateTime)?;
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_instance_event_window_disassociation_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::InstanceEventWindowDisassociationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_428 = writer.prefix("InstanceId");
if let Some(var_429) = &input.instance_ids {
let mut list_431 = scope_428.start_list(true, Some("item"));
for item_430 in var_429 {
#[allow(unused_mut)]
let mut entry_432 = list_431.entry();
entry_432.string(item_430);
}
list_431.finish();
}
#[allow(unused_mut)]
let mut scope_433 = writer.prefix("InstanceTag");
if let Some(var_434) = &input.instance_tags {
let mut list_436 = scope_433.start_list(true, Some("item"));
for item_435 in var_434 {
#[allow(unused_mut)]
let mut entry_437 = list_436.entry();
crate::query_ser::serialize_structure_crate_model_tag(entry_437, item_435)?;
}
list_436.finish();
}
#[allow(unused_mut)]
let mut scope_438 = writer.prefix("DedicatedHostId");
if let Some(var_439) = &input.dedicated_host_ids {
let mut list_441 = scope_438.start_list(true, Some("item"));
for item_440 in var_439 {
#[allow(unused_mut)]
let mut entry_442 = list_441.entry();
entry_442.string(item_440);
}
list_441.finish();
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fast_launch_snapshot_configuration_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FastLaunchSnapshotConfigurationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_443 = writer.prefix("TargetResourceCount");
if let Some(var_444) = &input.target_resource_count {
scope_443.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_444).into()),
);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_fast_launch_launch_template_specification_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::FastLaunchLaunchTemplateSpecificationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_445 = writer.prefix("LaunchTemplateId");
if let Some(var_446) = &input.launch_template_id {
scope_445.string(var_446);
}
#[allow(unused_mut)]
let mut scope_447 = writer.prefix("LaunchTemplateName");
if let Some(var_448) = &input.launch_template_name {
scope_447.string(var_448);
}
#[allow(unused_mut)]
let mut scope_449 = writer.prefix("Version");
if let Some(var_450) = &input.version {
scope_449.string(var_450);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_export_task_s3_location_request(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::ExportTaskS3LocationRequest,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_451 = writer.prefix("S3Bucket");
if let Some(var_452) = &input.s3_bucket {
scope_451.string(var_452);
}
#[allow(unused_mut)]
let mut scope_453 = writer.prefix("S3Prefix");
if let Some(var_454) = &input.s3_prefix {
scope_453.string(var_454);
}
Ok(())
}
#[allow(unused_mut)]
pub fn serialize_structure_crate_model_integrate_services(
mut writer: aws_smithy_query::QueryValueWriter,
input: &crate::model::IntegrateServices,
) -> Result<(), aws_smithy_http::operation::error::SerializationError> {
#[allow(unused_mut)]
let mut scope_455 = writer.prefix("AthenaIntegration");
if let Some(var_456) = &input.athena_integrations {
let mut list_458 = scope_455.start_list(true, Some("item"));
for item_457 in var_456 {
#[allow(unused_mut)]
let mut entry_459 = list_458.entry();
crate::query_ser::serialize_structure_crate_model_athena_integration(
entry_459, item_457,
)?;
}
list_458.finish();
}
Ok(())
}
#[allow(unused_mut)]
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(())
}
16206 16207 16208 16209 16210 16211 16212 16213 16214 16215 16216 16217 16218 16219 16220 16221 16222 16223 16224 16225 16226 16227 16228 16229 16230 16231 16232 16233 16234 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 16246 16247 16248 16249 16250 16251 16252 16253 16254 16255 16256 16257 16258 16259 16260 16261 16262 16263 16264 16265 16266 16267 16268 16269 16270 16271 16272 16273 16274 16275 16276 16277 16278
pub fn serialize_operation_crate_operation_get_spot_placement_scores(
input: &crate::input::GetSpotPlacementScoresInput,
) -> Result<aws_smithy_http::body::SdkBody, aws_smithy_http::operation::error::SerializationError> {
let mut out = String::new();
#[allow(unused_mut)]
let mut writer =
aws_smithy_query::QueryWriter::new(&mut out, "GetSpotPlacementScores", "2016-11-15");
#[allow(unused_mut)]
let mut scope_4537 = writer.prefix("InstanceType");
if let Some(var_4538) = &input.instance_types {
let mut list_4540 = scope_4537.start_list(true, None);
for item_4539 in var_4538 {
#[allow(unused_mut)]
let mut entry_4541 = list_4540.entry();
entry_4541.string(item_4539);
}
list_4540.finish();
}
#[allow(unused_mut)]
let mut scope_4542 = writer.prefix("TargetCapacity");
if let Some(var_4543) = &input.target_capacity {
scope_4542.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_4543).into()),
);
}
#[allow(unused_mut)]
let mut scope_4544 = writer.prefix("TargetCapacityUnitType");
if let Some(var_4545) = &input.target_capacity_unit_type {
scope_4544.string(var_4545.as_str());
}
#[allow(unused_mut)]
let mut scope_4546 = writer.prefix("SingleAvailabilityZone");
if let Some(var_4547) = &input.single_availability_zone {
scope_4546.boolean(*var_4547);
}
#[allow(unused_mut)]
let mut scope_4548 = writer.prefix("RegionName");
if let Some(var_4549) = &input.region_names {
let mut list_4551 = scope_4548.start_list(true, None);
for item_4550 in var_4549 {
#[allow(unused_mut)]
let mut entry_4552 = list_4551.entry();
entry_4552.string(item_4550);
}
list_4551.finish();
}
#[allow(unused_mut)]
let mut scope_4553 = writer.prefix("InstanceRequirementsWithMetadata");
if let Some(var_4554) = &input.instance_requirements_with_metadata {
crate::query_ser::serialize_structure_crate_model_instance_requirements_with_metadata_request(scope_4553, var_4554)?;
}
#[allow(unused_mut)]
let mut scope_4555 = writer.prefix("DryRun");
if let Some(var_4556) = &input.dry_run {
scope_4555.boolean(*var_4556);
}
#[allow(unused_mut)]
let mut scope_4557 = writer.prefix("MaxResults");
if let Some(var_4558) = &input.max_results {
scope_4557.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_4558).into()),
);
}
#[allow(unused_mut)]
let mut scope_4559 = writer.prefix("NextToken");
if let Some(var_4560) = &input.next_token {
scope_4559.string(var_4560);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
Trait Implementations§
source§impl AsRef<str> for TargetCapacityUnitType
impl AsRef<str> for TargetCapacityUnitType
source§impl Clone for TargetCapacityUnitType
impl Clone for TargetCapacityUnitType
source§fn clone(&self) -> TargetCapacityUnitType
fn clone(&self) -> TargetCapacityUnitType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TargetCapacityUnitType
impl Debug for TargetCapacityUnitType
source§impl From<&str> for TargetCapacityUnitType
impl From<&str> for TargetCapacityUnitType
source§impl FromStr for TargetCapacityUnitType
impl FromStr for TargetCapacityUnitType
source§impl Hash for TargetCapacityUnitType
impl Hash for TargetCapacityUnitType
source§impl Ord for TargetCapacityUnitType
impl Ord for TargetCapacityUnitType
source§fn cmp(&self, other: &TargetCapacityUnitType) -> Ordering
fn cmp(&self, other: &TargetCapacityUnitType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<TargetCapacityUnitType> for TargetCapacityUnitType
impl PartialEq<TargetCapacityUnitType> for TargetCapacityUnitType
source§fn eq(&self, other: &TargetCapacityUnitType) -> bool
fn eq(&self, other: &TargetCapacityUnitType) -> bool
source§impl PartialOrd<TargetCapacityUnitType> for TargetCapacityUnitType
impl PartialOrd<TargetCapacityUnitType> for TargetCapacityUnitType
source§fn partial_cmp(&self, other: &TargetCapacityUnitType) -> Option<Ordering>
fn partial_cmp(&self, other: &TargetCapacityUnitType) -> 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 TargetCapacityUnitType
impl StructuralEq for TargetCapacityUnitType
impl StructuralPartialEq for TargetCapacityUnitType
Auto Trait Implementations§
impl RefUnwindSafe for TargetCapacityUnitType
impl Send for TargetCapacityUnitType
impl Sync for TargetCapacityUnitType
impl Unpin for TargetCapacityUnitType
impl UnwindSafe for TargetCapacityUnitType
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.