winterbaume-ec2 0.2.0

EC2/VPC service implementation for winterbaume
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
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
pub type Tags = std::collections::HashMap<String, String>;

#[derive(Debug, Clone)]
pub struct Vpc {
    pub vpc_id: String,
    pub cidr_block: String,
    pub state: String,
    pub dhcp_options_id: String,
    pub instance_tenancy: String,
    pub is_default: bool,
    pub enable_dns_hostnames: bool,
    pub enable_dns_support: bool,
    pub secondary_cidr_blocks: Vec<(String, String)>, // (assoc_id, cidr_block)
    pub tags: Tags,
    /// EC2-Classic ClassicLink toggle. AWS retired EC2-Classic but still
    /// honours `DescribeVpcClassicLink`; new VPCs always report `false`.
    pub classic_link_enabled: bool,
}

#[derive(Debug, Clone)]
pub struct Subnet {
    pub subnet_id: String,
    pub vpc_id: String,
    pub cidr_block: String,
    pub availability_zone: String,
    pub state: String,
    pub available_ip_address_count: i64,
    pub map_public_ip_on_launch: bool,
    pub ipv6_cidr_blocks: Vec<SubnetIpv6CidrAssoc>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct SubnetIpv6CidrAssoc {
    pub association_id: String,
    pub ipv6_cidr_block: String,
    pub state: String,
}

#[derive(Debug, Clone)]
pub struct InternetGateway {
    pub igw_id: String,
    pub attachments: Vec<IgwAttachment>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct IgwAttachment {
    pub vpc_id: String,
    pub state: String,
}

#[derive(Debug, Clone)]
pub struct SecurityGroup {
    pub group_id: String,
    pub group_name: String,
    pub description: String,
    pub vpc_id: String,
    pub owner_id: String,
    pub ingress_rules: Vec<IpPermission>,
    pub egress_rules: Vec<IpPermission>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct IpPermission {
    pub rule_id: String,
    pub from_port: Option<i64>,
    pub to_port: Option<i64>,
    pub ip_protocol: String,
    pub ip_ranges: Vec<IpRange>,
    pub ipv6_ranges: Vec<Ipv6Range>,
    pub user_id_group_pairs: Vec<UserIdGroupPair>,
}

#[derive(Debug, Clone)]
pub struct IpRange {
    pub cidr_ip: String,
    pub description: Option<String>,
}

#[derive(Debug, Clone)]
pub struct Ipv6Range {
    pub cidr_ipv6: String,
    pub description: Option<String>,
}

#[derive(Debug, Clone)]
pub struct UserIdGroupPair {
    pub group_id: String,
    pub user_id: Option<String>,
}

#[derive(Debug, Clone)]
pub struct RouteTable {
    pub route_table_id: String,
    pub vpc_id: String,
    pub routes: Vec<Route>,
    pub associations: Vec<RouteTableAssociation>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct Route {
    pub destination_cidr_block: Option<String>,
    pub destination_ipv6_cidr_block: Option<String>,
    pub gateway_id: Option<String>,
    pub state: String,
    pub origin: String,
}

#[derive(Debug, Clone)]
pub struct RouteTableAssociation {
    pub association_id: String,
    pub subnet_id: Option<String>,
    pub main: bool,
    pub state: String,
}

#[derive(Debug, Clone)]
pub struct KeyPair {
    pub key_pair_id: String,
    pub key_name: String,
    pub fingerprint: String,
    pub tags: Tags,
}

// Network ACL types

#[derive(Debug, Clone)]
pub struct NetworkAcl {
    pub network_acl_id: String,
    pub vpc_id: String,
    pub is_default: bool,
    pub entries: Vec<NetworkAclEntry>,
    pub associations: Vec<NetworkAclAssociation>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct NetworkAclEntry {
    pub rule_number: i32,
    pub protocol: String,
    pub rule_action: String,
    pub egress: bool,
    pub cidr_block: Option<String>,
    pub ipv6_cidr_block: Option<String>,
    pub port_range: Option<PortRange>,
    pub icmp_type_code: Option<IcmpTypeCode>,
}

#[derive(Debug, Clone)]
pub struct PortRange {
    pub from: i32,
    pub to: i32,
}

#[derive(Debug, Clone)]
pub struct IcmpTypeCode {
    pub type_num: i32,
    pub code: i32,
}

#[derive(Debug, Clone)]
pub struct NetworkAclAssociation {
    pub network_acl_association_id: String,
    pub network_acl_id: String,
    pub subnet_id: String,
}

// Elastic IP types

#[derive(Debug, Clone)]
pub struct ElasticIp {
    pub allocation_id: String,
    pub public_ip: String,
    pub association_id: Option<String>,
    pub instance_id: Option<String>,
    pub network_interface_id: Option<String>,
    pub private_ip_address: Option<String>,
    /// Reverse-DNS PTR record domain name. Set via `ModifyAddressAttribute`,
    /// cleared via `ResetAddressAttribute`.
    pub address_attribute_ptr_record: Option<String>,
    /// Address scope: "vpc" (default) or "standard" (Classic), used by
    /// `MoveAddressToVpc` / `RestoreAddressToClassic` legacy operations.
    pub domain: String,
    /// Account ID an `EnableAddressTransfer` offer was issued to. Cleared by
    /// `DisableAddressTransfer` (and on completion of the transfer).
    pub pending_transfer: Option<String>,
    pub tags: Tags,
}

// NAT Gateway types

#[derive(Debug, Clone)]
pub struct NatGateway {
    pub nat_gateway_id: String,
    pub vpc_id: String,
    pub subnet_id: String,
    pub state: String,
    pub connectivity_type: String,
    pub allocation_id: Option<String>,
    pub public_ip: Option<String>,
    /// Secondary addresses (assigned via `AssignPrivateNatGatewayAddress` /
    /// `AssociateNatGatewayAddress`).
    pub secondary_addresses: Vec<NatGatewayAddressAssociation>,
    pub tags: Tags,
}

/// One element of a NAT gateway's address set.
#[derive(Debug, Clone)]
pub struct NatGatewayAddressAssociation {
    pub allocation_id: Option<String>,
    pub association_id: Option<String>,
    pub network_interface_id: Option<String>,
    pub private_ip: Option<String>,
    pub public_ip: Option<String>,
    /// One of "assigning", "unassigning", "associating", "disassociating",
    /// "succeeded", "failed", "failed-disassociating".
    pub status: String,
    pub is_primary: bool,
}

// BYOIP CIDR types

#[derive(Debug, Clone)]
pub struct ByoipCidr {
    pub cidr: String,
    pub description: Option<String>,
    /// One of "pending-provision", "provisioned", "pending-advertisement",
    /// "advertised", "pending-deprovision", "deprovisioned".
    pub state: String,
    /// ASN association for this CIDR, if a BYOASN has been associated.
    pub asn_association: Option<AsnAssociation>,
    /// IPAM pool ID this CIDR has been moved into via `MoveByoipCidrToIpam`.
    pub ipam_pool_id: Option<String>,
}

/// Association between a BYO-ASN and a BYOIP CIDR.
#[derive(Debug, Clone)]
pub struct AsnAssociation {
    pub asn: String,
    pub cidr: String,
    /// `pending-association` / `associated` / `pending-disassociation` /
    /// `disassociated` / `failed-association` / `failed-disassociation`.
    pub state: String,
    pub status_message: Option<String>,
}

// Public IPv4 pool types

#[derive(Debug, Clone)]
pub struct PublicIpv4Pool {
    pub pool_id: String,
    pub description: Option<String>,
    pub network_border_group: Option<String>,
    pub total_address_count: i32,
    pub total_available_address_count: i32,
    pub pool_address_ranges: Vec<PublicIpv4PoolRange>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct PublicIpv4PoolRange {
    pub first_address: String,
    pub last_address: String,
    pub address_count: i32,
    pub available_address_count: i32,
}

// COIP CIDR types

#[derive(Debug, Clone)]
pub struct CoipCidr {
    pub cidr: String,
    pub coip_pool_id: String,
}

// Address transfer types

#[derive(Debug, Clone)]
pub struct AddressTransfer {
    pub allocation_id: String,
    pub public_ip: String,
    pub transfer_account_id: String,
    pub transfer_offer_expiration_timestamp: String,
    pub transfer_offer_accepted_timestamp: Option<String>,
    /// One of "pending", "accepted", "disabled".
    pub address_transfer_status: String,
}

// DHCP Options types

#[derive(Debug, Clone)]
pub struct DhcpOptions {
    pub dhcp_options_id: String,
    pub configurations: Vec<DhcpConfiguration>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct DhcpConfiguration {
    pub key: String,
    pub values: Vec<String>,
}

// Egress-only internet gateway types

#[derive(Debug, Clone)]
pub struct EgressOnlyInternetGateway {
    pub eigw_id: String,
    pub state: String,
    pub attachments: Vec<EoigwAttachment>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct EoigwAttachment {
    pub vpc_id: String,
    pub state: String,
}

// Flow log types

#[derive(Debug, Clone)]
pub struct FlowLog {
    pub flow_log_id: String,
    pub resource_id: String,
    pub traffic_type: String,
    pub log_destination_type: String,
    pub log_destination: Option<String>,
    pub log_group_name: Option<String>,
    pub deliver_logs_status: String,
    pub flow_log_status: String,
    pub tags: Tags,
}

// VPC peering types

#[derive(Debug, Clone)]
pub struct VpcPeeringConnection {
    pub peering_id: String,
    pub requester_vpc_id: String,
    pub accepter_vpc_id: Option<String>,
    pub status: String,
    pub tags: Tags,
    /// Peering options on the requester side, set by
    /// `ModifyVpcPeeringConnectionOptions`.
    pub requester_peering_options: Option<VpcPeeringConnectionOptions>,
    /// Peering options on the accepter side.
    pub accepter_peering_options: Option<VpcPeeringConnectionOptions>,
}

/// Peering options for either side of a VPC peering connection.
#[derive(Debug, Clone, Default)]
pub struct VpcPeeringConnectionOptions {
    pub allow_dns_resolution_from_remote_vpc: bool,
    pub allow_egress_from_local_classic_link_to_remote_vpc: bool,
    pub allow_egress_from_local_vpc_to_remote_classic_link: bool,
}

// VPC endpoint types

#[derive(Debug, Clone)]
pub struct VpcEndpoint {
    pub endpoint_id: String,
    pub vpc_id: String,
    pub service_name: String,
    pub endpoint_type: String,
    pub state: String,
    pub policy_document: Option<String>,
    pub route_table_ids: Vec<String>,
    pub subnet_ids: Vec<String>,
    pub security_group_ids: Vec<String>,
    pub tags: Tags,
}

// Managed prefix list types

#[derive(Debug, Clone)]
pub struct ManagedPrefixList {
    pub prefix_list_id: String,
    pub prefix_list_name: String,
    pub state: String,
    pub address_family: String,
    pub max_entries: i32,
    pub entries: Vec<TypesPrefixListEntry>,
    pub tags: Tags,
    pub version: i64,
    /// Snapshot of (version, entries) for each historical version. Allows
    /// `RestoreManagedPrefixListVersion` to revert to a prior state.
    pub version_history: Vec<ManagedPrefixListVersion>,
}

#[derive(Debug, Clone)]
pub struct ManagedPrefixListVersion {
    pub version: i64,
    pub entries: Vec<TypesPrefixListEntry>,
}

#[derive(Debug, Clone)]
pub struct TypesPrefixListEntry {
    pub cidr: String,
    pub description: Option<String>,
}

// Customer gateway types

#[derive(Debug, Clone)]
pub struct CustomerGateway {
    pub customer_gateway_id: String,
    pub bgp_asn: String,
    pub ip_address: String,
    pub gateway_type: String,
    pub state: String,
    pub tags: Tags,
}

// VPN gateway types

#[derive(Debug, Clone)]
pub struct VpnGateway {
    pub vpn_gateway_id: String,
    pub gateway_type: String,
    pub state: String,
    pub amazon_side_asn: Option<i64>,
    pub vpc_attachments: Vec<VgwVpcAttachment>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct VgwVpcAttachment {
    pub vpc_id: String,
    pub state: String,
}

// VPN connection types

#[derive(Debug, Clone, Default)]
pub struct VpnConnection {
    pub vpn_connection_id: String,
    pub vpn_gateway_id: String,
    pub customer_gateway_id: String,
    /// Optional alternative target endpoint -- a transit gateway. AWS allows
    /// `ModifyVpnConnection` to switch the target between VGW / TGW.
    pub transit_gateway_id: Option<String>,
    pub connection_type: String,
    pub state: String,
    pub tags: Tags,
    /// Static routes added via `CreateVpnConnectionRoute`.
    pub routes: Vec<VpnStaticRoute>,
    /// Tunnel and traffic options. Modified by `ModifyVpnConnectionOptions`
    /// and `ModifyVpnTunnelOptions`.
    pub options: Option<VpnConnectionOptions>,
    /// State of any in-flight tunnel replacement triggered by
    /// `ReplaceVpnTunnel`. One of "available", "pending".
    pub tunnel_replacement_status: Option<String>,
}

#[derive(Debug, Clone)]
pub struct VpnStaticRoute {
    pub destination_cidr_block: String,
    /// Always "Static" for routes added via `CreateVpnConnectionRoute`.
    pub source: String,
    pub state: String,
}

#[derive(Debug, Clone, Default)]
pub struct VpnConnectionOptions {
    pub local_ipv4_network_cidr: Option<String>,
    pub local_ipv6_network_cidr: Option<String>,
    pub remote_ipv4_network_cidr: Option<String>,
    pub remote_ipv6_network_cidr: Option<String>,
    pub tunnel_inside_ip_version: Option<String>,
    pub static_routes_only: Option<bool>,
    pub tunnel_options: Vec<VpnTunnelOptions>,
}

#[derive(Debug, Clone, Default)]
pub struct VpnTunnelOptions {
    /// Inside-tunnel IPv4 CIDR (e.g. "169.254.10.0/30").
    pub tunnel_inside_cidr: Option<String>,
    pub tunnel_inside_ipv6_cidr: Option<String>,
    pub pre_shared_key: Option<String>,
    /// Outside IP address that identifies this tunnel.
    pub outside_ip_address: Option<String>,
    /// Certificate ARN, set by `ModifyVpnTunnelCertificate`.
    pub certificate_arn: Option<String>,
}

// VPN Concentrator types -- a less-documented internal AWS resource. Modelled
// as a thin record so `Create`/`Describe`/`Delete` round-trip cleanly.

#[derive(Debug, Clone)]
pub struct VpnConcentrator {
    pub vpn_concentrator_id: String,
    pub concentrator_type: String,
    pub state: String,
    pub transit_gateway_id: Option<String>,
    pub transit_gateway_attachment_id: Option<String>,
    pub tags: Tags,
}

// Carrier gateway types

#[derive(Debug, Clone)]
pub struct CarrierGateway {
    pub carrier_gateway_id: String,
    pub vpc_id: String,
    pub state: String,
    pub tags: Tags,
}

// Network interface types

#[derive(Debug, Clone)]
pub struct NetworkInterface {
    pub network_interface_id: String,
    pub subnet_id: String,
    pub vpc_id: String,
    pub description: String,
    pub private_ip_address: String,
    pub status: String,
    pub attachment_id: Option<String>,
    pub instance_id: Option<String>,
    pub device_index: Option<i32>,
    pub security_groups: Vec<String>,
    pub source_dest_check: bool,
    pub tags: Tags,
    /// Public IP DNS name options hostname type.
    pub public_ip_dns_hostname_type: Option<String>,
}

// Transit Gateway types

#[derive(Debug, Clone)]
pub struct TransitGateway {
    pub transit_gateway_id: String,
    pub state: String,
    pub amazon_side_asn: i64,
    pub description: String,
    pub dns_support: String,
    pub vpn_ecmp_support: String,
    pub multicast_support: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TransitGatewayVpcAttachment {
    pub attachment_id: String,
    pub transit_gateway_id: String,
    pub vpc_id: String,
    pub subnet_ids: Vec<String>,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TransitGatewayPeeringAttachment {
    pub attachment_id: String,
    pub transit_gateway_id: String,
    pub peer_transit_gateway_id: String,
    pub peer_account_id: String,
    pub peer_region: String,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TransitGatewayRouteTable {
    pub route_table_id: String,
    pub transit_gateway_id: String,
    pub state: String,
    pub default_association_route_table: bool,
    pub default_propagation_route_table: bool,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TransitGatewayRoute {
    pub destination_cidr_block: String,
    pub route_type: String,
    pub state: String,
    pub attachment_id: Option<String>,
}

// Instance types

#[derive(Debug, Clone)]
pub struct InstanceState {
    pub code: i32,
    pub name: String,
}

#[derive(Debug, Clone)]
pub struct Instance {
    pub instance_id: String,
    pub image_id: String,
    pub instance_type: String,
    pub state: InstanceState,
    pub private_ip_address: Option<String>,
    pub public_ip_address: Option<String>,
    pub subnet_id: Option<String>,
    pub vpc_id: Option<String>,
    pub key_name: Option<String>,
    pub security_groups: Vec<String>,
    pub launch_time: String,
    pub tags: Tags,
    pub iam_instance_profile_arn: Option<String>,
    pub monitoring_state: String,
    pub placement_az: String,
    pub placement_group_name: Option<String>,
    pub placement_tenancy: Option<String>,
    pub placement_host_id: Option<String>,
    pub placement_affinity: Option<String>,
    pub placement_partition_number: Option<i32>,
    pub owner_id: String,
    /// ClassicLink VPC association: (vpc_id, [security_group_ids])
    pub classic_link_vpc: Option<(String, Vec<String>)>,
    /// Private DNS hostname type (e.g. "ip-name", "resource-name").
    pub private_dns_hostname_type: Option<String>,
    /// Whether to enable A record IP-based hostnames.
    pub enable_resource_name_dns_a_record: Option<bool>,
    /// Whether to enable AAAA record IP-based hostnames.
    pub enable_resource_name_dns_aaaa_record: Option<bool>,
    /// Per-instance burstable credit specification: "standard" | "unlimited".
    pub credit_specification: Option<String>,
    /// CPU options: (core_count, threads_per_core, amd_sev_snp).
    pub cpu_options: Option<InstanceCpuOptions>,
    /// Maintenance options.
    pub maintenance_options: Option<InstanceMaintenanceOptions>,
    /// Network performance bandwidth weighting: "default" | "vpc-1" | "ebs-1".
    pub network_bandwidth_weighting: Option<String>,
    /// Lifecycle code: e.g. "spot", "scheduled".
    pub lifecycle: Option<String>,
    /// Product codes attached to this instance (each `(code, code_type)`).
    pub product_codes: Vec<(String, String)>,
    /// Group 10: per-instance capacity-reservation specification.
    pub capacity_reservation_specification: Option<CapacityReservationSpecificationResponse>,
}

#[derive(Debug, Clone, Default)]
pub struct InstanceCpuOptions {
    pub core_count: Option<i32>,
    pub threads_per_core: Option<i32>,
    pub amd_sev_snp: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct InstanceMaintenanceOptions {
    pub auto_recovery: Option<String>,
    pub reboot_migration: Option<String>,
}

/// Account-level / per-region instance metadata defaults.
#[derive(Debug, Clone, Default)]
pub struct InstanceMetadataDefaults {
    pub http_tokens: Option<String>,
    pub http_put_response_hop_limit: Option<i32>,
    pub http_endpoint: Option<String>,
    pub instance_metadata_tags: Option<String>,
}

// EBS Volume types

#[derive(Debug, Clone)]
pub struct VolumeAttachment {
    pub volume_id: String,
    pub instance_id: String,
    pub device: String,
    pub state: String,
    pub attach_time: String,
    pub delete_on_termination: bool,
}

#[derive(Debug, Clone)]
pub struct Volume {
    pub volume_id: String,
    pub size: i32,
    pub snapshot_id: Option<String>,
    pub availability_zone: String,
    pub state: String,
    pub volume_type: String,
    pub iops: Option<i32>,
    pub throughput: Option<i32>,
    pub encrypted: bool,
    pub create_time: String,
    pub attachments: Vec<VolumeAttachment>,
    pub tags: Tags,
    /// One of "in-recycle-bin" or empty. Set when the volume is moved to
    /// the Recycle Bin (mock policy treats every deletion as recoverable).
    pub recycle_bin_state: Option<String>,
    /// Set when the volume was created via `CopyVolumes`.
    pub source_volume_id: Option<String>,
}

// EBS Snapshot types

#[derive(Debug, Clone)]
pub struct Snapshot {
    pub snapshot_id: String,
    pub volume_id: String,
    pub volume_size: i32,
    pub state: String,
    pub description: String,
    pub start_time: String,
    pub progress: String,
    pub owner_id: String,
    pub encrypted: bool,
    pub tags: Tags,
    /// Lock state: "governance" | "compliance" | "none".
    pub lock_state: String,
    pub lock_duration: Option<i32>,
    pub lock_created_on: Option<String>,
    pub lock_expires_on: Option<String>,
    pub lock_duration_start_time: Option<String>,
    pub cool_off_period: Option<i32>,
    pub cool_off_period_expires_on: Option<String>,
    /// Storage tier: "standard" | "archive".
    pub storage_tier: String,
    /// Status of the most recent tier-change operation.
    pub last_tiering_operation_status: Option<String>,
    /// Per-AZ fast-snapshot-restore states. Mutated by
    /// `EnableFastSnapshotRestores` / `DisableFastSnapshotRestores`.
    pub fast_snapshot_restore_states: Vec<FastSnapshotRestoreState>,
}

#[derive(Debug, Clone, Default)]
pub struct FastSnapshotRestoreState {
    pub availability_zone: String,
    /// One of `enabling`, `optimizing`, `enabled`, `disabling`, `disabled`.
    pub state: String,
}

// AMI / Image types

#[derive(Debug, Clone)]
pub struct Image {
    pub image_id: String,
    pub name: String,
    pub description: String,
    pub state: String,
    pub owner_id: String,
    pub architecture: String,
    pub image_type: String,
    pub platform: Option<String>,
    pub virtualization_type: String,
    pub root_device_type: String,
    pub root_device_name: String,
    pub public: bool,
    pub tags: Tags,
    pub source_instance_id: Option<String>,
    pub source_instance_type: String,
    pub launch_permissions: Vec<LaunchPermission>,
    /// Set to "recycled" while the AMI is in the Recycle Bin (after
    /// `DeregisterImage`); cleared on `RestoreImageFromRecycleBin`.
    pub recycle_bin_state: Option<String>,
    /// RFC 3339 timestamp set by `EnableImageDeprecation`; cleared by
    /// `DisableImageDeprecation`.
    pub deprecation_time: Option<String>,
    /// RFC 3339 timestamp at which the AMI entered the Recycle Bin. Set when
    /// `recycle_bin_state` becomes `recycled`.
    pub recycle_bin_enter_time: Option<String>,
    /// Account product-code list (optional).
    pub product_codes: Vec<(String, String)>,
    /// Fast-launch (`Windows AMI`) configuration set by `EnableFastLaunch` /
    /// `DisableFastLaunch`. `None` when fast-launch has never been configured.
    pub fast_launch_state: Option<FastLaunchState>,
    /// Image deregistration protection state. One of `enabled`,
    /// `enabled-with-cooldown`, `disabled`. `None` when never configured.
    pub deregistration_protection: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct FastLaunchState {
    /// One of "enabling", "enabled", "disabling", "disabled".
    pub state: String,
    pub image_id: String,
    /// Always "snapshot" today (the only supported `ResourceType`).
    pub resource_type: String,
    pub snapshot_configuration: SnapshotConfigurationRequest,
    pub launch_template: FastLaunchLaunchTemplateSpecification,
    pub max_parallel_launches: i32,
    pub owner_id: String,
    pub state_transition_time: String,
}

#[derive(Debug, Clone, Default)]
pub struct SnapshotConfigurationRequest {
    pub target_resource_count: Option<i32>,
}

#[derive(Debug, Clone, Default)]
pub struct FastLaunchLaunchTemplateSpecification {
    pub launch_template_id: Option<String>,
    pub launch_template_name: Option<String>,
    pub version: Option<String>,
}

#[derive(Debug, Clone, Default, PartialEq, Eq)]
pub struct LaunchPermission {
    pub user_id: Option<String>,
    pub group: Option<String>,
}

// Launch Template types

#[derive(Debug, Clone)]
pub struct LaunchTemplate {
    pub launch_template_id: String,
    pub launch_template_name: String,
    pub default_version_number: i64,
    pub latest_version_number: i64,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct LaunchTemplateVersion {
    pub version_number: i64,
    pub launch_template_id: String,
    pub launch_template_name: String,
    pub version_description: String,
    pub data: std::collections::HashMap<String, String>,
    pub default_version: bool,
}

// Spot Instance types

#[derive(Debug, Clone)]
pub struct SpotInstanceRequest {
    pub spot_instance_request_id: String,
    pub spot_price: String,
    pub instance_type: String,
    pub image_id: String,
    pub state: String,
    pub status_code: String,
    pub instance_id: Option<String>,
    pub tags: Tags,
}

// IAM Instance Profile Association

#[derive(Debug, Clone)]
pub struct IamInstanceProfileAssociation {
    pub association_id: String,
    pub instance_id: String,
    pub iam_instance_profile_arn: String,
    pub iam_instance_profile_name: String,
    pub state: String,
}

// Dedicated Host types

#[derive(Debug, Clone)]
pub struct DedicatedHost {
    pub host_id: String,
    pub availability_zone: String,
    pub instance_type: Option<String>,
    pub auto_placement: String,
    pub host_recovery: String,
    pub state: String,
    pub tags: Tags,
}

// EC2 Fleet types

#[derive(Debug, Clone)]
pub struct Ec2Fleet {
    pub fleet_id: String,
    pub state: String,
    pub fleet_type: String,
    pub create_time: String,
    pub tags: Tags,
    /// Total target capacity (modifiable via `ModifyFleet`).
    pub total_target_capacity: Option<i32>,
    /// On-demand portion of target capacity.
    pub on_demand_target_capacity: Option<i32>,
    /// Spot portion of target capacity.
    pub spot_target_capacity: Option<i32>,
    /// Free-form context string (modifiable via `ModifyFleet`).
    pub context: Option<String>,
}

// VPC Endpoint Service Configuration types

#[derive(Debug, Clone, Default)]
pub struct VpcEndpointServiceConfiguration {
    pub service_id: String,
    pub service_name: String,
    pub service_type: String,
    pub acceptance_required: bool,
    pub state: String,
    pub network_load_balancer_arns: Vec<String>,
    pub gateway_load_balancer_arns: Vec<String>,
    pub allowed_principals: Vec<String>,
    pub tags: Tags,
    /// One of "ServiceOwner", "Endpoint". Toggled by
    /// `ModifyVpcEndpointServicePayerResponsibility`.
    pub payer_responsibility: Option<String>,
    /// State of the service's private DNS verification. One of
    /// "pendingVerification", "verifying", "verified", "failed".
    pub private_dns_state: Option<String>,
}

// VPC Endpoint Connection types -- represents an endpoint that has connected
// to a service configuration. Created implicitly by `CreateVpcEndpoint` against
// a service ID, transitioned by `Accept`/`RejectVpcEndpointConnections`.

#[derive(Debug, Clone)]
pub struct VpcEndpointConnection {
    pub service_id: String,
    pub vpc_endpoint_id: String,
    pub vpc_endpoint_owner: String,
    /// One of "pendingAcceptance", "available", "rejected", "deleted".
    pub vpc_endpoint_state: String,
    pub creation_timestamp: String,
}

// VPC Endpoint Connection Notification (SNS topic for endpoint events).

#[derive(Debug, Clone)]
pub struct VpcEndpointConnectionNotification {
    pub connection_notification_id: String,
    pub connection_notification_arn: String,
    pub connection_events: Vec<String>,
    pub connection_notification_state: String,
    pub connection_notification_type: String,
    pub service_id: Option<String>,
    pub vpc_endpoint_id: Option<String>,
}

// VPC Block Public Access exclusion -- an opt-out scoped to a single VPC or
// subnet, allowing internet egress (or both directions) even when the
// account-level block is on.

#[derive(Debug, Clone)]
pub struct VpcBlockPublicAccessExclusion {
    pub exclusion_id: String,
    /// One of "allow-bidirectional", "allow-egress", "block-bidirectional".
    pub internet_gateway_exclusion_mode: String,
    pub resource_arn: String,
    /// One of "create-in-progress", "create-complete", "update-in-progress",
    /// "update-complete", "delete-in-progress", "delete-complete".
    pub state: String,
    pub creation_timestamp: String,
    pub last_update_timestamp: String,
    pub tags: Tags,
}

// VPC Block Public Access account-level options -- single-value per
// account/region, modified by `ModifyVpcBlockPublicAccessOptions`.

#[derive(Debug, Clone)]
pub struct VpcBlockPublicAccessOptions {
    pub aws_account_id: String,
    pub aws_region: String,
    /// One of "off", "block-bidirectional", "block-ingress".
    pub internet_gateway_block_mode: String,
    /// One of "default", "update-in-progress", "update-complete".
    pub state: String,
    pub last_update_timestamp: String,
}

// Per-VPC encryption control resource.

#[derive(Debug, Clone)]
pub struct VpcEncryptionControl {
    pub vpc_encryption_control_id: String,
    pub vpc_id: String,
    /// One of "enforce", "monitor".
    pub mode: String,
    /// One of "enforce-in-progress", "enforce-complete", "monitor-in-progress",
    /// "monitor-complete", "delete-in-progress", "delete-complete".
    pub state: String,
    /// History of mode changes ((mode, timestamp)).
    pub mode_history: Vec<(String, String)>,
    pub tags: Tags,
}

// Spot Fleet types

#[derive(Debug, Clone)]
pub struct SpotFleetRequest {
    pub spot_fleet_request_id: String,
    pub spot_fleet_request_state: String,
    pub target_capacity: i32,
    pub iam_fleet_role: String,
    pub create_time: String,
    pub tags: Tags,
}

// Subnet CIDR Reservation types

#[derive(Debug, Clone)]
pub struct SubnetCidrReservationEntry {
    pub reservation_id: String,
    pub subnet_id: String,
    pub cidr: String,
    pub reservation_type: String,
    pub description: String,
    pub owner_id: String,
}

// Subnet IPv6 CIDR association

#[derive(Debug, Clone)]
pub struct SubnetIpv6Cidr {
    pub association_id: String,
    pub ipv6_cidr_block: String,
    pub state: String,
}

// Placement Group

#[derive(Debug, Clone)]
pub struct PlacementGroup {
    pub group_id: String,
    pub group_name: String,
    pub group_arn: String,
    pub strategy: String,
    pub state: String,
    pub partition_count: Option<i32>,
    pub spread_level: Option<String>,
    pub tags: Tags,
}

// Network Interface Permission

#[derive(Debug, Clone)]
pub struct NetworkInterfacePermission {
    pub network_interface_permission_id: String,
    pub network_interface_id: String,
    pub aws_account_id: Option<String>,
    pub aws_service: Option<String>,
    pub permission: String,
    pub permission_state: String,
}

// Capacity Reservation

#[derive(Debug, Clone)]
pub struct CapacityReservation {
    pub capacity_reservation_id: String,
    pub capacity_reservation_arn: String,
    pub owner_id: String,
    pub instance_type: String,
    pub instance_platform: String,
    pub availability_zone: String,
    pub tenancy: String,
    pub total_instance_count: i32,
    pub available_instance_count: i32,
    pub ebs_optimized: bool,
    pub ephemeral_storage: bool,
    pub state: String,
    pub start_date: String,
    pub end_date: Option<String>,
    pub end_date_type: String,
    pub instance_match_criteria: String,
    pub create_date: String,
    pub outpost_arn: Option<String>,
    pub placement_group_arn: Option<String>,
    pub tags: Tags,
    /// Group 10: pending billing-ownership transfer target account ID.
    pub pending_billing_owner_account_id: Option<String>,
    /// Group 10: account ID that currently owns the unused-reservation billing.
    pub billing_owner_account_id: Option<String>,
    /// Group 10: when this reservation was split off, the parent reservation ID.
    pub target_capacity_reservation_id: Option<String>,
    /// Group 10: reservation type (e.g. "default", "capacity-block").
    pub reservation_type: Option<String>,
    /// Group 10: optional commitment details.
    pub commitment_info: Option<CapacityReservationCommitmentInfo>,
}

// Instance Connect Endpoint

#[derive(Debug, Clone)]
pub struct InstanceConnectEndpoint {
    pub instance_connect_endpoint_id: String,
    pub instance_connect_endpoint_arn: String,
    pub subnet_id: String,
    pub vpc_id: String,
    pub availability_zone: String,
    pub state: String,
    pub created_at: String,
    pub preserve_client_ip: bool,
    pub security_group_ids: Vec<String>,
    pub network_interface_ids: Vec<String>,
    pub dns_name: String,
    pub fips_dns_name: String,
    pub ip_address_type: String,
    pub owner_id: String,
    pub tags: Tags,
}

// COIP (Customer-Owned IP) Pool

#[derive(Debug, Clone)]
pub struct CoipPool {
    pub pool_id: String,
    pub pool_arn: String,
    pub local_gateway_route_table_id: String,
    pub pool_cidrs: Vec<String>,
    pub tags: Tags,
}

// Security Group VPC Association

#[derive(Debug, Clone)]
pub struct SecurityGroupVpcAssociation {
    pub group_id: String,
    pub vpc_id: String,
    pub vpc_owner_id: String,
    pub state: String,
}

// Enclave Certificate IAM Role Association

#[derive(Debug, Clone)]
pub struct EnclaveCertificateIamRoleAssociation {
    pub certificate_arn: String,
    pub role_arn: String,
    pub certificate_s3_bucket_name: String,
    pub certificate_s3_object_key: String,
    pub encryption_kms_key_id: String,
}

// Mac System Integrity Protection Modification Task

#[derive(Debug, Clone)]
pub struct MacSipModificationTask {
    pub task_id: String,
    pub instance_id: String,
    pub task_type: String,
    pub task_state: String,
    pub start_time: String,
    pub apple_internal: Option<String>,
    pub base_system: Option<String>,
    pub debugging_restrictions: Option<String>,
    pub dtrace_restrictions: Option<String>,
    pub filesystem_protections: Option<String>,
    pub kext_signing: Option<String>,
    pub nvram_protections: Option<String>,
    pub status: Option<String>,
    pub tags: Tags,
}

// Declarative Policies Report

#[derive(Debug, Clone)]
pub struct DeclarativePoliciesReport {
    pub report_id: String,
    pub s3_bucket: String,
    pub s3_prefix: Option<String>,
    pub target_id: String,
    pub status: String,
    pub start_time: String,
    pub end_time: Option<String>,
    pub tags: Tags,
}

// Capacity Reservation Fleet

#[derive(Debug, Clone)]
pub struct CapacityReservationFleetInstanceSpec {
    pub instance_type: String,
    pub instance_platform: String,
    pub availability_zone: Option<String>,
    pub ebs_optimized: Option<bool>,
    pub priority: Option<i32>,
    pub weight: Option<f64>,
}

#[derive(Debug, Clone)]
pub struct CapacityReservationFleet {
    pub capacity_reservation_fleet_id: String,
    pub capacity_reservation_fleet_arn: String,
    pub state: String,
    pub tenancy: String,
    pub allocation_strategy: String,
    pub instance_match_criteria: String,
    pub total_target_capacity: i32,
    pub total_fulfilled_capacity: f64,
    pub create_time: String,
    pub end_date: Option<String>,
    pub instance_type_specifications: Vec<CapacityReservationFleetInstanceSpec>,
    pub tags: Tags,
}

// Mac Volume Ownership Delegation Task

#[derive(Debug, Clone)]
pub struct MacVolumeOwnershipTask {
    pub task_id: String,
    /// One of "pending", "in-progress", "completed", "failed".
    pub mac_volume_ownership_task_state: String,
    pub volume_id: String,
    pub source_volume_owner_account_id: String,
    pub target_volume_owner_account_id: String,
    pub creation_time: String,
    pub completion_time: Option<String>,
}

// Replace Root Volume Task

#[derive(Debug, Clone)]
pub struct ReplaceRootVolumeTask {
    pub task_id: String,
    pub instance_id: String,
    /// One of "pending", "in-progress", "failing", "succeeding", "failed",
    /// "succeeded".
    pub task_state: String,
    pub image_id: Option<String>,
    pub snapshot_id: Option<String>,
    pub delete_replaced_root_volume: bool,
    pub start_time: String,
    pub complete_time: Option<String>,
    pub tags: Tags,
}

// Snapshot Import Task

#[derive(Debug, Clone)]
pub struct SnapshotImportTask {
    pub import_task_id: String,
    /// One of "active", "cancelling", "cancelled", "deleting", "deleted",
    /// "completed".
    pub status: String,
    pub description: Option<String>,
    pub disk_image_size: Option<f64>,
    pub format: Option<String>,
    pub url: Option<String>,
    pub user_bucket_s3_bucket: Option<String>,
    pub user_bucket_s3_key: Option<String>,
    pub owner_id: String,
    pub encrypted: bool,
    pub kms_key_id: Option<String>,
    /// Set after the task completes and a snapshot is materialised.
    pub snapshot_id: Option<String>,
    pub tags: Tags,
}

// Conversion Task (ImportInstance / ImportVolume)

#[derive(Debug, Clone)]
pub struct ImportInstanceVolumeDetail {
    pub availability_zone: Option<String>,
    pub bytes_converted: Option<i64>,
    pub description: Option<String>,
    pub status: String,
}

#[derive(Debug, Clone)]
pub struct ConversionTask {
    pub conversion_task_id: String,
    pub expiration_time: String,
    pub description: Option<String>,
    pub instance_id: Option<String>,
    /// One of "Windows", "Linux".
    pub platform: String,
    pub volumes: Vec<ImportInstanceVolumeDetail>,
    /// One of "active", "cancelling", "cancelled", "completed".
    pub state: String,
    pub status_message: Option<String>,
    pub tags: Tags,
}

// Export Task (CreateInstanceExportTask)

#[derive(Debug, Clone)]
pub struct ExportTask {
    pub export_task_id: String,
    pub description: String,
    pub instance_id: String,
    /// One of "citrix", "vmware", "microsoft".
    pub target_environment: String,
    /// One of "vmdk", "raw", "vhd".
    pub disk_image_format: String,
    pub container_format: Option<String>,
    pub s3_bucket: String,
    pub s3_prefix: Option<String>,
    pub s3_key: String,
    /// One of "active", "cancelling", "cancelled", "completed".
    pub status: String,
    pub status_message: Option<String>,
    pub tags: Tags,
}

// Trunk Interface Association

#[derive(Debug, Clone)]
pub struct TrunkInterfaceAssociation {
    pub association_id: String,
    pub branch_interface_id: String,
    pub trunk_interface_id: String,
    /// One of "vlan", "gre".
    pub interface_protocol: String,
    pub vlan_id: Option<i32>,
    pub gre_key: Option<i32>,
    pub tags: Tags,
}

// Secondary Network and Subnet

#[derive(Debug, Clone)]
pub struct SecondaryNetwork {
    pub network_id: String,
    pub vpc_id: String,
    pub primary_cidr_block: String,
    pub secondary_cidr_blocks: Vec<String>,
    /// One of "pending", "available", "deleting", "deleted".
    pub state: String,
    pub network_border_group: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct SecondarySubnet {
    pub subnet_id: String,
    pub vpc_id: String,
    pub secondary_network_id: String,
    pub cidr_block: String,
    pub availability_zone: String,
    pub state: String,
    pub tags: Tags,
}

// ---------------------------------------------------------------------------
// Group 5 additions: Reserved Instances, FPGA Image, Image tasks, Instance
// Event windows / events, Host reservations, Scheduled instances.
// ---------------------------------------------------------------------------

/// Quote acceptance record from `AcceptReservedInstancesExchangeQuote`.
#[derive(Debug, Clone)]
pub struct ReservedInstancesExchange {
    pub exchange_id: String,
    pub target_reserved_instances_ids: Vec<String>,
    pub source_reserved_instances_ids: Vec<String>,
    pub status: String,
    pub status_message: Option<String>,
    pub time: String,
}

#[derive(Debug, Clone)]
pub struct ReservedInstancesListing {
    pub listing_id: String,
    pub reserved_instances_id: String,
    pub instance_count: i32,
    pub price_schedules: Vec<PriceSchedule>,
    pub status: String,
    pub status_message: Option<String>,
    pub create_date: String,
    pub update_date: String,
    pub client_token: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct PriceSchedule {
    pub term: i64,
    pub price: f64,
    pub currency_code: String,
    pub active: bool,
}

#[derive(Debug, Clone)]
pub struct ReservedInstancesPurchase {
    pub purchase_id: String,
    pub reserved_instances_offering_id: String,
    pub instance_count: i32,
    pub limit_price: Option<String>,
    pub purchase_time: String,
    pub tags: Tags,
    /// Whether this purchase is queued (not yet active). Set to `true` when
    /// the request specifies `PurchaseTime` in the future.
    pub queued: bool,
    /// The reserved instances created by this purchase.
    pub reserved_instances_id: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ReservedInstances {
    pub reserved_instances_id: String,
    pub instance_type: String,
    pub instance_count: i32,
    pub product_description: String,
    pub scope: String,
    pub currency_code: String,
    pub duration: i64,
    pub fixed_price: f64,
    pub usage_price: f64,
    pub offering_class: String,
    pub offering_type: String,
    pub instance_tenancy: String,
    pub start: String,
    pub end: String,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct ReservedInstancesModification {
    pub modification_id: String,
    pub reserved_instances_ids: Vec<String>,
    pub target_configurations: Vec<ReservedInstancesConfiguration>,
    pub status: String,
    pub status_message: Option<String>,
    pub create_date: String,
    pub update_date: String,
    pub effective_date: String,
    pub client_token: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ReservedInstancesConfiguration {
    pub availability_zone: Option<String>,
    pub instance_count: Option<i32>,
    pub instance_type: Option<String>,
    pub platform: Option<String>,
    pub scope: Option<String>,
}

#[derive(Debug, Clone)]
pub struct FpgaImage {
    pub fpga_image_id: String,
    pub fpga_image_global_id: String,
    pub name: String,
    pub description: Option<String>,
    pub shell_version: Option<String>,
    pub pci_id_vendor: Option<String>,
    pub pci_id_device: Option<String>,
    pub state: String,
    pub create_time: String,
    pub update_time: String,
    pub owner_id: String,
    pub owner_alias: Option<String>,
    pub product_codes: Vec<(String, String)>,
    pub tags: Tags,
    pub public: bool,
    pub data_retention_support: bool,
    pub instance_types: Vec<String>,
    /// Per-account load permissions: each is a `(scope, value)` pair where
    /// `scope` is "user_id" or "group".
    pub load_permissions: Vec<(String, String)>,
}

#[derive(Debug, Clone)]
pub struct ImageUsageReport {
    pub report_id: String,
    pub image_id: String,
    pub account_filters: Vec<String>,
    pub resource_types: Vec<String>,
    pub status: String,
    pub creation_time: String,
    pub completion_time: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct RestoreImageTask {
    pub image_id: String,
    pub name: String,
    pub s3_object_url: String,
    pub status: String,
    pub status_message: Option<String>,
    pub creation_time: String,
}

#[derive(Debug, Clone)]
pub struct StoreImageTask {
    pub image_id: String,
    pub ami_id: String,
    pub bucket: String,
    pub s3_object_key: String,
    pub store_task_state: String,
    pub store_task_failure_reason: Option<String>,
    pub progress_percentage: i32,
    pub task_start_time: String,
}

#[derive(Debug, Clone)]
pub struct ImportImageTask {
    pub import_task_id: String,
    pub architecture: Option<String>,
    pub description: Option<String>,
    pub encrypted: bool,
    pub hypervisor: Option<String>,
    pub image_id: Option<String>,
    pub license_type: Option<String>,
    pub platform: Option<String>,
    pub progress: Option<String>,
    pub snapshot_details: Vec<ImportImageSnapshotDetail>,
    pub status: String,
    pub status_message: Option<String>,
    pub tags: Tags,
    pub usage_operation: Option<String>,
    pub boot_mode: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ImportImageSnapshotDetail {
    pub disk_image_size: Option<f64>,
    pub format: Option<String>,
    pub progress: Option<String>,
    pub snapshot_id: Option<String>,
    pub status: Option<String>,
    pub url: Option<String>,
    pub user_bucket_s3_bucket: Option<String>,
    pub user_bucket_s3_key: Option<String>,
}

/// Per-region allowed AMI criteria entry (image owners, names, etc.).
#[derive(Debug, Clone, Default)]
pub struct AllowedImageCriterion {
    pub image_providers: Vec<String>,
    pub marketplace_product_codes: Vec<String>,
    pub deprecation_time_condition: Option<String>,
}

#[derive(Debug, Clone)]
pub struct InstanceEventWindow {
    pub instance_event_window_id: String,
    pub name: String,
    pub time_ranges: Vec<InstanceEventWindowTimeRange>,
    pub cron_expression: Option<String>,
    pub association_target: Option<InstanceEventWindowAssociation>,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct InstanceEventWindowTimeRange {
    pub start_week_day: Option<String>,
    pub start_hour: Option<i32>,
    pub end_week_day: Option<String>,
    pub end_hour: Option<i32>,
}

#[derive(Debug, Clone, Default)]
pub struct InstanceEventWindowAssociation {
    pub instance_ids: Vec<String>,
    pub dedicated_host_ids: Vec<String>,
    pub tags: Vec<(String, String)>,
}

/// One scheduled instance status event (e.g. retirement, system reboot).
#[derive(Debug, Clone)]
pub struct InstanceEvent {
    pub event_id: String,
    pub instance_id: String,
    pub code: String,
    pub description: String,
    pub not_before: String,
    pub not_after: String,
    pub not_before_deadline: Option<String>,
}

/// Subscribe-by-tag instance event notification attribute.
#[derive(Debug, Clone, Default)]
pub struct InstanceTagNotificationAttributes {
    pub include_all_tags_of_instance: bool,
    pub instance_tag_keys: Vec<String>,
}

#[derive(Debug, Clone)]
pub struct HostReservation {
    pub host_reservation_id: String,
    pub host_id_set: Vec<String>,
    pub currency_code: String,
    pub duration: i32,
    pub end: Option<String>,
    pub hourly_price: String,
    pub instance_family: String,
    pub offering_id: String,
    pub payment_option: String,
    pub start: String,
    pub state: String,
    pub upfront_price: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct ScheduledInstance {
    pub scheduled_instance_id: String,
    pub instance_type: String,
    pub platform: String,
    pub network_platform: String,
    pub availability_zone: String,
    pub instance_count: i32,
    pub hourly_price: String,
    pub total_scheduled_instance_hours: i32,
    pub term_start_date: String,
    pub term_end_date: String,
    pub recurrence: ScheduledInstanceRecurrence,
    pub slot_duration_in_hours: i32,
    pub previous_slot_end_time: Option<String>,
    pub next_slot_start_time: Option<String>,
    pub create_date: String,
}

#[derive(Debug, Clone, Default)]
pub struct ScheduledInstanceRecurrence {
    pub frequency: Option<String>,
    pub interval: Option<i32>,
    pub occurrence_day_set: Vec<i32>,
    pub occurrence_relative_to_end: Option<bool>,
    pub occurrence_unit: Option<String>,
}

/// Per-instance status report submitted via `ReportInstanceStatus`.
#[derive(Debug, Clone)]
pub struct InstanceStatusReport {
    pub instance_id: String,
    pub status: String,
    pub reason_codes: Vec<String>,
    pub start_time: Option<String>,
    pub end_time: Option<String>,
    pub description: Option<String>,
}

// ===== Group 6: Network Insights =====

#[derive(Debug, Clone, Default)]
pub struct PathStatementSpec {
    pub packet_header_statement: Option<PacketHeaderStatementSpec>,
    pub resource_statement: Option<ResourceStatementSpec>,
}

#[derive(Debug, Clone, Default)]
pub struct PacketHeaderStatementSpec {
    pub destination_addresses: Vec<String>,
    pub destination_ports: Vec<String>,
    pub destination_prefix_lists: Vec<String>,
    pub protocols: Vec<String>,
    pub source_addresses: Vec<String>,
    pub source_ports: Vec<String>,
    pub source_prefix_lists: Vec<String>,
}

#[derive(Debug, Clone, Default)]
pub struct ResourceStatementSpec {
    pub resource_types: Vec<String>,
    pub resources: Vec<String>,
}

#[derive(Debug, Clone, Default)]
pub struct AccessScopePathSpec {
    pub source: Option<PathStatementSpec>,
    pub destination: Option<PathStatementSpec>,
    pub through_resources: Vec<ResourceStatementSpec>,
}

#[derive(Debug, Clone)]
pub struct NetworkInsightsAccessScope {
    pub network_insights_access_scope_id: String,
    pub network_insights_access_scope_arn: String,
    pub created_date: String,
    pub updated_date: String,
    pub tags: Tags,
    pub match_paths: Vec<AccessScopePathSpec>,
    pub exclude_paths: Vec<AccessScopePathSpec>,
}

#[derive(Debug, Clone)]
pub struct NetworkInsightsAccessScopeAnalysis {
    pub network_insights_access_scope_analysis_id: String,
    pub network_insights_access_scope_analysis_arn: String,
    pub network_insights_access_scope_id: String,
    pub status: String,
    pub status_message: Option<String>,
    pub warning_message: Option<String>,
    pub start_date: String,
    pub end_date: Option<String>,
    pub findings_found: String,
    pub analyzed_eni_count: i32,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct NetworkInsightsPathFilterPortRange {
    pub from_port: Option<i32>,
    pub to_port: Option<i32>,
}

#[derive(Debug, Clone, Default)]
pub struct NetworkInsightsPathFilter {
    pub destination_address: Option<String>,
    pub destination_port_range: Option<NetworkInsightsPathFilterPortRange>,
    pub source_address: Option<String>,
    pub source_port_range: Option<NetworkInsightsPathFilterPortRange>,
}

#[derive(Debug, Clone)]
pub struct NetworkInsightsPath {
    pub network_insights_path_id: String,
    pub network_insights_path_arn: String,
    pub created_date: String,
    pub source: Option<String>,
    pub destination: Option<String>,
    pub source_arn: Option<String>,
    pub destination_arn: Option<String>,
    pub source_ip: Option<String>,
    pub destination_ip: Option<String>,
    pub protocol: String,
    pub destination_port: Option<i32>,
    pub tags: Tags,
    pub filter_at_source: NetworkInsightsPathFilter,
    pub filter_at_destination: NetworkInsightsPathFilter,
}

#[derive(Debug, Clone)]
pub struct NetworkInsightsAnalysis {
    pub network_insights_analysis_id: String,
    pub network_insights_analysis_arn: String,
    pub network_insights_path_id: String,
    pub additional_accounts: Vec<String>,
    pub filter_in_arns: Vec<String>,
    pub start_date: String,
    pub end_date: Option<String>,
    pub status: String,
    pub status_message: Option<String>,
    pub warning_message: Option<String>,
    pub network_path_found: bool,
    pub tags: Tags,
}

// ===== Group 6: Traffic Mirror =====

#[derive(Debug, Clone, Default)]
pub struct TrafficMirrorPortRange {
    pub from_port: Option<i32>,
    pub to_port: Option<i32>,
}

#[derive(Debug, Clone)]
pub struct TrafficMirrorFilterRule {
    pub traffic_mirror_filter_rule_id: String,
    pub traffic_mirror_filter_id: String,
    pub traffic_direction: String,
    pub rule_number: i32,
    pub rule_action: String,
    pub protocol: Option<i32>,
    pub destination_port_range: Option<TrafficMirrorPortRange>,
    pub source_port_range: Option<TrafficMirrorPortRange>,
    pub destination_cidr_block: String,
    pub source_cidr_block: String,
    pub description: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TrafficMirrorFilter {
    pub traffic_mirror_filter_id: String,
    pub description: Option<String>,
    pub ingress_filter_rules: Vec<TrafficMirrorFilterRule>,
    pub egress_filter_rules: Vec<TrafficMirrorFilterRule>,
    pub network_services: Vec<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TrafficMirrorSession {
    pub traffic_mirror_session_id: String,
    pub traffic_mirror_target_id: String,
    pub traffic_mirror_filter_id: String,
    pub network_interface_id: String,
    pub owner_id: String,
    pub packet_length: Option<i32>,
    pub session_number: i32,
    pub virtual_network_id: Option<i32>,
    pub description: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct TrafficMirrorTarget {
    pub traffic_mirror_target_id: String,
    pub network_interface_id: Option<String>,
    pub network_load_balancer_arn: Option<String>,
    pub gateway_load_balancer_endpoint_id: Option<String>,
    pub r#type: String,
    pub description: Option<String>,
    pub owner_id: String,
    pub tags: Tags,
}

// ===== Group 7: Client VPN =====

#[derive(Debug, Clone, Default)]
pub struct ClientVpnEndpointStatus {
    pub code: String,
    pub message: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct ClientVpnAuthorizationRuleStatus {
    pub code: String,
    pub message: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct ClientVpnRouteStatus {
    pub code: String,
    pub message: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct ClientVpnAssociationStatus {
    pub code: String,
    pub message: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct ClientVpnConnectionStatus {
    pub code: String,
    pub message: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ClientVpnEndpoint {
    pub client_vpn_endpoint_id: String,
    pub description: Option<String>,
    pub status: ClientVpnEndpointStatus,
    pub creation_time: String,
    pub deletion_time: Option<String>,
    pub dns_name: String,
    pub client_cidr_block: String,
    pub dns_servers: Vec<String>,
    pub split_tunnel: bool,
    pub vpn_protocol: String,
    pub transport_protocol: String,
    pub vpn_port: i32,
    pub server_certificate_arn: String,
    pub authentication_options: Vec<String>,
    pub connection_log_options_enabled: bool,
    pub connection_log_options_cloudwatch_log_group: Option<String>,
    pub connection_log_options_cloudwatch_log_stream: Option<String>,
    pub tags: Tags,
    pub security_group_ids: Vec<String>,
    pub vpc_id: Option<String>,
    pub self_service_portal_url: Option<String>,
    pub self_service_portal: String,
    pub session_timeout_hours: i32,
    pub client_login_banner_enabled: bool,
    pub client_login_banner_text: Option<String>,
    pub disconnect_on_session_timeout: bool,
    pub client_route_enforcement_enforced: bool,
    pub client_certificate_revocation_list: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ClientVpnTargetNetworkAssociation {
    pub association_id: String,
    pub vpc_id: String,
    pub target_network_id: String, // subnet_id
    pub client_vpn_endpoint_id: String,
    pub security_groups: Vec<String>,
    pub status: ClientVpnAssociationStatus,
}

#[derive(Debug, Clone)]
pub struct ClientVpnAuthorizationRule {
    pub client_vpn_endpoint_id: String,
    pub group_id: Option<String>,
    pub access_all: bool,
    pub destination_cidr: String,
    pub description: Option<String>,
    pub status: ClientVpnAuthorizationRuleStatus,
}

#[derive(Debug, Clone)]
pub struct ClientVpnRoute {
    pub client_vpn_endpoint_id: String,
    pub destination_cidr: String,
    pub target_subnet: String,
    pub r#type: String,
    pub origin: String,
    pub status: ClientVpnRouteStatus,
    pub description: Option<String>,
}

#[derive(Debug, Clone)]
pub struct ClientVpnConnection {
    pub connection_id: String,
    pub client_vpn_endpoint_id: String,
    pub username: Option<String>,
    pub status: ClientVpnConnectionStatus,
    pub posture_compliance_statuses: Vec<String>,
    pub common_name: Option<String>,
    pub connection_established_time: String,
    pub connection_end_time: Option<String>,
    pub ingress_bytes: String,
    pub egress_bytes: String,
    pub ingress_packets: String,
    pub egress_packets: String,
    pub client_ip: Option<String>,
    pub client_port: Option<String>,
    pub timestamp: String,
}

// ===== Group 7: Local Gateway =====

#[derive(Debug, Clone)]
pub struct LocalGateway {
    pub local_gateway_id: String,
    pub outpost_arn: String,
    pub owner_id: String,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayRoute {
    pub destination_cidr_block: String,
    pub local_gateway_route_table_id: String,
    pub r#type: String,
    pub state: String,
    pub local_gateway_route_table_arn: Option<String>,
    pub owner_id: String,
    pub subnet_id: Option<String>,
    pub network_interface_id: Option<String>,
    pub destination_prefix_list_id: Option<String>,
    pub coip_pool_id: Option<String>,
    pub local_gateway_virtual_interface_group_id: Option<String>,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayRouteTable {
    pub local_gateway_route_table_id: String,
    pub local_gateway_route_table_arn: String,
    pub local_gateway_id: String,
    pub owner_id: String,
    pub state: String,
    pub mode: String,
    pub tags: Tags,
    pub state_reason_code: Option<String>,
    pub state_reason_message: Option<String>,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayRouteTableVirtualInterfaceGroupAssociation {
    pub local_gateway_route_table_virtual_interface_group_association_id: String,
    pub local_gateway_virtual_interface_group_id: String,
    pub local_gateway_route_table_id: String,
    pub local_gateway_route_table_arn: String,
    pub local_gateway_id: String,
    pub owner_id: String,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayRouteTableVpcAssociation {
    pub local_gateway_route_table_vpc_association_id: String,
    pub local_gateway_route_table_id: String,
    pub local_gateway_route_table_arn: String,
    pub local_gateway_id: String,
    pub vpc_id: String,
    pub owner_id: String,
    pub state: String,
    pub tags: Tags,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayVirtualInterface {
    pub local_gateway_virtual_interface_id: String,
    pub local_gateway_id: String,
    pub vlan: i32,
    pub local_address: String,
    pub peer_address: String,
    pub local_bgp_asn: i32,
    pub peer_bgp_asn: i32,
    pub owner_id: String,
    pub tags: Tags,
    pub configuration_state: String,
    pub peer_bgp_asn_extended: Option<i64>,
    pub local_gateway_virtual_interface_arn: Option<String>,
}

#[derive(Debug, Clone)]
pub struct LocalGatewayVirtualInterfaceGroup {
    pub local_gateway_virtual_interface_group_id: String,
    pub local_gateway_virtual_interface_ids: Vec<String>,
    pub local_gateway_id: String,
    pub owner_id: String,
    pub tags: Tags,
    pub configuration_state: Option<String>,
    pub local_bgp_asn: i32,
    pub local_bgp_asn_extended: Option<i64>,
    pub local_gateway_virtual_interface_group_arn: Option<String>,
}

// ===== Group 8: Route Server =====

/// A Route Server resource. Tracks BGP route exchange between AWS-managed
/// route servers and customer route reflectors deployed in a VPC.
#[derive(Debug, Clone)]
pub struct RouteServer {
    pub route_server_id: String,
    pub route_server_arn: String,
    pub amazon_side_asn: i64,
    /// One of "pending", "available", "modifying", "deleting", "deleted".
    pub state: String,
    /// One of "enable", "disable", "reset".
    pub persist_routes: String,
    pub persist_routes_duration: Option<i64>,
    pub sns_notifications_enabled: bool,
    pub sns_topic_arn: Option<String>,
    pub tags: Tags,
}

/// A Route Server endpoint -- a route server's foothold in a single subnet of a
/// VPC, materialised as an ENI.
#[derive(Debug, Clone)]
pub struct RouteServerEndpoint {
    pub route_server_endpoint_id: String,
    pub route_server_id: String,
    pub vpc_id: String,
    pub subnet_id: String,
    pub eni_id: String,
    pub eni_address: Option<String>,
    /// One of "pending", "available", "deleting", "deleted", "failed".
    pub state: String,
    pub failure_reason: Option<String>,
    pub tags: Tags,
}

/// A BGP peer attached to a route server endpoint.
#[derive(Debug, Clone)]
pub struct RouteServerPeer {
    pub route_server_peer_id: String,
    pub route_server_endpoint_id: String,
    pub route_server_id: String,
    pub vpc_id: String,
    pub subnet_id: String,
    pub peer_address: String,
    /// One of "pending", "available", "deleting", "deleted", "failed".
    pub state: String,
    pub failure_reason: Option<String>,
    pub options: RouteServerPeerOptions,
    pub endpoint_eni_id: Option<String>,
    pub endpoint_eni_address: Option<String>,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct RouteServerPeerOptions {
    pub peer_asn: i64,
    /// One of "bgp-keepalive", "bfd".
    pub peer_liveness_detection: String,
    pub bgp_options: Option<RouteServerBgpOptions>,
}

#[derive(Debug, Clone, Default)]
pub struct RouteServerBgpOptions {
    pub peer_asn: Option<i64>,
    /// One of "bgp-keepalive", "bfd".
    pub peer_liveness_detection: Option<String>,
}

/// A Route Server VPC association.
#[derive(Debug, Clone)]
pub struct RouteServerAssociation {
    pub route_server_id: String,
    pub vpc_id: String,
    /// One of "associating", "associated", "disassociating", "disassociated".
    pub state: String,
    /// Route tables that have route-server propagation enabled, in addition
    /// to whatever the VPC's main table is. Mutated by
    /// `EnableRouteServerPropagation` / `DisableRouteServerPropagation`.
    pub propagations: Vec<String>,
}

// ===== Group 9: Verified Access =====

/// A Verified Access instance.
#[derive(Debug, Clone)]
pub struct VerifiedAccessInstance {
    pub verified_access_instance_id: String,
    pub description: Option<String>,
    pub creation_time: String,
    pub last_updated_time: String,
    pub fips_enabled: bool,
    pub cidr_endpoints_custom_subdomain: Option<String>,
    pub name: Option<String>,
    /// IDs of attached trust providers (resolved into condensed views in
    /// responses).
    pub trust_provider_ids: Vec<String>,
    pub tags: Tags,
}

/// A Verified Access trust provider.
#[derive(Debug, Clone)]
pub struct VerifiedAccessTrustProvider {
    pub verified_access_trust_provider_id: String,
    pub description: Option<String>,
    /// One of "user", "device".
    pub trust_provider_type: String,
    pub user_trust_provider_type: Option<String>,
    pub device_trust_provider_type: Option<String>,
    pub oidc_options: Option<VerifiedAccessOidcOptions>,
    pub device_options: Option<VerifiedAccessDeviceOptions>,
    pub native_application_oidc_options: Option<VerifiedAccessNativeApplicationOidcOptions>,
    pub policy_reference_name: String,
    pub creation_time: String,
    pub last_updated_time: String,
    pub sse_specification: VerifiedAccessSseSpecification,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessOidcOptions {
    pub issuer: Option<String>,
    pub authorization_endpoint: Option<String>,
    pub token_endpoint: Option<String>,
    pub user_info_endpoint: Option<String>,
    pub client_id: Option<String>,
    pub client_secret: Option<String>,
    pub scope: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessDeviceOptions {
    pub tenant_id: Option<String>,
    pub public_signing_key_url: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessNativeApplicationOidcOptions {
    pub public_signing_key_endpoint: Option<String>,
    pub issuer: Option<String>,
    pub authorization_endpoint: Option<String>,
    pub token_endpoint: Option<String>,
    pub user_info_endpoint: Option<String>,
    pub client_id: Option<String>,
    pub client_secret: Option<String>,
    pub scope: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessSseSpecification {
    pub customer_managed_key_enabled: Option<bool>,
    pub kms_key_arn: Option<String>,
}

/// A Verified Access group within an instance.
#[derive(Debug, Clone)]
pub struct VerifiedAccessGroup {
    pub verified_access_group_id: String,
    pub verified_access_group_arn: String,
    pub verified_access_instance_id: String,
    pub owner: String,
    pub description: Option<String>,
    pub creation_time: String,
    pub last_updated_time: String,
    pub deletion_time: Option<String>,
    pub sse_specification: VerifiedAccessSseSpecification,
    pub policy_document: Option<String>,
    pub policy_enabled: bool,
    pub tags: Tags,
}

/// A Verified Access endpoint within a group.
#[derive(Debug, Clone)]
pub struct VerifiedAccessEndpoint {
    pub verified_access_endpoint_id: String,
    pub verified_access_instance_id: String,
    pub verified_access_group_id: String,
    pub application_domain: Option<String>,
    /// One of "load-balancer", "network-interface", "cidr", "rds".
    pub endpoint_type: String,
    pub attachment_type: String,
    pub domain_certificate_arn: Option<String>,
    pub endpoint_domain: Option<String>,
    pub device_validation_domain: Option<String>,
    pub security_group_ids: Vec<String>,
    pub load_balancer_options: Option<VerifiedAccessEndpointLoadBalancerOptions>,
    pub network_interface_options: Option<VerifiedAccessEndpointEniOptions>,
    pub cidr_options: Option<VerifiedAccessEndpointCidrOptions>,
    pub rds_options: Option<VerifiedAccessEndpointRdsOptions>,
    pub status_code: String,
    pub status_message: Option<String>,
    pub description: Option<String>,
    pub creation_time: String,
    pub last_updated_time: String,
    pub deletion_time: Option<String>,
    pub sse_specification: VerifiedAccessSseSpecification,
    pub policy_document: Option<String>,
    pub policy_enabled: bool,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessEndpointPortRange {
    pub from_port: Option<i32>,
    pub to_port: Option<i32>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessEndpointLoadBalancerOptions {
    pub load_balancer_arn: Option<String>,
    pub port: Option<i32>,
    pub port_ranges: Vec<VerifiedAccessEndpointPortRange>,
    pub protocol: Option<String>,
    pub subnet_ids: Vec<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessEndpointEniOptions {
    pub network_interface_id: Option<String>,
    pub port: Option<i32>,
    pub port_ranges: Vec<VerifiedAccessEndpointPortRange>,
    pub protocol: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessEndpointCidrOptions {
    pub cidr: Option<String>,
    pub port_ranges: Vec<VerifiedAccessEndpointPortRange>,
    pub protocol: Option<String>,
    pub subnet_ids: Vec<String>,
}

#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessEndpointRdsOptions {
    pub port: Option<i32>,
    pub protocol: Option<String>,
    pub rds_db_cluster_arn: Option<String>,
    pub rds_db_instance_arn: Option<String>,
    pub rds_db_proxy_arn: Option<String>,
    pub rds_endpoint: Option<String>,
    pub subnet_ids: Vec<String>,
}

/// A trust-provider <-> instance attachment record.
#[derive(Debug, Clone)]
pub struct VerifiedAccessTrustProviderAttachment {
    pub instance_id: String,
    pub trust_provider_id: String,
}

/// Logging configuration for a Verified Access instance.
#[derive(Debug, Clone, Default)]
pub struct VerifiedAccessLogs {
    pub cloud_watch_logs_enabled: bool,
    pub cloud_watch_logs_log_group: Option<String>,
    pub kinesis_data_firehose_enabled: bool,
    pub kinesis_data_firehose_delivery_stream: Option<String>,
    pub s3_enabled: bool,
    pub s3_bucket_name: Option<String>,
    pub s3_bucket_owner: Option<String>,
    pub s3_prefix: Option<String>,
    pub log_version: Option<String>,
    pub include_trust_context: Option<bool>,
}

// --- Group 10 additions: Capacity Reservation extensions ---

/// Pending / accepted billing-ownership offer for a capacity reservation.
#[derive(Debug, Clone)]
pub struct BillingOwnershipOffer {
    pub capacity_reservation_id: String,
    pub unused_reservation_billing_owner_id: String,
    pub requested_by: String,
    /// One of "pending", "accepted", "cancelled", "rejected", "deleted", "expired".
    pub status: String,
    pub status_message: Option<String>,
    pub last_update_time: String,
}

/// S3 destination for a Capacity Manager data export.
#[derive(Debug, Clone, Default)]
pub struct S3DestinationOptions {
    pub bucket: String,
    pub prefix: Option<String>,
}

/// Capacity Manager data export.
#[derive(Debug, Clone)]
pub struct CapacityManagerDataExport {
    pub data_export_id: String,
    /// One of "ondemand", "daily", "weekly", "monthly".
    pub schedule: String,
    pub organization_account_ids: Vec<String>,
    /// One of "parquet", "csv".
    pub output_format: String,
    pub s3_destination: S3DestinationOptions,
    /// One of "pending", "active", "paused", "failed", "deleted".
    pub status: String,
    pub status_message: Option<String>,
    pub last_export_time: Option<String>,
    pub next_export_time: Option<String>,
    pub create_time: String,
    pub tags: Tags,
}

/// Account-level Capacity Manager Organizations access.
#[derive(Debug, Clone)]
pub struct CapacityManagerOrganizationsAccess {
    /// One of "enabled", "disabled", "enabling", "disabling".
    pub state: String,
    pub last_updated_time: String,
}

/// Interruptible capacity-reservation allocation record.
#[derive(Debug, Clone)]
pub struct InterruptibleCapacityReservationAllocation {
    pub allocation_id: String,
    pub capacity_reservation_id: String,
    pub instance_count: i32,
    pub start_date_time: String,
    pub end_date_time: String,
    /// One of "scheduled", "active", "completed", "failed", "cancelled".
    pub state: String,
    /// One of "scheduled", "on-demand".
    pub allocation_type: String,
    pub tags: Tags,
}

/// A Capacity Block purchase record (fixed-duration capacity reservation).
#[derive(Debug, Clone)]
pub struct CapacityBlock {
    pub capacity_block_id: String,
    pub capacity_reservation_id: String,
    pub capacity_block_offering_id: String,
    pub instance_type: String,
    pub instance_count: i32,
    pub availability_zone: String,
    pub start_date: String,
    pub end_date: String,
    /// One of "default", "dedicated".
    pub tenancy: String,
    pub currency_code: String,
    pub upfront_fee: String,
    pub commitment_duration_in_seconds: i64,
    pub capacity_reservation_arn: String,
    pub tags: Tags,
}

/// Extension of an existing Capacity Block.
#[derive(Debug, Clone)]
pub struct CapacityBlockExtension {
    pub capacity_block_extension_id: String,
    pub capacity_reservation_id: String,
    pub instance_type: String,
    pub availability_zone: String,
    pub instance_count: i32,
    pub availability_zone_id: Option<String>,
    pub start_date: String,
    pub end_date: String,
    pub capacity_block_extension_offering_id: String,
    /// One of "payment-pending", "payment-failed", "payment-succeeded".
    pub capacity_block_extension_status: String,
    pub capacity_block_extension_purchase_date: String,
    pub capacity_block_extension_duration_hours: i32,
    pub currency_code: String,
    pub upfront_fee: String,
    pub capacity_reservation_arn: Option<String>,
    pub capacity_block_extension_arn: Option<String>,
}

/// Optional commitment metadata attached to a capacity reservation.
#[derive(Debug, Clone, Default)]
pub struct CapacityReservationCommitmentInfo {
    pub commitment_end_date: Option<String>,
    pub committed_instance_count: Option<i32>,
}

/// Per-instance capacity-reservation specification (response shape).
#[derive(Debug, Clone, Default)]
pub struct CapacityReservationSpecificationResponse {
    /// One of "open", "none", "capacity-reservations-only".
    pub capacity_reservation_preference: Option<String>,
    pub capacity_reservation_id: Option<String>,
    pub capacity_reservation_resource_group_arn: Option<String>,
}

// ---------------------------------------------------------------------------
// Group 11: Transit Gateway extension types
// ---------------------------------------------------------------------------

/// TGW multicast domain.
#[derive(Debug, Clone)]
pub struct TransitGatewayMulticastDomain {
    pub transit_gateway_multicast_domain_id: String,
    pub transit_gateway_id: String,
    pub transit_gateway_multicast_domain_arn: String,
    pub owner_id: String,
    /// One of `enable` / `disable`.
    pub igmpv2_support: String,
    pub static_sources_support: String,
    pub auto_accept_shared_associations: String,
    /// One of `pending` / `available` / `deleting` / `deleted`.
    pub state: String,
    pub creation_time: String,
    pub tags: Tags,
}

/// One subnet within a `TransitGatewayMulticastDomainAssociation`.
#[derive(Debug, Clone)]
pub struct MulticastSubnetAssociation {
    pub subnet_id: String,
    /// One of `associating` / `associated` / `disassociating` / `disassociated`
    /// / `rejected` / `failed` / `pendingAcceptance`.
    pub state: String,
}

/// VPC↔domain association keyed by `(domain_id, attachment_id)`.
#[derive(Debug, Clone)]
pub struct TransitGatewayMulticastDomainAssociation {
    pub transit_gateway_multicast_domain_id: String,
    pub transit_gateway_attachment_id: String,
    pub resource_id: String,
    /// Always `vpc` in this mock.
    pub resource_type: String,
    pub subnets: Vec<MulticastSubnetAssociation>,
}

/// Multicast group member (keyed by `(domain_id, group_ip, network_interface_id)`).
#[derive(Debug, Clone)]
pub struct TransitGatewayMulticastGroupMember {
    pub transit_gateway_multicast_domain_id: String,
    pub group_ip_address: String,
    pub transit_gateway_attachment_id: Option<String>,
    pub subnet_id: Option<String>,
    pub resource_id: Option<String>,
    /// Always `vpc` in this mock.
    pub resource_type: String,
    pub network_interface_id: String,
    /// Always `igmp` for members registered through the API.
    pub member_type: String,
    pub source_type: String,
}

/// Multicast group source (keyed by `(domain_id, group_ip, network_interface_id)`).
#[derive(Debug, Clone)]
pub struct TransitGatewayMulticastGroupSource {
    pub transit_gateway_multicast_domain_id: String,
    pub group_ip_address: String,
    pub transit_gateway_attachment_id: Option<String>,
    pub subnet_id: Option<String>,
    pub resource_id: Option<String>,
    pub resource_type: String,
    pub network_interface_id: String,
    pub member_type: String,
    pub source_type: String,
}

/// TGW connect attachment (GRE-tunnelled connect attachment over a transport VPC attachment).
#[derive(Debug, Clone)]
pub struct TransitGatewayConnect {
    pub transit_gateway_attachment_id: String,
    pub transport_transit_gateway_attachment_id: String,
    pub transit_gateway_id: String,
    /// One of `pendingAcceptance` / `rollingBack` / `pending` / `available` /
    /// `modifying` / `deleting` / `deleted` / `failed` / `rejected` / `rejecting`
    /// / `failing`.
    pub state: String,
    pub creation_time: String,
    pub protocol: String,
    pub tags: Tags,
}

/// TGW connect peer attached to a `TransitGatewayConnect`.
#[derive(Debug, Clone)]
pub struct TransitGatewayConnectPeer {
    pub transit_gateway_attachment_id: String,
    pub transit_gateway_connect_peer_id: String,
    /// One of `pending` / `available` / `deleting` / `deleted`.
    pub state: String,
    pub creation_time: String,
    pub transit_gateway_address: String,
    pub peer_address: String,
    pub inside_cidr_blocks: Vec<String>,
    pub protocol: String,
    pub bgp_configurations: Vec<TransitGatewayAttachmentBgpConfiguration>,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct TransitGatewayAttachmentBgpConfiguration {
    pub transit_gateway_asn: i64,
    pub peer_asn: i64,
    pub transit_gateway_address: String,
    pub peer_address: String,
    /// `up` / `down`.
    pub bgp_status: String,
}

/// TGW metering policy (one record per policy ID).
#[derive(Debug, Clone)]
pub struct TransitGatewayMeteringPolicy {
    pub transit_gateway_metering_policy_id: String,
    pub transit_gateway_metering_policy_arn: String,
    pub transit_gateway_id: String,
    pub name: String,
    pub description: Option<String>,
    /// `available` / `deleted`.
    pub state: String,
    pub tags: Tags,
    pub last_updated_time: String,
    pub version: i32,
    pub middlebox_attachment_ids: Vec<String>,
}

/// One entry within a metering policy. Stored separately so `Modify*` /
/// `Delete*Entry` can mutate independently.
#[derive(Debug, Clone)]
pub struct TransitGatewayMeteringPolicyEntry {
    pub transit_gateway_metering_policy_entry_id: String,
    pub transit_gateway_metering_policy_id: String,
    pub sequence_number: i32,
    /// `meter` / `exclude`.
    pub action: String,
    pub source_cidr_block: Option<String>,
    pub destination_cidr_block: Option<String>,
    pub protocol: Option<String>,
    pub source_port: Option<String>,
    pub destination_port: Option<String>,
    pub dimensions: Vec<String>,
    pub state: String,
}

/// TGW policy table.
#[derive(Debug, Clone)]
pub struct TransitGatewayPolicyTable {
    pub transit_gateway_policy_table_id: String,
    pub transit_gateway_id: String,
    /// `pending` / `available` / `deleting` / `deleted`.
    pub state: String,
    pub creation_time: String,
    pub tags: Tags,
}

/// Policy-table-to-attachment association (keyed by `(policy_table_id, attachment_id)`).
#[derive(Debug, Clone)]
pub struct TransitGatewayPolicyTableAssociation {
    pub transit_gateway_policy_table_id: String,
    pub transit_gateway_attachment_id: String,
    /// Always `vpc` for now.
    pub resource_type: String,
    pub resource_id: String,
    /// `associating` / `associated` / `disassociating` / `disassociated`.
    pub state: String,
}

/// Prefix-list reference attached to a TGW route table (keyed by
/// `(route_table_id, prefix_list_id)`).
#[derive(Debug, Clone)]
pub struct TransitGatewayPrefixListReference {
    pub transit_gateway_route_table_id: String,
    pub prefix_list_id: String,
    pub prefix_list_owner_id: String,
    /// `pending` / `available` / `modifying` / `deleting`.
    pub state: String,
    pub blackhole: bool,
    pub transit_gateway_attachment_id: Option<String>,
    pub resource_id: Option<String>,
    pub resource_type: Option<String>,
}

/// TGW route-table announcement (per-table cross-network announcement).
#[derive(Debug, Clone)]
pub struct TransitGatewayRouteTableAnnouncement {
    pub transit_gateway_route_table_announcement_id: String,
    pub transit_gateway_id: String,
    pub core_network_id: String,
    pub peer_transit_gateway_id: String,
    pub peer_core_network_id: Option<String>,
    pub peering_attachment_id: String,
    /// `outgoing` / `incoming`.
    pub announcement_direction: String,
    pub transit_gateway_route_table_id: String,
    /// `available` / `pending` / `failing` / `failed` / `deleting` / `deleted`.
    pub state: String,
    pub creation_time: String,
    pub tags: Tags,
}

// ---------------------------------------------------------------------------
// Group 12: IPAM (IP Address Manager) types
// ---------------------------------------------------------------------------

/// One operating region for an IPAM or resource discovery.
#[derive(Debug, Clone)]
pub struct IpamOperatingRegion {
    pub region_name: String,
}

/// Top-level IPAM record.
#[derive(Debug, Clone)]
pub struct Ipam {
    pub ipam_id: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    pub public_default_scope_id: String,
    pub private_default_scope_id: String,
    pub scope_count: i32,
    pub description: Option<String>,
    pub operating_regions: Vec<IpamOperatingRegion>,
    /// `create-in-progress` / `create-complete` / `modify-in-progress` /
    /// `modify-complete` / `delete-in-progress` / `delete-complete` / etc.
    pub state: String,
    pub owner_id: String,
    pub default_resource_discovery_id: Option<String>,
    pub default_resource_discovery_association_id: Option<String>,
    pub resource_discovery_association_count: i32,
    /// `free` / `advanced`.
    pub tier: String,
    pub enable_private_gua: bool,
    /// `ipam-owner` / `resource-owner`.
    pub metered_account: String,
    pub tags: Tags,
}

/// One IPAM scope (private or public). Created automatically when an IPAM
/// is created (one default `private` and one default `public`); additional
/// scopes can be created with `CreateIpamScope`.
#[derive(Debug, Clone)]
pub struct IpamScope {
    pub ipam_scope_id: String,
    pub ipam_scope_arn: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    /// `public` / `private`.
    pub ipam_scope_type: String,
    pub is_default: bool,
    pub description: Option<String>,
    pub pool_count: i32,
    pub state: String,
    pub tags: Tags,
    pub owner_id: String,
}

/// One IPAM pool inside a scope.
#[derive(Debug, Clone)]
pub struct IpamPool {
    pub ipam_pool_id: String,
    pub source_ipam_pool_id: Option<String>,
    pub ipam_pool_arn: String,
    pub ipam_scope_arn: String,
    pub ipam_scope_type: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    pub locale: String,
    pub pool_depth: i32,
    pub state: String,
    pub state_message: Option<String>,
    pub description: Option<String>,
    pub auto_import: bool,
    pub publicly_advertisable: bool,
    /// `ipv4` / `ipv6`.
    pub address_family: String,
    pub allocation_min_netmask_length: Option<i32>,
    pub allocation_max_netmask_length: Option<i32>,
    pub allocation_default_netmask_length: Option<i32>,
    pub allocation_resource_tags: Vec<(String, String)>,
    pub aws_service: Option<String>,
    pub public_ip_source: Option<String>,
    pub source_resource_id: Option<String>,
    pub source_resource_type: Option<String>,
    pub source_resource_region: Option<String>,
    pub source_resource_owner: Option<String>,
    pub tags: Tags,
    pub owner_id: String,
    pub allocation_count: i32,
}

/// One CIDR provisioned into an IPAM pool.
#[derive(Debug, Clone)]
pub struct IpamPoolCidr {
    pub cidr: String,
    /// `pending-provision` / `provisioned` / `failed-provision` /
    /// `pending-deprovision` / `deprovisioned` / `failed-deprovision`.
    pub state: String,
    pub failure_reason: Option<String>,
    pub ipam_pool_cidr_id: String,
    pub netmask_length: Option<i32>,
}

/// One allocation against an IPAM pool. Keyed in state by
/// `(ipam_pool_id, ipam_pool_allocation_id)`.
#[derive(Debug, Clone)]
pub struct IpamPoolAllocation {
    pub ipam_pool_allocation_id: String,
    pub cidr: String,
    pub ipam_pool_id: String,
    pub description: Option<String>,
    pub resource_id: Option<String>,
    /// `ipam-pool` / `vpc` / `subnet` / `ec2-public-ipv4-pool` / `custom`.
    pub resource_type: String,
    pub resource_region: Option<String>,
    pub resource_owner: Option<String>,
}

/// IPAM resource discovery record (for cross-account discovery).
#[derive(Debug, Clone)]
pub struct IpamResourceDiscovery {
    pub ipam_resource_discovery_id: String,
    pub ipam_resource_discovery_arn: String,
    pub ipam_resource_discovery_region: String,
    pub description: Option<String>,
    pub operating_regions: Vec<IpamOperatingRegion>,
    pub is_default: bool,
    pub state: String,
    pub owner_id: String,
    pub tags: Tags,
}

/// Association between an IPAM and a resource discovery.
#[derive(Debug, Clone)]
pub struct IpamResourceDiscoveryAssociation {
    pub ipam_resource_discovery_association_id: String,
    pub ipam_resource_discovery_association_arn: String,
    pub ipam_arn: String,
    pub ipam_id: String,
    pub ipam_region: String,
    pub ipam_resource_discovery_id: String,
    pub owner_id: String,
    pub is_default: bool,
    /// `active` / `not-found`.
    pub resource_discovery_status: String,
    /// `associate-in-progress` / `associate-complete` / `associate-failed` /
    /// `disassociate-in-progress` / `disassociate-complete` / `disassociate-failed` /
    /// `isolate-in-progress` / `isolate-complete` / `restore-in-progress`.
    pub state: String,
    pub tags: Tags,
}

/// BYO-ASN provisioned into an IPAM. Keyed by `(ipam_id, asn)`.
#[derive(Debug, Clone)]
pub struct IpamByoasn {
    pub asn: String,
    pub ipam_id: String,
    pub description: Option<String>,
    /// `deprovisioned` / `failed-deprovision` / `failed-provision` /
    /// `pending-deprovision` / `pending-provision` / `provisioned`.
    pub state: String,
    pub status_message: Option<String>,
}

/// IPAM external resource verification token.
#[derive(Debug, Clone)]
pub struct IpamExternalResourceVerificationToken {
    pub ipam_external_resource_verification_token_id: String,
    pub ipam_external_resource_verification_token_arn: String,
    pub ipam_id: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    pub token_value: String,
    pub token_name: String,
    pub not_after: String,
    /// `valid` / `expired`.
    pub status: String,
    pub state: String,
    pub tags: Tags,
}

/// IPAM allocation policy. Stores its current allocation rules (modifiable
/// via `ModifyIpamPolicyAllocationRules`).
#[derive(Debug, Clone)]
pub struct IpamPolicy {
    pub ipam_policy_id: String,
    pub ipam_policy_arn: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    pub policy_name: String,
    /// Always `allocation` for now.
    pub policy_type: String,
    pub description: Option<String>,
    pub state: String,
    pub allocation_rules: Vec<IpamPolicyAllocationRule>,
    pub tags: Tags,
    pub owner_id: String,
}

/// One allocation rule in an IPAM policy.
#[derive(Debug, Clone)]
pub struct IpamPolicyAllocationRule {
    pub source_ipam_pool_id: Option<String>,
}

/// IPAM Prefix List Resolver.
#[derive(Debug, Clone)]
pub struct IpamPrefixListResolver {
    pub ipam_prefix_list_resolver_id: String,
    pub ipam_prefix_list_resolver_arn: String,
    pub ipam_arn: String,
    pub ipam_region: String,
    pub name: String,
    pub description: Option<String>,
    /// `pending` / `available` / `modifying` / `deleting` / `deleted`.
    pub state: String,
    pub owner_id: String,
    pub target_count: i32,
    pub tags: Tags,
}

/// One target attached to a prefix-list resolver. Keyed by
/// `(resolver_id, target_id)`.
#[derive(Debug, Clone)]
pub struct IpamPrefixListResolverTarget {
    pub ipam_prefix_list_resolver_target_id: String,
    pub ipam_prefix_list_resolver_id: String,
    pub target_resource_arn: String,
    pub target_resource_type: String,
    pub target_resource_region: String,
    pub owner_id: String,
    pub state: String,
    pub tags: Tags,
}

// ---------------------------------------------------------------------------
// Batch B additions: VolumeModification, ImportVolumeTask, BundleTask,
// IdFormat, OutpostLag, ExportImageTask.
// ---------------------------------------------------------------------------

/// Pending or completed `ModifyVolume` operation, keyed by volume_id.
#[derive(Debug, Clone)]
pub struct VolumeModification {
    pub volume_id: String,
    /// One of "modifying", "optimizing", "completed", "failed".
    pub modification_state: String,
    pub status_message: Option<String>,
    pub target_size: Option<i32>,
    pub target_iops: Option<i32>,
    pub target_throughput: Option<i32>,
    pub target_volume_type: Option<String>,
    pub target_multi_attach_enabled: Option<bool>,
    pub original_size: Option<i32>,
    pub original_iops: Option<i32>,
    pub original_throughput: Option<i32>,
    pub original_volume_type: Option<String>,
    pub original_multi_attach_enabled: Option<bool>,
    /// Progress percent, 0-100.
    pub progress: i64,
    pub start_time: String,
    pub end_time: Option<String>,
}

/// `ImportVolume` conversion-task record (legacy, distinct from
/// `ConversionTask` for VM-import). Keyed by conversion_task_id.
#[derive(Debug, Clone)]
pub struct ImportVolumeTask {
    pub conversion_task_id: String,
    pub expiration_time: String,
    pub image: DiskImageDescription,
    pub volume: DiskImageVolumeDescription,
    pub availability_zone: String,
    pub bytes_converted: i64,
    pub description: Option<String>,
    /// One of "active", "cancelling", "cancelled", "completed".
    pub status: String,
    pub status_message: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct DiskImageDescription {
    pub format: String,
    pub size: i64,
    pub import_manifest_url: String,
    pub checksum: Option<String>,
}

#[derive(Debug, Clone, Default)]
pub struct DiskImageVolumeDescription {
    pub size: i64,
    pub id: String,
}

/// `BundleInstance` task tracked by ID. AWS retired the operation but
/// continues to honour the API.
#[derive(Debug, Clone)]
pub struct BundleTask {
    pub bundle_id: String,
    pub instance_id: String,
    pub bucket: String,
    pub prefix: String,
    pub start_time: String,
    pub update_time: String,
    /// One of "pending", "waiting-for-shutdown", "bundling", "storing",
    /// "cancelling", "complete", "failed".
    pub state: String,
    pub progress: String,
    pub error_code: Option<String>,
    pub error_message: Option<String>,
}

/// Per-resource-type long/short ID format toggle.
#[derive(Debug, Clone)]
pub struct IdFormatEntry {
    pub use_long_ids: bool,
    pub deadline: Option<String>,
}

/// Outpost link aggregation group, keyed by outpost-lag ID.
#[derive(Debug, Clone)]
pub struct OutpostLag {
    pub outpost_lag_id: String,
    pub outpost_arn: String,
    pub owner_id: String,
    pub state: String,
    pub local_gateway_virtual_interface_ids: Vec<String>,
    pub service_link_virtual_interface_ids: Vec<String>,
    pub tags: Tags,
}

/// `ExportImage` task. Keyed by export_image_task_id.
#[derive(Debug, Clone)]
pub struct ExportImageTask {
    pub export_image_task_id: String,
    pub description: Option<String>,
    pub image_id: String,
    pub role_name: String,
    /// One of "active", "completed", "deleting", "deleted".
    pub status: String,
    pub status_message: Option<String>,
    pub progress: String,
    pub s3_export_location: ExportTaskS3Location,
    /// One of "vmdk", "raw", "vhd".
    pub disk_image_format: String,
    pub tags: Tags,
}

#[derive(Debug, Clone, Default)]
pub struct ExportTaskS3Location {
    pub s3_bucket: String,
    pub s3_prefix: Option<String>,
}

/// AWS Network Performance metric subscription, keyed in state by
/// `(source, destination, metric, statistic)`.
#[derive(Debug, Clone, Default)]
pub struct AwsNetworkPerformanceSubscription {
    pub source: String,
    pub destination: String,
    /// e.g. `aggregate-latency`.
    pub metric: String,
    /// e.g. `p50`.
    pub statistic: String,
    /// e.g. `five-minutes`.
    pub period: String,
}