aws-sdk-snowdevicemanagement 0.2.0

AWS SDK for AWS Snow Device Management
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about the task assigned to one or many devices.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TaskSummary {
    /// <p>The task ID.</p>
    pub task_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub task_arn: std::option::Option<std::string::String>,
    /// <p>The state of the task assigned to one or many devices.</p>
    pub state: std::option::Option<crate::model::TaskState>,
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
    /// in different ways, such as by purpose, owner, or environment.</p>
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl TaskSummary {
    /// <p>The task ID.</p>
    pub fn task_id(&self) -> std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the task.</p>
    pub fn task_arn(&self) -> std::option::Option<&str> {
        self.task_arn.as_deref()
    }
    /// <p>The state of the task assigned to one or many devices.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::TaskState> {
        self.state.as_ref()
    }
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
    /// in different ways, such as by purpose, owner, or environment.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
impl std::fmt::Debug for TaskSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("TaskSummary");
        formatter.field("task_id", &self.task_id);
        formatter.field("task_arn", &self.task_arn);
        formatter.field("state", &self.state);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
/// See [`TaskSummary`](crate::model::TaskSummary)
pub mod task_summary {
    /// A builder for [`TaskSummary`](crate::model::TaskSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) task_id: std::option::Option<std::string::String>,
        pub(crate) task_arn: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::TaskState>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The task ID.</p>
        pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.task_id = Some(input.into());
            self
        }
        /// <p>The task ID.</p>
        pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.task_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the task.</p>
        pub fn task_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.task_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the task.</p>
        pub fn set_task_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.task_arn = input;
            self
        }
        /// <p>The state of the task assigned to one or many devices.</p>
        pub fn state(mut self, input: crate::model::TaskState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the task assigned to one or many devices.</p>
        pub fn set_state(mut self, input: std::option::Option<crate::model::TaskState>) -> Self {
            self.state = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
        /// in different ways, such as by purpose, owner, or environment.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
        /// in different ways, such as by purpose, owner, or environment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`TaskSummary`](crate::model::TaskSummary)
        pub fn build(self) -> crate::model::TaskSummary {
            crate::model::TaskSummary {
                task_id: self.task_id,
                task_arn: self.task_arn,
                state: self.state,
                tags: self.tags,
            }
        }
    }
}
impl TaskSummary {
    /// Creates a new builder-style object to manufacture [`TaskSummary`](crate::model::TaskSummary)
    pub fn builder() -> crate::model::task_summary::Builder {
        crate::model::task_summary::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum TaskState {
    #[allow(missing_docs)] // documentation missing in model
    Canceled,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    InProgress,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for TaskState {
    fn from(s: &str) -> Self {
        match s {
            "CANCELED" => TaskState::Canceled,
            "COMPLETED" => TaskState::Completed,
            "IN_PROGRESS" => TaskState::InProgress,
            other => TaskState::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for TaskState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(TaskState::from(s))
    }
}
impl TaskState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            TaskState::Canceled => "CANCELED",
            TaskState::Completed => "COMPLETED",
            TaskState::InProgress => "IN_PROGRESS",
            TaskState::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["CANCELED", "COMPLETED", "IN_PROGRESS"]
    }
}
impl AsRef<str> for TaskState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The command given to the device to execute.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub enum Command {
    /// <p>Reboots the device.</p>
    Reboot(crate::model::Reboot),
    /// <p>Unlocks the device.</p>
    Unlock(crate::model::Unlock),
    /// The `Unknown` variant represents cases where new union variant was received. Consider upgrading the SDK to the latest available version.
    /// An unknown enum variant
    ///
    /// _Note: If you encounter this error, consider upgrading your SDK to the latest version._
    /// The `Unknown` variant represents cases where the server sent a value that wasn't recognized
    /// by the client. This can happen when the server adds new functionality, but the client has not been updated.
    /// To investigate this, consider turning on debug logging to print the raw HTTP response.
    #[non_exhaustive]
    Unknown,
}
impl Command {
    /// Tries to convert the enum instance into [`Reboot`](crate::model::Command::Reboot), extracting the inner [`Reboot`](crate::model::Reboot).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_reboot(&self) -> std::result::Result<&crate::model::Reboot, &Self> {
        if let Command::Reboot(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`Reboot`](crate::model::Command::Reboot).
    pub fn is_reboot(&self) -> bool {
        self.as_reboot().is_ok()
    }
    /// Tries to convert the enum instance into [`Unlock`](crate::model::Command::Unlock), extracting the inner [`Unlock`](crate::model::Unlock).
    /// Returns `Err(&Self)` if it can't be converted.
    pub fn as_unlock(&self) -> std::result::Result<&crate::model::Unlock, &Self> {
        if let Command::Unlock(val) = &self {
            Ok(val)
        } else {
            Err(self)
        }
    }
    /// Returns true if this is a [`Unlock`](crate::model::Command::Unlock).
    pub fn is_unlock(&self) -> bool {
        self.as_unlock().is_ok()
    }
    /// Returns true if the enum instance is the `Unknown` variant.
    pub fn is_unknown(&self) -> bool {
        matches!(self, Self::Unknown)
    }
}

/// <p>A structure used to reboot the device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Reboot {}
impl std::fmt::Debug for Reboot {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Reboot");
        formatter.finish()
    }
}
/// See [`Reboot`](crate::model::Reboot)
pub mod reboot {
    /// A builder for [`Reboot`](crate::model::Reboot)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`Reboot`](crate::model::Reboot)
        pub fn build(self) -> crate::model::Reboot {
            crate::model::Reboot {}
        }
    }
}
impl Reboot {
    /// Creates a new builder-style object to manufacture [`Reboot`](crate::model::Reboot)
    pub fn builder() -> crate::model::reboot::Builder {
        crate::model::reboot::Builder::default()
    }
}

/// <p>A structure used to unlock a device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Unlock {}
impl std::fmt::Debug for Unlock {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Unlock");
        formatter.finish()
    }
}
/// See [`Unlock`](crate::model::Unlock)
pub mod unlock {
    /// A builder for [`Unlock`](crate::model::Unlock)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {}
    impl Builder {
        /// Consumes the builder and constructs a [`Unlock`](crate::model::Unlock)
        pub fn build(self) -> crate::model::Unlock {
            crate::model::Unlock {}
        }
    }
}
impl Unlock {
    /// Creates a new builder-style object to manufacture [`Unlock`](crate::model::Unlock)
    pub fn builder() -> crate::model::unlock::Builder {
        crate::model::unlock::Builder::default()
    }
}

/// <p>The summary of a task execution on a specified device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExecutionSummary {
    /// <p>The ID of the task.</p>
    pub task_id: std::option::Option<std::string::String>,
    /// <p>The ID of the execution.</p>
    pub execution_id: std::option::Option<std::string::String>,
    /// <p>The ID of the managed device that the task is being executed on.</p>
    pub managed_device_id: std::option::Option<std::string::String>,
    /// <p>The state of the execution.</p>
    pub state: std::option::Option<crate::model::ExecutionState>,
}
impl ExecutionSummary {
    /// <p>The ID of the task.</p>
    pub fn task_id(&self) -> std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The ID of the execution.</p>
    pub fn execution_id(&self) -> std::option::Option<&str> {
        self.execution_id.as_deref()
    }
    /// <p>The ID of the managed device that the task is being executed on.</p>
    pub fn managed_device_id(&self) -> std::option::Option<&str> {
        self.managed_device_id.as_deref()
    }
    /// <p>The state of the execution.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::ExecutionState> {
        self.state.as_ref()
    }
}
impl std::fmt::Debug for ExecutionSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ExecutionSummary");
        formatter.field("task_id", &self.task_id);
        formatter.field("execution_id", &self.execution_id);
        formatter.field("managed_device_id", &self.managed_device_id);
        formatter.field("state", &self.state);
        formatter.finish()
    }
}
/// See [`ExecutionSummary`](crate::model::ExecutionSummary)
pub mod execution_summary {
    /// A builder for [`ExecutionSummary`](crate::model::ExecutionSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) task_id: std::option::Option<std::string::String>,
        pub(crate) execution_id: std::option::Option<std::string::String>,
        pub(crate) managed_device_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::ExecutionState>,
    }
    impl Builder {
        /// <p>The ID of the task.</p>
        pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.task_id = Some(input.into());
            self
        }
        /// <p>The ID of the task.</p>
        pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.task_id = input;
            self
        }
        /// <p>The ID of the execution.</p>
        pub fn execution_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.execution_id = Some(input.into());
            self
        }
        /// <p>The ID of the execution.</p>
        pub fn set_execution_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.execution_id = input;
            self
        }
        /// <p>The ID of the managed device that the task is being executed on.</p>
        pub fn managed_device_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.managed_device_id = Some(input.into());
            self
        }
        /// <p>The ID of the managed device that the task is being executed on.</p>
        pub fn set_managed_device_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.managed_device_id = input;
            self
        }
        /// <p>The state of the execution.</p>
        pub fn state(mut self, input: crate::model::ExecutionState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The state of the execution.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::ExecutionState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// Consumes the builder and constructs a [`ExecutionSummary`](crate::model::ExecutionSummary)
        pub fn build(self) -> crate::model::ExecutionSummary {
            crate::model::ExecutionSummary {
                task_id: self.task_id,
                execution_id: self.execution_id,
                managed_device_id: self.managed_device_id,
                state: self.state,
            }
        }
    }
}
impl ExecutionSummary {
    /// Creates a new builder-style object to manufacture [`ExecutionSummary`](crate::model::ExecutionSummary)
    pub fn builder() -> crate::model::execution_summary::Builder {
        crate::model::execution_summary::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ExecutionState {
    #[allow(missing_docs)] // documentation missing in model
    Canceled,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    InProgress,
    #[allow(missing_docs)] // documentation missing in model
    Queued,
    #[allow(missing_docs)] // documentation missing in model
    Rejected,
    #[allow(missing_docs)] // documentation missing in model
    Succeeded,
    #[allow(missing_docs)] // documentation missing in model
    TimedOut,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ExecutionState {
    fn from(s: &str) -> Self {
        match s {
            "CANCELED" => ExecutionState::Canceled,
            "FAILED" => ExecutionState::Failed,
            "IN_PROGRESS" => ExecutionState::InProgress,
            "QUEUED" => ExecutionState::Queued,
            "REJECTED" => ExecutionState::Rejected,
            "SUCCEEDED" => ExecutionState::Succeeded,
            "TIMED_OUT" => ExecutionState::TimedOut,
            other => ExecutionState::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ExecutionState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ExecutionState::from(s))
    }
}
impl ExecutionState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ExecutionState::Canceled => "CANCELED",
            ExecutionState::Failed => "FAILED",
            ExecutionState::InProgress => "IN_PROGRESS",
            ExecutionState::Queued => "QUEUED",
            ExecutionState::Rejected => "REJECTED",
            ExecutionState::Succeeded => "SUCCEEDED",
            ExecutionState::TimedOut => "TIMED_OUT",
            ExecutionState::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "CANCELED",
            "FAILED",
            "IN_PROGRESS",
            "QUEUED",
            "REJECTED",
            "SUCCEEDED",
            "TIMED_OUT",
        ]
    }
}
impl AsRef<str> for ExecutionState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A summary of a resource available on the device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourceSummary {
    /// <p>The resource type.</p>
    pub resource_type: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub arn: std::option::Option<std::string::String>,
    /// <p>The ID of the resource.</p>
    pub id: std::option::Option<std::string::String>,
}
impl ResourceSummary {
    /// <p>The resource type.</p>
    pub fn resource_type(&self) -> std::option::Option<&str> {
        self.resource_type.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The ID of the resource.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
}
impl std::fmt::Debug for ResourceSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ResourceSummary");
        formatter.field("resource_type", &self.resource_type);
        formatter.field("arn", &self.arn);
        formatter.field("id", &self.id);
        formatter.finish()
    }
}
/// See [`ResourceSummary`](crate::model::ResourceSummary)
pub mod resource_summary {
    /// A builder for [`ResourceSummary`](crate::model::ResourceSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) resource_type: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The resource type.</p>
        pub fn resource_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_type = Some(input.into());
            self
        }
        /// <p>The resource type.</p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the resource.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the resource.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The ID of the resource.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourceSummary`](crate::model::ResourceSummary)
        pub fn build(self) -> crate::model::ResourceSummary {
            crate::model::ResourceSummary {
                resource_type: self.resource_type,
                arn: self.arn,
                id: self.id,
            }
        }
    }
}
impl ResourceSummary {
    /// Creates a new builder-style object to manufacture [`ResourceSummary`](crate::model::ResourceSummary)
    pub fn builder() -> crate::model::resource_summary::Builder {
        crate::model::resource_summary::Builder::default()
    }
}

/// <p>The details about the instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InstanceSummary {
    /// <p>A structure containing details about the instance.</p>
    pub instance: std::option::Option<crate::model::Instance>,
    /// <p>When the instance summary was last updated.</p>
    pub last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
}
impl InstanceSummary {
    /// <p>A structure containing details about the instance.</p>
    pub fn instance(&self) -> std::option::Option<&crate::model::Instance> {
        self.instance.as_ref()
    }
    /// <p>When the instance summary was last updated.</p>
    pub fn last_updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.last_updated_at.as_ref()
    }
}
impl std::fmt::Debug for InstanceSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("InstanceSummary");
        formatter.field("instance", &self.instance);
        formatter.field("last_updated_at", &self.last_updated_at);
        formatter.finish()
    }
}
/// See [`InstanceSummary`](crate::model::InstanceSummary)
pub mod instance_summary {
    /// A builder for [`InstanceSummary`](crate::model::InstanceSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) instance: std::option::Option<crate::model::Instance>,
        pub(crate) last_updated_at: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>A structure containing details about the instance.</p>
        pub fn instance(mut self, input: crate::model::Instance) -> Self {
            self.instance = Some(input);
            self
        }
        /// <p>A structure containing details about the instance.</p>
        pub fn set_instance(mut self, input: std::option::Option<crate::model::Instance>) -> Self {
            self.instance = input;
            self
        }
        /// <p>When the instance summary was last updated.</p>
        pub fn last_updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.last_updated_at = Some(input);
            self
        }
        /// <p>When the instance summary was last updated.</p>
        pub fn set_last_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.last_updated_at = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceSummary`](crate::model::InstanceSummary)
        pub fn build(self) -> crate::model::InstanceSummary {
            crate::model::InstanceSummary {
                instance: self.instance,
                last_updated_at: self.last_updated_at,
            }
        }
    }
}
impl InstanceSummary {
    /// Creates a new builder-style object to manufacture [`InstanceSummary`](crate::model::InstanceSummary)
    pub fn builder() -> crate::model::instance_summary::Builder {
        crate::model::instance_summary::Builder::default()
    }
}

/// <p>The description of an
/// instance.
/// Currently, Amazon EC2 instances are the only supported instance type.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Instance {
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub image_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Machine Image (AMI) launch index, which you can use to find this instance in
    /// the launch group. </p>
    pub ami_launch_index: std::option::Option<i32>,
    /// <p>The ID of the instance.</p>
    pub instance_id: std::option::Option<std::string::String>,
    /// <p>The description of the current state of an instance.</p>
    pub state: std::option::Option<crate::model::InstanceState>,
    /// <p>The instance type.</p>
    pub instance_type: std::option::Option<std::string::String>,
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub private_ip_address: std::option::Option<std::string::String>,
    /// <p>The public IPv4 address assigned to the instance.</p>
    pub public_ip_address: std::option::Option<std::string::String>,
    /// <p>When the instance was created.</p>
    pub created_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>When the instance was last updated.</p>
    pub updated_at: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>Any block device mapping entries for the instance.</p>
    pub block_device_mappings:
        std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
    /// <p>The security groups for the instance.</p>
    pub security_groups: std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
    /// <p>The CPU options for the instance.</p>
    pub cpu_options: std::option::Option<crate::model::CpuOptions>,
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>). </p>
    pub root_device_name: std::option::Option<std::string::String>,
}
impl Instance {
    /// <p>The ID of the AMI used to launch the instance.</p>
    pub fn image_id(&self) -> std::option::Option<&str> {
        self.image_id.as_deref()
    }
    /// <p>The Amazon Machine Image (AMI) launch index, which you can use to find this instance in
    /// the launch group. </p>
    pub fn ami_launch_index(&self) -> std::option::Option<i32> {
        self.ami_launch_index
    }
    /// <p>The ID of the instance.</p>
    pub fn instance_id(&self) -> std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The description of the current state of an instance.</p>
    pub fn state(&self) -> std::option::Option<&crate::model::InstanceState> {
        self.state.as_ref()
    }
    /// <p>The instance type.</p>
    pub fn instance_type(&self) -> std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The private IPv4 address assigned to the instance.</p>
    pub fn private_ip_address(&self) -> std::option::Option<&str> {
        self.private_ip_address.as_deref()
    }
    /// <p>The public IPv4 address assigned to the instance.</p>
    pub fn public_ip_address(&self) -> std::option::Option<&str> {
        self.public_ip_address.as_deref()
    }
    /// <p>When the instance was created.</p>
    pub fn created_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
    /// <p>When the instance was last updated.</p>
    pub fn updated_at(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>Any block device mapping entries for the instance.</p>
    pub fn block_device_mappings(
        &self,
    ) -> std::option::Option<&[crate::model::InstanceBlockDeviceMapping]> {
        self.block_device_mappings.as_deref()
    }
    /// <p>The security groups for the instance.</p>
    pub fn security_groups(&self) -> std::option::Option<&[crate::model::SecurityGroupIdentifier]> {
        self.security_groups.as_deref()
    }
    /// <p>The CPU options for the instance.</p>
    pub fn cpu_options(&self) -> std::option::Option<&crate::model::CpuOptions> {
        self.cpu_options.as_ref()
    }
    /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>). </p>
    pub fn root_device_name(&self) -> std::option::Option<&str> {
        self.root_device_name.as_deref()
    }
}
impl std::fmt::Debug for Instance {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Instance");
        formatter.field("image_id", &self.image_id);
        formatter.field("ami_launch_index", &self.ami_launch_index);
        formatter.field("instance_id", &self.instance_id);
        formatter.field("state", &self.state);
        formatter.field("instance_type", &self.instance_type);
        formatter.field("private_ip_address", &self.private_ip_address);
        formatter.field("public_ip_address", &self.public_ip_address);
        formatter.field("created_at", &self.created_at);
        formatter.field("updated_at", &self.updated_at);
        formatter.field("block_device_mappings", &self.block_device_mappings);
        formatter.field("security_groups", &self.security_groups);
        formatter.field("cpu_options", &self.cpu_options);
        formatter.field("root_device_name", &self.root_device_name);
        formatter.finish()
    }
}
/// See [`Instance`](crate::model::Instance)
pub mod instance {
    /// A builder for [`Instance`](crate::model::Instance)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) image_id: std::option::Option<std::string::String>,
        pub(crate) ami_launch_index: std::option::Option<i32>,
        pub(crate) instance_id: std::option::Option<std::string::String>,
        pub(crate) state: std::option::Option<crate::model::InstanceState>,
        pub(crate) instance_type: std::option::Option<std::string::String>,
        pub(crate) private_ip_address: std::option::Option<std::string::String>,
        pub(crate) public_ip_address: std::option::Option<std::string::String>,
        pub(crate) created_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) updated_at: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) block_device_mappings:
            std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
        pub(crate) security_groups:
            std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
        pub(crate) cpu_options: std::option::Option<crate::model::CpuOptions>,
        pub(crate) root_device_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The ID of the AMI used to launch the instance.</p>
        pub fn image_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.image_id = Some(input.into());
            self
        }
        /// <p>The ID of the AMI used to launch the instance.</p>
        pub fn set_image_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.image_id = input;
            self
        }
        /// <p>The Amazon Machine Image (AMI) launch index, which you can use to find this instance in
        /// the launch group. </p>
        pub fn ami_launch_index(mut self, input: i32) -> Self {
            self.ami_launch_index = Some(input);
            self
        }
        /// <p>The Amazon Machine Image (AMI) launch index, which you can use to find this instance in
        /// the launch group. </p>
        pub fn set_ami_launch_index(mut self, input: std::option::Option<i32>) -> Self {
            self.ami_launch_index = input;
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn instance_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_id = Some(input.into());
            self
        }
        /// <p>The ID of the instance.</p>
        pub fn set_instance_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.instance_id = input;
            self
        }
        /// <p>The description of the current state of an instance.</p>
        pub fn state(mut self, input: crate::model::InstanceState) -> Self {
            self.state = Some(input);
            self
        }
        /// <p>The description of the current state of an instance.</p>
        pub fn set_state(
            mut self,
            input: std::option::Option<crate::model::InstanceState>,
        ) -> Self {
            self.state = input;
            self
        }
        /// <p>The instance type.</p>
        pub fn instance_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.instance_type = Some(input.into());
            self
        }
        /// <p>The instance type.</p>
        pub fn set_instance_type(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.instance_type = input;
            self
        }
        /// <p>The private IPv4 address assigned to the instance.</p>
        pub fn private_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.private_ip_address = Some(input.into());
            self
        }
        /// <p>The private IPv4 address assigned to the instance.</p>
        pub fn set_private_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.private_ip_address = input;
            self
        }
        /// <p>The public IPv4 address assigned to the instance.</p>
        pub fn public_ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.public_ip_address = Some(input.into());
            self
        }
        /// <p>The public IPv4 address assigned to the instance.</p>
        pub fn set_public_ip_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.public_ip_address = input;
            self
        }
        /// <p>When the instance was created.</p>
        pub fn created_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.created_at = Some(input);
            self
        }
        /// <p>When the instance was created.</p>
        pub fn set_created_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.created_at = input;
            self
        }
        /// <p>When the instance was last updated.</p>
        pub fn updated_at(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.updated_at = Some(input);
            self
        }
        /// <p>When the instance was last updated.</p>
        pub fn set_updated_at(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.updated_at = input;
            self
        }
        /// Appends an item to `block_device_mappings`.
        ///
        /// To override the contents of this collection use [`set_block_device_mappings`](Self::set_block_device_mappings).
        ///
        /// <p>Any block device mapping entries for the instance.</p>
        pub fn block_device_mappings(
            mut self,
            input: impl Into<crate::model::InstanceBlockDeviceMapping>,
        ) -> Self {
            let mut v = self.block_device_mappings.unwrap_or_default();
            v.push(input.into());
            self.block_device_mappings = Some(v);
            self
        }
        /// <p>Any block device mapping entries for the instance.</p>
        pub fn set_block_device_mappings(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::InstanceBlockDeviceMapping>>,
        ) -> Self {
            self.block_device_mappings = input;
            self
        }
        /// Appends an item to `security_groups`.
        ///
        /// To override the contents of this collection use [`set_security_groups`](Self::set_security_groups).
        ///
        /// <p>The security groups for the instance.</p>
        pub fn security_groups(
            mut self,
            input: impl Into<crate::model::SecurityGroupIdentifier>,
        ) -> Self {
            let mut v = self.security_groups.unwrap_or_default();
            v.push(input.into());
            self.security_groups = Some(v);
            self
        }
        /// <p>The security groups for the instance.</p>
        pub fn set_security_groups(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SecurityGroupIdentifier>>,
        ) -> Self {
            self.security_groups = input;
            self
        }
        /// <p>The CPU options for the instance.</p>
        pub fn cpu_options(mut self, input: crate::model::CpuOptions) -> Self {
            self.cpu_options = Some(input);
            self
        }
        /// <p>The CPU options for the instance.</p>
        pub fn set_cpu_options(
            mut self,
            input: std::option::Option<crate::model::CpuOptions>,
        ) -> Self {
            self.cpu_options = input;
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>). </p>
        pub fn root_device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.root_device_name = Some(input.into());
            self
        }
        /// <p>The device name of the root device volume (for example, <code>/dev/sda1</code>). </p>
        pub fn set_root_device_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.root_device_name = input;
            self
        }
        /// Consumes the builder and constructs a [`Instance`](crate::model::Instance)
        pub fn build(self) -> crate::model::Instance {
            crate::model::Instance {
                image_id: self.image_id,
                ami_launch_index: self.ami_launch_index,
                instance_id: self.instance_id,
                state: self.state,
                instance_type: self.instance_type,
                private_ip_address: self.private_ip_address,
                public_ip_address: self.public_ip_address,
                created_at: self.created_at,
                updated_at: self.updated_at,
                block_device_mappings: self.block_device_mappings,
                security_groups: self.security_groups,
                cpu_options: self.cpu_options,
                root_device_name: self.root_device_name,
            }
        }
    }
}
impl Instance {
    /// Creates a new builder-style object to manufacture [`Instance`](crate::model::Instance)
    pub fn builder() -> crate::model::instance::Builder {
        crate::model::instance::Builder::default()
    }
}

/// <p>The options for how a device's CPU is configured.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct CpuOptions {
    /// <p>The number of cores that the CPU can use.</p>
    pub core_count: std::option::Option<i32>,
    /// <p>The number of threads per core in the CPU.</p>
    pub threads_per_core: std::option::Option<i32>,
}
impl CpuOptions {
    /// <p>The number of cores that the CPU can use.</p>
    pub fn core_count(&self) -> std::option::Option<i32> {
        self.core_count
    }
    /// <p>The number of threads per core in the CPU.</p>
    pub fn threads_per_core(&self) -> std::option::Option<i32> {
        self.threads_per_core
    }
}
impl std::fmt::Debug for CpuOptions {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("CpuOptions");
        formatter.field("core_count", &self.core_count);
        formatter.field("threads_per_core", &self.threads_per_core);
        formatter.finish()
    }
}
/// See [`CpuOptions`](crate::model::CpuOptions)
pub mod cpu_options {
    /// A builder for [`CpuOptions`](crate::model::CpuOptions)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) core_count: std::option::Option<i32>,
        pub(crate) threads_per_core: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The number of cores that the CPU can use.</p>
        pub fn core_count(mut self, input: i32) -> Self {
            self.core_count = Some(input);
            self
        }
        /// <p>The number of cores that the CPU can use.</p>
        pub fn set_core_count(mut self, input: std::option::Option<i32>) -> Self {
            self.core_count = input;
            self
        }
        /// <p>The number of threads per core in the CPU.</p>
        pub fn threads_per_core(mut self, input: i32) -> Self {
            self.threads_per_core = Some(input);
            self
        }
        /// <p>The number of threads per core in the CPU.</p>
        pub fn set_threads_per_core(mut self, input: std::option::Option<i32>) -> Self {
            self.threads_per_core = input;
            self
        }
        /// Consumes the builder and constructs a [`CpuOptions`](crate::model::CpuOptions)
        pub fn build(self) -> crate::model::CpuOptions {
            crate::model::CpuOptions {
                core_count: self.core_count,
                threads_per_core: self.threads_per_core,
            }
        }
    }
}
impl CpuOptions {
    /// Creates a new builder-style object to manufacture [`CpuOptions`](crate::model::CpuOptions)
    pub fn builder() -> crate::model::cpu_options::Builder {
        crate::model::cpu_options::Builder::default()
    }
}

/// <p>Information about the device's security group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SecurityGroupIdentifier {
    /// <p>The security group ID.</p>
    pub group_id: std::option::Option<std::string::String>,
    /// <p>The security group name.</p>
    pub group_name: std::option::Option<std::string::String>,
}
impl SecurityGroupIdentifier {
    /// <p>The security group ID.</p>
    pub fn group_id(&self) -> std::option::Option<&str> {
        self.group_id.as_deref()
    }
    /// <p>The security group name.</p>
    pub fn group_name(&self) -> std::option::Option<&str> {
        self.group_name.as_deref()
    }
}
impl std::fmt::Debug for SecurityGroupIdentifier {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SecurityGroupIdentifier");
        formatter.field("group_id", &self.group_id);
        formatter.field("group_name", &self.group_name);
        formatter.finish()
    }
}
/// See [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier)
pub mod security_group_identifier {
    /// A builder for [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) group_id: std::option::Option<std::string::String>,
        pub(crate) group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The security group ID.</p>
        pub fn group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_id = Some(input.into());
            self
        }
        /// <p>The security group ID.</p>
        pub fn set_group_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_id = input;
            self
        }
        /// <p>The security group name.</p>
        pub fn group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.group_name = Some(input.into());
            self
        }
        /// <p>The security group name.</p>
        pub fn set_group_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier)
        pub fn build(self) -> crate::model::SecurityGroupIdentifier {
            crate::model::SecurityGroupIdentifier {
                group_id: self.group_id,
                group_name: self.group_name,
            }
        }
    }
}
impl SecurityGroupIdentifier {
    /// Creates a new builder-style object to manufacture [`SecurityGroupIdentifier`](crate::model::SecurityGroupIdentifier)
    pub fn builder() -> crate::model::security_group_identifier::Builder {
        crate::model::security_group_identifier::Builder::default()
    }
}

/// <p>The description of a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InstanceBlockDeviceMapping {
    /// <p>The block device name.</p>
    pub device_name: std::option::Option<std::string::String>,
    /// <p>The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS)
    /// volumes when the instance is launched. </p>
    pub ebs: std::option::Option<crate::model::EbsInstanceBlockDevice>,
}
impl InstanceBlockDeviceMapping {
    /// <p>The block device name.</p>
    pub fn device_name(&self) -> std::option::Option<&str> {
        self.device_name.as_deref()
    }
    /// <p>The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS)
    /// volumes when the instance is launched. </p>
    pub fn ebs(&self) -> std::option::Option<&crate::model::EbsInstanceBlockDevice> {
        self.ebs.as_ref()
    }
}
impl std::fmt::Debug for InstanceBlockDeviceMapping {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("InstanceBlockDeviceMapping");
        formatter.field("device_name", &self.device_name);
        formatter.field("ebs", &self.ebs);
        formatter.finish()
    }
}
/// See [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping)
pub mod instance_block_device_mapping {
    /// A builder for [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) device_name: std::option::Option<std::string::String>,
        pub(crate) ebs: std::option::Option<crate::model::EbsInstanceBlockDevice>,
    }
    impl Builder {
        /// <p>The block device name.</p>
        pub fn device_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.device_name = Some(input.into());
            self
        }
        /// <p>The block device name.</p>
        pub fn set_device_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.device_name = input;
            self
        }
        /// <p>The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS)
        /// volumes when the instance is launched. </p>
        pub fn ebs(mut self, input: crate::model::EbsInstanceBlockDevice) -> Self {
            self.ebs = Some(input);
            self
        }
        /// <p>The parameters used to automatically set up Amazon Elastic Block Store (Amazon EBS)
        /// volumes when the instance is launched. </p>
        pub fn set_ebs(
            mut self,
            input: std::option::Option<crate::model::EbsInstanceBlockDevice>,
        ) -> Self {
            self.ebs = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping)
        pub fn build(self) -> crate::model::InstanceBlockDeviceMapping {
            crate::model::InstanceBlockDeviceMapping {
                device_name: self.device_name,
                ebs: self.ebs,
            }
        }
    }
}
impl InstanceBlockDeviceMapping {
    /// Creates a new builder-style object to manufacture [`InstanceBlockDeviceMapping`](crate::model::InstanceBlockDeviceMapping)
    pub fn builder() -> crate::model::instance_block_device_mapping::Builder {
        crate::model::instance_block_device_mapping::Builder::default()
    }
}

/// <p>Describes a parameter used to set up an Amazon Elastic Block Store (Amazon EBS) volume
/// in a block device mapping.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EbsInstanceBlockDevice {
    /// <p>When the attachment was initiated.</p>
    pub attach_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>A value that indicates whether the volume is deleted on instance termination.</p>
    pub delete_on_termination: std::option::Option<bool>,
    /// <p>The attachment state.</p>
    pub status: std::option::Option<crate::model::AttachmentStatus>,
    /// <p>The ID of the Amazon EBS volume.</p>
    pub volume_id: std::option::Option<std::string::String>,
}
impl EbsInstanceBlockDevice {
    /// <p>When the attachment was initiated.</p>
    pub fn attach_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.attach_time.as_ref()
    }
    /// <p>A value that indicates whether the volume is deleted on instance termination.</p>
    pub fn delete_on_termination(&self) -> std::option::Option<bool> {
        self.delete_on_termination
    }
    /// <p>The attachment state.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::AttachmentStatus> {
        self.status.as_ref()
    }
    /// <p>The ID of the Amazon EBS volume.</p>
    pub fn volume_id(&self) -> std::option::Option<&str> {
        self.volume_id.as_deref()
    }
}
impl std::fmt::Debug for EbsInstanceBlockDevice {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("EbsInstanceBlockDevice");
        formatter.field("attach_time", &self.attach_time);
        formatter.field("delete_on_termination", &self.delete_on_termination);
        formatter.field("status", &self.status);
        formatter.field("volume_id", &self.volume_id);
        formatter.finish()
    }
}
/// See [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice)
pub mod ebs_instance_block_device {
    /// A builder for [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attach_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) delete_on_termination: std::option::Option<bool>,
        pub(crate) status: std::option::Option<crate::model::AttachmentStatus>,
        pub(crate) volume_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>When the attachment was initiated.</p>
        pub fn attach_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.attach_time = Some(input);
            self
        }
        /// <p>When the attachment was initiated.</p>
        pub fn set_attach_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.attach_time = input;
            self
        }
        /// <p>A value that indicates whether the volume is deleted on instance termination.</p>
        pub fn delete_on_termination(mut self, input: bool) -> Self {
            self.delete_on_termination = Some(input);
            self
        }
        /// <p>A value that indicates whether the volume is deleted on instance termination.</p>
        pub fn set_delete_on_termination(mut self, input: std::option::Option<bool>) -> Self {
            self.delete_on_termination = input;
            self
        }
        /// <p>The attachment state.</p>
        pub fn status(mut self, input: crate::model::AttachmentStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The attachment state.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::AttachmentStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>The ID of the Amazon EBS volume.</p>
        pub fn volume_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.volume_id = Some(input.into());
            self
        }
        /// <p>The ID of the Amazon EBS volume.</p>
        pub fn set_volume_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.volume_id = input;
            self
        }
        /// Consumes the builder and constructs a [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice)
        pub fn build(self) -> crate::model::EbsInstanceBlockDevice {
            crate::model::EbsInstanceBlockDevice {
                attach_time: self.attach_time,
                delete_on_termination: self.delete_on_termination,
                status: self.status,
                volume_id: self.volume_id,
            }
        }
    }
}
impl EbsInstanceBlockDevice {
    /// Creates a new builder-style object to manufacture [`EbsInstanceBlockDevice`](crate::model::EbsInstanceBlockDevice)
    pub fn builder() -> crate::model::ebs_instance_block_device::Builder {
        crate::model::ebs_instance_block_device::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AttachmentStatus {
    #[allow(missing_docs)] // documentation missing in model
    Attached,
    #[allow(missing_docs)] // documentation missing in model
    Attaching,
    #[allow(missing_docs)] // documentation missing in model
    Detached,
    #[allow(missing_docs)] // documentation missing in model
    Detaching,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AttachmentStatus {
    fn from(s: &str) -> Self {
        match s {
            "ATTACHED" => AttachmentStatus::Attached,
            "ATTACHING" => AttachmentStatus::Attaching,
            "DETACHED" => AttachmentStatus::Detached,
            "DETACHING" => AttachmentStatus::Detaching,
            other => AttachmentStatus::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AttachmentStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AttachmentStatus::from(s))
    }
}
impl AttachmentStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AttachmentStatus::Attached => "ATTACHED",
            AttachmentStatus::Attaching => "ATTACHING",
            AttachmentStatus::Detached => "DETACHED",
            AttachmentStatus::Detaching => "DETACHING",
            AttachmentStatus::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["ATTACHED", "ATTACHING", "DETACHED", "DETACHING"]
    }
}
impl AsRef<str> for AttachmentStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>The description of the current state of an instance.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InstanceState {
    /// <p>The state of the instance as a 16-bit unsigned integer. </p>
    /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values
    /// between 256 and 65,535. These numerical values are used for internal purposes and should be
    /// ignored. </p>
    /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values
    /// between 0 and 255. </p>
    /// <p>The valid values for the instance state code are all in the range of the low byte. These
    /// values are: </p>
    /// <ul>
    /// <li>
    /// <p>
    /// <code>0</code> : <code>pending</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>16</code> : <code>running</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>32</code> : <code>shutting-down</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>48</code> : <code>terminated</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>64</code> : <code>stopping</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>80</code> : <code>stopped</code>
    /// </p>
    /// </li>
    /// </ul>
    /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in
    /// decimal. </p>
    pub code: std::option::Option<i32>,
    /// <p>The current
    /// state
    /// of the instance.</p>
    pub name: std::option::Option<crate::model::InstanceStateName>,
}
impl InstanceState {
    /// <p>The state of the instance as a 16-bit unsigned integer. </p>
    /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values
    /// between 256 and 65,535. These numerical values are used for internal purposes and should be
    /// ignored. </p>
    /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values
    /// between 0 and 255. </p>
    /// <p>The valid values for the instance state code are all in the range of the low byte. These
    /// values are: </p>
    /// <ul>
    /// <li>
    /// <p>
    /// <code>0</code> : <code>pending</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>16</code> : <code>running</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>32</code> : <code>shutting-down</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>48</code> : <code>terminated</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>64</code> : <code>stopping</code>
    /// </p>
    /// </li>
    /// <li>
    /// <p>
    /// <code>80</code> : <code>stopped</code>
    /// </p>
    /// </li>
    /// </ul>
    /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in
    /// decimal. </p>
    pub fn code(&self) -> std::option::Option<i32> {
        self.code
    }
    /// <p>The current
    /// state
    /// of the instance.</p>
    pub fn name(&self) -> std::option::Option<&crate::model::InstanceStateName> {
        self.name.as_ref()
    }
}
impl std::fmt::Debug for InstanceState {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("InstanceState");
        formatter.field("code", &self.code);
        formatter.field("name", &self.name);
        formatter.finish()
    }
}
/// See [`InstanceState`](crate::model::InstanceState)
pub mod instance_state {
    /// A builder for [`InstanceState`](crate::model::InstanceState)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<i32>,
        pub(crate) name: std::option::Option<crate::model::InstanceStateName>,
    }
    impl Builder {
        /// <p>The state of the instance as a 16-bit unsigned integer. </p>
        /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values
        /// between 256 and 65,535. These numerical values are used for internal purposes and should be
        /// ignored. </p>
        /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values
        /// between 0 and 255. </p>
        /// <p>The valid values for the instance state code are all in the range of the low byte. These
        /// values are: </p>
        /// <ul>
        /// <li>
        /// <p>
        /// <code>0</code> : <code>pending</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>16</code> : <code>running</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>32</code> : <code>shutting-down</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>48</code> : <code>terminated</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>64</code> : <code>stopping</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>80</code> : <code>stopped</code>
        /// </p>
        /// </li>
        /// </ul>
        /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in
        /// decimal. </p>
        pub fn code(mut self, input: i32) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The state of the instance as a 16-bit unsigned integer. </p>
        /// <p>The high byte is all of the bits between 2^8 and (2^16)-1, which equals decimal values
        /// between 256 and 65,535. These numerical values are used for internal purposes and should be
        /// ignored. </p>
        /// <p>The low byte is all of the bits between 2^0 and (2^8)-1, which equals decimal values
        /// between 0 and 255. </p>
        /// <p>The valid values for the instance state code are all in the range of the low byte. These
        /// values are: </p>
        /// <ul>
        /// <li>
        /// <p>
        /// <code>0</code> : <code>pending</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>16</code> : <code>running</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>32</code> : <code>shutting-down</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>48</code> : <code>terminated</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>64</code> : <code>stopping</code>
        /// </p>
        /// </li>
        /// <li>
        /// <p>
        /// <code>80</code> : <code>stopped</code>
        /// </p>
        /// </li>
        /// </ul>
        /// <p>You can ignore the high byte value by zeroing out all of the bits above 2^8 or 256 in
        /// decimal. </p>
        pub fn set_code(mut self, input: std::option::Option<i32>) -> Self {
            self.code = input;
            self
        }
        /// <p>The current
        /// state
        /// of the instance.</p>
        pub fn name(mut self, input: crate::model::InstanceStateName) -> Self {
            self.name = Some(input);
            self
        }
        /// <p>The current
        /// state
        /// of the instance.</p>
        pub fn set_name(
            mut self,
            input: std::option::Option<crate::model::InstanceStateName>,
        ) -> Self {
            self.name = input;
            self
        }
        /// Consumes the builder and constructs a [`InstanceState`](crate::model::InstanceState)
        pub fn build(self) -> crate::model::InstanceState {
            crate::model::InstanceState {
                code: self.code,
                name: self.name,
            }
        }
    }
}
impl InstanceState {
    /// Creates a new builder-style object to manufacture [`InstanceState`](crate::model::InstanceState)
    pub fn builder() -> crate::model::instance_state::Builder {
        crate::model::instance_state::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum InstanceStateName {
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    Running,
    #[allow(missing_docs)] // documentation missing in model
    ShuttingDown,
    #[allow(missing_docs)] // documentation missing in model
    Stopped,
    #[allow(missing_docs)] // documentation missing in model
    Stopping,
    #[allow(missing_docs)] // documentation missing in model
    Terminated,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for InstanceStateName {
    fn from(s: &str) -> Self {
        match s {
            "PENDING" => InstanceStateName::Pending,
            "RUNNING" => InstanceStateName::Running,
            "SHUTTING_DOWN" => InstanceStateName::ShuttingDown,
            "STOPPED" => InstanceStateName::Stopped,
            "STOPPING" => InstanceStateName::Stopping,
            "TERMINATED" => InstanceStateName::Terminated,
            other => InstanceStateName::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for InstanceStateName {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(InstanceStateName::from(s))
    }
}
impl InstanceStateName {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            InstanceStateName::Pending => "PENDING",
            InstanceStateName::Running => "RUNNING",
            InstanceStateName::ShuttingDown => "SHUTTING_DOWN",
            InstanceStateName::Stopped => "STOPPED",
            InstanceStateName::Stopping => "STOPPING",
            InstanceStateName::Terminated => "TERMINATED",
            InstanceStateName::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "PENDING",
            "RUNNING",
            "SHUTTING_DOWN",
            "STOPPED",
            "STOPPING",
            "TERMINATED",
        ]
    }
}
impl AsRef<str> for InstanceStateName {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Identifying information about the device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct DeviceSummary {
    /// <p>The ID of the device.</p>
    pub managed_device_id: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub managed_device_arn: std::option::Option<std::string::String>,
    /// <p>The ID of the job used to order the device.</p>
    pub associated_with_job: std::option::Option<std::string::String>,
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
    /// in different ways, such as by purpose, owner, or environment.</p>
    pub tags:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl DeviceSummary {
    /// <p>The ID of the device.</p>
    pub fn managed_device_id(&self) -> std::option::Option<&str> {
        self.managed_device_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the device.</p>
    pub fn managed_device_arn(&self) -> std::option::Option<&str> {
        self.managed_device_arn.as_deref()
    }
    /// <p>The ID of the job used to order the device.</p>
    pub fn associated_with_job(&self) -> std::option::Option<&str> {
        self.associated_with_job.as_deref()
    }
    /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
    /// in different ways, such as by purpose, owner, or environment.</p>
    pub fn tags(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.tags.as_ref()
    }
}
impl std::fmt::Debug for DeviceSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("DeviceSummary");
        formatter.field("managed_device_id", &self.managed_device_id);
        formatter.field("managed_device_arn", &self.managed_device_arn);
        formatter.field("associated_with_job", &self.associated_with_job);
        formatter.field("tags", &self.tags);
        formatter.finish()
    }
}
/// See [`DeviceSummary`](crate::model::DeviceSummary)
pub mod device_summary {
    /// A builder for [`DeviceSummary`](crate::model::DeviceSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) managed_device_id: std::option::Option<std::string::String>,
        pub(crate) managed_device_arn: std::option::Option<std::string::String>,
        pub(crate) associated_with_job: std::option::Option<std::string::String>,
        pub(crate) tags: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The ID of the device.</p>
        pub fn managed_device_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.managed_device_id = Some(input.into());
            self
        }
        /// <p>The ID of the device.</p>
        pub fn set_managed_device_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.managed_device_id = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the device.</p>
        pub fn managed_device_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.managed_device_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the device.</p>
        pub fn set_managed_device_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.managed_device_arn = input;
            self
        }
        /// <p>The ID of the job used to order the device.</p>
        pub fn associated_with_job(mut self, input: impl Into<std::string::String>) -> Self {
            self.associated_with_job = Some(input.into());
            self
        }
        /// <p>The ID of the job used to order the device.</p>
        pub fn set_associated_with_job(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.associated_with_job = input;
            self
        }
        /// Adds a key-value pair to `tags`.
        ///
        /// To override the contents of this collection use [`set_tags`](Self::set_tags).
        ///
        /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
        /// in different ways, such as by purpose, owner, or environment.</p>
        pub fn tags(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.tags.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.tags = Some(hash_map);
            self
        }
        /// <p>Optional metadata that you assign to a resource. You can use tags to categorize a resource
        /// in different ways, such as by purpose, owner, or environment.</p>
        pub fn set_tags(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.tags = input;
            self
        }
        /// Consumes the builder and constructs a [`DeviceSummary`](crate::model::DeviceSummary)
        pub fn build(self) -> crate::model::DeviceSummary {
            crate::model::DeviceSummary {
                managed_device_id: self.managed_device_id,
                managed_device_arn: self.managed_device_arn,
                associated_with_job: self.associated_with_job,
                tags: self.tags,
            }
        }
    }
}
impl DeviceSummary {
    /// Creates a new builder-style object to manufacture [`DeviceSummary`](crate::model::DeviceSummary)
    pub fn builder() -> crate::model::device_summary::Builder {
        crate::model::device_summary::Builder::default()
    }
}

/// <p>Information about the software on the device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SoftwareInformation {
    /// <p>The version of the software currently installed on the device.</p>
    pub installed_version: std::option::Option<std::string::String>,
    /// <p>The version of the software being installed on the device.</p>
    pub installing_version: std::option::Option<std::string::String>,
    /// <p>The state of the software that is installed or that is being installed on the
    /// device.</p>
    pub install_state: std::option::Option<std::string::String>,
}
impl SoftwareInformation {
    /// <p>The version of the software currently installed on the device.</p>
    pub fn installed_version(&self) -> std::option::Option<&str> {
        self.installed_version.as_deref()
    }
    /// <p>The version of the software being installed on the device.</p>
    pub fn installing_version(&self) -> std::option::Option<&str> {
        self.installing_version.as_deref()
    }
    /// <p>The state of the software that is installed or that is being installed on the
    /// device.</p>
    pub fn install_state(&self) -> std::option::Option<&str> {
        self.install_state.as_deref()
    }
}
impl std::fmt::Debug for SoftwareInformation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SoftwareInformation");
        formatter.field("installed_version", &self.installed_version);
        formatter.field("installing_version", &self.installing_version);
        formatter.field("install_state", &self.install_state);
        formatter.finish()
    }
}
/// See [`SoftwareInformation`](crate::model::SoftwareInformation)
pub mod software_information {
    /// A builder for [`SoftwareInformation`](crate::model::SoftwareInformation)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) installed_version: std::option::Option<std::string::String>,
        pub(crate) installing_version: std::option::Option<std::string::String>,
        pub(crate) install_state: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The version of the software currently installed on the device.</p>
        pub fn installed_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.installed_version = Some(input.into());
            self
        }
        /// <p>The version of the software currently installed on the device.</p>
        pub fn set_installed_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.installed_version = input;
            self
        }
        /// <p>The version of the software being installed on the device.</p>
        pub fn installing_version(mut self, input: impl Into<std::string::String>) -> Self {
            self.installing_version = Some(input.into());
            self
        }
        /// <p>The version of the software being installed on the device.</p>
        pub fn set_installing_version(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.installing_version = input;
            self
        }
        /// <p>The state of the software that is installed or that is being installed on the
        /// device.</p>
        pub fn install_state(mut self, input: impl Into<std::string::String>) -> Self {
            self.install_state = Some(input.into());
            self
        }
        /// <p>The state of the software that is installed or that is being installed on the
        /// device.</p>
        pub fn set_install_state(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.install_state = input;
            self
        }
        /// Consumes the builder and constructs a [`SoftwareInformation`](crate::model::SoftwareInformation)
        pub fn build(self) -> crate::model::SoftwareInformation {
            crate::model::SoftwareInformation {
                installed_version: self.installed_version,
                installing_version: self.installing_version,
                install_state: self.install_state,
            }
        }
    }
}
impl SoftwareInformation {
    /// Creates a new builder-style object to manufacture [`SoftwareInformation`](crate::model::SoftwareInformation)
    pub fn builder() -> crate::model::software_information::Builder {
        crate::model::software_information::Builder::default()
    }
}

/// <p>The physical capacity of the Amazon Web Services Snow Family device. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Capacity {
    /// <p>The name of the type of capacity, such as memory.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The unit of measure for the type of capacity.</p>
    pub unit: std::option::Option<std::string::String>,
    /// <p>The total capacity on the device.</p>
    pub total: std::option::Option<i64>,
    /// <p>The amount of capacity used on the device.</p>
    pub used: std::option::Option<i64>,
    /// <p>The amount of capacity available for use on the device.</p>
    pub available: std::option::Option<i64>,
}
impl Capacity {
    /// <p>The name of the type of capacity, such as memory.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The unit of measure for the type of capacity.</p>
    pub fn unit(&self) -> std::option::Option<&str> {
        self.unit.as_deref()
    }
    /// <p>The total capacity on the device.</p>
    pub fn total(&self) -> std::option::Option<i64> {
        self.total
    }
    /// <p>The amount of capacity used on the device.</p>
    pub fn used(&self) -> std::option::Option<i64> {
        self.used
    }
    /// <p>The amount of capacity available for use on the device.</p>
    pub fn available(&self) -> std::option::Option<i64> {
        self.available
    }
}
impl std::fmt::Debug for Capacity {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Capacity");
        formatter.field("name", &self.name);
        formatter.field("unit", &self.unit);
        formatter.field("total", &self.total);
        formatter.field("used", &self.used);
        formatter.field("available", &self.available);
        formatter.finish()
    }
}
/// See [`Capacity`](crate::model::Capacity)
pub mod capacity {
    /// A builder for [`Capacity`](crate::model::Capacity)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) unit: std::option::Option<std::string::String>,
        pub(crate) total: std::option::Option<i64>,
        pub(crate) used: std::option::Option<i64>,
        pub(crate) available: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the type of capacity, such as memory.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the type of capacity, such as memory.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The unit of measure for the type of capacity.</p>
        pub fn unit(mut self, input: impl Into<std::string::String>) -> Self {
            self.unit = Some(input.into());
            self
        }
        /// <p>The unit of measure for the type of capacity.</p>
        pub fn set_unit(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.unit = input;
            self
        }
        /// <p>The total capacity on the device.</p>
        pub fn total(mut self, input: i64) -> Self {
            self.total = Some(input);
            self
        }
        /// <p>The total capacity on the device.</p>
        pub fn set_total(mut self, input: std::option::Option<i64>) -> Self {
            self.total = input;
            self
        }
        /// <p>The amount of capacity used on the device.</p>
        pub fn used(mut self, input: i64) -> Self {
            self.used = Some(input);
            self
        }
        /// <p>The amount of capacity used on the device.</p>
        pub fn set_used(mut self, input: std::option::Option<i64>) -> Self {
            self.used = input;
            self
        }
        /// <p>The amount of capacity available for use on the device.</p>
        pub fn available(mut self, input: i64) -> Self {
            self.available = Some(input);
            self
        }
        /// <p>The amount of capacity available for use on the device.</p>
        pub fn set_available(mut self, input: std::option::Option<i64>) -> Self {
            self.available = input;
            self
        }
        /// Consumes the builder and constructs a [`Capacity`](crate::model::Capacity)
        pub fn build(self) -> crate::model::Capacity {
            crate::model::Capacity {
                name: self.name,
                unit: self.unit,
                total: self.total,
                used: self.used,
                available: self.available,
            }
        }
    }
}
impl Capacity {
    /// Creates a new builder-style object to manufacture [`Capacity`](crate::model::Capacity)
    pub fn builder() -> crate::model::capacity::Builder {
        crate::model::capacity::Builder::default()
    }
}

/// <p>The details about the physical network interface for the device.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct PhysicalNetworkInterface {
    /// <p>The physical network interface ID.</p>
    pub physical_network_interface_id: std::option::Option<std::string::String>,
    /// <p>The
    /// physical
    /// connector type.</p>
    pub physical_connector_type: std::option::Option<crate::model::PhysicalConnectorType>,
    /// <p>A value that describes whether the IP address is dynamic or persistent.</p>
    pub ip_address_assignment: std::option::Option<crate::model::IpAddressAssignment>,
    /// <p>The IP address of the device.</p>
    pub ip_address: std::option::Option<std::string::String>,
    /// <p>The netmask used to divide the IP address into subnets.</p>
    pub netmask: std::option::Option<std::string::String>,
    /// <p>The default gateway of the device.</p>
    pub default_gateway: std::option::Option<std::string::String>,
    /// <p>The MAC address of the device.</p>
    pub mac_address: std::option::Option<std::string::String>,
}
impl PhysicalNetworkInterface {
    /// <p>The physical network interface ID.</p>
    pub fn physical_network_interface_id(&self) -> std::option::Option<&str> {
        self.physical_network_interface_id.as_deref()
    }
    /// <p>The
    /// physical
    /// connector type.</p>
    pub fn physical_connector_type(
        &self,
    ) -> std::option::Option<&crate::model::PhysicalConnectorType> {
        self.physical_connector_type.as_ref()
    }
    /// <p>A value that describes whether the IP address is dynamic or persistent.</p>
    pub fn ip_address_assignment(&self) -> std::option::Option<&crate::model::IpAddressAssignment> {
        self.ip_address_assignment.as_ref()
    }
    /// <p>The IP address of the device.</p>
    pub fn ip_address(&self) -> std::option::Option<&str> {
        self.ip_address.as_deref()
    }
    /// <p>The netmask used to divide the IP address into subnets.</p>
    pub fn netmask(&self) -> std::option::Option<&str> {
        self.netmask.as_deref()
    }
    /// <p>The default gateway of the device.</p>
    pub fn default_gateway(&self) -> std::option::Option<&str> {
        self.default_gateway.as_deref()
    }
    /// <p>The MAC address of the device.</p>
    pub fn mac_address(&self) -> std::option::Option<&str> {
        self.mac_address.as_deref()
    }
}
impl std::fmt::Debug for PhysicalNetworkInterface {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("PhysicalNetworkInterface");
        formatter.field(
            "physical_network_interface_id",
            &self.physical_network_interface_id,
        );
        formatter.field("physical_connector_type", &self.physical_connector_type);
        formatter.field("ip_address_assignment", &self.ip_address_assignment);
        formatter.field("ip_address", &self.ip_address);
        formatter.field("netmask", &self.netmask);
        formatter.field("default_gateway", &self.default_gateway);
        formatter.field("mac_address", &self.mac_address);
        formatter.finish()
    }
}
/// See [`PhysicalNetworkInterface`](crate::model::PhysicalNetworkInterface)
pub mod physical_network_interface {
    /// A builder for [`PhysicalNetworkInterface`](crate::model::PhysicalNetworkInterface)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) physical_network_interface_id: std::option::Option<std::string::String>,
        pub(crate) physical_connector_type:
            std::option::Option<crate::model::PhysicalConnectorType>,
        pub(crate) ip_address_assignment: std::option::Option<crate::model::IpAddressAssignment>,
        pub(crate) ip_address: std::option::Option<std::string::String>,
        pub(crate) netmask: std::option::Option<std::string::String>,
        pub(crate) default_gateway: std::option::Option<std::string::String>,
        pub(crate) mac_address: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The physical network interface ID.</p>
        pub fn physical_network_interface_id(
            mut self,
            input: impl Into<std::string::String>,
        ) -> Self {
            self.physical_network_interface_id = Some(input.into());
            self
        }
        /// <p>The physical network interface ID.</p>
        pub fn set_physical_network_interface_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.physical_network_interface_id = input;
            self
        }
        /// <p>The
        /// physical
        /// connector type.</p>
        pub fn physical_connector_type(
            mut self,
            input: crate::model::PhysicalConnectorType,
        ) -> Self {
            self.physical_connector_type = Some(input);
            self
        }
        /// <p>The
        /// physical
        /// connector type.</p>
        pub fn set_physical_connector_type(
            mut self,
            input: std::option::Option<crate::model::PhysicalConnectorType>,
        ) -> Self {
            self.physical_connector_type = input;
            self
        }
        /// <p>A value that describes whether the IP address is dynamic or persistent.</p>
        pub fn ip_address_assignment(mut self, input: crate::model::IpAddressAssignment) -> Self {
            self.ip_address_assignment = Some(input);
            self
        }
        /// <p>A value that describes whether the IP address is dynamic or persistent.</p>
        pub fn set_ip_address_assignment(
            mut self,
            input: std::option::Option<crate::model::IpAddressAssignment>,
        ) -> Self {
            self.ip_address_assignment = input;
            self
        }
        /// <p>The IP address of the device.</p>
        pub fn ip_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.ip_address = Some(input.into());
            self
        }
        /// <p>The IP address of the device.</p>
        pub fn set_ip_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.ip_address = input;
            self
        }
        /// <p>The netmask used to divide the IP address into subnets.</p>
        pub fn netmask(mut self, input: impl Into<std::string::String>) -> Self {
            self.netmask = Some(input.into());
            self
        }
        /// <p>The netmask used to divide the IP address into subnets.</p>
        pub fn set_netmask(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.netmask = input;
            self
        }
        /// <p>The default gateway of the device.</p>
        pub fn default_gateway(mut self, input: impl Into<std::string::String>) -> Self {
            self.default_gateway = Some(input.into());
            self
        }
        /// <p>The default gateway of the device.</p>
        pub fn set_default_gateway(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.default_gateway = input;
            self
        }
        /// <p>The MAC address of the device.</p>
        pub fn mac_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.mac_address = Some(input.into());
            self
        }
        /// <p>The MAC address of the device.</p>
        pub fn set_mac_address(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.mac_address = input;
            self
        }
        /// Consumes the builder and constructs a [`PhysicalNetworkInterface`](crate::model::PhysicalNetworkInterface)
        pub fn build(self) -> crate::model::PhysicalNetworkInterface {
            crate::model::PhysicalNetworkInterface {
                physical_network_interface_id: self.physical_network_interface_id,
                physical_connector_type: self.physical_connector_type,
                ip_address_assignment: self.ip_address_assignment,
                ip_address: self.ip_address,
                netmask: self.netmask,
                default_gateway: self.default_gateway,
                mac_address: self.mac_address,
            }
        }
    }
}
impl PhysicalNetworkInterface {
    /// Creates a new builder-style object to manufacture [`PhysicalNetworkInterface`](crate::model::PhysicalNetworkInterface)
    pub fn builder() -> crate::model::physical_network_interface::Builder {
        crate::model::physical_network_interface::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum IpAddressAssignment {
    #[allow(missing_docs)] // documentation missing in model
    Dhcp,
    #[allow(missing_docs)] // documentation missing in model
    Static,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for IpAddressAssignment {
    fn from(s: &str) -> Self {
        match s {
            "DHCP" => IpAddressAssignment::Dhcp,
            "STATIC" => IpAddressAssignment::Static,
            other => IpAddressAssignment::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for IpAddressAssignment {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(IpAddressAssignment::from(s))
    }
}
impl IpAddressAssignment {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            IpAddressAssignment::Dhcp => "DHCP",
            IpAddressAssignment::Static => "STATIC",
            IpAddressAssignment::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["DHCP", "STATIC"]
    }
}
impl AsRef<str> for IpAddressAssignment {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum PhysicalConnectorType {
    #[allow(missing_docs)] // documentation missing in model
    Qsfp,
    #[allow(missing_docs)] // documentation missing in model
    Rj45,
    #[allow(missing_docs)] // documentation missing in model
    Rj452,
    #[allow(missing_docs)] // documentation missing in model
    SfpPlus,
    #[allow(missing_docs)] // documentation missing in model
    Wifi,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for PhysicalConnectorType {
    fn from(s: &str) -> Self {
        match s {
            "QSFP" => PhysicalConnectorType::Qsfp,
            "RJ45" => PhysicalConnectorType::Rj45,
            "RJ45_2" => PhysicalConnectorType::Rj452,
            "SFP_PLUS" => PhysicalConnectorType::SfpPlus,
            "WIFI" => PhysicalConnectorType::Wifi,
            other => PhysicalConnectorType::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for PhysicalConnectorType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(PhysicalConnectorType::from(s))
    }
}
impl PhysicalConnectorType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            PhysicalConnectorType::Qsfp => "QSFP",
            PhysicalConnectorType::Rj45 => "RJ45",
            PhysicalConnectorType::Rj452 => "RJ45_2",
            PhysicalConnectorType::SfpPlus => "SFP_PLUS",
            PhysicalConnectorType::Wifi => "WIFI",
            PhysicalConnectorType::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["QSFP", "RJ45", "RJ45_2", "SFP_PLUS", "WIFI"]
    }
}
impl AsRef<str> for PhysicalConnectorType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum UnlockState {
    #[allow(missing_docs)] // documentation missing in model
    Locked,
    #[allow(missing_docs)] // documentation missing in model
    Unlocked,
    #[allow(missing_docs)] // documentation missing in model
    Unlocking,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for UnlockState {
    fn from(s: &str) -> Self {
        match s {
            "LOCKED" => UnlockState::Locked,
            "UNLOCKED" => UnlockState::Unlocked,
            "UNLOCKING" => UnlockState::Unlocking,
            other => UnlockState::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for UnlockState {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(UnlockState::from(s))
    }
}
impl UnlockState {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            UnlockState::Locked => "LOCKED",
            UnlockState::Unlocked => "UNLOCKED",
            UnlockState::Unlocking => "UNLOCKING",
            UnlockState::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["LOCKED", "UNLOCKED", "UNLOCKING"]
    }
}
impl AsRef<str> for UnlockState {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}