#[non_exhaustive]
pub enum DefaultRouteTableAssociationValue {
Disable,
Enable,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against DefaultRouteTableAssociationValue
, 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 defaultroutetableassociationvalue = unimplemented!();
match defaultroutetableassociationvalue {
DefaultRouteTableAssociationValue::Disable => { /* ... */ },
DefaultRouteTableAssociationValue::Enable => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when defaultroutetableassociationvalue
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant DefaultRouteTableAssociationValue::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
DefaultRouteTableAssociationValue::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 DefaultRouteTableAssociationValue::NewFeature
is defined.
Specifically, when defaultroutetableassociationvalue
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on DefaultRouteTableAssociationValue::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
Disable
Enable
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl DefaultRouteTableAssociationValue
impl DefaultRouteTableAssociationValue
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
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
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(())
}
Trait Implementations§
source§impl AsRef<str> for DefaultRouteTableAssociationValue
impl AsRef<str> for DefaultRouteTableAssociationValue
source§impl Clone for DefaultRouteTableAssociationValue
impl Clone for DefaultRouteTableAssociationValue
source§fn clone(&self) -> DefaultRouteTableAssociationValue
fn clone(&self) -> DefaultRouteTableAssociationValue
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl From<&str> for DefaultRouteTableAssociationValue
impl From<&str> for DefaultRouteTableAssociationValue
source§impl Ord for DefaultRouteTableAssociationValue
impl Ord for DefaultRouteTableAssociationValue
source§fn cmp(&self, other: &DefaultRouteTableAssociationValue) -> Ordering
fn cmp(&self, other: &DefaultRouteTableAssociationValue) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<DefaultRouteTableAssociationValue> for DefaultRouteTableAssociationValue
impl PartialEq<DefaultRouteTableAssociationValue> for DefaultRouteTableAssociationValue
source§fn eq(&self, other: &DefaultRouteTableAssociationValue) -> bool
fn eq(&self, other: &DefaultRouteTableAssociationValue) -> bool
source§impl PartialOrd<DefaultRouteTableAssociationValue> for DefaultRouteTableAssociationValue
impl PartialOrd<DefaultRouteTableAssociationValue> for DefaultRouteTableAssociationValue
source§fn partial_cmp(
&self,
other: &DefaultRouteTableAssociationValue
) -> Option<Ordering>
fn partial_cmp(
&self,
other: &DefaultRouteTableAssociationValue
) -> 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 DefaultRouteTableAssociationValue
impl StructuralEq for DefaultRouteTableAssociationValue
impl StructuralPartialEq for DefaultRouteTableAssociationValue
Auto Trait Implementations§
impl RefUnwindSafe for DefaultRouteTableAssociationValue
impl Send for DefaultRouteTableAssociationValue
impl Sync for DefaultRouteTableAssociationValue
impl Unpin for DefaultRouteTableAssociationValue
impl UnwindSafe for DefaultRouteTableAssociationValue
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.