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
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Provides information about a particular parameter passed inside a request that resulted in an exception.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ValidationExceptionField {
    /// <p>The name of the parameter that failed validation.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The message describing why the parameter failed validation.</p>
    pub message: std::option::Option<std::string::String>,
}
impl ValidationExceptionField {
    /// <p>The name of the parameter that failed validation.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The message describing why the parameter failed validation.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Debug for ValidationExceptionField {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ValidationExceptionField");
        formatter.field("name", &self.name);
        formatter.field("message", &self.message);
        formatter.finish()
    }
}
/// See [`ValidationExceptionField`](crate::model::ValidationExceptionField)
pub mod validation_exception_field {
    /// A builder for [`ValidationExceptionField`](crate::model::ValidationExceptionField)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the parameter that failed validation.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the parameter that failed validation.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The message describing why the parameter failed validation.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The message describing why the parameter failed validation.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// Consumes the builder and constructs a [`ValidationExceptionField`](crate::model::ValidationExceptionField)
        pub fn build(self) -> crate::model::ValidationExceptionField {
            crate::model::ValidationExceptionField {
                name: self.name,
                message: self.message,
            }
        }
    }
}
impl ValidationExceptionField {
    /// Creates a new builder-style object to manufacture [`ValidationExceptionField`](crate::model::ValidationExceptionField)
    pub fn builder() -> crate::model::validation_exception_field::Builder {
        crate::model::validation_exception_field::Builder::default()
    }
}

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

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

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

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

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum ProtectedResourceType {
    #[allow(missing_docs)] // documentation missing in model
    ApplicationLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    ClassicLoadBalancer,
    #[allow(missing_docs)] // documentation missing in model
    CloudfrontDistribution,
    #[allow(missing_docs)] // documentation missing in model
    ElasticIpAllocation,
    #[allow(missing_docs)] // documentation missing in model
    GlobalAccelerator,
    #[allow(missing_docs)] // documentation missing in model
    Route53HostedZone,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ProtectedResourceType {
    fn from(s: &str) -> Self {
        match s {
            "APPLICATION_LOAD_BALANCER" => ProtectedResourceType::ApplicationLoadBalancer,
            "CLASSIC_LOAD_BALANCER" => ProtectedResourceType::ClassicLoadBalancer,
            "CLOUDFRONT_DISTRIBUTION" => ProtectedResourceType::CloudfrontDistribution,
            "ELASTIC_IP_ALLOCATION" => ProtectedResourceType::ElasticIpAllocation,
            "GLOBAL_ACCELERATOR" => ProtectedResourceType::GlobalAccelerator,
            "ROUTE_53_HOSTED_ZONE" => ProtectedResourceType::Route53HostedZone,
            other => ProtectedResourceType::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ProtectedResourceType {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ProtectedResourceType::from(s))
    }
}
impl ProtectedResourceType {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ProtectedResourceType::ApplicationLoadBalancer => "APPLICATION_LOAD_BALANCER",
            ProtectedResourceType::ClassicLoadBalancer => "CLASSIC_LOAD_BALANCER",
            ProtectedResourceType::CloudfrontDistribution => "CLOUDFRONT_DISTRIBUTION",
            ProtectedResourceType::ElasticIpAllocation => "ELASTIC_IP_ALLOCATION",
            ProtectedResourceType::GlobalAccelerator => "GLOBAL_ACCELERATOR",
            ProtectedResourceType::Route53HostedZone => "ROUTE_53_HOSTED_ZONE",
            ProtectedResourceType::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "APPLICATION_LOAD_BALANCER",
            "CLASSIC_LOAD_BALANCER",
            "CLOUDFRONT_DISTRIBUTION",
            "ELASTIC_IP_ALLOCATION",
            "GLOBAL_ACCELERATOR",
            "ROUTE_53_HOSTED_ZONE",
        ]
    }
}
impl AsRef<str> for ProtectedResourceType {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

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

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

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

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

/// <p>Contact information that the SRT can use to contact you if you have proactive engagement enabled, for escalations to the SRT and to initiate proactive customer support.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct EmergencyContact {
    /// <p>The email address for the contact.</p>
    pub email_address: std::option::Option<std::string::String>,
    /// <p>The phone number for the contact.</p>
    pub phone_number: std::option::Option<std::string::String>,
    /// <p>Additional notes regarding the contact. </p>
    pub contact_notes: std::option::Option<std::string::String>,
}
impl EmergencyContact {
    /// <p>The email address for the contact.</p>
    pub fn email_address(&self) -> std::option::Option<&str> {
        self.email_address.as_deref()
    }
    /// <p>The phone number for the contact.</p>
    pub fn phone_number(&self) -> std::option::Option<&str> {
        self.phone_number.as_deref()
    }
    /// <p>Additional notes regarding the contact. </p>
    pub fn contact_notes(&self) -> std::option::Option<&str> {
        self.contact_notes.as_deref()
    }
}
impl std::fmt::Debug for EmergencyContact {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("EmergencyContact");
        formatter.field("email_address", &self.email_address);
        formatter.field("phone_number", &self.phone_number);
        formatter.field("contact_notes", &self.contact_notes);
        formatter.finish()
    }
}
/// See [`EmergencyContact`](crate::model::EmergencyContact)
pub mod emergency_contact {
    /// A builder for [`EmergencyContact`](crate::model::EmergencyContact)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) email_address: std::option::Option<std::string::String>,
        pub(crate) phone_number: std::option::Option<std::string::String>,
        pub(crate) contact_notes: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The email address for the contact.</p>
        pub fn email_address(mut self, input: impl Into<std::string::String>) -> Self {
            self.email_address = Some(input.into());
            self
        }
        /// <p>The email address for the contact.</p>
        pub fn set_email_address(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.email_address = input;
            self
        }
        /// <p>The phone number for the contact.</p>
        pub fn phone_number(mut self, input: impl Into<std::string::String>) -> Self {
            self.phone_number = Some(input.into());
            self
        }
        /// <p>The phone number for the contact.</p>
        pub fn set_phone_number(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.phone_number = input;
            self
        }
        /// <p>Additional notes regarding the contact. </p>
        pub fn contact_notes(mut self, input: impl Into<std::string::String>) -> Self {
            self.contact_notes = Some(input.into());
            self
        }
        /// <p>Additional notes regarding the contact. </p>
        pub fn set_contact_notes(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.contact_notes = input;
            self
        }
        /// Consumes the builder and constructs a [`EmergencyContact`](crate::model::EmergencyContact)
        pub fn build(self) -> crate::model::EmergencyContact {
            crate::model::EmergencyContact {
                email_address: self.email_address,
                phone_number: self.phone_number,
                contact_notes: self.contact_notes,
            }
        }
    }
}
impl EmergencyContact {
    /// Creates a new builder-style object to manufacture [`EmergencyContact`](crate::model::EmergencyContact)
    pub fn builder() -> crate::model::emergency_contact::Builder {
        crate::model::emergency_contact::Builder::default()
    }
}

/// <p>A tag associated with an Amazon Web Services resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing or other management. Typically, the tag key represents a category, such as "environment", and the tag value represents a specific value within that category, such as "test," "development," or "production". Or you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each Amazon Web Services resource, up to 50 tags for a resource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Tag {
    /// <p>Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.</p>
    pub key: std::option::Option<std::string::String>,
    /// <p>Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.</p>
    pub value: std::option::Option<std::string::String>,
}
impl Tag {
    /// <p>Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.</p>
    pub fn key(&self) -> std::option::Option<&str> {
        self.key.as_deref()
    }
    /// <p>Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
impl std::fmt::Debug for Tag {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Tag");
        formatter.field("key", &self.key);
        formatter.field("value", &self.value);
        formatter.finish()
    }
}
/// See [`Tag`](crate::model::Tag)
pub mod tag {
    /// A builder for [`Tag`](crate::model::Tag)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) key: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.</p>
        pub fn key(mut self, input: impl Into<std::string::String>) -> Self {
            self.key = Some(input.into());
            self
        }
        /// <p>Part of the key:value pair that defines a tag. You can use a tag key to describe a category of information, such as "customer." Tag keys are case-sensitive.</p>
        pub fn set_key(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.key = input;
            self
        }
        /// <p>Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>Part of the key:value pair that defines a tag. You can use a tag value to describe a specific value within a category, such as "companyA" or "companyB." Tag values are case-sensitive.</p>
        pub fn set_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Tag`](crate::model::Tag)
        pub fn build(self) -> crate::model::Tag {
            crate::model::Tag {
                key: self.key,
                value: self.value,
            }
        }
    }
}
impl Tag {
    /// Creates a new builder-style object to manufacture [`Tag`](crate::model::Tag)
    pub fn builder() -> crate::model::tag::Builder {
        crate::model::tag::Builder::default()
    }
}

/// <p>An object that represents a resource that is under DDoS protection.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Protection {
    /// <p>The unique identifier (ID) of the protection.</p>
    pub id: std::option::Option<std::string::String>,
    /// <p>The name of the protection. For example, <code>My CloudFront distributions</code>.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.</p>
    pub resource_arn: std::option::Option<std::string::String>,
    /// <p>The unique identifier (ID) for the Route 53 health check that's associated with the protection. </p>
    pub health_check_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ARN (Amazon Resource Name) of the protection.</p>
    pub protection_arn: std::option::Option<std::string::String>,
}
impl Protection {
    /// <p>The unique identifier (ID) of the protection.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The name of the protection. For example, <code>My CloudFront distributions</code>.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.</p>
    pub fn resource_arn(&self) -> std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>The unique identifier (ID) for the Route 53 health check that's associated with the protection. </p>
    pub fn health_check_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.health_check_ids.as_deref()
    }
    /// <p>The ARN (Amazon Resource Name) of the protection.</p>
    pub fn protection_arn(&self) -> std::option::Option<&str> {
        self.protection_arn.as_deref()
    }
}
impl std::fmt::Debug for Protection {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Protection");
        formatter.field("id", &self.id);
        formatter.field("name", &self.name);
        formatter.field("resource_arn", &self.resource_arn);
        formatter.field("health_check_ids", &self.health_check_ids);
        formatter.field("protection_arn", &self.protection_arn);
        formatter.finish()
    }
}
/// See [`Protection`](crate::model::Protection)
pub mod protection {
    /// A builder for [`Protection`](crate::model::Protection)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) resource_arn: std::option::Option<std::string::String>,
        pub(crate) health_check_ids: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protection_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique identifier (ID) of the protection.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier (ID) of the protection.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// <p>The name of the protection. For example, <code>My CloudFront distributions</code>.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the protection. For example, <code>My CloudFront distributions</code>.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.</p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the Amazon Web Services resource that is protected.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_arn = input;
            self
        }
        /// Appends an item to `health_check_ids`.
        ///
        /// To override the contents of this collection use [`set_health_check_ids`](Self::set_health_check_ids).
        ///
        /// <p>The unique identifier (ID) for the Route 53 health check that's associated with the protection. </p>
        pub fn health_check_ids(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.health_check_ids.unwrap_or_default();
            v.push(input.into());
            self.health_check_ids = Some(v);
            self
        }
        /// <p>The unique identifier (ID) for the Route 53 health check that's associated with the protection. </p>
        pub fn set_health_check_ids(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.health_check_ids = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the protection.</p>
        pub fn protection_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.protection_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the protection.</p>
        pub fn set_protection_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.protection_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`Protection`](crate::model::Protection)
        pub fn build(self) -> crate::model::Protection {
            crate::model::Protection {
                id: self.id,
                name: self.name,
                resource_arn: self.resource_arn,
                health_check_ids: self.health_check_ids,
                protection_arn: self.protection_arn,
            }
        }
    }
}
impl Protection {
    /// Creates a new builder-style object to manufacture [`Protection`](crate::model::Protection)
    pub fn builder() -> crate::model::protection::Builder {
        crate::model::protection::Builder::default()
    }
}

/// <p>A grouping of protected resources that you and Shield Advanced can monitor as a collective. This resource grouping improves the accuracy of detection and reduces false positives. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProtectionGroup {
    /// <p>The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it. </p>
    pub protection_group_id: std::option::Option<std::string::String>,
    /// <p>Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.</p>
    /// <ul>
    /// <li>
    /// <p>Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.</p>
    /// </li>
    /// <li>
    /// <p>Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.</p>
    /// </li>
    /// <li>
    /// <p>Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.</p>
    /// </li>
    /// </ul>
    pub aggregation: std::option::Option<crate::model::ProtectionGroupAggregation>,
    /// <p>The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.</p>
    pub pattern: std::option::Option<crate::model::ProtectionGroupPattern>,
    /// <p>The resource type to include in the protection group. All protected resources of this type are included in the protection group.
    /// You must set this when you set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set it for any other <code>Pattern</code> setting. </p>
    pub resource_type: std::option::Option<crate::model::ProtectedResourceType>,
    /// <p>The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set <code>Pattern</code> to <code>ARBITRARY</code> and you must not set it for any other <code>Pattern</code> setting. </p>
    pub members: std::option::Option<std::vec::Vec<std::string::String>>,
    /// <p>The ARN (Amazon Resource Name) of the protection group.</p>
    pub protection_group_arn: std::option::Option<std::string::String>,
}
impl ProtectionGroup {
    /// <p>The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it. </p>
    pub fn protection_group_id(&self) -> std::option::Option<&str> {
        self.protection_group_id.as_deref()
    }
    /// <p>Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.</p>
    /// <ul>
    /// <li>
    /// <p>Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.</p>
    /// </li>
    /// <li>
    /// <p>Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.</p>
    /// </li>
    /// <li>
    /// <p>Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.</p>
    /// </li>
    /// </ul>
    pub fn aggregation(&self) -> std::option::Option<&crate::model::ProtectionGroupAggregation> {
        self.aggregation.as_ref()
    }
    /// <p>The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.</p>
    pub fn pattern(&self) -> std::option::Option<&crate::model::ProtectionGroupPattern> {
        self.pattern.as_ref()
    }
    /// <p>The resource type to include in the protection group. All protected resources of this type are included in the protection group.
    /// You must set this when you set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set it for any other <code>Pattern</code> setting. </p>
    pub fn resource_type(&self) -> std::option::Option<&crate::model::ProtectedResourceType> {
        self.resource_type.as_ref()
    }
    /// <p>The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set <code>Pattern</code> to <code>ARBITRARY</code> and you must not set it for any other <code>Pattern</code> setting. </p>
    pub fn members(&self) -> std::option::Option<&[std::string::String]> {
        self.members.as_deref()
    }
    /// <p>The ARN (Amazon Resource Name) of the protection group.</p>
    pub fn protection_group_arn(&self) -> std::option::Option<&str> {
        self.protection_group_arn.as_deref()
    }
}
impl std::fmt::Debug for ProtectionGroup {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ProtectionGroup");
        formatter.field("protection_group_id", &self.protection_group_id);
        formatter.field("aggregation", &self.aggregation);
        formatter.field("pattern", &self.pattern);
        formatter.field("resource_type", &self.resource_type);
        formatter.field("members", &self.members);
        formatter.field("protection_group_arn", &self.protection_group_arn);
        formatter.finish()
    }
}
/// See [`ProtectionGroup`](crate::model::ProtectionGroup)
pub mod protection_group {
    /// A builder for [`ProtectionGroup`](crate::model::ProtectionGroup)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protection_group_id: std::option::Option<std::string::String>,
        pub(crate) aggregation: std::option::Option<crate::model::ProtectionGroupAggregation>,
        pub(crate) pattern: std::option::Option<crate::model::ProtectionGroupPattern>,
        pub(crate) resource_type: std::option::Option<crate::model::ProtectedResourceType>,
        pub(crate) members: std::option::Option<std::vec::Vec<std::string::String>>,
        pub(crate) protection_group_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it. </p>
        pub fn protection_group_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.protection_group_id = Some(input.into());
            self
        }
        /// <p>The name of the protection group. You use this to identify the protection group in lists and to manage the protection group, for example to update, delete, or describe it. </p>
        pub fn set_protection_group_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.protection_group_id = input;
            self
        }
        /// <p>Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.</p>
        /// <ul>
        /// <li>
        /// <p>Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.</p>
        /// </li>
        /// <li>
        /// <p>Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.</p>
        /// </li>
        /// <li>
        /// <p>Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.</p>
        /// </li>
        /// </ul>
        pub fn aggregation(mut self, input: crate::model::ProtectionGroupAggregation) -> Self {
            self.aggregation = Some(input);
            self
        }
        /// <p>Defines how Shield combines resource data for the group in order to detect, mitigate, and report events.</p>
        /// <ul>
        /// <li>
        /// <p>Sum - Use the total traffic across the group. This is a good choice for most cases. Examples include Elastic IP addresses for EC2 instances that scale manually or automatically.</p>
        /// </li>
        /// <li>
        /// <p>Mean - Use the average of the traffic across the group. This is a good choice for resources that share traffic uniformly. Examples include accelerators and load balancers.</p>
        /// </li>
        /// <li>
        /// <p>Max - Use the highest traffic from each resource. This is useful for resources that don't share traffic and for resources that share that traffic in a non-uniform way. Examples include Amazon CloudFront distributions and origin resources for CloudFront distributions.</p>
        /// </li>
        /// </ul>
        pub fn set_aggregation(
            mut self,
            input: std::option::Option<crate::model::ProtectionGroupAggregation>,
        ) -> Self {
            self.aggregation = input;
            self
        }
        /// <p>The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.</p>
        pub fn pattern(mut self, input: crate::model::ProtectionGroupPattern) -> Self {
            self.pattern = Some(input);
            self
        }
        /// <p>The criteria to use to choose the protected resources for inclusion in the group. You can include all resources that have protections, provide a list of resource Amazon Resource Names (ARNs), or include all resources of a specified resource type.</p>
        pub fn set_pattern(
            mut self,
            input: std::option::Option<crate::model::ProtectionGroupPattern>,
        ) -> Self {
            self.pattern = input;
            self
        }
        /// <p>The resource type to include in the protection group. All protected resources of this type are included in the protection group.
        /// You must set this when you set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set it for any other <code>Pattern</code> setting. </p>
        pub fn resource_type(mut self, input: crate::model::ProtectedResourceType) -> Self {
            self.resource_type = Some(input);
            self
        }
        /// <p>The resource type to include in the protection group. All protected resources of this type are included in the protection group.
        /// You must set this when you set <code>Pattern</code> to <code>BY_RESOURCE_TYPE</code> and you must not set it for any other <code>Pattern</code> setting. </p>
        pub fn set_resource_type(
            mut self,
            input: std::option::Option<crate::model::ProtectedResourceType>,
        ) -> Self {
            self.resource_type = input;
            self
        }
        /// Appends an item to `members`.
        ///
        /// To override the contents of this collection use [`set_members`](Self::set_members).
        ///
        /// <p>The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set <code>Pattern</code> to <code>ARBITRARY</code> and you must not set it for any other <code>Pattern</code> setting. </p>
        pub fn members(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.members.unwrap_or_default();
            v.push(input.into());
            self.members = Some(v);
            self
        }
        /// <p>The Amazon Resource Names (ARNs) of the resources to include in the protection group. You must set this when you set <code>Pattern</code> to <code>ARBITRARY</code> and you must not set it for any other <code>Pattern</code> setting. </p>
        pub fn set_members(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.members = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the protection group.</p>
        pub fn protection_group_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.protection_group_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the protection group.</p>
        pub fn set_protection_group_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.protection_group_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`ProtectionGroup`](crate::model::ProtectionGroup)
        pub fn build(self) -> crate::model::ProtectionGroup {
            crate::model::ProtectionGroup {
                protection_group_id: self.protection_group_id,
                aggregation: self.aggregation,
                pattern: self.pattern,
                resource_type: self.resource_type,
                members: self.members,
                protection_group_arn: self.protection_group_arn,
            }
        }
    }
}
impl ProtectionGroup {
    /// Creates a new builder-style object to manufacture [`ProtectionGroup`](crate::model::ProtectionGroup)
    pub fn builder() -> crate::model::protection_group::Builder {
        crate::model::protection_group::Builder::default()
    }
}

/// <p>Summarizes all DDoS attacks for a specified time period.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackSummary {
    /// <p>The unique identifier (ID) of the attack.</p>
    pub attack_id: std::option::Option<std::string::String>,
    /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
    pub resource_arn: std::option::Option<std::string::String>,
    /// <p>The start time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The list of attacks for a specified time period.</p>
    pub attack_vectors: std::option::Option<std::vec::Vec<crate::model::AttackVectorDescription>>,
}
impl AttackSummary {
    /// <p>The unique identifier (ID) of the attack.</p>
    pub fn attack_id(&self) -> std::option::Option<&str> {
        self.attack_id.as_deref()
    }
    /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
    pub fn resource_arn(&self) -> std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>The start time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The end time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The list of attacks for a specified time period.</p>
    pub fn attack_vectors(&self) -> std::option::Option<&[crate::model::AttackVectorDescription]> {
        self.attack_vectors.as_deref()
    }
}
impl std::fmt::Debug for AttackSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackSummary");
        formatter.field("attack_id", &self.attack_id);
        formatter.field("resource_arn", &self.resource_arn);
        formatter.field("start_time", &self.start_time);
        formatter.field("end_time", &self.end_time);
        formatter.field("attack_vectors", &self.attack_vectors);
        formatter.finish()
    }
}
/// See [`AttackSummary`](crate::model::AttackSummary)
pub mod attack_summary {
    /// A builder for [`AttackSummary`](crate::model::AttackSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attack_id: std::option::Option<std::string::String>,
        pub(crate) resource_arn: std::option::Option<std::string::String>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) attack_vectors:
            std::option::Option<std::vec::Vec<crate::model::AttackVectorDescription>>,
    }
    impl Builder {
        /// <p>The unique identifier (ID) of the attack.</p>
        pub fn attack_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attack_id = Some(input.into());
            self
        }
        /// <p>The unique identifier (ID) of the attack.</p>
        pub fn set_attack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.attack_id = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_arn = input;
            self
        }
        /// <p>The start time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The start time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The end time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The end time of the attack, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// Appends an item to `attack_vectors`.
        ///
        /// To override the contents of this collection use [`set_attack_vectors`](Self::set_attack_vectors).
        ///
        /// <p>The list of attacks for a specified time period.</p>
        pub fn attack_vectors(
            mut self,
            input: impl Into<crate::model::AttackVectorDescription>,
        ) -> Self {
            let mut v = self.attack_vectors.unwrap_or_default();
            v.push(input.into());
            self.attack_vectors = Some(v);
            self
        }
        /// <p>The list of attacks for a specified time period.</p>
        pub fn set_attack_vectors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AttackVectorDescription>>,
        ) -> Self {
            self.attack_vectors = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackSummary`](crate::model::AttackSummary)
        pub fn build(self) -> crate::model::AttackSummary {
            crate::model::AttackSummary {
                attack_id: self.attack_id,
                resource_arn: self.resource_arn,
                start_time: self.start_time,
                end_time: self.end_time,
                attack_vectors: self.attack_vectors,
            }
        }
    }
}
impl AttackSummary {
    /// Creates a new builder-style object to manufacture [`AttackSummary`](crate::model::AttackSummary)
    pub fn builder() -> crate::model::attack_summary::Builder {
        crate::model::attack_summary::Builder::default()
    }
}

/// <p>Describes the attack.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackVectorDescription {
    /// <p>The attack type. Valid values:</p>
    /// <ul>
    /// <li>
    /// <p>UDP_TRAFFIC</p>
    /// </li>
    /// <li>
    /// <p>UDP_FRAGMENT</p>
    /// </li>
    /// <li>
    /// <p>GENERIC_UDP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>DNS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>NTP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>CHARGEN_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SSDP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>PORT_MAPPER</p>
    /// </li>
    /// <li>
    /// <p>RIP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SNMP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>MSSQL_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>NET_BIOS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SYN_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>ACK_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>REQUEST_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>HTTP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>UDS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>MEMCACHED_REFLECTION</p>
    /// </li>
    /// </ul>
    pub vector_type: std::option::Option<std::string::String>,
}
impl AttackVectorDescription {
    /// <p>The attack type. Valid values:</p>
    /// <ul>
    /// <li>
    /// <p>UDP_TRAFFIC</p>
    /// </li>
    /// <li>
    /// <p>UDP_FRAGMENT</p>
    /// </li>
    /// <li>
    /// <p>GENERIC_UDP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>DNS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>NTP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>CHARGEN_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SSDP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>PORT_MAPPER</p>
    /// </li>
    /// <li>
    /// <p>RIP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SNMP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>MSSQL_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>NET_BIOS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>SYN_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>ACK_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>REQUEST_FLOOD</p>
    /// </li>
    /// <li>
    /// <p>HTTP_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>UDS_REFLECTION</p>
    /// </li>
    /// <li>
    /// <p>MEMCACHED_REFLECTION</p>
    /// </li>
    /// </ul>
    pub fn vector_type(&self) -> std::option::Option<&str> {
        self.vector_type.as_deref()
    }
}
impl std::fmt::Debug for AttackVectorDescription {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackVectorDescription");
        formatter.field("vector_type", &self.vector_type);
        formatter.finish()
    }
}
/// See [`AttackVectorDescription`](crate::model::AttackVectorDescription)
pub mod attack_vector_description {
    /// A builder for [`AttackVectorDescription`](crate::model::AttackVectorDescription)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) vector_type: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The attack type. Valid values:</p>
        /// <ul>
        /// <li>
        /// <p>UDP_TRAFFIC</p>
        /// </li>
        /// <li>
        /// <p>UDP_FRAGMENT</p>
        /// </li>
        /// <li>
        /// <p>GENERIC_UDP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>DNS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>NTP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>CHARGEN_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SSDP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>PORT_MAPPER</p>
        /// </li>
        /// <li>
        /// <p>RIP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SNMP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>MSSQL_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>NET_BIOS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SYN_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>ACK_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>REQUEST_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>HTTP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>UDS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>MEMCACHED_REFLECTION</p>
        /// </li>
        /// </ul>
        pub fn vector_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.vector_type = Some(input.into());
            self
        }
        /// <p>The attack type. Valid values:</p>
        /// <ul>
        /// <li>
        /// <p>UDP_TRAFFIC</p>
        /// </li>
        /// <li>
        /// <p>UDP_FRAGMENT</p>
        /// </li>
        /// <li>
        /// <p>GENERIC_UDP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>DNS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>NTP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>CHARGEN_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SSDP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>PORT_MAPPER</p>
        /// </li>
        /// <li>
        /// <p>RIP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SNMP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>MSSQL_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>NET_BIOS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>SYN_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>ACK_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>REQUEST_FLOOD</p>
        /// </li>
        /// <li>
        /// <p>HTTP_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>UDS_REFLECTION</p>
        /// </li>
        /// <li>
        /// <p>MEMCACHED_REFLECTION</p>
        /// </li>
        /// </ul>
        pub fn set_vector_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vector_type = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackVectorDescription`](crate::model::AttackVectorDescription)
        pub fn build(self) -> crate::model::AttackVectorDescription {
            crate::model::AttackVectorDescription {
                vector_type: self.vector_type,
            }
        }
    }
}
impl AttackVectorDescription {
    /// Creates a new builder-style object to manufacture [`AttackVectorDescription`](crate::model::AttackVectorDescription)
    pub fn builder() -> crate::model::attack_vector_description::Builder {
        crate::model::attack_vector_description::Builder::default()
    }
}

/// <p>The time range. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct TimeRange {
    /// <p>The start time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub from_inclusive: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The end time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub to_exclusive: std::option::Option<aws_smithy_types::DateTime>,
}
impl TimeRange {
    /// <p>The start time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn from_inclusive(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.from_inclusive.as_ref()
    }
    /// <p>The end time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn to_exclusive(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.to_exclusive.as_ref()
    }
}
impl std::fmt::Debug for TimeRange {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("TimeRange");
        formatter.field("from_inclusive", &self.from_inclusive);
        formatter.field("to_exclusive", &self.to_exclusive);
        formatter.finish()
    }
}
/// See [`TimeRange`](crate::model::TimeRange)
pub mod time_range {
    /// A builder for [`TimeRange`](crate::model::TimeRange)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) from_inclusive: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) to_exclusive: std::option::Option<aws_smithy_types::DateTime>,
    }
    impl Builder {
        /// <p>The start time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn from_inclusive(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.from_inclusive = Some(input);
            self
        }
        /// <p>The start time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_from_inclusive(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.from_inclusive = input;
            self
        }
        /// <p>The end time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn to_exclusive(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.to_exclusive = Some(input);
            self
        }
        /// <p>The end time, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_to_exclusive(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.to_exclusive = input;
            self
        }
        /// Consumes the builder and constructs a [`TimeRange`](crate::model::TimeRange)
        pub fn build(self) -> crate::model::TimeRange {
            crate::model::TimeRange {
                from_inclusive: self.from_inclusive,
                to_exclusive: self.to_exclusive,
            }
        }
    }
}
impl TimeRange {
    /// Creates a new builder-style object to manufacture [`TimeRange`](crate::model::TimeRange)
    pub fn builder() -> crate::model::time_range::Builder {
        crate::model::time_range::Builder::default()
    }
}

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

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

/// <p>Information about the Shield Advanced subscription for an account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Subscription {
    /// <p>The start time of the subscription, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The date and time your subscription will end.</p>
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The length, in seconds, of the Shield Advanced subscription for the account.</p>
    pub time_commitment_in_seconds: i64,
    /// <p>If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period.</p>
    /// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
    pub auto_renew: std::option::Option<crate::model::AutoRenew>,
    /// <p>Specifies how many protections of a given type you can create.</p>
    pub limits: std::option::Option<std::vec::Vec<crate::model::Limit>>,
    /// <p>If <code>ENABLED</code>, the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.</p>
    /// <p>If <code>PENDING</code>, you have requested proactive engagement and the request is pending. The status changes to <code>ENABLED</code> when your request is fully processed.</p>
    /// <p>If <code>DISABLED</code>, the SRT will not proactively notify contacts about escalations or to initiate proactive customer support. </p>
    pub proactive_engagement_status: std::option::Option<crate::model::ProactiveEngagementStatus>,
    /// <p>Limits settings for your subscription. </p>
    pub subscription_limits: std::option::Option<crate::model::SubscriptionLimits>,
    /// <p>The ARN (Amazon Resource Name) of the subscription.</p>
    pub subscription_arn: std::option::Option<std::string::String>,
}
impl Subscription {
    /// <p>The start time of the subscription, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The date and time your subscription will end.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>The length, in seconds, of the Shield Advanced subscription for the account.</p>
    pub fn time_commitment_in_seconds(&self) -> i64 {
        self.time_commitment_in_seconds
    }
    /// <p>If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period.</p>
    /// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
    pub fn auto_renew(&self) -> std::option::Option<&crate::model::AutoRenew> {
        self.auto_renew.as_ref()
    }
    /// <p>Specifies how many protections of a given type you can create.</p>
    pub fn limits(&self) -> std::option::Option<&[crate::model::Limit]> {
        self.limits.as_deref()
    }
    /// <p>If <code>ENABLED</code>, the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.</p>
    /// <p>If <code>PENDING</code>, you have requested proactive engagement and the request is pending. The status changes to <code>ENABLED</code> when your request is fully processed.</p>
    /// <p>If <code>DISABLED</code>, the SRT will not proactively notify contacts about escalations or to initiate proactive customer support. </p>
    pub fn proactive_engagement_status(
        &self,
    ) -> std::option::Option<&crate::model::ProactiveEngagementStatus> {
        self.proactive_engagement_status.as_ref()
    }
    /// <p>Limits settings for your subscription. </p>
    pub fn subscription_limits(&self) -> std::option::Option<&crate::model::SubscriptionLimits> {
        self.subscription_limits.as_ref()
    }
    /// <p>The ARN (Amazon Resource Name) of the subscription.</p>
    pub fn subscription_arn(&self) -> std::option::Option<&str> {
        self.subscription_arn.as_deref()
    }
}
impl std::fmt::Debug for Subscription {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Subscription");
        formatter.field("start_time", &self.start_time);
        formatter.field("end_time", &self.end_time);
        formatter.field(
            "time_commitment_in_seconds",
            &self.time_commitment_in_seconds,
        );
        formatter.field("auto_renew", &self.auto_renew);
        formatter.field("limits", &self.limits);
        formatter.field(
            "proactive_engagement_status",
            &self.proactive_engagement_status,
        );
        formatter.field("subscription_limits", &self.subscription_limits);
        formatter.field("subscription_arn", &self.subscription_arn);
        formatter.finish()
    }
}
/// See [`Subscription`](crate::model::Subscription)
pub mod subscription {
    /// A builder for [`Subscription`](crate::model::Subscription)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) time_commitment_in_seconds: std::option::Option<i64>,
        pub(crate) auto_renew: std::option::Option<crate::model::AutoRenew>,
        pub(crate) limits: std::option::Option<std::vec::Vec<crate::model::Limit>>,
        pub(crate) proactive_engagement_status:
            std::option::Option<crate::model::ProactiveEngagementStatus>,
        pub(crate) subscription_limits: std::option::Option<crate::model::SubscriptionLimits>,
        pub(crate) subscription_arn: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The start time of the subscription, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The start time of the subscription, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The date and time your subscription will end.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The date and time your subscription will end.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// <p>The length, in seconds, of the Shield Advanced subscription for the account.</p>
        pub fn time_commitment_in_seconds(mut self, input: i64) -> Self {
            self.time_commitment_in_seconds = Some(input);
            self
        }
        /// <p>The length, in seconds, of the Shield Advanced subscription for the account.</p>
        pub fn set_time_commitment_in_seconds(mut self, input: std::option::Option<i64>) -> Self {
            self.time_commitment_in_seconds = input;
            self
        }
        /// <p>If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period.</p>
        /// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
        pub fn auto_renew(mut self, input: crate::model::AutoRenew) -> Self {
            self.auto_renew = Some(input);
            self
        }
        /// <p>If <code>ENABLED</code>, the subscription will be automatically renewed at the end of the existing subscription period.</p>
        /// <p>When you initally create a subscription, <code>AutoRenew</code> is set to <code>ENABLED</code>. You can change this by submitting an <code>UpdateSubscription</code> request. If the <code>UpdateSubscription</code> request does not included a value for <code>AutoRenew</code>, the existing value for <code>AutoRenew</code> remains unchanged.</p>
        pub fn set_auto_renew(
            mut self,
            input: std::option::Option<crate::model::AutoRenew>,
        ) -> Self {
            self.auto_renew = input;
            self
        }
        /// Appends an item to `limits`.
        ///
        /// To override the contents of this collection use [`set_limits`](Self::set_limits).
        ///
        /// <p>Specifies how many protections of a given type you can create.</p>
        pub fn limits(mut self, input: impl Into<crate::model::Limit>) -> Self {
            let mut v = self.limits.unwrap_or_default();
            v.push(input.into());
            self.limits = Some(v);
            self
        }
        /// <p>Specifies how many protections of a given type you can create.</p>
        pub fn set_limits(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Limit>>,
        ) -> Self {
            self.limits = input;
            self
        }
        /// <p>If <code>ENABLED</code>, the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.</p>
        /// <p>If <code>PENDING</code>, you have requested proactive engagement and the request is pending. The status changes to <code>ENABLED</code> when your request is fully processed.</p>
        /// <p>If <code>DISABLED</code>, the SRT will not proactively notify contacts about escalations or to initiate proactive customer support. </p>
        pub fn proactive_engagement_status(
            mut self,
            input: crate::model::ProactiveEngagementStatus,
        ) -> Self {
            self.proactive_engagement_status = Some(input);
            self
        }
        /// <p>If <code>ENABLED</code>, the Shield Response Team (SRT) will use email and phone to notify contacts about escalations to the SRT and to initiate proactive customer support.</p>
        /// <p>If <code>PENDING</code>, you have requested proactive engagement and the request is pending. The status changes to <code>ENABLED</code> when your request is fully processed.</p>
        /// <p>If <code>DISABLED</code>, the SRT will not proactively notify contacts about escalations or to initiate proactive customer support. </p>
        pub fn set_proactive_engagement_status(
            mut self,
            input: std::option::Option<crate::model::ProactiveEngagementStatus>,
        ) -> Self {
            self.proactive_engagement_status = input;
            self
        }
        /// <p>Limits settings for your subscription. </p>
        pub fn subscription_limits(mut self, input: crate::model::SubscriptionLimits) -> Self {
            self.subscription_limits = Some(input);
            self
        }
        /// <p>Limits settings for your subscription. </p>
        pub fn set_subscription_limits(
            mut self,
            input: std::option::Option<crate::model::SubscriptionLimits>,
        ) -> Self {
            self.subscription_limits = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the subscription.</p>
        pub fn subscription_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.subscription_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the subscription.</p>
        pub fn set_subscription_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.subscription_arn = input;
            self
        }
        /// Consumes the builder and constructs a [`Subscription`](crate::model::Subscription)
        pub fn build(self) -> crate::model::Subscription {
            crate::model::Subscription {
                start_time: self.start_time,
                end_time: self.end_time,
                time_commitment_in_seconds: self.time_commitment_in_seconds.unwrap_or_default(),
                auto_renew: self.auto_renew,
                limits: self.limits,
                proactive_engagement_status: self.proactive_engagement_status,
                subscription_limits: self.subscription_limits,
                subscription_arn: self.subscription_arn,
            }
        }
    }
}
impl Subscription {
    /// Creates a new builder-style object to manufacture [`Subscription`](crate::model::Subscription)
    pub fn builder() -> crate::model::subscription::Builder {
        crate::model::subscription::Builder::default()
    }
}

/// <p>Limits settings for your subscription. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SubscriptionLimits {
    /// <p>Limits settings on protections for your subscription. </p>
    pub protection_limits: std::option::Option<crate::model::ProtectionLimits>,
    /// <p>Limits settings on protection groups for your subscription. </p>
    pub protection_group_limits: std::option::Option<crate::model::ProtectionGroupLimits>,
}
impl SubscriptionLimits {
    /// <p>Limits settings on protections for your subscription. </p>
    pub fn protection_limits(&self) -> std::option::Option<&crate::model::ProtectionLimits> {
        self.protection_limits.as_ref()
    }
    /// <p>Limits settings on protection groups for your subscription. </p>
    pub fn protection_group_limits(
        &self,
    ) -> std::option::Option<&crate::model::ProtectionGroupLimits> {
        self.protection_group_limits.as_ref()
    }
}
impl std::fmt::Debug for SubscriptionLimits {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SubscriptionLimits");
        formatter.field("protection_limits", &self.protection_limits);
        formatter.field("protection_group_limits", &self.protection_group_limits);
        formatter.finish()
    }
}
/// See [`SubscriptionLimits`](crate::model::SubscriptionLimits)
pub mod subscription_limits {
    /// A builder for [`SubscriptionLimits`](crate::model::SubscriptionLimits)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protection_limits: std::option::Option<crate::model::ProtectionLimits>,
        pub(crate) protection_group_limits:
            std::option::Option<crate::model::ProtectionGroupLimits>,
    }
    impl Builder {
        /// <p>Limits settings on protections for your subscription. </p>
        pub fn protection_limits(mut self, input: crate::model::ProtectionLimits) -> Self {
            self.protection_limits = Some(input);
            self
        }
        /// <p>Limits settings on protections for your subscription. </p>
        pub fn set_protection_limits(
            mut self,
            input: std::option::Option<crate::model::ProtectionLimits>,
        ) -> Self {
            self.protection_limits = input;
            self
        }
        /// <p>Limits settings on protection groups for your subscription. </p>
        pub fn protection_group_limits(
            mut self,
            input: crate::model::ProtectionGroupLimits,
        ) -> Self {
            self.protection_group_limits = Some(input);
            self
        }
        /// <p>Limits settings on protection groups for your subscription. </p>
        pub fn set_protection_group_limits(
            mut self,
            input: std::option::Option<crate::model::ProtectionGroupLimits>,
        ) -> Self {
            self.protection_group_limits = input;
            self
        }
        /// Consumes the builder and constructs a [`SubscriptionLimits`](crate::model::SubscriptionLimits)
        pub fn build(self) -> crate::model::SubscriptionLimits {
            crate::model::SubscriptionLimits {
                protection_limits: self.protection_limits,
                protection_group_limits: self.protection_group_limits,
            }
        }
    }
}
impl SubscriptionLimits {
    /// Creates a new builder-style object to manufacture [`SubscriptionLimits`](crate::model::SubscriptionLimits)
    pub fn builder() -> crate::model::subscription_limits::Builder {
        crate::model::subscription_limits::Builder::default()
    }
}

/// <p>Limits settings on protection groups for your subscription. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProtectionGroupLimits {
    /// <p>The maximum number of protection groups that you can have at one time. </p>
    pub max_protection_groups: i64,
    /// <p>Limits settings by pattern type in the protection groups for your subscription. </p>
    pub pattern_type_limits: std::option::Option<crate::model::ProtectionGroupPatternTypeLimits>,
}
impl ProtectionGroupLimits {
    /// <p>The maximum number of protection groups that you can have at one time. </p>
    pub fn max_protection_groups(&self) -> i64 {
        self.max_protection_groups
    }
    /// <p>Limits settings by pattern type in the protection groups for your subscription. </p>
    pub fn pattern_type_limits(
        &self,
    ) -> std::option::Option<&crate::model::ProtectionGroupPatternTypeLimits> {
        self.pattern_type_limits.as_ref()
    }
}
impl std::fmt::Debug for ProtectionGroupLimits {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ProtectionGroupLimits");
        formatter.field("max_protection_groups", &self.max_protection_groups);
        formatter.field("pattern_type_limits", &self.pattern_type_limits);
        formatter.finish()
    }
}
/// See [`ProtectionGroupLimits`](crate::model::ProtectionGroupLimits)
pub mod protection_group_limits {
    /// A builder for [`ProtectionGroupLimits`](crate::model::ProtectionGroupLimits)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_protection_groups: std::option::Option<i64>,
        pub(crate) pattern_type_limits:
            std::option::Option<crate::model::ProtectionGroupPatternTypeLimits>,
    }
    impl Builder {
        /// <p>The maximum number of protection groups that you can have at one time. </p>
        pub fn max_protection_groups(mut self, input: i64) -> Self {
            self.max_protection_groups = Some(input);
            self
        }
        /// <p>The maximum number of protection groups that you can have at one time. </p>
        pub fn set_max_protection_groups(mut self, input: std::option::Option<i64>) -> Self {
            self.max_protection_groups = input;
            self
        }
        /// <p>Limits settings by pattern type in the protection groups for your subscription. </p>
        pub fn pattern_type_limits(
            mut self,
            input: crate::model::ProtectionGroupPatternTypeLimits,
        ) -> Self {
            self.pattern_type_limits = Some(input);
            self
        }
        /// <p>Limits settings by pattern type in the protection groups for your subscription. </p>
        pub fn set_pattern_type_limits(
            mut self,
            input: std::option::Option<crate::model::ProtectionGroupPatternTypeLimits>,
        ) -> Self {
            self.pattern_type_limits = input;
            self
        }
        /// Consumes the builder and constructs a [`ProtectionGroupLimits`](crate::model::ProtectionGroupLimits)
        pub fn build(self) -> crate::model::ProtectionGroupLimits {
            crate::model::ProtectionGroupLimits {
                max_protection_groups: self.max_protection_groups.unwrap_or_default(),
                pattern_type_limits: self.pattern_type_limits,
            }
        }
    }
}
impl ProtectionGroupLimits {
    /// Creates a new builder-style object to manufacture [`ProtectionGroupLimits`](crate::model::ProtectionGroupLimits)
    pub fn builder() -> crate::model::protection_group_limits::Builder {
        crate::model::protection_group_limits::Builder::default()
    }
}

/// <p>Limits settings by pattern type in the protection groups for your subscription. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProtectionGroupPatternTypeLimits {
    /// <p>Limits settings on protection groups with arbitrary pattern type. </p>
    pub arbitrary_pattern_limits:
        std::option::Option<crate::model::ProtectionGroupArbitraryPatternLimits>,
}
impl ProtectionGroupPatternTypeLimits {
    /// <p>Limits settings on protection groups with arbitrary pattern type. </p>
    pub fn arbitrary_pattern_limits(
        &self,
    ) -> std::option::Option<&crate::model::ProtectionGroupArbitraryPatternLimits> {
        self.arbitrary_pattern_limits.as_ref()
    }
}
impl std::fmt::Debug for ProtectionGroupPatternTypeLimits {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ProtectionGroupPatternTypeLimits");
        formatter.field("arbitrary_pattern_limits", &self.arbitrary_pattern_limits);
        formatter.finish()
    }
}
/// See [`ProtectionGroupPatternTypeLimits`](crate::model::ProtectionGroupPatternTypeLimits)
pub mod protection_group_pattern_type_limits {
    /// A builder for [`ProtectionGroupPatternTypeLimits`](crate::model::ProtectionGroupPatternTypeLimits)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) arbitrary_pattern_limits:
            std::option::Option<crate::model::ProtectionGroupArbitraryPatternLimits>,
    }
    impl Builder {
        /// <p>Limits settings on protection groups with arbitrary pattern type. </p>
        pub fn arbitrary_pattern_limits(
            mut self,
            input: crate::model::ProtectionGroupArbitraryPatternLimits,
        ) -> Self {
            self.arbitrary_pattern_limits = Some(input);
            self
        }
        /// <p>Limits settings on protection groups with arbitrary pattern type. </p>
        pub fn set_arbitrary_pattern_limits(
            mut self,
            input: std::option::Option<crate::model::ProtectionGroupArbitraryPatternLimits>,
        ) -> Self {
            self.arbitrary_pattern_limits = input;
            self
        }
        /// Consumes the builder and constructs a [`ProtectionGroupPatternTypeLimits`](crate::model::ProtectionGroupPatternTypeLimits)
        pub fn build(self) -> crate::model::ProtectionGroupPatternTypeLimits {
            crate::model::ProtectionGroupPatternTypeLimits {
                arbitrary_pattern_limits: self.arbitrary_pattern_limits,
            }
        }
    }
}
impl ProtectionGroupPatternTypeLimits {
    /// Creates a new builder-style object to manufacture [`ProtectionGroupPatternTypeLimits`](crate::model::ProtectionGroupPatternTypeLimits)
    pub fn builder() -> crate::model::protection_group_pattern_type_limits::Builder {
        crate::model::protection_group_pattern_type_limits::Builder::default()
    }
}

/// <p>Limits settings on protection groups with arbitrary pattern type. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProtectionGroupArbitraryPatternLimits {
    /// <p>The maximum number of resources you can specify for a single arbitrary pattern in a protection group.</p>
    pub max_members: i64,
}
impl ProtectionGroupArbitraryPatternLimits {
    /// <p>The maximum number of resources you can specify for a single arbitrary pattern in a protection group.</p>
    pub fn max_members(&self) -> i64 {
        self.max_members
    }
}
impl std::fmt::Debug for ProtectionGroupArbitraryPatternLimits {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ProtectionGroupArbitraryPatternLimits");
        formatter.field("max_members", &self.max_members);
        formatter.finish()
    }
}
/// See [`ProtectionGroupArbitraryPatternLimits`](crate::model::ProtectionGroupArbitraryPatternLimits)
pub mod protection_group_arbitrary_pattern_limits {
    /// A builder for [`ProtectionGroupArbitraryPatternLimits`](crate::model::ProtectionGroupArbitraryPatternLimits)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max_members: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The maximum number of resources you can specify for a single arbitrary pattern in a protection group.</p>
        pub fn max_members(mut self, input: i64) -> Self {
            self.max_members = Some(input);
            self
        }
        /// <p>The maximum number of resources you can specify for a single arbitrary pattern in a protection group.</p>
        pub fn set_max_members(mut self, input: std::option::Option<i64>) -> Self {
            self.max_members = input;
            self
        }
        /// Consumes the builder and constructs a [`ProtectionGroupArbitraryPatternLimits`](crate::model::ProtectionGroupArbitraryPatternLimits)
        pub fn build(self) -> crate::model::ProtectionGroupArbitraryPatternLimits {
            crate::model::ProtectionGroupArbitraryPatternLimits {
                max_members: self.max_members.unwrap_or_default(),
            }
        }
    }
}
impl ProtectionGroupArbitraryPatternLimits {
    /// Creates a new builder-style object to manufacture [`ProtectionGroupArbitraryPatternLimits`](crate::model::ProtectionGroupArbitraryPatternLimits)
    pub fn builder() -> crate::model::protection_group_arbitrary_pattern_limits::Builder {
        crate::model::protection_group_arbitrary_pattern_limits::Builder::default()
    }
}

/// <p>Limits settings on protections for your subscription. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ProtectionLimits {
    /// <p>The maximum number of resource types that you can specify in a protection.</p>
    pub protected_resource_type_limits: std::option::Option<std::vec::Vec<crate::model::Limit>>,
}
impl ProtectionLimits {
    /// <p>The maximum number of resource types that you can specify in a protection.</p>
    pub fn protected_resource_type_limits(&self) -> std::option::Option<&[crate::model::Limit]> {
        self.protected_resource_type_limits.as_deref()
    }
}
impl std::fmt::Debug for ProtectionLimits {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ProtectionLimits");
        formatter.field(
            "protected_resource_type_limits",
            &self.protected_resource_type_limits,
        );
        formatter.finish()
    }
}
/// See [`ProtectionLimits`](crate::model::ProtectionLimits)
pub mod protection_limits {
    /// A builder for [`ProtectionLimits`](crate::model::ProtectionLimits)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) protected_resource_type_limits:
            std::option::Option<std::vec::Vec<crate::model::Limit>>,
    }
    impl Builder {
        /// Appends an item to `protected_resource_type_limits`.
        ///
        /// To override the contents of this collection use [`set_protected_resource_type_limits`](Self::set_protected_resource_type_limits).
        ///
        /// <p>The maximum number of resource types that you can specify in a protection.</p>
        pub fn protected_resource_type_limits(
            mut self,
            input: impl Into<crate::model::Limit>,
        ) -> Self {
            let mut v = self.protected_resource_type_limits.unwrap_or_default();
            v.push(input.into());
            self.protected_resource_type_limits = Some(v);
            self
        }
        /// <p>The maximum number of resource types that you can specify in a protection.</p>
        pub fn set_protected_resource_type_limits(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Limit>>,
        ) -> Self {
            self.protected_resource_type_limits = input;
            self
        }
        /// Consumes the builder and constructs a [`ProtectionLimits`](crate::model::ProtectionLimits)
        pub fn build(self) -> crate::model::ProtectionLimits {
            crate::model::ProtectionLimits {
                protected_resource_type_limits: self.protected_resource_type_limits,
            }
        }
    }
}
impl ProtectionLimits {
    /// Creates a new builder-style object to manufacture [`ProtectionLimits`](crate::model::ProtectionLimits)
    pub fn builder() -> crate::model::protection_limits::Builder {
        crate::model::protection_limits::Builder::default()
    }
}

/// <p>Specifies how many protections of a given type you can create.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Limit {
    /// <p>The type of protection.</p>
    pub r#type: std::option::Option<std::string::String>,
    /// <p>The maximum number of protections that can be created for the specified <code>Type</code>.</p>
    pub max: i64,
}
impl Limit {
    /// <p>The type of protection.</p>
    pub fn r#type(&self) -> std::option::Option<&str> {
        self.r#type.as_deref()
    }
    /// <p>The maximum number of protections that can be created for the specified <code>Type</code>.</p>
    pub fn max(&self) -> i64 {
        self.max
    }
}
impl std::fmt::Debug for Limit {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Limit");
        formatter.field("r#type", &self.r#type);
        formatter.field("max", &self.max);
        formatter.finish()
    }
}
/// See [`Limit`](crate::model::Limit)
pub mod limit {
    /// A builder for [`Limit`](crate::model::Limit)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<std::string::String>,
        pub(crate) max: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The type of protection.</p>
        pub fn r#type(mut self, input: impl Into<std::string::String>) -> Self {
            self.r#type = Some(input.into());
            self
        }
        /// <p>The type of protection.</p>
        pub fn set_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The maximum number of protections that can be created for the specified <code>Type</code>.</p>
        pub fn max(mut self, input: i64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum number of protections that can be created for the specified <code>Type</code>.</p>
        pub fn set_max(mut self, input: std::option::Option<i64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`Limit`](crate::model::Limit)
        pub fn build(self) -> crate::model::Limit {
            crate::model::Limit {
                r#type: self.r#type,
                max: self.max.unwrap_or_default(),
            }
        }
    }
}
impl Limit {
    /// Creates a new builder-style object to manufacture [`Limit`](crate::model::Limit)
    pub fn builder() -> crate::model::limit::Builder {
        crate::model::limit::Builder::default()
    }
}

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

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

/// <p>A single attack statistics data record. This is returned by <a>DescribeAttackStatistics</a> along with a time range indicating the time period that the attack statistics apply to.  </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackStatisticsDataItem {
    /// <p>Information about the volume of attacks during the time period. If the accompanying <code>AttackCount</code> is zero, this setting might be empty.</p>
    pub attack_volume: std::option::Option<crate::model::AttackVolume>,
    /// <p>The number of attacks detected during the time period. This is always present, but might be zero. </p>
    pub attack_count: i64,
}
impl AttackStatisticsDataItem {
    /// <p>Information about the volume of attacks during the time period. If the accompanying <code>AttackCount</code> is zero, this setting might be empty.</p>
    pub fn attack_volume(&self) -> std::option::Option<&crate::model::AttackVolume> {
        self.attack_volume.as_ref()
    }
    /// <p>The number of attacks detected during the time period. This is always present, but might be zero. </p>
    pub fn attack_count(&self) -> i64 {
        self.attack_count
    }
}
impl std::fmt::Debug for AttackStatisticsDataItem {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackStatisticsDataItem");
        formatter.field("attack_volume", &self.attack_volume);
        formatter.field("attack_count", &self.attack_count);
        formatter.finish()
    }
}
/// See [`AttackStatisticsDataItem`](crate::model::AttackStatisticsDataItem)
pub mod attack_statistics_data_item {
    /// A builder for [`AttackStatisticsDataItem`](crate::model::AttackStatisticsDataItem)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attack_volume: std::option::Option<crate::model::AttackVolume>,
        pub(crate) attack_count: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>Information about the volume of attacks during the time period. If the accompanying <code>AttackCount</code> is zero, this setting might be empty.</p>
        pub fn attack_volume(mut self, input: crate::model::AttackVolume) -> Self {
            self.attack_volume = Some(input);
            self
        }
        /// <p>Information about the volume of attacks during the time period. If the accompanying <code>AttackCount</code> is zero, this setting might be empty.</p>
        pub fn set_attack_volume(
            mut self,
            input: std::option::Option<crate::model::AttackVolume>,
        ) -> Self {
            self.attack_volume = input;
            self
        }
        /// <p>The number of attacks detected during the time period. This is always present, but might be zero. </p>
        pub fn attack_count(mut self, input: i64) -> Self {
            self.attack_count = Some(input);
            self
        }
        /// <p>The number of attacks detected during the time period. This is always present, but might be zero. </p>
        pub fn set_attack_count(mut self, input: std::option::Option<i64>) -> Self {
            self.attack_count = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackStatisticsDataItem`](crate::model::AttackStatisticsDataItem)
        pub fn build(self) -> crate::model::AttackStatisticsDataItem {
            crate::model::AttackStatisticsDataItem {
                attack_volume: self.attack_volume,
                attack_count: self.attack_count.unwrap_or_default(),
            }
        }
    }
}
impl AttackStatisticsDataItem {
    /// Creates a new builder-style object to manufacture [`AttackStatisticsDataItem`](crate::model::AttackStatisticsDataItem)
    pub fn builder() -> crate::model::attack_statistics_data_item::Builder {
        crate::model::attack_statistics_data_item::Builder::default()
    }
}

/// <p>Information about the volume of attacks during the time period, included in an <a>AttackStatisticsDataItem</a>. If the accompanying <code>AttackCount</code> in the statistics object is zero, this setting might be empty.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackVolume {
    /// <p>A statistics object that uses bits per second as the unit. This is included for network level attacks. </p>
    pub bits_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
    /// <p>A statistics object that uses packets per second as the unit. This is included for network level attacks. </p>
    pub packets_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
    /// <p>A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.</p>
    pub requests_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
}
impl AttackVolume {
    /// <p>A statistics object that uses bits per second as the unit. This is included for network level attacks. </p>
    pub fn bits_per_second(&self) -> std::option::Option<&crate::model::AttackVolumeStatistics> {
        self.bits_per_second.as_ref()
    }
    /// <p>A statistics object that uses packets per second as the unit. This is included for network level attacks. </p>
    pub fn packets_per_second(&self) -> std::option::Option<&crate::model::AttackVolumeStatistics> {
        self.packets_per_second.as_ref()
    }
    /// <p>A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.</p>
    pub fn requests_per_second(
        &self,
    ) -> std::option::Option<&crate::model::AttackVolumeStatistics> {
        self.requests_per_second.as_ref()
    }
}
impl std::fmt::Debug for AttackVolume {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackVolume");
        formatter.field("bits_per_second", &self.bits_per_second);
        formatter.field("packets_per_second", &self.packets_per_second);
        formatter.field("requests_per_second", &self.requests_per_second);
        formatter.finish()
    }
}
/// See [`AttackVolume`](crate::model::AttackVolume)
pub mod attack_volume {
    /// A builder for [`AttackVolume`](crate::model::AttackVolume)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) bits_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
        pub(crate) packets_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
        pub(crate) requests_per_second: std::option::Option<crate::model::AttackVolumeStatistics>,
    }
    impl Builder {
        /// <p>A statistics object that uses bits per second as the unit. This is included for network level attacks. </p>
        pub fn bits_per_second(mut self, input: crate::model::AttackVolumeStatistics) -> Self {
            self.bits_per_second = Some(input);
            self
        }
        /// <p>A statistics object that uses bits per second as the unit. This is included for network level attacks. </p>
        pub fn set_bits_per_second(
            mut self,
            input: std::option::Option<crate::model::AttackVolumeStatistics>,
        ) -> Self {
            self.bits_per_second = input;
            self
        }
        /// <p>A statistics object that uses packets per second as the unit. This is included for network level attacks. </p>
        pub fn packets_per_second(mut self, input: crate::model::AttackVolumeStatistics) -> Self {
            self.packets_per_second = Some(input);
            self
        }
        /// <p>A statistics object that uses packets per second as the unit. This is included for network level attacks. </p>
        pub fn set_packets_per_second(
            mut self,
            input: std::option::Option<crate::model::AttackVolumeStatistics>,
        ) -> Self {
            self.packets_per_second = input;
            self
        }
        /// <p>A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.</p>
        pub fn requests_per_second(mut self, input: crate::model::AttackVolumeStatistics) -> Self {
            self.requests_per_second = Some(input);
            self
        }
        /// <p>A statistics object that uses requests per second as the unit. This is included for application level attacks, and is only available for accounts that are subscribed to Shield Advanced.</p>
        pub fn set_requests_per_second(
            mut self,
            input: std::option::Option<crate::model::AttackVolumeStatistics>,
        ) -> Self {
            self.requests_per_second = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackVolume`](crate::model::AttackVolume)
        pub fn build(self) -> crate::model::AttackVolume {
            crate::model::AttackVolume {
                bits_per_second: self.bits_per_second,
                packets_per_second: self.packets_per_second,
                requests_per_second: self.requests_per_second,
            }
        }
    }
}
impl AttackVolume {
    /// Creates a new builder-style object to manufacture [`AttackVolume`](crate::model::AttackVolume)
    pub fn builder() -> crate::model::attack_volume::Builder {
        crate::model::attack_volume::Builder::default()
    }
}

/// <p>Statistics objects for the various data types in <a>AttackVolume</a>. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackVolumeStatistics {
    /// <p>The maximum attack volume observed for the given unit.</p>
    pub max: f64,
}
impl AttackVolumeStatistics {
    /// <p>The maximum attack volume observed for the given unit.</p>
    pub fn max(&self) -> f64 {
        self.max
    }
}
impl std::fmt::Debug for AttackVolumeStatistics {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackVolumeStatistics");
        formatter.field("max", &self.max);
        formatter.finish()
    }
}
/// See [`AttackVolumeStatistics`](crate::model::AttackVolumeStatistics)
pub mod attack_volume_statistics {
    /// A builder for [`AttackVolumeStatistics`](crate::model::AttackVolumeStatistics)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) max: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The maximum attack volume observed for the given unit.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum attack volume observed for the given unit.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackVolumeStatistics`](crate::model::AttackVolumeStatistics)
        pub fn build(self) -> crate::model::AttackVolumeStatistics {
            crate::model::AttackVolumeStatistics {
                max: self.max.unwrap_or_default(),
            }
        }
    }
}
impl AttackVolumeStatistics {
    /// Creates a new builder-style object to manufacture [`AttackVolumeStatistics`](crate::model::AttackVolumeStatistics)
    pub fn builder() -> crate::model::attack_volume_statistics::Builder {
        crate::model::attack_volume_statistics::Builder::default()
    }
}

/// <p>The details of a DDoS attack.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackDetail {
    /// <p>The unique identifier (ID) of the attack.</p>
    pub attack_id: std::option::Option<std::string::String>,
    /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
    pub resource_arn: std::option::Option<std::string::String>,
    /// <p>If applicable, additional detail about the resource being attacked, for example, IP address or URL.</p>
    pub sub_resources: std::option::Option<std::vec::Vec<crate::model::SubResourceSummary>>,
    /// <p>The time the attack started, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub start_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>The time the attack ended, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub end_time: std::option::Option<aws_smithy_types::DateTime>,
    /// <p>List of counters that describe the attack for the specified time period.</p>
    pub attack_counters: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
    /// <p>The array of objects that provide details of the Shield event. </p>
    /// <p>For infrastructure  
    /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
    /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
    /// in the <i>WAF Developer Guide</i>. </p>
    pub attack_properties: std::option::Option<std::vec::Vec<crate::model::AttackProperty>>,
    /// <p>List of mitigation actions taken for the attack.</p>
    pub mitigations: std::option::Option<std::vec::Vec<crate::model::Mitigation>>,
}
impl AttackDetail {
    /// <p>The unique identifier (ID) of the attack.</p>
    pub fn attack_id(&self) -> std::option::Option<&str> {
        self.attack_id.as_deref()
    }
    /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
    pub fn resource_arn(&self) -> std::option::Option<&str> {
        self.resource_arn.as_deref()
    }
    /// <p>If applicable, additional detail about the resource being attacked, for example, IP address or URL.</p>
    pub fn sub_resources(&self) -> std::option::Option<&[crate::model::SubResourceSummary]> {
        self.sub_resources.as_deref()
    }
    /// <p>The time the attack started, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn start_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The time the attack ended, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
    pub fn end_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
        self.end_time.as_ref()
    }
    /// <p>List of counters that describe the attack for the specified time period.</p>
    pub fn attack_counters(&self) -> std::option::Option<&[crate::model::SummarizedCounter]> {
        self.attack_counters.as_deref()
    }
    /// <p>The array of objects that provide details of the Shield event. </p>
    /// <p>For infrastructure  
    /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
    /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
    /// in the <i>WAF Developer Guide</i>. </p>
    pub fn attack_properties(&self) -> std::option::Option<&[crate::model::AttackProperty]> {
        self.attack_properties.as_deref()
    }
    /// <p>List of mitigation actions taken for the attack.</p>
    pub fn mitigations(&self) -> std::option::Option<&[crate::model::Mitigation]> {
        self.mitigations.as_deref()
    }
}
impl std::fmt::Debug for AttackDetail {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackDetail");
        formatter.field("attack_id", &self.attack_id);
        formatter.field("resource_arn", &self.resource_arn);
        formatter.field("sub_resources", &self.sub_resources);
        formatter.field("start_time", &self.start_time);
        formatter.field("end_time", &self.end_time);
        formatter.field("attack_counters", &self.attack_counters);
        formatter.field("attack_properties", &self.attack_properties);
        formatter.field("mitigations", &self.mitigations);
        formatter.finish()
    }
}
/// See [`AttackDetail`](crate::model::AttackDetail)
pub mod attack_detail {
    /// A builder for [`AttackDetail`](crate::model::AttackDetail)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attack_id: std::option::Option<std::string::String>,
        pub(crate) resource_arn: std::option::Option<std::string::String>,
        pub(crate) sub_resources:
            std::option::Option<std::vec::Vec<crate::model::SubResourceSummary>>,
        pub(crate) start_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) end_time: std::option::Option<aws_smithy_types::DateTime>,
        pub(crate) attack_counters:
            std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
        pub(crate) attack_properties:
            std::option::Option<std::vec::Vec<crate::model::AttackProperty>>,
        pub(crate) mitigations: std::option::Option<std::vec::Vec<crate::model::Mitigation>>,
    }
    impl Builder {
        /// <p>The unique identifier (ID) of the attack.</p>
        pub fn attack_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.attack_id = Some(input.into());
            self
        }
        /// <p>The unique identifier (ID) of the attack.</p>
        pub fn set_attack_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.attack_id = input;
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
        pub fn resource_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.resource_arn = Some(input.into());
            self
        }
        /// <p>The ARN (Amazon Resource Name) of the resource that was attacked.</p>
        pub fn set_resource_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.resource_arn = input;
            self
        }
        /// Appends an item to `sub_resources`.
        ///
        /// To override the contents of this collection use [`set_sub_resources`](Self::set_sub_resources).
        ///
        /// <p>If applicable, additional detail about the resource being attacked, for example, IP address or URL.</p>
        pub fn sub_resources(mut self, input: impl Into<crate::model::SubResourceSummary>) -> Self {
            let mut v = self.sub_resources.unwrap_or_default();
            v.push(input.into());
            self.sub_resources = Some(v);
            self
        }
        /// <p>If applicable, additional detail about the resource being attacked, for example, IP address or URL.</p>
        pub fn set_sub_resources(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SubResourceSummary>>,
        ) -> Self {
            self.sub_resources = input;
            self
        }
        /// <p>The time the attack started, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn start_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.start_time = Some(input);
            self
        }
        /// <p>The time the attack started, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_start_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.start_time = input;
            self
        }
        /// <p>The time the attack ended, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn end_time(mut self, input: aws_smithy_types::DateTime) -> Self {
            self.end_time = Some(input);
            self
        }
        /// <p>The time the attack ended, in Unix time in seconds. For more information see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types">timestamp</a>.</p>
        pub fn set_end_time(
            mut self,
            input: std::option::Option<aws_smithy_types::DateTime>,
        ) -> Self {
            self.end_time = input;
            self
        }
        /// Appends an item to `attack_counters`.
        ///
        /// To override the contents of this collection use [`set_attack_counters`](Self::set_attack_counters).
        ///
        /// <p>List of counters that describe the attack for the specified time period.</p>
        pub fn attack_counters(
            mut self,
            input: impl Into<crate::model::SummarizedCounter>,
        ) -> Self {
            let mut v = self.attack_counters.unwrap_or_default();
            v.push(input.into());
            self.attack_counters = Some(v);
            self
        }
        /// <p>List of counters that describe the attack for the specified time period.</p>
        pub fn set_attack_counters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
        ) -> Self {
            self.attack_counters = input;
            self
        }
        /// Appends an item to `attack_properties`.
        ///
        /// To override the contents of this collection use [`set_attack_properties`](Self::set_attack_properties).
        ///
        /// <p>The array of objects that provide details of the Shield event. </p>
        /// <p>For infrastructure  
        /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
        /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
        /// in the <i>WAF Developer Guide</i>. </p>
        pub fn attack_properties(mut self, input: impl Into<crate::model::AttackProperty>) -> Self {
            let mut v = self.attack_properties.unwrap_or_default();
            v.push(input.into());
            self.attack_properties = Some(v);
            self
        }
        /// <p>The array of objects that provide details of the Shield event. </p>
        /// <p>For infrastructure  
        /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
        /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
        /// in the <i>WAF Developer Guide</i>. </p>
        pub fn set_attack_properties(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::AttackProperty>>,
        ) -> Self {
            self.attack_properties = input;
            self
        }
        /// Appends an item to `mitigations`.
        ///
        /// To override the contents of this collection use [`set_mitigations`](Self::set_mitigations).
        ///
        /// <p>List of mitigation actions taken for the attack.</p>
        pub fn mitigations(mut self, input: impl Into<crate::model::Mitigation>) -> Self {
            let mut v = self.mitigations.unwrap_or_default();
            v.push(input.into());
            self.mitigations = Some(v);
            self
        }
        /// <p>List of mitigation actions taken for the attack.</p>
        pub fn set_mitigations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Mitigation>>,
        ) -> Self {
            self.mitigations = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackDetail`](crate::model::AttackDetail)
        pub fn build(self) -> crate::model::AttackDetail {
            crate::model::AttackDetail {
                attack_id: self.attack_id,
                resource_arn: self.resource_arn,
                sub_resources: self.sub_resources,
                start_time: self.start_time,
                end_time: self.end_time,
                attack_counters: self.attack_counters,
                attack_properties: self.attack_properties,
                mitigations: self.mitigations,
            }
        }
    }
}
impl AttackDetail {
    /// Creates a new builder-style object to manufacture [`AttackDetail`](crate::model::AttackDetail)
    pub fn builder() -> crate::model::attack_detail::Builder {
        crate::model::attack_detail::Builder::default()
    }
}

/// <p>The mitigation applied to a DDoS attack.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Mitigation {
    /// <p>The name of the mitigation taken for this attack.</p>
    pub mitigation_name: std::option::Option<std::string::String>,
}
impl Mitigation {
    /// <p>The name of the mitigation taken for this attack.</p>
    pub fn mitigation_name(&self) -> std::option::Option<&str> {
        self.mitigation_name.as_deref()
    }
}
impl std::fmt::Debug for Mitigation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Mitigation");
        formatter.field("mitigation_name", &self.mitigation_name);
        formatter.finish()
    }
}
/// See [`Mitigation`](crate::model::Mitigation)
pub mod mitigation {
    /// A builder for [`Mitigation`](crate::model::Mitigation)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) mitigation_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the mitigation taken for this attack.</p>
        pub fn mitigation_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.mitigation_name = Some(input.into());
            self
        }
        /// <p>The name of the mitigation taken for this attack.</p>
        pub fn set_mitigation_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.mitigation_name = input;
            self
        }
        /// Consumes the builder and constructs a [`Mitigation`](crate::model::Mitigation)
        pub fn build(self) -> crate::model::Mitigation {
            crate::model::Mitigation {
                mitigation_name: self.mitigation_name,
            }
        }
    }
}
impl Mitigation {
    /// Creates a new builder-style object to manufacture [`Mitigation`](crate::model::Mitigation)
    pub fn builder() -> crate::model::mitigation::Builder {
        crate::model::mitigation::Builder::default()
    }
}

/// <p>Details of a Shield event. This is provided as part of an <a>AttackDetail</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct AttackProperty {
    /// <p>The type of Shield event that was observed. <code>NETWORK</code> indicates layer 3 and layer 4 events and <code>APPLICATION</code>
    /// indicates layer 7 events.</p>
    /// <p>For infrastructure  
    /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
    /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
    /// in the <i>WAF Developer Guide</i>. </p>
    pub attack_layer: std::option::Option<crate::model::AttackLayer>,
    /// <p>Defines the Shield event property information that is provided. The
    /// <code>WORDPRESS_PINGBACK_REFLECTOR</code> and <code>WORDPRESS_PINGBACK_SOURCE</code>
    /// values are valid only for WordPress reflective pingback events.</p>
    pub attack_property_identifier: std::option::Option<crate::model::AttackPropertyIdentifier>,
    /// <p>Contributor objects for the top five contributors to a Shield event. </p>
    pub top_contributors: std::option::Option<std::vec::Vec<crate::model::Contributor>>,
    /// <p>The unit used for the <code>Contributor</code>
    /// <code>Value</code> property. </p>
    pub unit: std::option::Option<crate::model::Unit>,
    /// <p>The total contributions made to this Shield event by all contributors.</p>
    pub total: i64,
}
impl AttackProperty {
    /// <p>The type of Shield event that was observed. <code>NETWORK</code> indicates layer 3 and layer 4 events and <code>APPLICATION</code>
    /// indicates layer 7 events.</p>
    /// <p>For infrastructure  
    /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
    /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
    /// in the <i>WAF Developer Guide</i>. </p>
    pub fn attack_layer(&self) -> std::option::Option<&crate::model::AttackLayer> {
        self.attack_layer.as_ref()
    }
    /// <p>Defines the Shield event property information that is provided. The
    /// <code>WORDPRESS_PINGBACK_REFLECTOR</code> and <code>WORDPRESS_PINGBACK_SOURCE</code>
    /// values are valid only for WordPress reflective pingback events.</p>
    pub fn attack_property_identifier(
        &self,
    ) -> std::option::Option<&crate::model::AttackPropertyIdentifier> {
        self.attack_property_identifier.as_ref()
    }
    /// <p>Contributor objects for the top five contributors to a Shield event. </p>
    pub fn top_contributors(&self) -> std::option::Option<&[crate::model::Contributor]> {
        self.top_contributors.as_deref()
    }
    /// <p>The unit used for the <code>Contributor</code>
    /// <code>Value</code> property. </p>
    pub fn unit(&self) -> std::option::Option<&crate::model::Unit> {
        self.unit.as_ref()
    }
    /// <p>The total contributions made to this Shield event by all contributors.</p>
    pub fn total(&self) -> i64 {
        self.total
    }
}
impl std::fmt::Debug for AttackProperty {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("AttackProperty");
        formatter.field("attack_layer", &self.attack_layer);
        formatter.field(
            "attack_property_identifier",
            &self.attack_property_identifier,
        );
        formatter.field("top_contributors", &self.top_contributors);
        formatter.field("unit", &self.unit);
        formatter.field("total", &self.total);
        formatter.finish()
    }
}
/// See [`AttackProperty`](crate::model::AttackProperty)
pub mod attack_property {
    /// A builder for [`AttackProperty`](crate::model::AttackProperty)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) attack_layer: std::option::Option<crate::model::AttackLayer>,
        pub(crate) attack_property_identifier:
            std::option::Option<crate::model::AttackPropertyIdentifier>,
        pub(crate) top_contributors: std::option::Option<std::vec::Vec<crate::model::Contributor>>,
        pub(crate) unit: std::option::Option<crate::model::Unit>,
        pub(crate) total: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The type of Shield event that was observed. <code>NETWORK</code> indicates layer 3 and layer 4 events and <code>APPLICATION</code>
        /// indicates layer 7 events.</p>
        /// <p>For infrastructure  
        /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
        /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
        /// in the <i>WAF Developer Guide</i>. </p>
        pub fn attack_layer(mut self, input: crate::model::AttackLayer) -> Self {
            self.attack_layer = Some(input);
            self
        }
        /// <p>The type of Shield event that was observed. <code>NETWORK</code> indicates layer 3 and layer 4 events and <code>APPLICATION</code>
        /// indicates layer 7 events.</p>
        /// <p>For infrastructure  
        /// layer events (L3 and L4 events) after January 25, 2021, you can view metrics for top contributors in Amazon CloudWatch metrics.
        /// For more information, see <a href="https://docs.aws.amazon.com/waf/latest/developerguide/monitoring-cloudwatch.html#set-ddos-alarms">Shield metrics and alarms</a>
        /// in the <i>WAF Developer Guide</i>. </p>
        pub fn set_attack_layer(
            mut self,
            input: std::option::Option<crate::model::AttackLayer>,
        ) -> Self {
            self.attack_layer = input;
            self
        }
        /// <p>Defines the Shield event property information that is provided. The
        /// <code>WORDPRESS_PINGBACK_REFLECTOR</code> and <code>WORDPRESS_PINGBACK_SOURCE</code>
        /// values are valid only for WordPress reflective pingback events.</p>
        pub fn attack_property_identifier(
            mut self,
            input: crate::model::AttackPropertyIdentifier,
        ) -> Self {
            self.attack_property_identifier = Some(input);
            self
        }
        /// <p>Defines the Shield event property information that is provided. The
        /// <code>WORDPRESS_PINGBACK_REFLECTOR</code> and <code>WORDPRESS_PINGBACK_SOURCE</code>
        /// values are valid only for WordPress reflective pingback events.</p>
        pub fn set_attack_property_identifier(
            mut self,
            input: std::option::Option<crate::model::AttackPropertyIdentifier>,
        ) -> Self {
            self.attack_property_identifier = input;
            self
        }
        /// Appends an item to `top_contributors`.
        ///
        /// To override the contents of this collection use [`set_top_contributors`](Self::set_top_contributors).
        ///
        /// <p>Contributor objects for the top five contributors to a Shield event. </p>
        pub fn top_contributors(mut self, input: impl Into<crate::model::Contributor>) -> Self {
            let mut v = self.top_contributors.unwrap_or_default();
            v.push(input.into());
            self.top_contributors = Some(v);
            self
        }
        /// <p>Contributor objects for the top five contributors to a Shield event. </p>
        pub fn set_top_contributors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::Contributor>>,
        ) -> Self {
            self.top_contributors = input;
            self
        }
        /// <p>The unit used for the <code>Contributor</code>
        /// <code>Value</code> property. </p>
        pub fn unit(mut self, input: crate::model::Unit) -> Self {
            self.unit = Some(input);
            self
        }
        /// <p>The unit used for the <code>Contributor</code>
        /// <code>Value</code> property. </p>
        pub fn set_unit(mut self, input: std::option::Option<crate::model::Unit>) -> Self {
            self.unit = input;
            self
        }
        /// <p>The total contributions made to this Shield event by all contributors.</p>
        pub fn total(mut self, input: i64) -> Self {
            self.total = Some(input);
            self
        }
        /// <p>The total contributions made to this Shield event by all contributors.</p>
        pub fn set_total(mut self, input: std::option::Option<i64>) -> Self {
            self.total = input;
            self
        }
        /// Consumes the builder and constructs a [`AttackProperty`](crate::model::AttackProperty)
        pub fn build(self) -> crate::model::AttackProperty {
            crate::model::AttackProperty {
                attack_layer: self.attack_layer,
                attack_property_identifier: self.attack_property_identifier,
                top_contributors: self.top_contributors,
                unit: self.unit,
                total: self.total.unwrap_or_default(),
            }
        }
    }
}
impl AttackProperty {
    /// Creates a new builder-style object to manufacture [`AttackProperty`](crate::model::AttackProperty)
    pub fn builder() -> crate::model::attack_property::Builder {
        crate::model::attack_property::Builder::default()
    }
}

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

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(Unit::from(s))
    }
}
impl Unit {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            Unit::Bits => "BITS",
            Unit::Bytes => "BYTES",
            Unit::Packets => "PACKETS",
            Unit::Requests => "REQUESTS",
            Unit::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &["BITS", "BYTES", "PACKETS", "REQUESTS"]
    }
}
impl AsRef<str> for Unit {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>A contributor to the attack and their contribution.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Contributor {
    /// <p>The name of the contributor. This is dependent on the <code>AttackPropertyIdentifier</code>. For example, if the <code>AttackPropertyIdentifier</code> is <code>SOURCE_COUNTRY</code>, the <code>Name</code> could be <code>United States</code>.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The contribution of this contributor expressed in <a>Protection</a> units. For example <code>10,000</code>.</p>
    pub value: i64,
}
impl Contributor {
    /// <p>The name of the contributor. This is dependent on the <code>AttackPropertyIdentifier</code>. For example, if the <code>AttackPropertyIdentifier</code> is <code>SOURCE_COUNTRY</code>, the <code>Name</code> could be <code>United States</code>.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The contribution of this contributor expressed in <a>Protection</a> units. For example <code>10,000</code>.</p>
    pub fn value(&self) -> i64 {
        self.value
    }
}
impl std::fmt::Debug for Contributor {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Contributor");
        formatter.field("name", &self.name);
        formatter.field("value", &self.value);
        formatter.finish()
    }
}
/// See [`Contributor`](crate::model::Contributor)
pub mod contributor {
    /// A builder for [`Contributor`](crate::model::Contributor)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the contributor. This is dependent on the <code>AttackPropertyIdentifier</code>. For example, if the <code>AttackPropertyIdentifier</code> is <code>SOURCE_COUNTRY</code>, the <code>Name</code> could be <code>United States</code>.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the contributor. This is dependent on the <code>AttackPropertyIdentifier</code>. For example, if the <code>AttackPropertyIdentifier</code> is <code>SOURCE_COUNTRY</code>, the <code>Name</code> could be <code>United States</code>.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The contribution of this contributor expressed in <a>Protection</a> units. For example <code>10,000</code>.</p>
        pub fn value(mut self, input: i64) -> Self {
            self.value = Some(input);
            self
        }
        /// <p>The contribution of this contributor expressed in <a>Protection</a> units. For example <code>10,000</code>.</p>
        pub fn set_value(mut self, input: std::option::Option<i64>) -> Self {
            self.value = input;
            self
        }
        /// Consumes the builder and constructs a [`Contributor`](crate::model::Contributor)
        pub fn build(self) -> crate::model::Contributor {
            crate::model::Contributor {
                name: self.name,
                value: self.value.unwrap_or_default(),
            }
        }
    }
}
impl Contributor {
    /// Creates a new builder-style object to manufacture [`Contributor`](crate::model::Contributor)
    pub fn builder() -> crate::model::contributor::Builder {
        crate::model::contributor::Builder::default()
    }
}

#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(
    std::clone::Clone,
    std::cmp::Eq,
    std::cmp::Ord,
    std::cmp::PartialEq,
    std::cmp::PartialOrd,
    std::fmt::Debug,
    std::hash::Hash,
)]
pub enum AttackPropertyIdentifier {
    #[allow(missing_docs)] // documentation missing in model
    DestinationUrl,
    #[allow(missing_docs)] // documentation missing in model
    Referrer,
    #[allow(missing_docs)] // documentation missing in model
    SourceAsn,
    #[allow(missing_docs)] // documentation missing in model
    SourceCountry,
    #[allow(missing_docs)] // documentation missing in model
    SourceIpAddress,
    #[allow(missing_docs)] // documentation missing in model
    SourceUserAgent,
    #[allow(missing_docs)] // documentation missing in model
    WordpressPingbackReflector,
    #[allow(missing_docs)] // documentation missing in model
    WordpressPingbackSource,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for AttackPropertyIdentifier {
    fn from(s: &str) -> Self {
        match s {
            "DESTINATION_URL" => AttackPropertyIdentifier::DestinationUrl,
            "REFERRER" => AttackPropertyIdentifier::Referrer,
            "SOURCE_ASN" => AttackPropertyIdentifier::SourceAsn,
            "SOURCE_COUNTRY" => AttackPropertyIdentifier::SourceCountry,
            "SOURCE_IP_ADDRESS" => AttackPropertyIdentifier::SourceIpAddress,
            "SOURCE_USER_AGENT" => AttackPropertyIdentifier::SourceUserAgent,
            "WORDPRESS_PINGBACK_REFLECTOR" => AttackPropertyIdentifier::WordpressPingbackReflector,
            "WORDPRESS_PINGBACK_SOURCE" => AttackPropertyIdentifier::WordpressPingbackSource,
            other => AttackPropertyIdentifier::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for AttackPropertyIdentifier {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(AttackPropertyIdentifier::from(s))
    }
}
impl AttackPropertyIdentifier {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            AttackPropertyIdentifier::DestinationUrl => "DESTINATION_URL",
            AttackPropertyIdentifier::Referrer => "REFERRER",
            AttackPropertyIdentifier::SourceAsn => "SOURCE_ASN",
            AttackPropertyIdentifier::SourceCountry => "SOURCE_COUNTRY",
            AttackPropertyIdentifier::SourceIpAddress => "SOURCE_IP_ADDRESS",
            AttackPropertyIdentifier::SourceUserAgent => "SOURCE_USER_AGENT",
            AttackPropertyIdentifier::WordpressPingbackReflector => "WORDPRESS_PINGBACK_REFLECTOR",
            AttackPropertyIdentifier::WordpressPingbackSource => "WORDPRESS_PINGBACK_SOURCE",
            AttackPropertyIdentifier::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "DESTINATION_URL",
            "REFERRER",
            "SOURCE_ASN",
            "SOURCE_COUNTRY",
            "SOURCE_IP_ADDRESS",
            "SOURCE_USER_AGENT",
            "WORDPRESS_PINGBACK_REFLECTOR",
            "WORDPRESS_PINGBACK_SOURCE",
        ]
    }
}
impl AsRef<str> for AttackPropertyIdentifier {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

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

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

/// <p>The counter that describes a DDoS attack.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SummarizedCounter {
    /// <p>The counter name.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The maximum value of the counter for a specified time period.</p>
    pub max: f64,
    /// <p>The average value of the counter for a specified time period.</p>
    pub average: f64,
    /// <p>The total of counter values for a specified time period.</p>
    pub sum: f64,
    /// <p>The number of counters for a specified time period.</p>
    pub n: i32,
    /// <p>The unit of the counters.</p>
    pub unit: std::option::Option<std::string::String>,
}
impl SummarizedCounter {
    /// <p>The counter name.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The maximum value of the counter for a specified time period.</p>
    pub fn max(&self) -> f64 {
        self.max
    }
    /// <p>The average value of the counter for a specified time period.</p>
    pub fn average(&self) -> f64 {
        self.average
    }
    /// <p>The total of counter values for a specified time period.</p>
    pub fn sum(&self) -> f64 {
        self.sum
    }
    /// <p>The number of counters for a specified time period.</p>
    pub fn n(&self) -> i32 {
        self.n
    }
    /// <p>The unit of the counters.</p>
    pub fn unit(&self) -> std::option::Option<&str> {
        self.unit.as_deref()
    }
}
impl std::fmt::Debug for SummarizedCounter {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SummarizedCounter");
        formatter.field("name", &self.name);
        formatter.field("max", &self.max);
        formatter.field("average", &self.average);
        formatter.field("sum", &self.sum);
        formatter.field("n", &self.n);
        formatter.field("unit", &self.unit);
        formatter.finish()
    }
}
/// See [`SummarizedCounter`](crate::model::SummarizedCounter)
pub mod summarized_counter {
    /// A builder for [`SummarizedCounter`](crate::model::SummarizedCounter)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) max: std::option::Option<f64>,
        pub(crate) average: std::option::Option<f64>,
        pub(crate) sum: std::option::Option<f64>,
        pub(crate) n: std::option::Option<i32>,
        pub(crate) unit: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The counter name.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The counter name.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The maximum value of the counter for a specified time period.</p>
        pub fn max(mut self, input: f64) -> Self {
            self.max = Some(input);
            self
        }
        /// <p>The maximum value of the counter for a specified time period.</p>
        pub fn set_max(mut self, input: std::option::Option<f64>) -> Self {
            self.max = input;
            self
        }
        /// <p>The average value of the counter for a specified time period.</p>
        pub fn average(mut self, input: f64) -> Self {
            self.average = Some(input);
            self
        }
        /// <p>The average value of the counter for a specified time period.</p>
        pub fn set_average(mut self, input: std::option::Option<f64>) -> Self {
            self.average = input;
            self
        }
        /// <p>The total of counter values for a specified time period.</p>
        pub fn sum(mut self, input: f64) -> Self {
            self.sum = Some(input);
            self
        }
        /// <p>The total of counter values for a specified time period.</p>
        pub fn set_sum(mut self, input: std::option::Option<f64>) -> Self {
            self.sum = input;
            self
        }
        /// <p>The number of counters for a specified time period.</p>
        pub fn n(mut self, input: i32) -> Self {
            self.n = Some(input);
            self
        }
        /// <p>The number of counters for a specified time period.</p>
        pub fn set_n(mut self, input: std::option::Option<i32>) -> Self {
            self.n = input;
            self
        }
        /// <p>The unit of the counters.</p>
        pub fn unit(mut self, input: impl Into<std::string::String>) -> Self {
            self.unit = Some(input.into());
            self
        }
        /// <p>The unit of the counters.</p>
        pub fn set_unit(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.unit = input;
            self
        }
        /// Consumes the builder and constructs a [`SummarizedCounter`](crate::model::SummarizedCounter)
        pub fn build(self) -> crate::model::SummarizedCounter {
            crate::model::SummarizedCounter {
                name: self.name,
                max: self.max.unwrap_or_default(),
                average: self.average.unwrap_or_default(),
                sum: self.sum.unwrap_or_default(),
                n: self.n.unwrap_or_default(),
                unit: self.unit,
            }
        }
    }
}
impl SummarizedCounter {
    /// Creates a new builder-style object to manufacture [`SummarizedCounter`](crate::model::SummarizedCounter)
    pub fn builder() -> crate::model::summarized_counter::Builder {
        crate::model::summarized_counter::Builder::default()
    }
}

/// <p>The attack information for the specified SubResource.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SubResourceSummary {
    /// <p>The <code>SubResource</code> type.</p>
    pub r#type: std::option::Option<crate::model::SubResourceType>,
    /// <p>The unique identifier (ID) of the <code>SubResource</code>.</p>
    pub id: std::option::Option<std::string::String>,
    /// <p>The list of attack types and associated counters.</p>
    pub attack_vectors: std::option::Option<std::vec::Vec<crate::model::SummarizedAttackVector>>,
    /// <p>The counters that describe the details of the attack.</p>
    pub counters: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
}
impl SubResourceSummary {
    /// <p>The <code>SubResource</code> type.</p>
    pub fn r#type(&self) -> std::option::Option<&crate::model::SubResourceType> {
        self.r#type.as_ref()
    }
    /// <p>The unique identifier (ID) of the <code>SubResource</code>.</p>
    pub fn id(&self) -> std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The list of attack types and associated counters.</p>
    pub fn attack_vectors(&self) -> std::option::Option<&[crate::model::SummarizedAttackVector]> {
        self.attack_vectors.as_deref()
    }
    /// <p>The counters that describe the details of the attack.</p>
    pub fn counters(&self) -> std::option::Option<&[crate::model::SummarizedCounter]> {
        self.counters.as_deref()
    }
}
impl std::fmt::Debug for SubResourceSummary {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SubResourceSummary");
        formatter.field("r#type", &self.r#type);
        formatter.field("id", &self.id);
        formatter.field("attack_vectors", &self.attack_vectors);
        formatter.field("counters", &self.counters);
        formatter.finish()
    }
}
/// See [`SubResourceSummary`](crate::model::SubResourceSummary)
pub mod sub_resource_summary {
    /// A builder for [`SubResourceSummary`](crate::model::SubResourceSummary)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) r#type: std::option::Option<crate::model::SubResourceType>,
        pub(crate) id: std::option::Option<std::string::String>,
        pub(crate) attack_vectors:
            std::option::Option<std::vec::Vec<crate::model::SummarizedAttackVector>>,
        pub(crate) counters: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
    }
    impl Builder {
        /// <p>The <code>SubResource</code> type.</p>
        pub fn r#type(mut self, input: crate::model::SubResourceType) -> Self {
            self.r#type = Some(input);
            self
        }
        /// <p>The <code>SubResource</code> type.</p>
        pub fn set_type(
            mut self,
            input: std::option::Option<crate::model::SubResourceType>,
        ) -> Self {
            self.r#type = input;
            self
        }
        /// <p>The unique identifier (ID) of the <code>SubResource</code>.</p>
        pub fn id(mut self, input: impl Into<std::string::String>) -> Self {
            self.id = Some(input.into());
            self
        }
        /// <p>The unique identifier (ID) of the <code>SubResource</code>.</p>
        pub fn set_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.id = input;
            self
        }
        /// Appends an item to `attack_vectors`.
        ///
        /// To override the contents of this collection use [`set_attack_vectors`](Self::set_attack_vectors).
        ///
        /// <p>The list of attack types and associated counters.</p>
        pub fn attack_vectors(
            mut self,
            input: impl Into<crate::model::SummarizedAttackVector>,
        ) -> Self {
            let mut v = self.attack_vectors.unwrap_or_default();
            v.push(input.into());
            self.attack_vectors = Some(v);
            self
        }
        /// <p>The list of attack types and associated counters.</p>
        pub fn set_attack_vectors(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SummarizedAttackVector>>,
        ) -> Self {
            self.attack_vectors = input;
            self
        }
        /// Appends an item to `counters`.
        ///
        /// To override the contents of this collection use [`set_counters`](Self::set_counters).
        ///
        /// <p>The counters that describe the details of the attack.</p>
        pub fn counters(mut self, input: impl Into<crate::model::SummarizedCounter>) -> Self {
            let mut v = self.counters.unwrap_or_default();
            v.push(input.into());
            self.counters = Some(v);
            self
        }
        /// <p>The counters that describe the details of the attack.</p>
        pub fn set_counters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
        ) -> Self {
            self.counters = input;
            self
        }
        /// Consumes the builder and constructs a [`SubResourceSummary`](crate::model::SubResourceSummary)
        pub fn build(self) -> crate::model::SubResourceSummary {
            crate::model::SubResourceSummary {
                r#type: self.r#type,
                id: self.id,
                attack_vectors: self.attack_vectors,
                counters: self.counters,
            }
        }
    }
}
impl SubResourceSummary {
    /// Creates a new builder-style object to manufacture [`SubResourceSummary`](crate::model::SubResourceSummary)
    pub fn builder() -> crate::model::sub_resource_summary::Builder {
        crate::model::sub_resource_summary::Builder::default()
    }
}

/// <p>A summary of information about the attack.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SummarizedAttackVector {
    /// <p>The attack type, for example, SNMP reflection or SYN flood.</p>
    pub vector_type: std::option::Option<std::string::String>,
    /// <p>The list of counters that describe the details of the attack.</p>
    pub vector_counters: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
}
impl SummarizedAttackVector {
    /// <p>The attack type, for example, SNMP reflection or SYN flood.</p>
    pub fn vector_type(&self) -> std::option::Option<&str> {
        self.vector_type.as_deref()
    }
    /// <p>The list of counters that describe the details of the attack.</p>
    pub fn vector_counters(&self) -> std::option::Option<&[crate::model::SummarizedCounter]> {
        self.vector_counters.as_deref()
    }
}
impl std::fmt::Debug for SummarizedAttackVector {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SummarizedAttackVector");
        formatter.field("vector_type", &self.vector_type);
        formatter.field("vector_counters", &self.vector_counters);
        formatter.finish()
    }
}
/// See [`SummarizedAttackVector`](crate::model::SummarizedAttackVector)
pub mod summarized_attack_vector {
    /// A builder for [`SummarizedAttackVector`](crate::model::SummarizedAttackVector)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) vector_type: std::option::Option<std::string::String>,
        pub(crate) vector_counters:
            std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
    }
    impl Builder {
        /// <p>The attack type, for example, SNMP reflection or SYN flood.</p>
        pub fn vector_type(mut self, input: impl Into<std::string::String>) -> Self {
            self.vector_type = Some(input.into());
            self
        }
        /// <p>The attack type, for example, SNMP reflection or SYN flood.</p>
        pub fn set_vector_type(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.vector_type = input;
            self
        }
        /// Appends an item to `vector_counters`.
        ///
        /// To override the contents of this collection use [`set_vector_counters`](Self::set_vector_counters).
        ///
        /// <p>The list of counters that describe the details of the attack.</p>
        pub fn vector_counters(
            mut self,
            input: impl Into<crate::model::SummarizedCounter>,
        ) -> Self {
            let mut v = self.vector_counters.unwrap_or_default();
            v.push(input.into());
            self.vector_counters = Some(v);
            self
        }
        /// <p>The list of counters that describe the details of the attack.</p>
        pub fn set_vector_counters(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::SummarizedCounter>>,
        ) -> Self {
            self.vector_counters = input;
            self
        }
        /// Consumes the builder and constructs a [`SummarizedAttackVector`](crate::model::SummarizedAttackVector)
        pub fn build(self) -> crate::model::SummarizedAttackVector {
            crate::model::SummarizedAttackVector {
                vector_type: self.vector_type,
                vector_counters: self.vector_counters,
            }
        }
    }
}
impl SummarizedAttackVector {
    /// Creates a new builder-style object to manufacture [`SummarizedAttackVector`](crate::model::SummarizedAttackVector)
    pub fn builder() -> crate::model::summarized_attack_vector::Builder {
        crate::model::summarized_attack_vector::Builder::default()
    }
}

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

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