Enum aws_sdk_ec2::model::ShutdownBehavior
source · #[non_exhaustive]
pub enum ShutdownBehavior {
Stop,
Terminate,
Unknown(UnknownVariantValue),
}
Expand description
When writing a match expression against ShutdownBehavior
, 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 shutdownbehavior = unimplemented!();
match shutdownbehavior {
ShutdownBehavior::Stop => { /* ... */ },
ShutdownBehavior::Terminate => { /* ... */ },
other @ _ if other.as_str() == "NewFeature" => { /* handles a case for `NewFeature` */ },
_ => { /* ... */ },
}
The above code demonstrates that when shutdownbehavior
represents
NewFeature
, the execution path will lead to the second last match arm,
even though the enum does not contain a variant ShutdownBehavior::NewFeature
in the current version of SDK. The reason is that the variable other
,
created by the @
operator, is bound to
ShutdownBehavior::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 ShutdownBehavior::NewFeature
is defined.
Specifically, when shutdownbehavior
represents NewFeature
,
the execution path will hit the second last match arm as before by virtue of
calling as_str
on ShutdownBehavior::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
Stop
Terminate
Unknown(UnknownVariantValue)
Unknown
contains new variants that have been added since this code was generated.
Implementations§
source§impl ShutdownBehavior
impl ShutdownBehavior
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
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
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(())
}
21594 21595 21596 21597 21598 21599 21600 21601 21602 21603 21604 21605 21606 21607 21608 21609 21610 21611 21612 21613 21614 21615 21616 21617 21618 21619 21620 21621 21622 21623 21624 21625 21626 21627 21628 21629 21630 21631 21632 21633 21634 21635 21636 21637 21638 21639 21640 21641 21642 21643 21644 21645 21646 21647 21648 21649 21650 21651 21652 21653 21654 21655 21656 21657 21658 21659 21660 21661 21662 21663 21664 21665 21666 21667 21668 21669 21670 21671 21672 21673 21674 21675 21676 21677 21678 21679 21680 21681 21682 21683 21684 21685 21686 21687 21688 21689 21690 21691 21692 21693 21694 21695 21696 21697 21698 21699 21700 21701 21702 21703 21704 21705 21706 21707 21708 21709 21710 21711 21712 21713 21714 21715 21716 21717 21718 21719 21720 21721 21722 21723 21724 21725 21726 21727 21728 21729 21730 21731 21732 21733 21734 21735 21736 21737 21738 21739 21740 21741 21742 21743 21744 21745 21746 21747 21748 21749 21750 21751 21752 21753 21754 21755 21756 21757 21758 21759 21760 21761 21762 21763 21764 21765 21766 21767 21768 21769 21770 21771 21772 21773 21774 21775 21776 21777 21778 21779 21780 21781 21782 21783 21784 21785 21786 21787 21788 21789 21790 21791 21792 21793 21794 21795 21796 21797 21798 21799 21800 21801 21802 21803 21804 21805 21806 21807 21808 21809 21810 21811 21812 21813 21814 21815 21816 21817 21818 21819 21820 21821 21822 21823 21824 21825 21826 21827 21828 21829 21830 21831 21832 21833 21834 21835 21836 21837 21838 21839 21840 21841 21842 21843 21844 21845 21846 21847 21848 21849 21850 21851 21852 21853 21854 21855 21856 21857 21858 21859 21860 21861 21862 21863 21864 21865 21866 21867 21868 21869 21870 21871 21872 21873 21874 21875 21876 21877 21878 21879 21880 21881 21882 21883 21884 21885 21886 21887 21888 21889 21890 21891 21892 21893 21894 21895 21896 21897 21898 21899 21900 21901
pub fn serialize_operation_crate_operation_run_instances(
input: &crate::input::RunInstancesInput,
) -> 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, "RunInstances", "2016-11-15");
#[allow(unused_mut)]
let mut scope_6074 = writer.prefix("BlockDeviceMapping");
if let Some(var_6075) = &input.block_device_mappings {
let mut list_6077 = scope_6074.start_list(true, Some("BlockDeviceMapping"));
for item_6076 in var_6075 {
#[allow(unused_mut)]
let mut entry_6078 = list_6077.entry();
crate::query_ser::serialize_structure_crate_model_block_device_mapping(
entry_6078, item_6076,
)?;
}
list_6077.finish();
}
#[allow(unused_mut)]
let mut scope_6079 = writer.prefix("ImageId");
if let Some(var_6080) = &input.image_id {
scope_6079.string(var_6080);
}
#[allow(unused_mut)]
let mut scope_6081 = writer.prefix("InstanceType");
if let Some(var_6082) = &input.instance_type {
scope_6081.string(var_6082.as_str());
}
#[allow(unused_mut)]
let mut scope_6083 = writer.prefix("Ipv6AddressCount");
if let Some(var_6084) = &input.ipv6_address_count {
scope_6083.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_6084).into()),
);
}
#[allow(unused_mut)]
let mut scope_6085 = writer.prefix("Ipv6Address");
if let Some(var_6086) = &input.ipv6_addresses {
let mut list_6088 = scope_6085.start_list(true, Some("item"));
for item_6087 in var_6086 {
#[allow(unused_mut)]
let mut entry_6089 = list_6088.entry();
crate::query_ser::serialize_structure_crate_model_instance_ipv6_address(
entry_6089, item_6087,
)?;
}
list_6088.finish();
}
#[allow(unused_mut)]
let mut scope_6090 = writer.prefix("KernelId");
if let Some(var_6091) = &input.kernel_id {
scope_6090.string(var_6091);
}
#[allow(unused_mut)]
let mut scope_6092 = writer.prefix("KeyName");
if let Some(var_6093) = &input.key_name {
scope_6092.string(var_6093);
}
#[allow(unused_mut)]
let mut scope_6094 = writer.prefix("MaxCount");
if let Some(var_6095) = &input.max_count {
scope_6094.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_6095).into()),
);
}
#[allow(unused_mut)]
let mut scope_6096 = writer.prefix("MinCount");
if let Some(var_6097) = &input.min_count {
scope_6096.number(
#[allow(clippy::useless_conversion)]
aws_smithy_types::Number::NegInt((*var_6097).into()),
);
}
#[allow(unused_mut)]
let mut scope_6098 = writer.prefix("Monitoring");
if let Some(var_6099) = &input.monitoring {
crate::query_ser::serialize_structure_crate_model_run_instances_monitoring_enabled(
scope_6098, var_6099,
)?;
}
#[allow(unused_mut)]
let mut scope_6100 = writer.prefix("Placement");
if let Some(var_6101) = &input.placement {
crate::query_ser::serialize_structure_crate_model_placement(scope_6100, var_6101)?;
}
#[allow(unused_mut)]
let mut scope_6102 = writer.prefix("RamdiskId");
if let Some(var_6103) = &input.ramdisk_id {
scope_6102.string(var_6103);
}
#[allow(unused_mut)]
let mut scope_6104 = writer.prefix("SecurityGroupId");
if let Some(var_6105) = &input.security_group_ids {
let mut list_6107 = scope_6104.start_list(true, Some("SecurityGroupId"));
for item_6106 in var_6105 {
#[allow(unused_mut)]
let mut entry_6108 = list_6107.entry();
entry_6108.string(item_6106);
}
list_6107.finish();
}
#[allow(unused_mut)]
let mut scope_6109 = writer.prefix("SecurityGroup");
if let Some(var_6110) = &input.security_groups {
let mut list_6112 = scope_6109.start_list(true, Some("SecurityGroup"));
for item_6111 in var_6110 {
#[allow(unused_mut)]
let mut entry_6113 = list_6112.entry();
entry_6113.string(item_6111);
}
list_6112.finish();
}
#[allow(unused_mut)]
let mut scope_6114 = writer.prefix("SubnetId");
if let Some(var_6115) = &input.subnet_id {
scope_6114.string(var_6115);
}
#[allow(unused_mut)]
let mut scope_6116 = writer.prefix("UserData");
if let Some(var_6117) = &input.user_data {
scope_6116.string(var_6117);
}
#[allow(unused_mut)]
let mut scope_6118 = writer.prefix("AdditionalInfo");
if let Some(var_6119) = &input.additional_info {
scope_6118.string(var_6119);
}
#[allow(unused_mut)]
let mut scope_6120 = writer.prefix("ClientToken");
if let Some(var_6121) = &input.client_token {
scope_6120.string(var_6121);
}
#[allow(unused_mut)]
let mut scope_6122 = writer.prefix("DisableApiTermination");
if let Some(var_6123) = &input.disable_api_termination {
scope_6122.boolean(*var_6123);
}
#[allow(unused_mut)]
let mut scope_6124 = writer.prefix("DryRun");
if let Some(var_6125) = &input.dry_run {
scope_6124.boolean(*var_6125);
}
#[allow(unused_mut)]
let mut scope_6126 = writer.prefix("EbsOptimized");
if let Some(var_6127) = &input.ebs_optimized {
scope_6126.boolean(*var_6127);
}
#[allow(unused_mut)]
let mut scope_6128 = writer.prefix("IamInstanceProfile");
if let Some(var_6129) = &input.iam_instance_profile {
crate::query_ser::serialize_structure_crate_model_iam_instance_profile_specification(
scope_6128, var_6129,
)?;
}
#[allow(unused_mut)]
let mut scope_6130 = writer.prefix("InstanceInitiatedShutdownBehavior");
if let Some(var_6131) = &input.instance_initiated_shutdown_behavior {
scope_6130.string(var_6131.as_str());
}
#[allow(unused_mut)]
let mut scope_6132 = writer.prefix("NetworkInterface");
if let Some(var_6133) = &input.network_interfaces {
let mut list_6135 = scope_6132.start_list(true, Some("item"));
for item_6134 in var_6133 {
#[allow(unused_mut)]
let mut entry_6136 = list_6135.entry();
crate::query_ser::serialize_structure_crate_model_instance_network_interface_specification(entry_6136, item_6134)?;
}
list_6135.finish();
}
#[allow(unused_mut)]
let mut scope_6137 = writer.prefix("PrivateIpAddress");
if let Some(var_6138) = &input.private_ip_address {
scope_6137.string(var_6138);
}
#[allow(unused_mut)]
let mut scope_6139 = writer.prefix("ElasticGpuSpecification");
if let Some(var_6140) = &input.elastic_gpu_specification {
let mut list_6142 = scope_6139.start_list(true, Some("item"));
for item_6141 in var_6140 {
#[allow(unused_mut)]
let mut entry_6143 = list_6142.entry();
crate::query_ser::serialize_structure_crate_model_elastic_gpu_specification(
entry_6143, item_6141,
)?;
}
list_6142.finish();
}
#[allow(unused_mut)]
let mut scope_6144 = writer.prefix("ElasticInferenceAccelerator");
if let Some(var_6145) = &input.elastic_inference_accelerators {
let mut list_6147 = scope_6144.start_list(true, Some("item"));
for item_6146 in var_6145 {
#[allow(unused_mut)]
let mut entry_6148 = list_6147.entry();
crate::query_ser::serialize_structure_crate_model_elastic_inference_accelerator(
entry_6148, item_6146,
)?;
}
list_6147.finish();
}
#[allow(unused_mut)]
let mut scope_6149 = writer.prefix("TagSpecification");
if let Some(var_6150) = &input.tag_specifications {
let mut list_6152 = scope_6149.start_list(true, Some("item"));
for item_6151 in var_6150 {
#[allow(unused_mut)]
let mut entry_6153 = list_6152.entry();
crate::query_ser::serialize_structure_crate_model_tag_specification(
entry_6153, item_6151,
)?;
}
list_6152.finish();
}
#[allow(unused_mut)]
let mut scope_6154 = writer.prefix("LaunchTemplate");
if let Some(var_6155) = &input.launch_template {
crate::query_ser::serialize_structure_crate_model_launch_template_specification(
scope_6154, var_6155,
)?;
}
#[allow(unused_mut)]
let mut scope_6156 = writer.prefix("InstanceMarketOptions");
if let Some(var_6157) = &input.instance_market_options {
crate::query_ser::serialize_structure_crate_model_instance_market_options_request(
scope_6156, var_6157,
)?;
}
#[allow(unused_mut)]
let mut scope_6158 = writer.prefix("CreditSpecification");
if let Some(var_6159) = &input.credit_specification {
crate::query_ser::serialize_structure_crate_model_credit_specification_request(
scope_6158, var_6159,
)?;
}
#[allow(unused_mut)]
let mut scope_6160 = writer.prefix("CpuOptions");
if let Some(var_6161) = &input.cpu_options {
crate::query_ser::serialize_structure_crate_model_cpu_options_request(
scope_6160, var_6161,
)?;
}
#[allow(unused_mut)]
let mut scope_6162 = writer.prefix("CapacityReservationSpecification");
if let Some(var_6163) = &input.capacity_reservation_specification {
crate::query_ser::serialize_structure_crate_model_capacity_reservation_specification(
scope_6162, var_6163,
)?;
}
#[allow(unused_mut)]
let mut scope_6164 = writer.prefix("HibernationOptions");
if let Some(var_6165) = &input.hibernation_options {
crate::query_ser::serialize_structure_crate_model_hibernation_options_request(
scope_6164, var_6165,
)?;
}
#[allow(unused_mut)]
let mut scope_6166 = writer.prefix("LicenseSpecification");
if let Some(var_6167) = &input.license_specifications {
let mut list_6169 = scope_6166.start_list(true, Some("item"));
for item_6168 in var_6167 {
#[allow(unused_mut)]
let mut entry_6170 = list_6169.entry();
crate::query_ser::serialize_structure_crate_model_license_configuration_request(
entry_6170, item_6168,
)?;
}
list_6169.finish();
}
#[allow(unused_mut)]
let mut scope_6171 = writer.prefix("MetadataOptions");
if let Some(var_6172) = &input.metadata_options {
crate::query_ser::serialize_structure_crate_model_instance_metadata_options_request(
scope_6171, var_6172,
)?;
}
#[allow(unused_mut)]
let mut scope_6173 = writer.prefix("EnclaveOptions");
if let Some(var_6174) = &input.enclave_options {
crate::query_ser::serialize_structure_crate_model_enclave_options_request(
scope_6173, var_6174,
)?;
}
#[allow(unused_mut)]
let mut scope_6175 = writer.prefix("PrivateDnsNameOptions");
if let Some(var_6176) = &input.private_dns_name_options {
crate::query_ser::serialize_structure_crate_model_private_dns_name_options_request(
scope_6175, var_6176,
)?;
}
#[allow(unused_mut)]
let mut scope_6177 = writer.prefix("MaintenanceOptions");
if let Some(var_6178) = &input.maintenance_options {
crate::query_ser::serialize_structure_crate_model_instance_maintenance_options_request(
scope_6177, var_6178,
)?;
}
#[allow(unused_mut)]
let mut scope_6179 = writer.prefix("DisableApiStop");
if let Some(var_6180) = &input.disable_api_stop {
scope_6179.boolean(*var_6180);
}
writer.finish();
Ok(aws_smithy_http::body::SdkBody::from(out))
}
Trait Implementations§
source§impl AsRef<str> for ShutdownBehavior
impl AsRef<str> for ShutdownBehavior
source§impl Clone for ShutdownBehavior
impl Clone for ShutdownBehavior
source§fn clone(&self) -> ShutdownBehavior
fn clone(&self) -> ShutdownBehavior
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ShutdownBehavior
impl Debug for ShutdownBehavior
source§impl From<&str> for ShutdownBehavior
impl From<&str> for ShutdownBehavior
source§impl FromStr for ShutdownBehavior
impl FromStr for ShutdownBehavior
source§impl Hash for ShutdownBehavior
impl Hash for ShutdownBehavior
source§impl Ord for ShutdownBehavior
impl Ord for ShutdownBehavior
source§fn cmp(&self, other: &ShutdownBehavior) -> Ordering
fn cmp(&self, other: &ShutdownBehavior) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq<ShutdownBehavior> for ShutdownBehavior
impl PartialEq<ShutdownBehavior> for ShutdownBehavior
source§fn eq(&self, other: &ShutdownBehavior) -> bool
fn eq(&self, other: &ShutdownBehavior) -> bool
source§impl PartialOrd<ShutdownBehavior> for ShutdownBehavior
impl PartialOrd<ShutdownBehavior> for ShutdownBehavior
source§fn partial_cmp(&self, other: &ShutdownBehavior) -> Option<Ordering>
fn partial_cmp(&self, other: &ShutdownBehavior) -> 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 ShutdownBehavior
impl StructuralEq for ShutdownBehavior
impl StructuralPartialEq for ShutdownBehavior
Auto Trait Implementations§
impl RefUnwindSafe for ShutdownBehavior
impl Send for ShutdownBehavior
impl Sync for ShutdownBehavior
impl Unpin for ShutdownBehavior
impl UnwindSafe for ShutdownBehavior
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.