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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Represents a matched event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetricFilterMatchRecord {
    /// <p>The event number.</p>
    pub event_number: i64,
    /// <p>The raw event data.</p>
    pub event_message: std::option::Option<std::string::String>,
    /// <p>The values extracted from the event data by the filter.</p>
    pub extracted_values:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
}
impl MetricFilterMatchRecord {
    /// <p>The event number.</p>
    pub fn event_number(&self) -> i64 {
        self.event_number
    }
    /// <p>The raw event data.</p>
    pub fn event_message(&self) -> std::option::Option<&str> {
        self.event_message.as_deref()
    }
    /// <p>The values extracted from the event data by the filter.</p>
    pub fn extracted_values(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.extracted_values.as_ref()
    }
}
impl std::fmt::Debug for MetricFilterMatchRecord {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("MetricFilterMatchRecord");
        formatter.field("event_number", &self.event_number);
        formatter.field("event_message", &self.event_message);
        formatter.field("extracted_values", &self.extracted_values);
        formatter.finish()
    }
}
/// See [`MetricFilterMatchRecord`](crate::model::MetricFilterMatchRecord)
pub mod metric_filter_match_record {
    /// A builder for [`MetricFilterMatchRecord`](crate::model::MetricFilterMatchRecord)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) event_number: std::option::Option<i64>,
        pub(crate) event_message: std::option::Option<std::string::String>,
        pub(crate) extracted_values: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
    }
    impl Builder {
        /// <p>The event number.</p>
        pub fn event_number(mut self, input: i64) -> Self {
            self.event_number = Some(input);
            self
        }
        /// <p>The event number.</p>
        pub fn set_event_number(mut self, input: std::option::Option<i64>) -> Self {
            self.event_number = input;
            self
        }
        /// <p>The raw event data.</p>
        pub fn event_message(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_message = Some(input.into());
            self
        }
        /// <p>The raw event data.</p>
        pub fn set_event_message(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.event_message = input;
            self
        }
        /// Adds a key-value pair to `extracted_values`.
        ///
        /// To override the contents of this collection use [`set_extracted_values`](Self::set_extracted_values).
        ///
        /// <p>The values extracted from the event data by the filter.</p>
        pub fn extracted_values(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.extracted_values.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.extracted_values = Some(hash_map);
            self
        }
        /// <p>The values extracted from the event data by the filter.</p>
        pub fn set_extracted_values(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.extracted_values = input;
            self
        }
        /// Consumes the builder and constructs a [`MetricFilterMatchRecord`](crate::model::MetricFilterMatchRecord)
        pub fn build(self) -> crate::model::MetricFilterMatchRecord {
            crate::model::MetricFilterMatchRecord {
                event_number: self.event_number.unwrap_or_default(),
                event_message: self.event_message,
                extracted_values: self.extracted_values,
            }
        }
    }
}
impl MetricFilterMatchRecord {
    /// Creates a new builder-style object to manufacture [`MetricFilterMatchRecord`](crate::model::MetricFilterMatchRecord)
    pub fn builder() -> crate::model::metric_filter_match_record::Builder {
        crate::model::metric_filter_match_record::Builder::default()
    }
}

/// <p>Reserved.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueryCompileError {
    /// <p>Reserved.</p>
    pub location: std::option::Option<crate::model::QueryCompileErrorLocation>,
    /// <p>Reserved.</p>
    pub message: std::option::Option<std::string::String>,
}
impl QueryCompileError {
    /// <p>Reserved.</p>
    pub fn location(&self) -> std::option::Option<&crate::model::QueryCompileErrorLocation> {
        self.location.as_ref()
    }
    /// <p>Reserved.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Debug for QueryCompileError {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("QueryCompileError");
        formatter.field("location", &self.location);
        formatter.field("message", &self.message);
        formatter.finish()
    }
}
/// See [`QueryCompileError`](crate::model::QueryCompileError)
pub mod query_compile_error {
    /// A builder for [`QueryCompileError`](crate::model::QueryCompileError)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) location: std::option::Option<crate::model::QueryCompileErrorLocation>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>Reserved.</p>
        pub fn location(mut self, input: crate::model::QueryCompileErrorLocation) -> Self {
            self.location = Some(input);
            self
        }
        /// <p>Reserved.</p>
        pub fn set_location(
            mut self,
            input: std::option::Option<crate::model::QueryCompileErrorLocation>,
        ) -> Self {
            self.location = input;
            self
        }
        /// <p>Reserved.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>Reserved.</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 [`QueryCompileError`](crate::model::QueryCompileError)
        pub fn build(self) -> crate::model::QueryCompileError {
            crate::model::QueryCompileError {
                location: self.location,
                message: self.message,
            }
        }
    }
}
impl QueryCompileError {
    /// Creates a new builder-style object to manufacture [`QueryCompileError`](crate::model::QueryCompileError)
    pub fn builder() -> crate::model::query_compile_error::Builder {
        crate::model::query_compile_error::Builder::default()
    }
}

/// <p>Reserved.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueryCompileErrorLocation {
    /// <p>Reserved.</p>
    pub start_char_offset: std::option::Option<i32>,
    /// <p>Reserved.</p>
    pub end_char_offset: std::option::Option<i32>,
}
impl QueryCompileErrorLocation {
    /// <p>Reserved.</p>
    pub fn start_char_offset(&self) -> std::option::Option<i32> {
        self.start_char_offset
    }
    /// <p>Reserved.</p>
    pub fn end_char_offset(&self) -> std::option::Option<i32> {
        self.end_char_offset
    }
}
impl std::fmt::Debug for QueryCompileErrorLocation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("QueryCompileErrorLocation");
        formatter.field("start_char_offset", &self.start_char_offset);
        formatter.field("end_char_offset", &self.end_char_offset);
        formatter.finish()
    }
}
/// See [`QueryCompileErrorLocation`](crate::model::QueryCompileErrorLocation)
pub mod query_compile_error_location {
    /// A builder for [`QueryCompileErrorLocation`](crate::model::QueryCompileErrorLocation)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) start_char_offset: std::option::Option<i32>,
        pub(crate) end_char_offset: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>Reserved.</p>
        pub fn start_char_offset(mut self, input: i32) -> Self {
            self.start_char_offset = Some(input);
            self
        }
        /// <p>Reserved.</p>
        pub fn set_start_char_offset(mut self, input: std::option::Option<i32>) -> Self {
            self.start_char_offset = input;
            self
        }
        /// <p>Reserved.</p>
        pub fn end_char_offset(mut self, input: i32) -> Self {
            self.end_char_offset = Some(input);
            self
        }
        /// <p>Reserved.</p>
        pub fn set_end_char_offset(mut self, input: std::option::Option<i32>) -> Self {
            self.end_char_offset = input;
            self
        }
        /// Consumes the builder and constructs a [`QueryCompileErrorLocation`](crate::model::QueryCompileErrorLocation)
        pub fn build(self) -> crate::model::QueryCompileErrorLocation {
            crate::model::QueryCompileErrorLocation {
                start_char_offset: self.start_char_offset,
                end_char_offset: self.end_char_offset,
            }
        }
    }
}
impl QueryCompileErrorLocation {
    /// Creates a new builder-style object to manufacture [`QueryCompileErrorLocation`](crate::model::QueryCompileErrorLocation)
    pub fn builder() -> crate::model::query_compile_error_location::Builder {
        crate::model::query_compile_error_location::Builder::default()
    }
}

/// <p>The method used to distribute log data to the destination, which can be either
/// random or grouped by log stream.</p>
#[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 Distribution {
    #[allow(missing_docs)] // documentation missing in model
    ByLogStream,
    #[allow(missing_docs)] // documentation missing in model
    Random,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for Distribution {
    fn from(s: &str) -> Self {
        match s {
            "ByLogStream" => Distribution::ByLogStream,
            "Random" => Distribution::Random,
            other => Distribution::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for Distribution {
    type Err = std::convert::Infallible;

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

/// <p>A policy enabling one or more entities to put logs to a log group in this account.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResourcePolicy {
    /// <p>The name of the resource policy.</p>
    pub policy_name: std::option::Option<std::string::String>,
    /// <p>The details of the policy.</p>
    pub policy_document: std::option::Option<std::string::String>,
    /// <p>Timestamp showing when this policy was last updated, expressed as the number of
    /// milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
    pub last_updated_time: std::option::Option<i64>,
}
impl ResourcePolicy {
    /// <p>The name of the resource policy.</p>
    pub fn policy_name(&self) -> std::option::Option<&str> {
        self.policy_name.as_deref()
    }
    /// <p>The details of the policy.</p>
    pub fn policy_document(&self) -> std::option::Option<&str> {
        self.policy_document.as_deref()
    }
    /// <p>Timestamp showing when this policy was last updated, expressed as the number of
    /// milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
    pub fn last_updated_time(&self) -> std::option::Option<i64> {
        self.last_updated_time
    }
}
impl std::fmt::Debug for ResourcePolicy {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ResourcePolicy");
        formatter.field("policy_name", &self.policy_name);
        formatter.field("policy_document", &self.policy_document);
        formatter.field("last_updated_time", &self.last_updated_time);
        formatter.finish()
    }
}
/// See [`ResourcePolicy`](crate::model::ResourcePolicy)
pub mod resource_policy {
    /// A builder for [`ResourcePolicy`](crate::model::ResourcePolicy)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) policy_name: std::option::Option<std::string::String>,
        pub(crate) policy_document: std::option::Option<std::string::String>,
        pub(crate) last_updated_time: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the resource policy.</p>
        pub fn policy_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.policy_name = Some(input.into());
            self
        }
        /// <p>The name of the resource policy.</p>
        pub fn set_policy_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.policy_name = input;
            self
        }
        /// <p>The details of the policy.</p>
        pub fn policy_document(mut self, input: impl Into<std::string::String>) -> Self {
            self.policy_document = Some(input.into());
            self
        }
        /// <p>The details of the policy.</p>
        pub fn set_policy_document(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.policy_document = input;
            self
        }
        /// <p>Timestamp showing when this policy was last updated, expressed as the number of
        /// milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
        pub fn last_updated_time(mut self, input: i64) -> Self {
            self.last_updated_time = Some(input);
            self
        }
        /// <p>Timestamp showing when this policy was last updated, expressed as the number of
        /// milliseconds after Jan 1, 1970 00:00:00 UTC.</p>
        pub fn set_last_updated_time(mut self, input: std::option::Option<i64>) -> Self {
            self.last_updated_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ResourcePolicy`](crate::model::ResourcePolicy)
        pub fn build(self) -> crate::model::ResourcePolicy {
            crate::model::ResourcePolicy {
                policy_name: self.policy_name,
                policy_document: self.policy_document,
                last_updated_time: self.last_updated_time,
            }
        }
    }
}
impl ResourcePolicy {
    /// Creates a new builder-style object to manufacture [`ResourcePolicy`](crate::model::ResourcePolicy)
    pub fn builder() -> crate::model::resource_policy::Builder {
        crate::model::resource_policy::Builder::default()
    }
}

/// <p>Indicates how to transform ingested log events to metric data in a CloudWatch
/// metric.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetricTransformation {
    /// <p>The name of the CloudWatch metric.</p>
    pub metric_name: std::option::Option<std::string::String>,
    /// <p>A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics
    /// that are similar. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace">Namespaces</a>.</p>
    pub metric_namespace: std::option::Option<std::string::String>,
    /// <p>The value to publish to the CloudWatch metric when a filter pattern matches a log event.</p>
    pub metric_value: std::option::Option<std::string::String>,
    /// <p>(Optional) The value to emit when a filter pattern does not match a log event.
    /// This value can be null.</p>
    pub default_value: std::option::Option<f64>,
    /// <p>The fields to use as dimensions for the metric. One metric filter can include
    /// as many as three dimensions.</p>
    /// <important>
    /// <p>Metrics extracted from log events are charged as custom metrics.
    /// To prevent unexpected high charges, do not specify high-cardinality fields such as
    /// <code>IPAddress</code> or <code>requestID</code> as dimensions. Each different value
    /// found for
    /// a dimension is treated as a separate metric and accrues charges as a separate custom metric.
    /// </p>
    /// <p>To help prevent accidental high charges, Amazon disables a metric filter
    /// if it generates 1000 different name/value pairs for the dimensions that you
    /// have specified within a certain amount of time.</p>
    /// <p>You can also set up a billing alarm to alert you if your charges are higher than
    /// expected. For more information,
    /// see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html">
    /// Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges</a>.
    /// </p>
    /// </important>
    pub dimensions:
        std::option::Option<std::collections::HashMap<std::string::String, std::string::String>>,
    /// <p>The unit to assign to the metric. If you omit this, the unit is set as <code>None</code>.</p>
    pub unit: std::option::Option<crate::model::StandardUnit>,
}
impl MetricTransformation {
    /// <p>The name of the CloudWatch metric.</p>
    pub fn metric_name(&self) -> std::option::Option<&str> {
        self.metric_name.as_deref()
    }
    /// <p>A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics
    /// that are similar. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace">Namespaces</a>.</p>
    pub fn metric_namespace(&self) -> std::option::Option<&str> {
        self.metric_namespace.as_deref()
    }
    /// <p>The value to publish to the CloudWatch metric when a filter pattern matches a log event.</p>
    pub fn metric_value(&self) -> std::option::Option<&str> {
        self.metric_value.as_deref()
    }
    /// <p>(Optional) The value to emit when a filter pattern does not match a log event.
    /// This value can be null.</p>
    pub fn default_value(&self) -> std::option::Option<f64> {
        self.default_value
    }
    /// <p>The fields to use as dimensions for the metric. One metric filter can include
    /// as many as three dimensions.</p>
    /// <important>
    /// <p>Metrics extracted from log events are charged as custom metrics.
    /// To prevent unexpected high charges, do not specify high-cardinality fields such as
    /// <code>IPAddress</code> or <code>requestID</code> as dimensions. Each different value
    /// found for
    /// a dimension is treated as a separate metric and accrues charges as a separate custom metric.
    /// </p>
    /// <p>To help prevent accidental high charges, Amazon disables a metric filter
    /// if it generates 1000 different name/value pairs for the dimensions that you
    /// have specified within a certain amount of time.</p>
    /// <p>You can also set up a billing alarm to alert you if your charges are higher than
    /// expected. For more information,
    /// see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html">
    /// Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges</a>.
    /// </p>
    /// </important>
    pub fn dimensions(
        &self,
    ) -> std::option::Option<&std::collections::HashMap<std::string::String, std::string::String>>
    {
        self.dimensions.as_ref()
    }
    /// <p>The unit to assign to the metric. If you omit this, the unit is set as <code>None</code>.</p>
    pub fn unit(&self) -> std::option::Option<&crate::model::StandardUnit> {
        self.unit.as_ref()
    }
}
impl std::fmt::Debug for MetricTransformation {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("MetricTransformation");
        formatter.field("metric_name", &self.metric_name);
        formatter.field("metric_namespace", &self.metric_namespace);
        formatter.field("metric_value", &self.metric_value);
        formatter.field("default_value", &self.default_value);
        formatter.field("dimensions", &self.dimensions);
        formatter.field("unit", &self.unit);
        formatter.finish()
    }
}
/// See [`MetricTransformation`](crate::model::MetricTransformation)
pub mod metric_transformation {
    /// A builder for [`MetricTransformation`](crate::model::MetricTransformation)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) metric_name: std::option::Option<std::string::String>,
        pub(crate) metric_namespace: std::option::Option<std::string::String>,
        pub(crate) metric_value: std::option::Option<std::string::String>,
        pub(crate) default_value: std::option::Option<f64>,
        pub(crate) dimensions: std::option::Option<
            std::collections::HashMap<std::string::String, std::string::String>,
        >,
        pub(crate) unit: std::option::Option<crate::model::StandardUnit>,
    }
    impl Builder {
        /// <p>The name of the CloudWatch metric.</p>
        pub fn metric_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.metric_name = Some(input.into());
            self
        }
        /// <p>The name of the CloudWatch metric.</p>
        pub fn set_metric_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.metric_name = input;
            self
        }
        /// <p>A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics
        /// that are similar. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace">Namespaces</a>.</p>
        pub fn metric_namespace(mut self, input: impl Into<std::string::String>) -> Self {
            self.metric_namespace = Some(input.into());
            self
        }
        /// <p>A custom namespace to contain your metric in CloudWatch. Use namespaces to group together metrics
        /// that are similar. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_concepts.html#Namespace">Namespaces</a>.</p>
        pub fn set_metric_namespace(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.metric_namespace = input;
            self
        }
        /// <p>The value to publish to the CloudWatch metric when a filter pattern matches a log event.</p>
        pub fn metric_value(mut self, input: impl Into<std::string::String>) -> Self {
            self.metric_value = Some(input.into());
            self
        }
        /// <p>The value to publish to the CloudWatch metric when a filter pattern matches a log event.</p>
        pub fn set_metric_value(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.metric_value = input;
            self
        }
        /// <p>(Optional) The value to emit when a filter pattern does not match a log event.
        /// This value can be null.</p>
        pub fn default_value(mut self, input: f64) -> Self {
            self.default_value = Some(input);
            self
        }
        /// <p>(Optional) The value to emit when a filter pattern does not match a log event.
        /// This value can be null.</p>
        pub fn set_default_value(mut self, input: std::option::Option<f64>) -> Self {
            self.default_value = input;
            self
        }
        /// Adds a key-value pair to `dimensions`.
        ///
        /// To override the contents of this collection use [`set_dimensions`](Self::set_dimensions).
        ///
        /// <p>The fields to use as dimensions for the metric. One metric filter can include
        /// as many as three dimensions.</p>
        /// <important>
        /// <p>Metrics extracted from log events are charged as custom metrics.
        /// To prevent unexpected high charges, do not specify high-cardinality fields such as
        /// <code>IPAddress</code> or <code>requestID</code> as dimensions. Each different value
        /// found for
        /// a dimension is treated as a separate metric and accrues charges as a separate custom metric.
        /// </p>
        /// <p>To help prevent accidental high charges, Amazon disables a metric filter
        /// if it generates 1000 different name/value pairs for the dimensions that you
        /// have specified within a certain amount of time.</p>
        /// <p>You can also set up a billing alarm to alert you if your charges are higher than
        /// expected. For more information,
        /// see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html">
        /// Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges</a>.
        /// </p>
        /// </important>
        pub fn dimensions(
            mut self,
            k: impl Into<std::string::String>,
            v: impl Into<std::string::String>,
        ) -> Self {
            let mut hash_map = self.dimensions.unwrap_or_default();
            hash_map.insert(k.into(), v.into());
            self.dimensions = Some(hash_map);
            self
        }
        /// <p>The fields to use as dimensions for the metric. One metric filter can include
        /// as many as three dimensions.</p>
        /// <important>
        /// <p>Metrics extracted from log events are charged as custom metrics.
        /// To prevent unexpected high charges, do not specify high-cardinality fields such as
        /// <code>IPAddress</code> or <code>requestID</code> as dimensions. Each different value
        /// found for
        /// a dimension is treated as a separate metric and accrues charges as a separate custom metric.
        /// </p>
        /// <p>To help prevent accidental high charges, Amazon disables a metric filter
        /// if it generates 1000 different name/value pairs for the dimensions that you
        /// have specified within a certain amount of time.</p>
        /// <p>You can also set up a billing alarm to alert you if your charges are higher than
        /// expected. For more information,
        /// see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/monitor_estimated_charges_with_cloudwatch.html">
        /// Creating a Billing Alarm to Monitor Your Estimated Amazon Web Services Charges</a>.
        /// </p>
        /// </important>
        pub fn set_dimensions(
            mut self,
            input: std::option::Option<
                std::collections::HashMap<std::string::String, std::string::String>,
            >,
        ) -> Self {
            self.dimensions = input;
            self
        }
        /// <p>The unit to assign to the metric. If you omit this, the unit is set as <code>None</code>.</p>
        pub fn unit(mut self, input: crate::model::StandardUnit) -> Self {
            self.unit = Some(input);
            self
        }
        /// <p>The unit to assign to the metric. If you omit this, the unit is set as <code>None</code>.</p>
        pub fn set_unit(mut self, input: std::option::Option<crate::model::StandardUnit>) -> Self {
            self.unit = input;
            self
        }
        /// Consumes the builder and constructs a [`MetricTransformation`](crate::model::MetricTransformation)
        pub fn build(self) -> crate::model::MetricTransformation {
            crate::model::MetricTransformation {
                metric_name: self.metric_name,
                metric_namespace: self.metric_namespace,
                metric_value: self.metric_value,
                default_value: self.default_value,
                dimensions: self.dimensions,
                unit: self.unit,
            }
        }
    }
}
impl MetricTransformation {
    /// Creates a new builder-style object to manufacture [`MetricTransformation`](crate::model::MetricTransformation)
    pub fn builder() -> crate::model::metric_transformation::Builder {
        crate::model::metric_transformation::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 StandardUnit {
    #[allow(missing_docs)] // documentation missing in model
    Bits,
    #[allow(missing_docs)] // documentation missing in model
    BitsSecond,
    #[allow(missing_docs)] // documentation missing in model
    Bytes,
    #[allow(missing_docs)] // documentation missing in model
    BytesSecond,
    #[allow(missing_docs)] // documentation missing in model
    Count,
    #[allow(missing_docs)] // documentation missing in model
    CountSecond,
    #[allow(missing_docs)] // documentation missing in model
    Gigabits,
    #[allow(missing_docs)] // documentation missing in model
    GigabitsSecond,
    #[allow(missing_docs)] // documentation missing in model
    Gigabytes,
    #[allow(missing_docs)] // documentation missing in model
    GigabytesSecond,
    #[allow(missing_docs)] // documentation missing in model
    Kilobits,
    #[allow(missing_docs)] // documentation missing in model
    KilobitsSecond,
    #[allow(missing_docs)] // documentation missing in model
    Kilobytes,
    #[allow(missing_docs)] // documentation missing in model
    KilobytesSecond,
    #[allow(missing_docs)] // documentation missing in model
    Megabits,
    #[allow(missing_docs)] // documentation missing in model
    MegabitsSecond,
    #[allow(missing_docs)] // documentation missing in model
    Megabytes,
    #[allow(missing_docs)] // documentation missing in model
    MegabytesSecond,
    #[allow(missing_docs)] // documentation missing in model
    Microseconds,
    #[allow(missing_docs)] // documentation missing in model
    Milliseconds,
    #[allow(missing_docs)] // documentation missing in model
    None,
    #[allow(missing_docs)] // documentation missing in model
    Percent,
    #[allow(missing_docs)] // documentation missing in model
    Seconds,
    #[allow(missing_docs)] // documentation missing in model
    Terabits,
    #[allow(missing_docs)] // documentation missing in model
    TerabitsSecond,
    #[allow(missing_docs)] // documentation missing in model
    Terabytes,
    #[allow(missing_docs)] // documentation missing in model
    TerabytesSecond,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for StandardUnit {
    fn from(s: &str) -> Self {
        match s {
            "Bits" => StandardUnit::Bits,
            "Bits/Second" => StandardUnit::BitsSecond,
            "Bytes" => StandardUnit::Bytes,
            "Bytes/Second" => StandardUnit::BytesSecond,
            "Count" => StandardUnit::Count,
            "Count/Second" => StandardUnit::CountSecond,
            "Gigabits" => StandardUnit::Gigabits,
            "Gigabits/Second" => StandardUnit::GigabitsSecond,
            "Gigabytes" => StandardUnit::Gigabytes,
            "Gigabytes/Second" => StandardUnit::GigabytesSecond,
            "Kilobits" => StandardUnit::Kilobits,
            "Kilobits/Second" => StandardUnit::KilobitsSecond,
            "Kilobytes" => StandardUnit::Kilobytes,
            "Kilobytes/Second" => StandardUnit::KilobytesSecond,
            "Megabits" => StandardUnit::Megabits,
            "Megabits/Second" => StandardUnit::MegabitsSecond,
            "Megabytes" => StandardUnit::Megabytes,
            "Megabytes/Second" => StandardUnit::MegabytesSecond,
            "Microseconds" => StandardUnit::Microseconds,
            "Milliseconds" => StandardUnit::Milliseconds,
            "None" => StandardUnit::None,
            "Percent" => StandardUnit::Percent,
            "Seconds" => StandardUnit::Seconds,
            "Terabits" => StandardUnit::Terabits,
            "Terabits/Second" => StandardUnit::TerabitsSecond,
            "Terabytes" => StandardUnit::Terabytes,
            "Terabytes/Second" => StandardUnit::TerabytesSecond,
            other => StandardUnit::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for StandardUnit {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(StandardUnit::from(s))
    }
}
impl StandardUnit {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            StandardUnit::Bits => "Bits",
            StandardUnit::BitsSecond => "Bits/Second",
            StandardUnit::Bytes => "Bytes",
            StandardUnit::BytesSecond => "Bytes/Second",
            StandardUnit::Count => "Count",
            StandardUnit::CountSecond => "Count/Second",
            StandardUnit::Gigabits => "Gigabits",
            StandardUnit::GigabitsSecond => "Gigabits/Second",
            StandardUnit::Gigabytes => "Gigabytes",
            StandardUnit::GigabytesSecond => "Gigabytes/Second",
            StandardUnit::Kilobits => "Kilobits",
            StandardUnit::KilobitsSecond => "Kilobits/Second",
            StandardUnit::Kilobytes => "Kilobytes",
            StandardUnit::KilobytesSecond => "Kilobytes/Second",
            StandardUnit::Megabits => "Megabits",
            StandardUnit::MegabitsSecond => "Megabits/Second",
            StandardUnit::Megabytes => "Megabytes",
            StandardUnit::MegabytesSecond => "Megabytes/Second",
            StandardUnit::Microseconds => "Microseconds",
            StandardUnit::Milliseconds => "Milliseconds",
            StandardUnit::None => "None",
            StandardUnit::Percent => "Percent",
            StandardUnit::Seconds => "Seconds",
            StandardUnit::Terabits => "Terabits",
            StandardUnit::TerabitsSecond => "Terabits/Second",
            StandardUnit::Terabytes => "Terabytes",
            StandardUnit::TerabytesSecond => "Terabytes/Second",
            StandardUnit::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "Bits",
            "Bits/Second",
            "Bytes",
            "Bytes/Second",
            "Count",
            "Count/Second",
            "Gigabits",
            "Gigabits/Second",
            "Gigabytes",
            "Gigabytes/Second",
            "Kilobits",
            "Kilobits/Second",
            "Kilobytes",
            "Kilobytes/Second",
            "Megabits",
            "Megabits/Second",
            "Megabytes",
            "Megabytes/Second",
            "Microseconds",
            "Milliseconds",
            "None",
            "Percent",
            "Seconds",
            "Terabits",
            "Terabits/Second",
            "Terabytes",
            "Terabytes/Second",
        ]
    }
}
impl AsRef<str> for StandardUnit {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Represents the rejected events.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct RejectedLogEventsInfo {
    /// <p>The log events that are too new.</p>
    pub too_new_log_event_start_index: std::option::Option<i32>,
    /// <p>The log events that are too old.</p>
    pub too_old_log_event_end_index: std::option::Option<i32>,
    /// <p>The expired log events.</p>
    pub expired_log_event_end_index: std::option::Option<i32>,
}
impl RejectedLogEventsInfo {
    /// <p>The log events that are too new.</p>
    pub fn too_new_log_event_start_index(&self) -> std::option::Option<i32> {
        self.too_new_log_event_start_index
    }
    /// <p>The log events that are too old.</p>
    pub fn too_old_log_event_end_index(&self) -> std::option::Option<i32> {
        self.too_old_log_event_end_index
    }
    /// <p>The expired log events.</p>
    pub fn expired_log_event_end_index(&self) -> std::option::Option<i32> {
        self.expired_log_event_end_index
    }
}
impl std::fmt::Debug for RejectedLogEventsInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("RejectedLogEventsInfo");
        formatter.field(
            "too_new_log_event_start_index",
            &self.too_new_log_event_start_index,
        );
        formatter.field(
            "too_old_log_event_end_index",
            &self.too_old_log_event_end_index,
        );
        formatter.field(
            "expired_log_event_end_index",
            &self.expired_log_event_end_index,
        );
        formatter.finish()
    }
}
/// See [`RejectedLogEventsInfo`](crate::model::RejectedLogEventsInfo)
pub mod rejected_log_events_info {
    /// A builder for [`RejectedLogEventsInfo`](crate::model::RejectedLogEventsInfo)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) too_new_log_event_start_index: std::option::Option<i32>,
        pub(crate) too_old_log_event_end_index: std::option::Option<i32>,
        pub(crate) expired_log_event_end_index: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The log events that are too new.</p>
        pub fn too_new_log_event_start_index(mut self, input: i32) -> Self {
            self.too_new_log_event_start_index = Some(input);
            self
        }
        /// <p>The log events that are too new.</p>
        pub fn set_too_new_log_event_start_index(
            mut self,
            input: std::option::Option<i32>,
        ) -> Self {
            self.too_new_log_event_start_index = input;
            self
        }
        /// <p>The log events that are too old.</p>
        pub fn too_old_log_event_end_index(mut self, input: i32) -> Self {
            self.too_old_log_event_end_index = Some(input);
            self
        }
        /// <p>The log events that are too old.</p>
        pub fn set_too_old_log_event_end_index(mut self, input: std::option::Option<i32>) -> Self {
            self.too_old_log_event_end_index = input;
            self
        }
        /// <p>The expired log events.</p>
        pub fn expired_log_event_end_index(mut self, input: i32) -> Self {
            self.expired_log_event_end_index = Some(input);
            self
        }
        /// <p>The expired log events.</p>
        pub fn set_expired_log_event_end_index(mut self, input: std::option::Option<i32>) -> Self {
            self.expired_log_event_end_index = input;
            self
        }
        /// Consumes the builder and constructs a [`RejectedLogEventsInfo`](crate::model::RejectedLogEventsInfo)
        pub fn build(self) -> crate::model::RejectedLogEventsInfo {
            crate::model::RejectedLogEventsInfo {
                too_new_log_event_start_index: self.too_new_log_event_start_index,
                too_old_log_event_end_index: self.too_old_log_event_end_index,
                expired_log_event_end_index: self.expired_log_event_end_index,
            }
        }
    }
}
impl RejectedLogEventsInfo {
    /// Creates a new builder-style object to manufacture [`RejectedLogEventsInfo`](crate::model::RejectedLogEventsInfo)
    pub fn builder() -> crate::model::rejected_log_events_info::Builder {
        crate::model::rejected_log_events_info::Builder::default()
    }
}

/// <p>Represents a log event, which is a record of activity that was recorded
/// by the application or resource being monitored.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct InputLogEvent {
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub timestamp: std::option::Option<i64>,
    /// <p>The raw event message.</p>
    pub message: std::option::Option<std::string::String>,
}
impl InputLogEvent {
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub fn timestamp(&self) -> std::option::Option<i64> {
        self.timestamp
    }
    /// <p>The raw event message.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Debug for InputLogEvent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("InputLogEvent");
        formatter.field("timestamp", &self.timestamp);
        formatter.field("message", &self.message);
        formatter.finish()
    }
}
/// See [`InputLogEvent`](crate::model::InputLogEvent)
pub mod input_log_event {
    /// A builder for [`InputLogEvent`](crate::model::InputLogEvent)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) timestamp: std::option::Option<i64>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn timestamp(mut self, input: i64) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn set_timestamp(mut self, input: std::option::Option<i64>) -> Self {
            self.timestamp = input;
            self
        }
        /// <p>The raw event message.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The raw event message.</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 [`InputLogEvent`](crate::model::InputLogEvent)
        pub fn build(self) -> crate::model::InputLogEvent {
            crate::model::InputLogEvent {
                timestamp: self.timestamp,
                message: self.message,
            }
        }
    }
}
impl InputLogEvent {
    /// Creates a new builder-style object to manufacture [`InputLogEvent`](crate::model::InputLogEvent)
    pub fn builder() -> crate::model::input_log_event::Builder {
        crate::model::input_log_event::Builder::default()
    }
}

/// <p>Represents a cross-account destination that receives subscription log events.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct Destination {
    /// <p>The name of the destination.</p>
    pub destination_name: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the physical target where the log events are
    /// delivered (for example, a Kinesis stream).</p>
    pub target_arn: std::option::Option<std::string::String>,
    /// <p>A role for impersonation, used when delivering log events to the target.</p>
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters
    /// against this destination.</p>
    pub access_policy: std::option::Option<std::string::String>,
    /// <p>The ARN of this destination.</p>
    pub arn: std::option::Option<std::string::String>,
    /// <p>The creation time of the destination, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
}
impl Destination {
    /// <p>The name of the destination.</p>
    pub fn destination_name(&self) -> std::option::Option<&str> {
        self.destination_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the physical target where the log events are
    /// delivered (for example, a Kinesis stream).</p>
    pub fn target_arn(&self) -> std::option::Option<&str> {
        self.target_arn.as_deref()
    }
    /// <p>A role for impersonation, used when delivering log events to the target.</p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters
    /// against this destination.</p>
    pub fn access_policy(&self) -> std::option::Option<&str> {
        self.access_policy.as_deref()
    }
    /// <p>The ARN of this destination.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The creation time of the destination, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
}
impl std::fmt::Debug for Destination {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("Destination");
        formatter.field("destination_name", &self.destination_name);
        formatter.field("target_arn", &self.target_arn);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("access_policy", &self.access_policy);
        formatter.field("arn", &self.arn);
        formatter.field("creation_time", &self.creation_time);
        formatter.finish()
    }
}
/// See [`Destination`](crate::model::Destination)
pub mod destination {
    /// A builder for [`Destination`](crate::model::Destination)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) destination_name: std::option::Option<std::string::String>,
        pub(crate) target_arn: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) access_policy: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the destination.</p>
        pub fn destination_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_name = Some(input.into());
            self
        }
        /// <p>The name of the destination.</p>
        pub fn set_destination_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_name = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the physical target where the log events are
        /// delivered (for example, a Kinesis stream).</p>
        pub fn target_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.target_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the physical target where the log events are
        /// delivered (for example, a Kinesis stream).</p>
        pub fn set_target_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.target_arn = input;
            self
        }
        /// <p>A role for impersonation, used when delivering log events to the target.</p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p>A role for impersonation, used when delivering log events to the target.</p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters
        /// against this destination.</p>
        pub fn access_policy(mut self, input: impl Into<std::string::String>) -> Self {
            self.access_policy = Some(input.into());
            self
        }
        /// <p>An IAM policy document that governs which Amazon Web Services accounts can create subscription filters
        /// against this destination.</p>
        pub fn set_access_policy(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.access_policy = input;
            self
        }
        /// <p>The ARN of this destination.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The ARN of this destination.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The creation time of the destination, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the destination, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// Consumes the builder and constructs a [`Destination`](crate::model::Destination)
        pub fn build(self) -> crate::model::Destination {
            crate::model::Destination {
                destination_name: self.destination_name,
                target_arn: self.target_arn,
                role_arn: self.role_arn,
                access_policy: self.access_policy,
                arn: self.arn,
                creation_time: self.creation_time,
            }
        }
    }
}
impl Destination {
    /// Creates a new builder-style object to manufacture [`Destination`](crate::model::Destination)
    pub fn builder() -> crate::model::destination::Builder {
        crate::model::destination::Builder::default()
    }
}

/// _Note: `QueryStatus::Unknown` has been renamed to `::UnknownValue`._
#[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 QueryStatus {
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Complete,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Running,
    #[allow(missing_docs)] // documentation missing in model
    Scheduled,
    #[allow(missing_docs)] // documentation missing in model
    Timeout,
    /// _Note: `::Unknown` has been renamed to `::UnknownValue`._
    UnknownValue,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for QueryStatus {
    fn from(s: &str) -> Self {
        match s {
            "Cancelled" => QueryStatus::Cancelled,
            "Complete" => QueryStatus::Complete,
            "Failed" => QueryStatus::Failed,
            "Running" => QueryStatus::Running,
            "Scheduled" => QueryStatus::Scheduled,
            "Timeout" => QueryStatus::Timeout,
            "Unknown" => QueryStatus::UnknownValue,
            other => QueryStatus::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for QueryStatus {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(QueryStatus::from(s))
    }
}
impl QueryStatus {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            QueryStatus::Cancelled => "Cancelled",
            QueryStatus::Complete => "Complete",
            QueryStatus::Failed => "Failed",
            QueryStatus::Running => "Running",
            QueryStatus::Scheduled => "Scheduled",
            QueryStatus::Timeout => "Timeout",
            QueryStatus::UnknownValue => "Unknown",
            QueryStatus::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "Cancelled",
            "Complete",
            "Failed",
            "Running",
            "Scheduled",
            "Timeout",
            "Unknown",
        ]
    }
}
impl AsRef<str> for QueryStatus {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}

/// <p>Contains the number of log events scanned by the query, the number of log events that matched the
/// query criteria, and the total number of bytes in the log events that were scanned.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueryStatistics {
    /// <p>The number of log events that matched the query string.</p>
    pub records_matched: f64,
    /// <p>The total number of log events scanned during the query.</p>
    pub records_scanned: f64,
    /// <p>The total number of bytes in the log events scanned during the query.</p>
    pub bytes_scanned: f64,
}
impl QueryStatistics {
    /// <p>The number of log events that matched the query string.</p>
    pub fn records_matched(&self) -> f64 {
        self.records_matched
    }
    /// <p>The total number of log events scanned during the query.</p>
    pub fn records_scanned(&self) -> f64 {
        self.records_scanned
    }
    /// <p>The total number of bytes in the log events scanned during the query.</p>
    pub fn bytes_scanned(&self) -> f64 {
        self.bytes_scanned
    }
}
impl std::fmt::Debug for QueryStatistics {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("QueryStatistics");
        formatter.field("records_matched", &self.records_matched);
        formatter.field("records_scanned", &self.records_scanned);
        formatter.field("bytes_scanned", &self.bytes_scanned);
        formatter.finish()
    }
}
/// See [`QueryStatistics`](crate::model::QueryStatistics)
pub mod query_statistics {
    /// A builder for [`QueryStatistics`](crate::model::QueryStatistics)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) records_matched: std::option::Option<f64>,
        pub(crate) records_scanned: std::option::Option<f64>,
        pub(crate) bytes_scanned: std::option::Option<f64>,
    }
    impl Builder {
        /// <p>The number of log events that matched the query string.</p>
        pub fn records_matched(mut self, input: f64) -> Self {
            self.records_matched = Some(input);
            self
        }
        /// <p>The number of log events that matched the query string.</p>
        pub fn set_records_matched(mut self, input: std::option::Option<f64>) -> Self {
            self.records_matched = input;
            self
        }
        /// <p>The total number of log events scanned during the query.</p>
        pub fn records_scanned(mut self, input: f64) -> Self {
            self.records_scanned = Some(input);
            self
        }
        /// <p>The total number of log events scanned during the query.</p>
        pub fn set_records_scanned(mut self, input: std::option::Option<f64>) -> Self {
            self.records_scanned = input;
            self
        }
        /// <p>The total number of bytes in the log events scanned during the query.</p>
        pub fn bytes_scanned(mut self, input: f64) -> Self {
            self.bytes_scanned = Some(input);
            self
        }
        /// <p>The total number of bytes in the log events scanned during the query.</p>
        pub fn set_bytes_scanned(mut self, input: std::option::Option<f64>) -> Self {
            self.bytes_scanned = input;
            self
        }
        /// Consumes the builder and constructs a [`QueryStatistics`](crate::model::QueryStatistics)
        pub fn build(self) -> crate::model::QueryStatistics {
            crate::model::QueryStatistics {
                records_matched: self.records_matched.unwrap_or_default(),
                records_scanned: self.records_scanned.unwrap_or_default(),
                bytes_scanned: self.bytes_scanned.unwrap_or_default(),
            }
        }
    }
}
impl QueryStatistics {
    /// Creates a new builder-style object to manufacture [`QueryStatistics`](crate::model::QueryStatistics)
    pub fn builder() -> crate::model::query_statistics::Builder {
        crate::model::query_statistics::Builder::default()
    }
}

/// <p>Contains one field from one log event returned by a CloudWatch Logs Insights query, along with the value of that field.</p>
/// <p>For more information about the fields that are
/// generated by CloudWatch logs, see
/// <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_AnalyzeLogData-discoverable-fields.html">Supported Logs and Discovered Fields</a>.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ResultField {
    /// <p>The log event field.</p>
    pub field: std::option::Option<std::string::String>,
    /// <p>The value of this field.</p>
    pub value: std::option::Option<std::string::String>,
}
impl ResultField {
    /// <p>The log event field.</p>
    pub fn field(&self) -> std::option::Option<&str> {
        self.field.as_deref()
    }
    /// <p>The value of this field.</p>
    pub fn value(&self) -> std::option::Option<&str> {
        self.value.as_deref()
    }
}
impl std::fmt::Debug for ResultField {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ResultField");
        formatter.field("field", &self.field);
        formatter.field("value", &self.value);
        formatter.finish()
    }
}
/// See [`ResultField`](crate::model::ResultField)
pub mod result_field {
    /// A builder for [`ResultField`](crate::model::ResultField)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) field: std::option::Option<std::string::String>,
        pub(crate) value: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The log event field.</p>
        pub fn field(mut self, input: impl Into<std::string::String>) -> Self {
            self.field = Some(input.into());
            self
        }
        /// <p>The log event field.</p>
        pub fn set_field(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.field = input;
            self
        }
        /// <p>The value of this field.</p>
        pub fn value(mut self, input: impl Into<std::string::String>) -> Self {
            self.value = Some(input.into());
            self
        }
        /// <p>The value of this field.</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 [`ResultField`](crate::model::ResultField)
        pub fn build(self) -> crate::model::ResultField {
            crate::model::ResultField {
                field: self.field,
                value: self.value,
            }
        }
    }
}
impl ResultField {
    /// Creates a new builder-style object to manufacture [`ResultField`](crate::model::ResultField)
    pub fn builder() -> crate::model::result_field::Builder {
        crate::model::result_field::Builder::default()
    }
}

/// <p>The fields contained in log events found by a <code>GetLogGroupFields</code> operation,
/// along with the percentage of queried log events in which each field appears.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LogGroupField {
    /// <p>The name of a log field.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The percentage of log events queried that contained the field.</p>
    pub percent: i32,
}
impl LogGroupField {
    /// <p>The name of a log field.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The percentage of log events queried that contained the field.</p>
    pub fn percent(&self) -> i32 {
        self.percent
    }
}
impl std::fmt::Debug for LogGroupField {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("LogGroupField");
        formatter.field("name", &self.name);
        formatter.field("percent", &self.percent);
        formatter.finish()
    }
}
/// See [`LogGroupField`](crate::model::LogGroupField)
pub mod log_group_field {
    /// A builder for [`LogGroupField`](crate::model::LogGroupField)
    #[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) percent: std::option::Option<i32>,
    }
    impl Builder {
        /// <p>The name of a log field.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of a log field.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The percentage of log events queried that contained the field.</p>
        pub fn percent(mut self, input: i32) -> Self {
            self.percent = Some(input);
            self
        }
        /// <p>The percentage of log events queried that contained the field.</p>
        pub fn set_percent(mut self, input: std::option::Option<i32>) -> Self {
            self.percent = input;
            self
        }
        /// Consumes the builder and constructs a [`LogGroupField`](crate::model::LogGroupField)
        pub fn build(self) -> crate::model::LogGroupField {
            crate::model::LogGroupField {
                name: self.name,
                percent: self.percent.unwrap_or_default(),
            }
        }
    }
}
impl LogGroupField {
    /// Creates a new builder-style object to manufacture [`LogGroupField`](crate::model::LogGroupField)
    pub fn builder() -> crate::model::log_group_field::Builder {
        crate::model::log_group_field::Builder::default()
    }
}

/// <p>Represents a log event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct OutputLogEvent {
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub timestamp: std::option::Option<i64>,
    /// <p>The data contained in the log event.</p>
    pub message: std::option::Option<std::string::String>,
    /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub ingestion_time: std::option::Option<i64>,
}
impl OutputLogEvent {
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub fn timestamp(&self) -> std::option::Option<i64> {
        self.timestamp
    }
    /// <p>The data contained in the log event.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub fn ingestion_time(&self) -> std::option::Option<i64> {
        self.ingestion_time
    }
}
impl std::fmt::Debug for OutputLogEvent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("OutputLogEvent");
        formatter.field("timestamp", &self.timestamp);
        formatter.field("message", &self.message);
        formatter.field("ingestion_time", &self.ingestion_time);
        formatter.finish()
    }
}
/// See [`OutputLogEvent`](crate::model::OutputLogEvent)
pub mod output_log_event {
    /// A builder for [`OutputLogEvent`](crate::model::OutputLogEvent)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) timestamp: std::option::Option<i64>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) ingestion_time: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn timestamp(mut self, input: i64) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn set_timestamp(mut self, input: std::option::Option<i64>) -> Self {
            self.timestamp = input;
            self
        }
        /// <p>The data contained in the log event.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The data contained in the log event.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn ingestion_time(mut self, input: i64) -> Self {
            self.ingestion_time = Some(input);
            self
        }
        /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn set_ingestion_time(mut self, input: std::option::Option<i64>) -> Self {
            self.ingestion_time = input;
            self
        }
        /// Consumes the builder and constructs a [`OutputLogEvent`](crate::model::OutputLogEvent)
        pub fn build(self) -> crate::model::OutputLogEvent {
            crate::model::OutputLogEvent {
                timestamp: self.timestamp,
                message: self.message,
                ingestion_time: self.ingestion_time,
            }
        }
    }
}
impl OutputLogEvent {
    /// Creates a new builder-style object to manufacture [`OutputLogEvent`](crate::model::OutputLogEvent)
    pub fn builder() -> crate::model::output_log_event::Builder {
        crate::model::output_log_event::Builder::default()
    }
}

/// <p>Represents the search status of a log stream.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SearchedLogStream {
    /// <p>The name of the log stream.</p>
    pub log_stream_name: std::option::Option<std::string::String>,
    /// <p>Indicates whether all the events in this log stream were searched.</p>
    pub searched_completely: std::option::Option<bool>,
}
impl SearchedLogStream {
    /// <p>The name of the log stream.</p>
    pub fn log_stream_name(&self) -> std::option::Option<&str> {
        self.log_stream_name.as_deref()
    }
    /// <p>Indicates whether all the events in this log stream were searched.</p>
    pub fn searched_completely(&self) -> std::option::Option<bool> {
        self.searched_completely
    }
}
impl std::fmt::Debug for SearchedLogStream {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SearchedLogStream");
        formatter.field("log_stream_name", &self.log_stream_name);
        formatter.field("searched_completely", &self.searched_completely);
        formatter.finish()
    }
}
/// See [`SearchedLogStream`](crate::model::SearchedLogStream)
pub mod searched_log_stream {
    /// A builder for [`SearchedLogStream`](crate::model::SearchedLogStream)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_stream_name: std::option::Option<std::string::String>,
        pub(crate) searched_completely: std::option::Option<bool>,
    }
    impl Builder {
        /// <p>The name of the log stream.</p>
        pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_stream_name = Some(input.into());
            self
        }
        /// <p>The name of the log stream.</p>
        pub fn set_log_stream_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_stream_name = input;
            self
        }
        /// <p>Indicates whether all the events in this log stream were searched.</p>
        pub fn searched_completely(mut self, input: bool) -> Self {
            self.searched_completely = Some(input);
            self
        }
        /// <p>Indicates whether all the events in this log stream were searched.</p>
        pub fn set_searched_completely(mut self, input: std::option::Option<bool>) -> Self {
            self.searched_completely = input;
            self
        }
        /// Consumes the builder and constructs a [`SearchedLogStream`](crate::model::SearchedLogStream)
        pub fn build(self) -> crate::model::SearchedLogStream {
            crate::model::SearchedLogStream {
                log_stream_name: self.log_stream_name,
                searched_completely: self.searched_completely,
            }
        }
    }
}
impl SearchedLogStream {
    /// Creates a new builder-style object to manufacture [`SearchedLogStream`](crate::model::SearchedLogStream)
    pub fn builder() -> crate::model::searched_log_stream::Builder {
        crate::model::searched_log_stream::Builder::default()
    }
}

/// <p>Represents a matched event.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct FilteredLogEvent {
    /// <p>The name of the log stream to which this event belongs.</p>
    pub log_stream_name: std::option::Option<std::string::String>,
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub timestamp: std::option::Option<i64>,
    /// <p>The data contained in the log event.</p>
    pub message: std::option::Option<std::string::String>,
    /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub ingestion_time: std::option::Option<i64>,
    /// <p>The ID of the event.</p>
    pub event_id: std::option::Option<std::string::String>,
}
impl FilteredLogEvent {
    /// <p>The name of the log stream to which this event belongs.</p>
    pub fn log_stream_name(&self) -> std::option::Option<&str> {
        self.log_stream_name.as_deref()
    }
    /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub fn timestamp(&self) -> std::option::Option<i64> {
        self.timestamp
    }
    /// <p>The data contained in the log event.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
    /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub fn ingestion_time(&self) -> std::option::Option<i64> {
        self.ingestion_time
    }
    /// <p>The ID of the event.</p>
    pub fn event_id(&self) -> std::option::Option<&str> {
        self.event_id.as_deref()
    }
}
impl std::fmt::Debug for FilteredLogEvent {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("FilteredLogEvent");
        formatter.field("log_stream_name", &self.log_stream_name);
        formatter.field("timestamp", &self.timestamp);
        formatter.field("message", &self.message);
        formatter.field("ingestion_time", &self.ingestion_time);
        formatter.field("event_id", &self.event_id);
        formatter.finish()
    }
}
/// See [`FilteredLogEvent`](crate::model::FilteredLogEvent)
pub mod filtered_log_event {
    /// A builder for [`FilteredLogEvent`](crate::model::FilteredLogEvent)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_stream_name: std::option::Option<std::string::String>,
        pub(crate) timestamp: std::option::Option<i64>,
        pub(crate) message: std::option::Option<std::string::String>,
        pub(crate) ingestion_time: std::option::Option<i64>,
        pub(crate) event_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the log stream to which this event belongs.</p>
        pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_stream_name = Some(input.into());
            self
        }
        /// <p>The name of the log stream to which this event belongs.</p>
        pub fn set_log_stream_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_stream_name = input;
            self
        }
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn timestamp(mut self, input: i64) -> Self {
            self.timestamp = Some(input);
            self
        }
        /// <p>The time the event occurred, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn set_timestamp(mut self, input: std::option::Option<i64>) -> Self {
            self.timestamp = input;
            self
        }
        /// <p>The data contained in the log event.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The data contained in the log event.</p>
        pub fn set_message(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.message = input;
            self
        }
        /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn ingestion_time(mut self, input: i64) -> Self {
            self.ingestion_time = Some(input);
            self
        }
        /// <p>The time the event was ingested, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn set_ingestion_time(mut self, input: std::option::Option<i64>) -> Self {
            self.ingestion_time = input;
            self
        }
        /// <p>The ID of the event.</p>
        pub fn event_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.event_id = Some(input.into());
            self
        }
        /// <p>The ID of the event.</p>
        pub fn set_event_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.event_id = input;
            self
        }
        /// Consumes the builder and constructs a [`FilteredLogEvent`](crate::model::FilteredLogEvent)
        pub fn build(self) -> crate::model::FilteredLogEvent {
            crate::model::FilteredLogEvent {
                log_stream_name: self.log_stream_name,
                timestamp: self.timestamp,
                message: self.message,
                ingestion_time: self.ingestion_time,
                event_id: self.event_id,
            }
        }
    }
}
impl FilteredLogEvent {
    /// Creates a new builder-style object to manufacture [`FilteredLogEvent`](crate::model::FilteredLogEvent)
    pub fn builder() -> crate::model::filtered_log_event::Builder {
        crate::model::filtered_log_event::Builder::default()
    }
}

/// <p>Represents a subscription filter.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct SubscriptionFilter {
    /// <p>The name of the subscription filter.</p>
    pub filter_name: std::option::Option<std::string::String>,
    /// <p>The name of the log group.</p>
    pub log_group_name: std::option::Option<std::string::String>,
    /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
    /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
    /// use the filter pattern to specify what to look for in the log event message.</p>
    pub filter_pattern: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
    pub destination_arn: std::option::Option<std::string::String>,
    /// <p></p>
    pub role_arn: std::option::Option<std::string::String>,
    /// <p>The method used to distribute log data to the destination, which can be either
    /// random or grouped by log stream.</p>
    pub distribution: std::option::Option<crate::model::Distribution>,
    /// <p>The creation time of the subscription filter, expressed as the number of milliseconds
    /// after Jan 1, 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
}
impl SubscriptionFilter {
    /// <p>The name of the subscription filter.</p>
    pub fn filter_name(&self) -> std::option::Option<&str> {
        self.filter_name.as_deref()
    }
    /// <p>The name of the log group.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
    /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
    /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
    /// use the filter pattern to specify what to look for in the log event message.</p>
    pub fn filter_pattern(&self) -> std::option::Option<&str> {
        self.filter_pattern.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the destination.</p>
    pub fn destination_arn(&self) -> std::option::Option<&str> {
        self.destination_arn.as_deref()
    }
    /// <p></p>
    pub fn role_arn(&self) -> std::option::Option<&str> {
        self.role_arn.as_deref()
    }
    /// <p>The method used to distribute log data to the destination, which can be either
    /// random or grouped by log stream.</p>
    pub fn distribution(&self) -> std::option::Option<&crate::model::Distribution> {
        self.distribution.as_ref()
    }
    /// <p>The creation time of the subscription filter, expressed as the number of milliseconds
    /// after Jan 1, 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
}
impl std::fmt::Debug for SubscriptionFilter {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("SubscriptionFilter");
        formatter.field("filter_name", &self.filter_name);
        formatter.field("log_group_name", &self.log_group_name);
        formatter.field("filter_pattern", &self.filter_pattern);
        formatter.field("destination_arn", &self.destination_arn);
        formatter.field("role_arn", &self.role_arn);
        formatter.field("distribution", &self.distribution);
        formatter.field("creation_time", &self.creation_time);
        formatter.finish()
    }
}
/// See [`SubscriptionFilter`](crate::model::SubscriptionFilter)
pub mod subscription_filter {
    /// A builder for [`SubscriptionFilter`](crate::model::SubscriptionFilter)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) filter_name: std::option::Option<std::string::String>,
        pub(crate) log_group_name: std::option::Option<std::string::String>,
        pub(crate) filter_pattern: std::option::Option<std::string::String>,
        pub(crate) destination_arn: std::option::Option<std::string::String>,
        pub(crate) role_arn: std::option::Option<std::string::String>,
        pub(crate) distribution: std::option::Option<crate::model::Distribution>,
        pub(crate) creation_time: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the subscription filter.</p>
        pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.filter_name = Some(input.into());
            self
        }
        /// <p>The name of the subscription filter.</p>
        pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.filter_name = input;
            self
        }
        /// <p>The name of the log group.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the log group.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
        /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
        /// use the filter pattern to specify what to look for in the log event message.</p>
        pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
            self.filter_pattern = Some(input.into());
            self
        }
        /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
        /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
        /// use the filter pattern to specify what to look for in the log event message.</p>
        pub fn set_filter_pattern(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.filter_pattern = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination.</p>
        pub fn destination_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the destination.</p>
        pub fn set_destination_arn(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_arn = input;
            self
        }
        /// <p></p>
        pub fn role_arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.role_arn = Some(input.into());
            self
        }
        /// <p></p>
        pub fn set_role_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.role_arn = input;
            self
        }
        /// <p>The method used to distribute log data to the destination, which can be either
        /// random or grouped by log stream.</p>
        pub fn distribution(mut self, input: crate::model::Distribution) -> Self {
            self.distribution = Some(input);
            self
        }
        /// <p>The method used to distribute log data to the destination, which can be either
        /// random or grouped by log stream.</p>
        pub fn set_distribution(
            mut self,
            input: std::option::Option<crate::model::Distribution>,
        ) -> Self {
            self.distribution = input;
            self
        }
        /// <p>The creation time of the subscription filter, expressed as the number of milliseconds
        /// after Jan 1, 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the subscription filter, expressed as the number of milliseconds
        /// after Jan 1, 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// Consumes the builder and constructs a [`SubscriptionFilter`](crate::model::SubscriptionFilter)
        pub fn build(self) -> crate::model::SubscriptionFilter {
            crate::model::SubscriptionFilter {
                filter_name: self.filter_name,
                log_group_name: self.log_group_name,
                filter_pattern: self.filter_pattern,
                destination_arn: self.destination_arn,
                role_arn: self.role_arn,
                distribution: self.distribution,
                creation_time: self.creation_time,
            }
        }
    }
}
impl SubscriptionFilter {
    /// Creates a new builder-style object to manufacture [`SubscriptionFilter`](crate::model::SubscriptionFilter)
    pub fn builder() -> crate::model::subscription_filter::Builder {
        crate::model::subscription_filter::Builder::default()
    }
}

/// <p>This structure contains details about a saved CloudWatch Logs Insights query definition.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueryDefinition {
    /// <p>The unique ID of the query definition.</p>
    pub query_definition_id: std::option::Option<std::string::String>,
    /// <p>The name of the query definition.</p>
    pub name: std::option::Option<std::string::String>,
    /// <p>The query string to use for this definition.
    /// For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
    pub query_string: std::option::Option<std::string::String>,
    /// <p>The date that the query definition was most recently modified.</p>
    pub last_modified: std::option::Option<i64>,
    /// <p>If this query definition contains a list of log groups that it is limited to, that list appears here.</p>
    pub log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl QueryDefinition {
    /// <p>The unique ID of the query definition.</p>
    pub fn query_definition_id(&self) -> std::option::Option<&str> {
        self.query_definition_id.as_deref()
    }
    /// <p>The name of the query definition.</p>
    pub fn name(&self) -> std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The query string to use for this definition.
    /// For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
    pub fn query_string(&self) -> std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <p>The date that the query definition was most recently modified.</p>
    pub fn last_modified(&self) -> std::option::Option<i64> {
        self.last_modified
    }
    /// <p>If this query definition contains a list of log groups that it is limited to, that list appears here.</p>
    pub fn log_group_names(&self) -> std::option::Option<&[std::string::String]> {
        self.log_group_names.as_deref()
    }
}
impl std::fmt::Debug for QueryDefinition {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("QueryDefinition");
        formatter.field("query_definition_id", &self.query_definition_id);
        formatter.field("name", &self.name);
        formatter.field("query_string", &self.query_string);
        formatter.field("last_modified", &self.last_modified);
        formatter.field("log_group_names", &self.log_group_names);
        formatter.finish()
    }
}
/// See [`QueryDefinition`](crate::model::QueryDefinition)
pub mod query_definition {
    /// A builder for [`QueryDefinition`](crate::model::QueryDefinition)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) query_definition_id: std::option::Option<std::string::String>,
        pub(crate) name: std::option::Option<std::string::String>,
        pub(crate) query_string: std::option::Option<std::string::String>,
        pub(crate) last_modified: std::option::Option<i64>,
        pub(crate) log_group_names: std::option::Option<std::vec::Vec<std::string::String>>,
    }
    impl Builder {
        /// <p>The unique ID of the query definition.</p>
        pub fn query_definition_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_definition_id = Some(input.into());
            self
        }
        /// <p>The unique ID of the query definition.</p>
        pub fn set_query_definition_id(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.query_definition_id = input;
            self
        }
        /// <p>The name of the query definition.</p>
        pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
            self.name = Some(input.into());
            self
        }
        /// <p>The name of the query definition.</p>
        pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.name = input;
            self
        }
        /// <p>The query string to use for this definition.
        /// For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
        pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_string = Some(input.into());
            self
        }
        /// <p>The query string to use for this definition.
        /// For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html">CloudWatch Logs Insights Query Syntax</a>.</p>
        pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.query_string = input;
            self
        }
        /// <p>The date that the query definition was most recently modified.</p>
        pub fn last_modified(mut self, input: i64) -> Self {
            self.last_modified = Some(input);
            self
        }
        /// <p>The date that the query definition was most recently modified.</p>
        pub fn set_last_modified(mut self, input: std::option::Option<i64>) -> Self {
            self.last_modified = input;
            self
        }
        /// Appends an item to `log_group_names`.
        ///
        /// To override the contents of this collection use [`set_log_group_names`](Self::set_log_group_names).
        ///
        /// <p>If this query definition contains a list of log groups that it is limited to, that list appears here.</p>
        pub fn log_group_names(mut self, input: impl Into<std::string::String>) -> Self {
            let mut v = self.log_group_names.unwrap_or_default();
            v.push(input.into());
            self.log_group_names = Some(v);
            self
        }
        /// <p>If this query definition contains a list of log groups that it is limited to, that list appears here.</p>
        pub fn set_log_group_names(
            mut self,
            input: std::option::Option<std::vec::Vec<std::string::String>>,
        ) -> Self {
            self.log_group_names = input;
            self
        }
        /// Consumes the builder and constructs a [`QueryDefinition`](crate::model::QueryDefinition)
        pub fn build(self) -> crate::model::QueryDefinition {
            crate::model::QueryDefinition {
                query_definition_id: self.query_definition_id,
                name: self.name,
                query_string: self.query_string,
                last_modified: self.last_modified,
                log_group_names: self.log_group_names,
            }
        }
    }
}
impl QueryDefinition {
    /// Creates a new builder-style object to manufacture [`QueryDefinition`](crate::model::QueryDefinition)
    pub fn builder() -> crate::model::query_definition::Builder {
        crate::model::query_definition::Builder::default()
    }
}

/// <p>Information about one CloudWatch Logs Insights query that matches the request in a <code>DescribeQueries</code> operation. </p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct QueryInfo {
    /// <p>The unique ID number of this query.</p>
    pub query_id: std::option::Option<std::string::String>,
    /// <p>The query string used in this query.</p>
    pub query_string: std::option::Option<std::string::String>,
    /// <p>The status of this query. Possible values are <code>Cancelled</code>,
    /// <code>Complete</code>, <code>Failed</code>, <code>Running</code>, <code>Scheduled</code>, and <code>Unknown</code>.</p>
    pub status: std::option::Option<crate::model::QueryStatus>,
    /// <p>The date and time that this query was created.</p>
    pub create_time: std::option::Option<i64>,
    /// <p>The name of the log group scanned by this query.</p>
    pub log_group_name: std::option::Option<std::string::String>,
}
impl QueryInfo {
    /// <p>The unique ID number of this query.</p>
    pub fn query_id(&self) -> std::option::Option<&str> {
        self.query_id.as_deref()
    }
    /// <p>The query string used in this query.</p>
    pub fn query_string(&self) -> std::option::Option<&str> {
        self.query_string.as_deref()
    }
    /// <p>The status of this query. Possible values are <code>Cancelled</code>,
    /// <code>Complete</code>, <code>Failed</code>, <code>Running</code>, <code>Scheduled</code>, and <code>Unknown</code>.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::QueryStatus> {
        self.status.as_ref()
    }
    /// <p>The date and time that this query was created.</p>
    pub fn create_time(&self) -> std::option::Option<i64> {
        self.create_time
    }
    /// <p>The name of the log group scanned by this query.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
}
impl std::fmt::Debug for QueryInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("QueryInfo");
        formatter.field("query_id", &self.query_id);
        formatter.field("query_string", &self.query_string);
        formatter.field("status", &self.status);
        formatter.field("create_time", &self.create_time);
        formatter.field("log_group_name", &self.log_group_name);
        formatter.finish()
    }
}
/// See [`QueryInfo`](crate::model::QueryInfo)
pub mod query_info {
    /// A builder for [`QueryInfo`](crate::model::QueryInfo)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) query_id: std::option::Option<std::string::String>,
        pub(crate) query_string: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::QueryStatus>,
        pub(crate) create_time: std::option::Option<i64>,
        pub(crate) log_group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The unique ID number of this query.</p>
        pub fn query_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_id = Some(input.into());
            self
        }
        /// <p>The unique ID number of this query.</p>
        pub fn set_query_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.query_id = input;
            self
        }
        /// <p>The query string used in this query.</p>
        pub fn query_string(mut self, input: impl Into<std::string::String>) -> Self {
            self.query_string = Some(input.into());
            self
        }
        /// <p>The query string used in this query.</p>
        pub fn set_query_string(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.query_string = input;
            self
        }
        /// <p>The status of this query. Possible values are <code>Cancelled</code>,
        /// <code>Complete</code>, <code>Failed</code>, <code>Running</code>, <code>Scheduled</code>, and <code>Unknown</code>.</p>
        pub fn status(mut self, input: crate::model::QueryStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of this query. Possible values are <code>Cancelled</code>,
        /// <code>Complete</code>, <code>Failed</code>, <code>Running</code>, <code>Scheduled</code>, and <code>Unknown</code>.</p>
        pub fn set_status(mut self, input: std::option::Option<crate::model::QueryStatus>) -> Self {
            self.status = input;
            self
        }
        /// <p>The date and time that this query was created.</p>
        pub fn create_time(mut self, input: i64) -> Self {
            self.create_time = Some(input);
            self
        }
        /// <p>The date and time that this query was created.</p>
        pub fn set_create_time(mut self, input: std::option::Option<i64>) -> Self {
            self.create_time = input;
            self
        }
        /// <p>The name of the log group scanned by this query.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the log group scanned by this query.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`QueryInfo`](crate::model::QueryInfo)
        pub fn build(self) -> crate::model::QueryInfo {
            crate::model::QueryInfo {
                query_id: self.query_id,
                query_string: self.query_string,
                status: self.status,
                create_time: self.create_time,
                log_group_name: self.log_group_name,
            }
        }
    }
}
impl QueryInfo {
    /// Creates a new builder-style object to manufacture [`QueryInfo`](crate::model::QueryInfo)
    pub fn builder() -> crate::model::query_info::Builder {
        crate::model::query_info::Builder::default()
    }
}

/// <p>Metric filters express how CloudWatch Logs would extract metric observations
/// from ingested log events and transform them into metric data in a CloudWatch metric.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct MetricFilter {
    /// <p>The name of the metric filter.</p>
    pub filter_name: std::option::Option<std::string::String>,
    /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
    /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
    /// use the filter pattern to specify what to look for in the log event message.</p>
    pub filter_pattern: std::option::Option<std::string::String>,
    /// <p>The metric transformations.</p>
    pub metric_transformations:
        std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
    /// <p>The creation time of the metric filter, expressed as the number of milliseconds after
    /// Jan 1, 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
    /// <p>The name of the log group.</p>
    pub log_group_name: std::option::Option<std::string::String>,
}
impl MetricFilter {
    /// <p>The name of the metric filter.</p>
    pub fn filter_name(&self) -> std::option::Option<&str> {
        self.filter_name.as_deref()
    }
    /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
    /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
    /// use the filter pattern to specify what to look for in the log event message.</p>
    pub fn filter_pattern(&self) -> std::option::Option<&str> {
        self.filter_pattern.as_deref()
    }
    /// <p>The metric transformations.</p>
    pub fn metric_transformations(
        &self,
    ) -> std::option::Option<&[crate::model::MetricTransformation]> {
        self.metric_transformations.as_deref()
    }
    /// <p>The creation time of the metric filter, expressed as the number of milliseconds after
    /// Jan 1, 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
    /// <p>The name of the log group.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
}
impl std::fmt::Debug for MetricFilter {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("MetricFilter");
        formatter.field("filter_name", &self.filter_name);
        formatter.field("filter_pattern", &self.filter_pattern);
        formatter.field("metric_transformations", &self.metric_transformations);
        formatter.field("creation_time", &self.creation_time);
        formatter.field("log_group_name", &self.log_group_name);
        formatter.finish()
    }
}
/// See [`MetricFilter`](crate::model::MetricFilter)
pub mod metric_filter {
    /// A builder for [`MetricFilter`](crate::model::MetricFilter)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) filter_name: std::option::Option<std::string::String>,
        pub(crate) filter_pattern: std::option::Option<std::string::String>,
        pub(crate) metric_transformations:
            std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
        pub(crate) creation_time: std::option::Option<i64>,
        pub(crate) log_group_name: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the metric filter.</p>
        pub fn filter_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.filter_name = Some(input.into());
            self
        }
        /// <p>The name of the metric filter.</p>
        pub fn set_filter_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.filter_name = input;
            self
        }
        /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
        /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
        /// use the filter pattern to specify what to look for in the log event message.</p>
        pub fn filter_pattern(mut self, input: impl Into<std::string::String>) -> Self {
            self.filter_pattern = Some(input.into());
            self
        }
        /// <p>A symbolic description of how CloudWatch Logs should interpret the data in each log
        /// event. For example, a log event can contain timestamps, IP addresses, strings, and so on. You
        /// use the filter pattern to specify what to look for in the log event message.</p>
        pub fn set_filter_pattern(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.filter_pattern = input;
            self
        }
        /// Appends an item to `metric_transformations`.
        ///
        /// To override the contents of this collection use [`set_metric_transformations`](Self::set_metric_transformations).
        ///
        /// <p>The metric transformations.</p>
        pub fn metric_transformations(
            mut self,
            input: impl Into<crate::model::MetricTransformation>,
        ) -> Self {
            let mut v = self.metric_transformations.unwrap_or_default();
            v.push(input.into());
            self.metric_transformations = Some(v);
            self
        }
        /// <p>The metric transformations.</p>
        pub fn set_metric_transformations(
            mut self,
            input: std::option::Option<std::vec::Vec<crate::model::MetricTransformation>>,
        ) -> Self {
            self.metric_transformations = input;
            self
        }
        /// <p>The creation time of the metric filter, expressed as the number of milliseconds after
        /// Jan 1, 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the metric filter, expressed as the number of milliseconds after
        /// Jan 1, 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The name of the log group.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the log group.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// Consumes the builder and constructs a [`MetricFilter`](crate::model::MetricFilter)
        pub fn build(self) -> crate::model::MetricFilter {
            crate::model::MetricFilter {
                filter_name: self.filter_name,
                filter_pattern: self.filter_pattern,
                metric_transformations: self.metric_transformations,
                creation_time: self.creation_time,
                log_group_name: self.log_group_name,
            }
        }
    }
}
impl MetricFilter {
    /// Creates a new builder-style object to manufacture [`MetricFilter`](crate::model::MetricFilter)
    pub fn builder() -> crate::model::metric_filter::Builder {
        crate::model::metric_filter::Builder::default()
    }
}

/// <p>Represents a log stream, which is a sequence of log events from
/// a single emitter of logs.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LogStream {
    /// <p>The name of the log stream.</p>
    pub log_stream_name: std::option::Option<std::string::String>,
    /// <p>The creation time of the stream, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
    /// <p>The time of the first event, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub first_event_timestamp: std::option::Option<i64>,
    /// <p>The time of the most recent log event in the log stream in CloudWatch Logs. This number
    /// is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The
    /// <code>lastEventTime</code> value updates on an eventual consistency basis. It typically
    /// updates in less than an hour from ingestion, but in rare situations might take
    /// longer.</p>
    pub last_event_timestamp: std::option::Option<i64>,
    /// <p>The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
    /// UTC.</p>
    pub last_ingestion_time: std::option::Option<i64>,
    /// <p>The sequence token.</p>
    pub upload_sequence_token: std::option::Option<std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the log stream.</p>
    pub arn: std::option::Option<std::string::String>,
    /// <p>The number of bytes stored.</p>
    /// <p>
    /// <b>Important:</b> On June 17, 2019, this parameter was
    /// deprecated for log streams, and is always reported as zero. This change applies only to log
    /// streams. The <code>storedBytes</code> parameter for log groups is not affected.</p>
    pub stored_bytes: std::option::Option<i64>,
}
impl LogStream {
    /// <p>The name of the log stream.</p>
    pub fn log_stream_name(&self) -> std::option::Option<&str> {
        self.log_stream_name.as_deref()
    }
    /// <p>The creation time of the stream, expressed as the number of milliseconds after Jan 1,
    /// 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
    /// <p>The time of the first event, expressed as the number of milliseconds after Jan 1, 1970
    /// 00:00:00 UTC.</p>
    pub fn first_event_timestamp(&self) -> std::option::Option<i64> {
        self.first_event_timestamp
    }
    /// <p>The time of the most recent log event in the log stream in CloudWatch Logs. This number
    /// is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The
    /// <code>lastEventTime</code> value updates on an eventual consistency basis. It typically
    /// updates in less than an hour from ingestion, but in rare situations might take
    /// longer.</p>
    pub fn last_event_timestamp(&self) -> std::option::Option<i64> {
        self.last_event_timestamp
    }
    /// <p>The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
    /// UTC.</p>
    pub fn last_ingestion_time(&self) -> std::option::Option<i64> {
        self.last_ingestion_time
    }
    /// <p>The sequence token.</p>
    pub fn upload_sequence_token(&self) -> std::option::Option<&str> {
        self.upload_sequence_token.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the log stream.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The number of bytes stored.</p>
    /// <p>
    /// <b>Important:</b> On June 17, 2019, this parameter was
    /// deprecated for log streams, and is always reported as zero. This change applies only to log
    /// streams. The <code>storedBytes</code> parameter for log groups is not affected.</p>
    pub fn stored_bytes(&self) -> std::option::Option<i64> {
        self.stored_bytes
    }
}
impl std::fmt::Debug for LogStream {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("LogStream");
        formatter.field("log_stream_name", &self.log_stream_name);
        formatter.field("creation_time", &self.creation_time);
        formatter.field("first_event_timestamp", &self.first_event_timestamp);
        formatter.field("last_event_timestamp", &self.last_event_timestamp);
        formatter.field("last_ingestion_time", &self.last_ingestion_time);
        formatter.field("upload_sequence_token", &self.upload_sequence_token);
        formatter.field("arn", &self.arn);
        formatter.field("stored_bytes", &self.stored_bytes);
        formatter.finish()
    }
}
/// See [`LogStream`](crate::model::LogStream)
pub mod log_stream {
    /// A builder for [`LogStream`](crate::model::LogStream)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_stream_name: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<i64>,
        pub(crate) first_event_timestamp: std::option::Option<i64>,
        pub(crate) last_event_timestamp: std::option::Option<i64>,
        pub(crate) last_ingestion_time: std::option::Option<i64>,
        pub(crate) upload_sequence_token: std::option::Option<std::string::String>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) stored_bytes: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The name of the log stream.</p>
        pub fn log_stream_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_stream_name = Some(input.into());
            self
        }
        /// <p>The name of the log stream.</p>
        pub fn set_log_stream_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_stream_name = input;
            self
        }
        /// <p>The creation time of the stream, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the stream, expressed as the number of milliseconds after Jan 1,
        /// 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The time of the first event, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn first_event_timestamp(mut self, input: i64) -> Self {
            self.first_event_timestamp = Some(input);
            self
        }
        /// <p>The time of the first event, expressed as the number of milliseconds after Jan 1, 1970
        /// 00:00:00 UTC.</p>
        pub fn set_first_event_timestamp(mut self, input: std::option::Option<i64>) -> Self {
            self.first_event_timestamp = input;
            self
        }
        /// <p>The time of the most recent log event in the log stream in CloudWatch Logs. This number
        /// is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The
        /// <code>lastEventTime</code> value updates on an eventual consistency basis. It typically
        /// updates in less than an hour from ingestion, but in rare situations might take
        /// longer.</p>
        pub fn last_event_timestamp(mut self, input: i64) -> Self {
            self.last_event_timestamp = Some(input);
            self
        }
        /// <p>The time of the most recent log event in the log stream in CloudWatch Logs. This number
        /// is expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC. The
        /// <code>lastEventTime</code> value updates on an eventual consistency basis. It typically
        /// updates in less than an hour from ingestion, but in rare situations might take
        /// longer.</p>
        pub fn set_last_event_timestamp(mut self, input: std::option::Option<i64>) -> Self {
            self.last_event_timestamp = input;
            self
        }
        /// <p>The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
        /// UTC.</p>
        pub fn last_ingestion_time(mut self, input: i64) -> Self {
            self.last_ingestion_time = Some(input);
            self
        }
        /// <p>The ingestion time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00
        /// UTC.</p>
        pub fn set_last_ingestion_time(mut self, input: std::option::Option<i64>) -> Self {
            self.last_ingestion_time = input;
            self
        }
        /// <p>The sequence token.</p>
        pub fn upload_sequence_token(mut self, input: impl Into<std::string::String>) -> Self {
            self.upload_sequence_token = Some(input.into());
            self
        }
        /// <p>The sequence token.</p>
        pub fn set_upload_sequence_token(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.upload_sequence_token = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the log stream.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the log stream.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The number of bytes stored.</p>
        /// <p>
        /// <b>Important:</b> On June 17, 2019, this parameter was
        /// deprecated for log streams, and is always reported as zero. This change applies only to log
        /// streams. The <code>storedBytes</code> parameter for log groups is not affected.</p>
        pub fn stored_bytes(mut self, input: i64) -> Self {
            self.stored_bytes = Some(input);
            self
        }
        /// <p>The number of bytes stored.</p>
        /// <p>
        /// <b>Important:</b> On June 17, 2019, this parameter was
        /// deprecated for log streams, and is always reported as zero. This change applies only to log
        /// streams. The <code>storedBytes</code> parameter for log groups is not affected.</p>
        pub fn set_stored_bytes(mut self, input: std::option::Option<i64>) -> Self {
            self.stored_bytes = input;
            self
        }
        /// Consumes the builder and constructs a [`LogStream`](crate::model::LogStream)
        pub fn build(self) -> crate::model::LogStream {
            crate::model::LogStream {
                log_stream_name: self.log_stream_name,
                creation_time: self.creation_time,
                first_event_timestamp: self.first_event_timestamp,
                last_event_timestamp: self.last_event_timestamp,
                last_ingestion_time: self.last_ingestion_time,
                upload_sequence_token: self.upload_sequence_token,
                arn: self.arn,
                stored_bytes: self.stored_bytes,
            }
        }
    }
}
impl LogStream {
    /// Creates a new builder-style object to manufacture [`LogStream`](crate::model::LogStream)
    pub fn builder() -> crate::model::log_stream::Builder {
        crate::model::log_stream::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 OrderBy {
    #[allow(missing_docs)] // documentation missing in model
    LastEventTime,
    #[allow(missing_docs)] // documentation missing in model
    LogStreamName,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for OrderBy {
    fn from(s: &str) -> Self {
        match s {
            "LastEventTime" => OrderBy::LastEventTime,
            "LogStreamName" => OrderBy::LogStreamName,
            other => OrderBy::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for OrderBy {
    type Err = std::convert::Infallible;

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

/// <p>Represents a log group.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct LogGroup {
    /// <p>The name of the log group.</p>
    pub log_group_name: std::option::Option<std::string::String>,
    /// <p>The creation time of the log group, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
    /// <p>The number of days to retain the log events in the specified log group.
    /// Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.</p>
    /// <p>To set a log group to never have log events expire, use
    /// <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html">DeleteRetentionPolicy</a>.
    /// </p>
    pub retention_in_days: std::option::Option<i32>,
    /// <p>The number of metric filters.</p>
    pub metric_filter_count: std::option::Option<i32>,
    /// <p>The Amazon Resource Name (ARN) of the log group.</p>
    pub arn: std::option::Option<std::string::String>,
    /// <p>The number of bytes stored.</p>
    pub stored_bytes: std::option::Option<i64>,
    /// <p>The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.</p>
    pub kms_key_id: std::option::Option<std::string::String>,
}
impl LogGroup {
    /// <p>The name of the log group.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
    /// <p>The creation time of the log group, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
    /// <p>The number of days to retain the log events in the specified log group.
    /// Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.</p>
    /// <p>To set a log group to never have log events expire, use
    /// <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html">DeleteRetentionPolicy</a>.
    /// </p>
    pub fn retention_in_days(&self) -> std::option::Option<i32> {
        self.retention_in_days
    }
    /// <p>The number of metric filters.</p>
    pub fn metric_filter_count(&self) -> std::option::Option<i32> {
        self.metric_filter_count
    }
    /// <p>The Amazon Resource Name (ARN) of the log group.</p>
    pub fn arn(&self) -> std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The number of bytes stored.</p>
    pub fn stored_bytes(&self) -> std::option::Option<i64> {
        self.stored_bytes
    }
    /// <p>The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.</p>
    pub fn kms_key_id(&self) -> std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
}
impl std::fmt::Debug for LogGroup {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("LogGroup");
        formatter.field("log_group_name", &self.log_group_name);
        formatter.field("creation_time", &self.creation_time);
        formatter.field("retention_in_days", &self.retention_in_days);
        formatter.field("metric_filter_count", &self.metric_filter_count);
        formatter.field("arn", &self.arn);
        formatter.field("stored_bytes", &self.stored_bytes);
        formatter.field("kms_key_id", &self.kms_key_id);
        formatter.finish()
    }
}
/// See [`LogGroup`](crate::model::LogGroup)
pub mod log_group {
    /// A builder for [`LogGroup`](crate::model::LogGroup)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) log_group_name: std::option::Option<std::string::String>,
        pub(crate) creation_time: std::option::Option<i64>,
        pub(crate) retention_in_days: std::option::Option<i32>,
        pub(crate) metric_filter_count: std::option::Option<i32>,
        pub(crate) arn: std::option::Option<std::string::String>,
        pub(crate) stored_bytes: std::option::Option<i64>,
        pub(crate) kms_key_id: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The name of the log group.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the log group.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// <p>The creation time of the log group, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the log group, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The number of days to retain the log events in the specified log group.
        /// Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.</p>
        /// <p>To set a log group to never have log events expire, use
        /// <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html">DeleteRetentionPolicy</a>.
        /// </p>
        pub fn retention_in_days(mut self, input: i32) -> Self {
            self.retention_in_days = Some(input);
            self
        }
        /// <p>The number of days to retain the log events in the specified log group.
        /// Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.</p>
        /// <p>To set a log group to never have log events expire, use
        /// <a href="https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DeleteRetentionPolicy.html">DeleteRetentionPolicy</a>.
        /// </p>
        pub fn set_retention_in_days(mut self, input: std::option::Option<i32>) -> Self {
            self.retention_in_days = input;
            self
        }
        /// <p>The number of metric filters.</p>
        pub fn metric_filter_count(mut self, input: i32) -> Self {
            self.metric_filter_count = Some(input);
            self
        }
        /// <p>The number of metric filters.</p>
        pub fn set_metric_filter_count(mut self, input: std::option::Option<i32>) -> Self {
            self.metric_filter_count = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the log group.</p>
        pub fn arn(mut self, input: impl Into<std::string::String>) -> Self {
            self.arn = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the log group.</p>
        pub fn set_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.arn = input;
            self
        }
        /// <p>The number of bytes stored.</p>
        pub fn stored_bytes(mut self, input: i64) -> Self {
            self.stored_bytes = Some(input);
            self
        }
        /// <p>The number of bytes stored.</p>
        pub fn set_stored_bytes(mut self, input: std::option::Option<i64>) -> Self {
            self.stored_bytes = input;
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.</p>
        pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.kms_key_id = Some(input.into());
            self
        }
        /// <p>The Amazon Resource Name (ARN) of the CMK to use when encrypting log data.</p>
        pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.kms_key_id = input;
            self
        }
        /// Consumes the builder and constructs a [`LogGroup`](crate::model::LogGroup)
        pub fn build(self) -> crate::model::LogGroup {
            crate::model::LogGroup {
                log_group_name: self.log_group_name,
                creation_time: self.creation_time,
                retention_in_days: self.retention_in_days,
                metric_filter_count: self.metric_filter_count,
                arn: self.arn,
                stored_bytes: self.stored_bytes,
                kms_key_id: self.kms_key_id,
            }
        }
    }
}
impl LogGroup {
    /// Creates a new builder-style object to manufacture [`LogGroup`](crate::model::LogGroup)
    pub fn builder() -> crate::model::log_group::Builder {
        crate::model::log_group::Builder::default()
    }
}

/// <p>Represents an export task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExportTask {
    /// <p>The ID of the export task.</p>
    pub task_id: std::option::Option<std::string::String>,
    /// <p>The name of the export task.</p>
    pub task_name: std::option::Option<std::string::String>,
    /// <p>The name of the log group from which logs data was exported.</p>
    pub log_group_name: std::option::Option<std::string::String>,
    /// <p>The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
    /// Events with a timestamp before this time are not exported.</p>
    pub from: std::option::Option<i64>,
    /// <p>The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
    /// Events with a timestamp later than this time are not exported.</p>
    pub to: std::option::Option<i64>,
    /// <p>The name of the S3 bucket to which the log data was exported.</p>
    pub destination: std::option::Option<std::string::String>,
    /// <p>The prefix that was used as the start of Amazon S3 key for every object exported.</p>
    pub destination_prefix: std::option::Option<std::string::String>,
    /// <p>The status of the export task.</p>
    pub status: std::option::Option<crate::model::ExportTaskStatus>,
    /// <p>Execution information about the export task.</p>
    pub execution_info: std::option::Option<crate::model::ExportTaskExecutionInfo>,
}
impl ExportTask {
    /// <p>The ID of the export task.</p>
    pub fn task_id(&self) -> std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The name of the export task.</p>
    pub fn task_name(&self) -> std::option::Option<&str> {
        self.task_name.as_deref()
    }
    /// <p>The name of the log group from which logs data was exported.</p>
    pub fn log_group_name(&self) -> std::option::Option<&str> {
        self.log_group_name.as_deref()
    }
    /// <p>The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
    /// Events with a timestamp before this time are not exported.</p>
    pub fn from(&self) -> std::option::Option<i64> {
        self.from
    }
    /// <p>The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
    /// Events with a timestamp later than this time are not exported.</p>
    pub fn to(&self) -> std::option::Option<i64> {
        self.to
    }
    /// <p>The name of the S3 bucket to which the log data was exported.</p>
    pub fn destination(&self) -> std::option::Option<&str> {
        self.destination.as_deref()
    }
    /// <p>The prefix that was used as the start of Amazon S3 key for every object exported.</p>
    pub fn destination_prefix(&self) -> std::option::Option<&str> {
        self.destination_prefix.as_deref()
    }
    /// <p>The status of the export task.</p>
    pub fn status(&self) -> std::option::Option<&crate::model::ExportTaskStatus> {
        self.status.as_ref()
    }
    /// <p>Execution information about the export task.</p>
    pub fn execution_info(&self) -> std::option::Option<&crate::model::ExportTaskExecutionInfo> {
        self.execution_info.as_ref()
    }
}
impl std::fmt::Debug for ExportTask {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ExportTask");
        formatter.field("task_id", &self.task_id);
        formatter.field("task_name", &self.task_name);
        formatter.field("log_group_name", &self.log_group_name);
        formatter.field("from", &self.from);
        formatter.field("to", &self.to);
        formatter.field("destination", &self.destination);
        formatter.field("destination_prefix", &self.destination_prefix);
        formatter.field("status", &self.status);
        formatter.field("execution_info", &self.execution_info);
        formatter.finish()
    }
}
/// See [`ExportTask`](crate::model::ExportTask)
pub mod export_task {
    /// A builder for [`ExportTask`](crate::model::ExportTask)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) task_id: std::option::Option<std::string::String>,
        pub(crate) task_name: std::option::Option<std::string::String>,
        pub(crate) log_group_name: std::option::Option<std::string::String>,
        pub(crate) from: std::option::Option<i64>,
        pub(crate) to: std::option::Option<i64>,
        pub(crate) destination: std::option::Option<std::string::String>,
        pub(crate) destination_prefix: std::option::Option<std::string::String>,
        pub(crate) status: std::option::Option<crate::model::ExportTaskStatus>,
        pub(crate) execution_info: std::option::Option<crate::model::ExportTaskExecutionInfo>,
    }
    impl Builder {
        /// <p>The ID of the export task.</p>
        pub fn task_id(mut self, input: impl Into<std::string::String>) -> Self {
            self.task_id = Some(input.into());
            self
        }
        /// <p>The ID of the export task.</p>
        pub fn set_task_id(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.task_id = input;
            self
        }
        /// <p>The name of the export task.</p>
        pub fn task_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.task_name = Some(input.into());
            self
        }
        /// <p>The name of the export task.</p>
        pub fn set_task_name(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.task_name = input;
            self
        }
        /// <p>The name of the log group from which logs data was exported.</p>
        pub fn log_group_name(mut self, input: impl Into<std::string::String>) -> Self {
            self.log_group_name = Some(input.into());
            self
        }
        /// <p>The name of the log group from which logs data was exported.</p>
        pub fn set_log_group_name(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.log_group_name = input;
            self
        }
        /// <p>The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        /// Events with a timestamp before this time are not exported.</p>
        pub fn from(mut self, input: i64) -> Self {
            self.from = Some(input);
            self
        }
        /// <p>The start time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        /// Events with a timestamp before this time are not exported.</p>
        pub fn set_from(mut self, input: std::option::Option<i64>) -> Self {
            self.from = input;
            self
        }
        /// <p>The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        /// Events with a timestamp later than this time are not exported.</p>
        pub fn to(mut self, input: i64) -> Self {
            self.to = Some(input);
            self
        }
        /// <p>The end time, expressed as the number of milliseconds after Jan 1, 1970 00:00:00 UTC.
        /// Events with a timestamp later than this time are not exported.</p>
        pub fn set_to(mut self, input: std::option::Option<i64>) -> Self {
            self.to = input;
            self
        }
        /// <p>The name of the S3 bucket to which the log data was exported.</p>
        pub fn destination(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination = Some(input.into());
            self
        }
        /// <p>The name of the S3 bucket to which the log data was exported.</p>
        pub fn set_destination(mut self, input: std::option::Option<std::string::String>) -> Self {
            self.destination = input;
            self
        }
        /// <p>The prefix that was used as the start of Amazon S3 key for every object exported.</p>
        pub fn destination_prefix(mut self, input: impl Into<std::string::String>) -> Self {
            self.destination_prefix = Some(input.into());
            self
        }
        /// <p>The prefix that was used as the start of Amazon S3 key for every object exported.</p>
        pub fn set_destination_prefix(
            mut self,
            input: std::option::Option<std::string::String>,
        ) -> Self {
            self.destination_prefix = input;
            self
        }
        /// <p>The status of the export task.</p>
        pub fn status(mut self, input: crate::model::ExportTaskStatus) -> Self {
            self.status = Some(input);
            self
        }
        /// <p>The status of the export task.</p>
        pub fn set_status(
            mut self,
            input: std::option::Option<crate::model::ExportTaskStatus>,
        ) -> Self {
            self.status = input;
            self
        }
        /// <p>Execution information about the export task.</p>
        pub fn execution_info(mut self, input: crate::model::ExportTaskExecutionInfo) -> Self {
            self.execution_info = Some(input);
            self
        }
        /// <p>Execution information about the export task.</p>
        pub fn set_execution_info(
            mut self,
            input: std::option::Option<crate::model::ExportTaskExecutionInfo>,
        ) -> Self {
            self.execution_info = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportTask`](crate::model::ExportTask)
        pub fn build(self) -> crate::model::ExportTask {
            crate::model::ExportTask {
                task_id: self.task_id,
                task_name: self.task_name,
                log_group_name: self.log_group_name,
                from: self.from,
                to: self.to,
                destination: self.destination,
                destination_prefix: self.destination_prefix,
                status: self.status,
                execution_info: self.execution_info,
            }
        }
    }
}
impl ExportTask {
    /// Creates a new builder-style object to manufacture [`ExportTask`](crate::model::ExportTask)
    pub fn builder() -> crate::model::export_task::Builder {
        crate::model::export_task::Builder::default()
    }
}

/// <p>Represents the status of an export task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExportTaskExecutionInfo {
    /// <p>The creation time of the export task, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub creation_time: std::option::Option<i64>,
    /// <p>The completion time of the export task, expressed as the number of milliseconds after
    /// Jan 1, 1970 00:00:00 UTC.</p>
    pub completion_time: std::option::Option<i64>,
}
impl ExportTaskExecutionInfo {
    /// <p>The creation time of the export task, expressed as the number of milliseconds after Jan
    /// 1, 1970 00:00:00 UTC.</p>
    pub fn creation_time(&self) -> std::option::Option<i64> {
        self.creation_time
    }
    /// <p>The completion time of the export task, expressed as the number of milliseconds after
    /// Jan 1, 1970 00:00:00 UTC.</p>
    pub fn completion_time(&self) -> std::option::Option<i64> {
        self.completion_time
    }
}
impl std::fmt::Debug for ExportTaskExecutionInfo {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ExportTaskExecutionInfo");
        formatter.field("creation_time", &self.creation_time);
        formatter.field("completion_time", &self.completion_time);
        formatter.finish()
    }
}
/// See [`ExportTaskExecutionInfo`](crate::model::ExportTaskExecutionInfo)
pub mod export_task_execution_info {
    /// A builder for [`ExportTaskExecutionInfo`](crate::model::ExportTaskExecutionInfo)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) creation_time: std::option::Option<i64>,
        pub(crate) completion_time: std::option::Option<i64>,
    }
    impl Builder {
        /// <p>The creation time of the export task, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn creation_time(mut self, input: i64) -> Self {
            self.creation_time = Some(input);
            self
        }
        /// <p>The creation time of the export task, expressed as the number of milliseconds after Jan
        /// 1, 1970 00:00:00 UTC.</p>
        pub fn set_creation_time(mut self, input: std::option::Option<i64>) -> Self {
            self.creation_time = input;
            self
        }
        /// <p>The completion time of the export task, expressed as the number of milliseconds after
        /// Jan 1, 1970 00:00:00 UTC.</p>
        pub fn completion_time(mut self, input: i64) -> Self {
            self.completion_time = Some(input);
            self
        }
        /// <p>The completion time of the export task, expressed as the number of milliseconds after
        /// Jan 1, 1970 00:00:00 UTC.</p>
        pub fn set_completion_time(mut self, input: std::option::Option<i64>) -> Self {
            self.completion_time = input;
            self
        }
        /// Consumes the builder and constructs a [`ExportTaskExecutionInfo`](crate::model::ExportTaskExecutionInfo)
        pub fn build(self) -> crate::model::ExportTaskExecutionInfo {
            crate::model::ExportTaskExecutionInfo {
                creation_time: self.creation_time,
                completion_time: self.completion_time,
            }
        }
    }
}
impl ExportTaskExecutionInfo {
    /// Creates a new builder-style object to manufacture [`ExportTaskExecutionInfo`](crate::model::ExportTaskExecutionInfo)
    pub fn builder() -> crate::model::export_task_execution_info::Builder {
        crate::model::export_task_execution_info::Builder::default()
    }
}

/// <p>Represents the status of an export task.</p>
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq)]
pub struct ExportTaskStatus {
    /// <p>The status code of the export task.</p>
    pub code: std::option::Option<crate::model::ExportTaskStatusCode>,
    /// <p>The status message related to the status code.</p>
    pub message: std::option::Option<std::string::String>,
}
impl ExportTaskStatus {
    /// <p>The status code of the export task.</p>
    pub fn code(&self) -> std::option::Option<&crate::model::ExportTaskStatusCode> {
        self.code.as_ref()
    }
    /// <p>The status message related to the status code.</p>
    pub fn message(&self) -> std::option::Option<&str> {
        self.message.as_deref()
    }
}
impl std::fmt::Debug for ExportTaskStatus {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        let mut formatter = f.debug_struct("ExportTaskStatus");
        formatter.field("code", &self.code);
        formatter.field("message", &self.message);
        formatter.finish()
    }
}
/// See [`ExportTaskStatus`](crate::model::ExportTaskStatus)
pub mod export_task_status {
    /// A builder for [`ExportTaskStatus`](crate::model::ExportTaskStatus)
    #[non_exhaustive]
    #[derive(std::default::Default, std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
    pub struct Builder {
        pub(crate) code: std::option::Option<crate::model::ExportTaskStatusCode>,
        pub(crate) message: std::option::Option<std::string::String>,
    }
    impl Builder {
        /// <p>The status code of the export task.</p>
        pub fn code(mut self, input: crate::model::ExportTaskStatusCode) -> Self {
            self.code = Some(input);
            self
        }
        /// <p>The status code of the export task.</p>
        pub fn set_code(
            mut self,
            input: std::option::Option<crate::model::ExportTaskStatusCode>,
        ) -> Self {
            self.code = input;
            self
        }
        /// <p>The status message related to the status code.</p>
        pub fn message(mut self, input: impl Into<std::string::String>) -> Self {
            self.message = Some(input.into());
            self
        }
        /// <p>The status message related to the status code.</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 [`ExportTaskStatus`](crate::model::ExportTaskStatus)
        pub fn build(self) -> crate::model::ExportTaskStatus {
            crate::model::ExportTaskStatus {
                code: self.code,
                message: self.message,
            }
        }
    }
}
impl ExportTaskStatus {
    /// Creates a new builder-style object to manufacture [`ExportTaskStatus`](crate::model::ExportTaskStatus)
    pub fn builder() -> crate::model::export_task_status::Builder {
        crate::model::export_task_status::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 ExportTaskStatusCode {
    #[allow(missing_docs)] // documentation missing in model
    Cancelled,
    #[allow(missing_docs)] // documentation missing in model
    Completed,
    #[allow(missing_docs)] // documentation missing in model
    Failed,
    #[allow(missing_docs)] // documentation missing in model
    Pending,
    #[allow(missing_docs)] // documentation missing in model
    PendingCancel,
    #[allow(missing_docs)] // documentation missing in model
    Running,
    /// Unknown contains new variants that have been added since this code was generated.
    Unknown(String),
}
impl std::convert::From<&str> for ExportTaskStatusCode {
    fn from(s: &str) -> Self {
        match s {
            "CANCELLED" => ExportTaskStatusCode::Cancelled,
            "COMPLETED" => ExportTaskStatusCode::Completed,
            "FAILED" => ExportTaskStatusCode::Failed,
            "PENDING" => ExportTaskStatusCode::Pending,
            "PENDING_CANCEL" => ExportTaskStatusCode::PendingCancel,
            "RUNNING" => ExportTaskStatusCode::Running,
            other => ExportTaskStatusCode::Unknown(other.to_owned()),
        }
    }
}
impl std::str::FromStr for ExportTaskStatusCode {
    type Err = std::convert::Infallible;

    fn from_str(s: &str) -> std::result::Result<Self, Self::Err> {
        Ok(ExportTaskStatusCode::from(s))
    }
}
impl ExportTaskStatusCode {
    /// Returns the `&str` value of the enum member.
    pub fn as_str(&self) -> &str {
        match self {
            ExportTaskStatusCode::Cancelled => "CANCELLED",
            ExportTaskStatusCode::Completed => "COMPLETED",
            ExportTaskStatusCode::Failed => "FAILED",
            ExportTaskStatusCode::Pending => "PENDING",
            ExportTaskStatusCode::PendingCancel => "PENDING_CANCEL",
            ExportTaskStatusCode::Running => "RUNNING",
            ExportTaskStatusCode::Unknown(s) => s.as_ref(),
        }
    }
    /// Returns all the `&str` values of the enum members.
    pub fn values() -> &'static [&'static str] {
        &[
            "CANCELLED",
            "COMPLETED",
            "FAILED",
            "PENDING",
            "PENDING_CANCEL",
            "RUNNING",
        ]
    }
}
impl AsRef<str> for ExportTaskStatusCode {
    fn as_ref(&self) -> &str {
        self.as_str()
    }
}