1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555

// =================================================================
//
//                           * WARNING *
//
//                    This file is generated!
//
//  Changes made to this file will be overwritten. If changes are
//  required to the generated code, the service_crategen project
//  must be updated to generate the changes.
//
// =================================================================

#[allow(warnings)]
use hyper::Client;
use hyper::status::StatusCode;
use rusoto_core::request::DispatchSignedRequest;
use rusoto_core::region;

use std::fmt;
use std::error::Error;
use std::io;
use std::io::Read;
use rusoto_core::request::HttpDispatchError;
use rusoto_core::credential::{CredentialsError, ProvideAwsCredentials};

use serde_json;
use rusoto_core::signature::SignedRequest;
use serde_json::Value as SerdeJsonValue;
use serde_json::from_str;
#[doc="<p>Indicates whether an AWS resource or AWS Config rule is compliant and provides the number of contributors that affect the compliance.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct Compliance {
    #[doc="<p>The number of AWS resources or AWS Config rules that cause a result of <code>NON_COMPLIANT</code>, up to a maximum number.</p>"]
    #[serde(rename="ComplianceContributorCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_contributor_count: Option<ComplianceContributorCount>,
    #[doc="<p>Indicates whether an AWS resource or AWS Config rule is compliant.</p> <p>A resource is compliant if it complies with all of the AWS Config rules that evaluate it, and it is noncompliant if it does not comply with one or more of these rules.</p> <p>A rule is compliant if all of the resources that the rule evaluates comply with it, and it is noncompliant if any of these resources do not comply.</p> <p>AWS Config returns the <code>INSUFFICIENT_DATA</code> value when no evaluation results are available for the AWS resource or Config rule.</p> <p>For the <code>Compliance</code> data type, AWS Config supports only <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>INSUFFICIENT_DATA</code> values. AWS Config does not support the <code>NOT_APPLICABLE</code> value for the <code>Compliance</code> data type.</p>"]
    #[serde(rename="ComplianceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_type: Option<String>,
}

#[doc="<p>Indicates whether an AWS Config rule is compliant. A rule is compliant if all of the resources that the rule evaluated comply with it, and it is noncompliant if any of these resources do not comply.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ComplianceByConfigRule {
    #[doc="<p>Indicates whether the AWS Config rule is compliant.</p>"]
    #[serde(rename="Compliance")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance: Option<Compliance>,
    #[doc="<p>The name of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_name: Option<String>,
}

#[doc="<p>Indicates whether an AWS resource that is evaluated according to one or more AWS Config rules is compliant. A resource is compliant if it complies with all of the rules that evaluate it, and it is noncompliant if it does not comply with one or more of these rules.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ComplianceByResource {
    #[doc="<p>Indicates whether the AWS resource complies with all of the AWS Config rules that evaluated it.</p>"]
    #[serde(rename="Compliance")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance: Option<Compliance>,
    #[doc="<p>The ID of the AWS resource that was evaluated.</p>"]
    #[serde(rename="ResourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The type of the AWS resource that was evaluated.</p>"]
    #[serde(rename="ResourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p>The number of AWS resources or AWS Config rules responsible for the current compliance of the item, up to a maximum number.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ComplianceContributorCount {
    #[doc="<p>Indicates whether the maximum count is reached.</p>"]
    #[serde(rename="CapExceeded")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub cap_exceeded: Option<bool>,
    #[doc="<p>The number of AWS resources or AWS Config rules responsible for the current compliance of the item.</p>"]
    #[serde(rename="CappedCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub capped_count: Option<i64>,
}

#[doc="<p>The number of AWS Config rules or AWS resources that are compliant and noncompliant.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ComplianceSummary {
    #[doc="<p>The time that AWS Config created the compliance summary.</p>"]
    #[serde(rename="ComplianceSummaryTimestamp")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_summary_timestamp: Option<f64>,
    #[doc="<p>The number of AWS Config rules or AWS resources that are compliant, up to a maximum of 25 for rules and 100 for resources.</p>"]
    #[serde(rename="CompliantResourceCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliant_resource_count: Option<ComplianceContributorCount>,
    #[doc="<p>The number of AWS Config rules or AWS resources that are noncompliant, up to a maximum of 25 for rules and 100 for resources.</p>"]
    #[serde(rename="NonCompliantResourceCount")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub non_compliant_resource_count: Option<ComplianceContributorCount>,
}

#[doc="<p>The number of AWS resources of a specific type that are compliant or noncompliant, up to a maximum of 100 for each compliance.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ComplianceSummaryByResourceType {
    #[doc="<p>The number of AWS resources that are compliant or noncompliant, up to a maximum of 100 for each compliance.</p>"]
    #[serde(rename="ComplianceSummary")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_summary: Option<ComplianceSummary>,
    #[doc="<p>The type of AWS resource.</p>"]
    #[serde(rename="ResourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p>A list that contains the status of the delivery of either the snapshot or the configuration history to the specified Amazon S3 bucket.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ConfigExportDeliveryInfo {
    #[doc="<p>The time of the last attempted delivery.</p>"]
    #[serde(rename="lastAttemptTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_attempt_time: Option<f64>,
    #[doc="<p>The error code from the last attempted delivery.</p>"]
    #[serde(rename="lastErrorCode")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_code: Option<String>,
    #[doc="<p>The error message from the last attempted delivery.</p>"]
    #[serde(rename="lastErrorMessage")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_message: Option<String>,
    #[doc="<p>Status of the last attempted delivery.</p>"]
    #[serde(rename="lastStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_status: Option<String>,
    #[doc="<p>The time of the last successful delivery.</p>"]
    #[serde(rename="lastSuccessfulTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_successful_time: Option<f64>,
    #[doc="<p>The time that the next delivery occurs.</p>"]
    #[serde(rename="nextDeliveryTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_delivery_time: Option<f64>,
}

#[doc="<p>An AWS Config rule represents an AWS Lambda function that you create for a custom rule or a predefined function for an AWS managed rule. The function evaluates configuration items to assess whether your AWS resources comply with your desired configurations. This function can run when AWS Config detects a configuration change to an AWS resource and at a periodic frequency that you choose (for example, every 24 hours).</p> <note> <p>You can use the AWS CLI and AWS SDKs if you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot. For more information, see <a>ConfigSnapshotDeliveryProperties</a>.</p> </note> <p>For more information about developing and using AWS Config rules, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html\">Evaluating AWS Resource Configurations with AWS Config</a> in the <i>AWS Config Developer Guide</i>.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ConfigRule {
    #[doc="<p>The Amazon Resource Name (ARN) of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleArn")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_arn: Option<String>,
    #[doc="<p>The ID of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_id: Option<String>,
    #[doc="<p>The name that you assign to the AWS Config rule. The name is required if you are adding a new rule.</p>"]
    #[serde(rename="ConfigRuleName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_name: Option<String>,
    #[doc="<p>Indicates whether the AWS Config rule is active or is currently being deleted by AWS Config. It can also indicate the evaluation status for the Config rule.</p> <p>AWS Config sets the state of the rule to <code>EVALUATING</code> temporarily after you use the <code>StartConfigRulesEvaluation</code> request to evaluate your resources against the Config rule.</p> <p>AWS Config sets the state of the rule to <code>DELETING_RESULTS</code> temporarily after you use the <code>DeleteEvaluationResults</code> request to delete the current evaluation results for the Config rule.</p> <p>AWS Config sets the state of a rule to <code>DELETING</code> temporarily after you use the <code>DeleteConfigRule</code> request to delete the rule. After AWS Config deletes the rule, the rule and all of its evaluations are erased and are no longer available.</p>"]
    #[serde(rename="ConfigRuleState")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_state: Option<String>,
    #[doc="<p>The description that you provide for the AWS Config rule.</p>"]
    #[serde(rename="Description")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub description: Option<String>,
    #[doc="<p>A string in JSON format that is passed to the AWS Config rule Lambda function.</p>"]
    #[serde(rename="InputParameters")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub input_parameters: Option<String>,
    #[doc="<p>The maximum frequency with which AWS Config runs evaluations for a rule. You can specify a value for <code>MaximumExecutionFrequency</code> when:</p> <ul> <li> <p>You are using an AWS managed rule that is triggered at a periodic frequency.</p> </li> <li> <p>Your custom rule is triggered when AWS Config delivers the configuration snapshot. For more information, see <a>ConfigSnapshotDeliveryProperties</a>.</p> </li> </ul> <note> <p>By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the <code>MaximumExecutionFrequency</code> parameter.</p> </note>"]
    #[serde(rename="MaximumExecutionFrequency")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub maximum_execution_frequency: Option<String>,
    #[doc="<p>Defines which resources can trigger an evaluation for the rule. The scope can include one or more resource types, a combination of one resource type and one resource ID, or a combination of a tag key and value. Specify a scope to constrain the resources that can trigger an evaluation for the rule. If you do not specify a scope, evaluations are triggered when any resource in the recording group changes.</p>"]
    #[serde(rename="Scope")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub scope: Option<Scope>,
    #[doc="<p>Provides the rule owner (AWS or customer), the rule identifier, and the notifications that cause the function to evaluate your AWS resources.</p>"]
    #[serde(rename="Source")]
    pub source: Source,
}

#[doc="<p>Status information for your AWS managed Config rules. The status includes information such as the last time the rule ran, the last time it failed, and the related error for the last failure.</p> <p>This action does not return status information about custom Config rules.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ConfigRuleEvaluationStatus {
    #[doc="<p>The Amazon Resource Name (ARN) of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleArn")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_arn: Option<String>,
    #[doc="<p>The ID of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_id: Option<String>,
    #[doc="<p>The name of the AWS Config rule.</p>"]
    #[serde(rename="ConfigRuleName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_name: Option<String>,
    #[doc="<p>The time that you first activated the AWS Config rule.</p>"]
    #[serde(rename="FirstActivatedTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub first_activated_time: Option<f64>,
    #[doc="<p>Indicates whether AWS Config has evaluated your resources against the rule at least once.</p> <ul> <li> <p> <code>true</code> - AWS Config has evaluated your AWS resources against the rule at least once.</p> </li> <li> <p> <code>false</code> - AWS Config has not once finished evaluating your AWS resources against the rule.</p> </li> </ul>"]
    #[serde(rename="FirstEvaluationStarted")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub first_evaluation_started: Option<bool>,
    #[doc="<p>The error code that AWS Config returned when the rule last failed.</p>"]
    #[serde(rename="LastErrorCode")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_code: Option<String>,
    #[doc="<p>The error message that AWS Config returned when the rule last failed.</p>"]
    #[serde(rename="LastErrorMessage")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_message: Option<String>,
    #[doc="<p>The time that AWS Config last failed to evaluate your AWS resources against the rule.</p>"]
    #[serde(rename="LastFailedEvaluationTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_failed_evaluation_time: Option<f64>,
    #[doc="<p>The time that AWS Config last failed to invoke the AWS Config rule to evaluate your AWS resources.</p>"]
    #[serde(rename="LastFailedInvocationTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_failed_invocation_time: Option<f64>,
    #[doc="<p>The time that AWS Config last successfully evaluated your AWS resources against the rule.</p>"]
    #[serde(rename="LastSuccessfulEvaluationTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_successful_evaluation_time: Option<f64>,
    #[doc="<p>The time that AWS Config last successfully invoked the AWS Config rule to evaluate your AWS resources.</p>"]
    #[serde(rename="LastSuccessfulInvocationTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_successful_invocation_time: Option<f64>,
}

#[doc="<p>Provides options for how often AWS Config delivers configuration snapshots to the Amazon S3 bucket in your delivery channel.</p> <note> <p>If you want to create a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot, see the following:</p> </note> <p>The frequency for a rule that triggers evaluations for your resources when AWS Config delivers the configuration snapshot is set by one of two values, depending on which is less frequent:</p> <ul> <li> <p>The value for the <code>deliveryFrequency</code> parameter within the delivery channel configuration, which sets how often AWS Config delivers configuration snapshots. This value also sets how often AWS Config invokes evaluations for Config rules.</p> </li> <li> <p>The value for the <code>MaximumExecutionFrequency</code> parameter, which sets the maximum frequency with which AWS Config invokes evaluations for the rule. For more information, see <a>ConfigRule</a>.</p> </li> </ul> <p>If the <code>deliveryFrequency</code> value is less frequent than the <code>MaximumExecutionFrequency</code> value for a rule, AWS Config invokes the rule only as often as the <code>deliveryFrequency</code> value.</p> <ol> <li> <p>For example, you want your rule to run evaluations when AWS Config delivers the configuration snapshot.</p> </li> <li> <p>You specify the <code>MaximumExecutionFrequency</code> value for <code>Six_Hours</code>. </p> </li> <li> <p>You then specify the delivery channel <code>deliveryFrequency</code> value for <code>TwentyFour_Hours</code>.</p> </li> <li> <p>Because the value for <code>deliveryFrequency</code> is less frequent than <code>MaximumExecutionFrequency</code>, AWS Config invokes evaluations for the rule every 24 hours. </p> </li> </ol> <p>You should set the <code>MaximumExecutionFrequency</code> value to be at least as frequent as the <code>deliveryFrequency</code> value. You can view the <code>deliveryFrequency</code> value by using the <code>DescribeDeliveryChannnels</code> action.</p> <p>To update the <code>deliveryFrequency</code> with which AWS Config delivers your configuration snapshots, use the <code>PutDeliveryChannel</code> action.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ConfigSnapshotDeliveryProperties {
    #[doc="<p>The frequency with which AWS Config delivers configuration snapshots.</p>"]
    #[serde(rename="deliveryFrequency")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub delivery_frequency: Option<String>,
}

#[doc="<p>A list that contains the status of the delivery of the configuration stream notification to the Amazon SNS topic.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ConfigStreamDeliveryInfo {
    #[doc="<p>The error code from the last attempted delivery.</p>"]
    #[serde(rename="lastErrorCode")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_code: Option<String>,
    #[doc="<p>The error message from the last attempted delivery.</p>"]
    #[serde(rename="lastErrorMessage")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_message: Option<String>,
    #[doc="<p>Status of the last attempted delivery.</p> <p> <b>Note</b> Providing an SNS topic on a <a href=\"http://docs.aws.amazon.com/config/latest/APIReference/API_DeliveryChannel.html\">DeliveryChannel</a> for AWS Config is optional. If the SNS delivery is turned off, the last status will be <b>Not_Applicable</b>.</p>"]
    #[serde(rename="lastStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_status: Option<String>,
    #[doc="<p>The time from the last status change.</p>"]
    #[serde(rename="lastStatusChangeTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_status_change_time: Option<f64>,
}

#[doc="<p>A list that contains detailed configurations of a specified resource.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ConfigurationItem {
    #[doc="<p>The 12 digit AWS account ID associated with the resource.</p>"]
    #[serde(rename="accountId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub account_id: Option<String>,
    #[doc="<p>The Amazon Resource Name (ARN) of the resource.</p>"]
    #[serde(rename="arn")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub arn: Option<String>,
    #[doc="<p>The Availability Zone associated with the resource.</p>"]
    #[serde(rename="availabilityZone")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub availability_zone: Option<String>,
    #[doc="<p>The region where the resource resides.</p>"]
    #[serde(rename="awsRegion")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub aws_region: Option<String>,
    #[doc="<p>The description of the resource configuration.</p>"]
    #[serde(rename="configuration")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration: Option<String>,
    #[doc="<p>The time when the configuration recording was initiated.</p>"]
    #[serde(rename="configurationItemCaptureTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_item_capture_time: Option<f64>,
    #[doc="<p>Unique MD5 hash that represents the configuration item's state.</p> <p>You can use MD5 hash to compare the states of two or more configuration items that are associated with the same resource.</p>"]
    #[serde(rename="configurationItemMD5Hash")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_item_md5_hash: Option<String>,
    #[doc="<p>The configuration item status.</p>"]
    #[serde(rename="configurationItemStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_item_status: Option<String>,
    #[doc="<p>An identifier that indicates the ordering of the configuration items of a resource.</p>"]
    #[serde(rename="configurationStateId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_state_id: Option<String>,
    #[doc="<p>A list of CloudTrail event IDs.</p> <p>A populated field indicates that the current configuration was initiated by the events recorded in the CloudTrail log. For more information about CloudTrail, see <a href=\"http://docs.aws.amazon.com/awscloudtrail/latest/userguide/what_is_cloud_trail_top_level.html\">What is AWS CloudTrail?</a>.</p> <p>An empty field indicates that the current configuration was not initiated by any event.</p>"]
    #[serde(rename="relatedEvents")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub related_events: Option<Vec<String>>,
    #[doc="<p>A list of related AWS resources.</p>"]
    #[serde(rename="relationships")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub relationships: Option<Vec<Relationship>>,
    #[doc="<p>The time stamp when the resource was created.</p>"]
    #[serde(rename="resourceCreationTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_creation_time: Option<f64>,
    #[doc="<p>The ID of the resource (for example., <code>sg-xxxxxx</code>).</p>"]
    #[serde(rename="resourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The custom name of the resource, if available.</p>"]
    #[serde(rename="resourceName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_name: Option<String>,
    #[doc="<p>The type of AWS resource.</p>"]
    #[serde(rename="resourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
    #[doc="<p>Configuration attributes that AWS Config returns for certain resource types to supplement the information returned for the <code>configuration</code> parameter.</p>"]
    #[serde(rename="supplementaryConfiguration")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub supplementary_configuration: Option<::std::collections::HashMap<String, String>>,
    #[doc="<p>A mapping of key value tags associated with the resource.</p>"]
    #[serde(rename="tags")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub tags: Option<::std::collections::HashMap<String, String>>,
    #[doc="<p>The version number of the resource configuration.</p>"]
    #[serde(rename="version")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub version: Option<String>,
}

#[doc="<p>An object that represents the recording of configuration changes of an AWS resource.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct ConfigurationRecorder {
    #[doc="<p>The name of the recorder. By default, AWS Config automatically assigns the name \"default\" when creating the configuration recorder. You cannot change the assigned name.</p>"]
    #[serde(rename="name")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub name: Option<String>,
    #[doc="<p>Specifies the types of AWS resource for which AWS Config records configuration changes.</p>"]
    #[serde(rename="recordingGroup")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub recording_group: Option<RecordingGroup>,
    #[doc="<p>Amazon Resource Name (ARN) of the IAM role used to describe the AWS resources associated with the account.</p>"]
    #[serde(rename="roleARN")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub role_arn: Option<String>,
}

#[doc="<p>The current status of the configuration recorder.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ConfigurationRecorderStatus {
    #[doc="<p>The error code indicating that the recording failed.</p>"]
    #[serde(rename="lastErrorCode")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_code: Option<String>,
    #[doc="<p>The message indicating that the recording failed due to an error.</p>"]
    #[serde(rename="lastErrorMessage")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_error_message: Option<String>,
    #[doc="<p>The time the recorder was last started.</p>"]
    #[serde(rename="lastStartTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_start_time: Option<f64>,
    #[doc="<p>The last (previous) status of the recorder.</p>"]
    #[serde(rename="lastStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_status: Option<String>,
    #[doc="<p>The time when the status was last changed.</p>"]
    #[serde(rename="lastStatusChangeTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_status_change_time: Option<f64>,
    #[doc="<p>The time the recorder was last stopped.</p>"]
    #[serde(rename="lastStopTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub last_stop_time: Option<f64>,
    #[doc="<p>The name of the configuration recorder.</p>"]
    #[serde(rename="name")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub name: Option<String>,
    #[doc="<p>Specifies whether the recorder is currently recording or not.</p>"]
    #[serde(rename="recording")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub recording: Option<bool>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeleteConfigRuleRequest {
    #[doc="<p>The name of the AWS Config rule that you want to delete.</p>"]
    #[serde(rename="ConfigRuleName")]
    pub config_rule_name: String,
}

#[doc="<p>The request object for the <code>DeleteConfigurationRecorder</code> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeleteConfigurationRecorderRequest {
    #[doc="<p>The name of the configuration recorder to be deleted. You can retrieve the name of your configuration recorder by using the <code>DescribeConfigurationRecorders</code> action.</p>"]
    #[serde(rename="ConfigurationRecorderName")]
    pub configuration_recorder_name: String,
}

#[doc="<p>The input for the <a>DeleteDeliveryChannel</a> action. The action accepts the following data in JSON format. </p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeleteDeliveryChannelRequest {
    #[doc="<p>The name of the delivery channel to delete.</p>"]
    #[serde(rename="DeliveryChannelName")]
    pub delivery_channel_name: String,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeleteEvaluationResultsRequest {
    #[doc="<p>The name of the Config rule for which you want to delete the evaluation results.</p>"]
    #[serde(rename="ConfigRuleName")]
    pub config_rule_name: String,
}

#[doc="<p>The output when you delete the evaluation results for the specified Config rule.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DeleteEvaluationResultsResponse;

#[doc="<p>The input for the <a>DeliverConfigSnapshot</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DeliverConfigSnapshotRequest {
    #[doc="<p>The name of the delivery channel through which the snapshot is delivered.</p>"]
    #[serde(rename="deliveryChannelName")]
    pub delivery_channel_name: String,
}

#[doc="<p>The output for the <a>DeliverConfigSnapshot</a> action in JSON format.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DeliverConfigSnapshotResponse {
    #[doc="<p>The ID of the snapshot that is being created.</p>"]
    #[serde(rename="configSnapshotId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_snapshot_id: Option<String>,
}

#[doc="<p>The channel through which AWS Config delivers notifications and updated configuration states.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct DeliveryChannel {
    #[doc="<p>The options for how often AWS Config delivers configuration snapshots to the Amazon S3 bucket.</p>"]
    #[serde(rename="configSnapshotDeliveryProperties")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_snapshot_delivery_properties: Option<ConfigSnapshotDeliveryProperties>,
    #[doc="<p>The name of the delivery channel. By default, AWS Config assigns the name \"default\" when creating the delivery channel. To change the delivery channel name, you must use the DeleteDeliveryChannel action to delete your current delivery channel, and then you must use the PutDeliveryChannel command to create a delivery channel that has the desired name.</p>"]
    #[serde(rename="name")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub name: Option<String>,
    #[doc="<p>The name of the Amazon S3 bucket to which AWS Config delivers configuration snapshots and configuration history files.</p> <p>If you specify a bucket that belongs to another AWS account, that bucket must have policies that grant access permissions to AWS Config. For more information, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/s3-bucket-policy.html\">Permissions for the Amazon S3 Bucket</a> in the AWS Config Developer Guide.</p>"]
    #[serde(rename="s3BucketName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub s_3_bucket_name: Option<String>,
    #[doc="<p>The prefix for the specified Amazon S3 bucket.</p>"]
    #[serde(rename="s3KeyPrefix")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub s_3_key_prefix: Option<String>,
    #[doc="<p>The Amazon Resource Name (ARN) of the Amazon SNS topic to which AWS Config sends notifications about configuration changes.</p> <p>If you choose a topic from another account, the topic must have policies that grant access permissions to AWS Config. For more information, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/sns-topic-policy.html\">Permissions for the Amazon SNS Topic</a> in the AWS Config Developer Guide.</p>"]
    #[serde(rename="snsTopicARN")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub sns_topic_arn: Option<String>,
}

#[doc="<p>The status of a specified delivery channel.</p> <p>Valid values: <code>Success</code> | <code>Failure</code> </p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DeliveryChannelStatus {
    #[doc="<p>A list that contains the status of the delivery of the configuration history to the specified Amazon S3 bucket.</p>"]
    #[serde(rename="configHistoryDeliveryInfo")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_history_delivery_info: Option<ConfigExportDeliveryInfo>,
    #[doc="<p>A list containing the status of the delivery of the snapshot to the specified Amazon S3 bucket.</p>"]
    #[serde(rename="configSnapshotDeliveryInfo")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_snapshot_delivery_info: Option<ConfigExportDeliveryInfo>,
    #[doc="<p>A list containing the status of the delivery of the configuration stream notification to the specified Amazon SNS topic.</p>"]
    #[serde(rename="configStreamDeliveryInfo")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_stream_delivery_info: Option<ConfigStreamDeliveryInfo>,
    #[doc="<p>The name of the delivery channel.</p>"]
    #[serde(rename="name")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub name: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeComplianceByConfigRuleRequest {
    #[doc="<p>Filters the results by compliance.</p> <p>The allowed values are <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>INSUFFICIENT_DATA</code>.</p>"]
    #[serde(rename="ComplianceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_types: Option<Vec<String>>,
    #[doc="<p>Specify one or more AWS Config rule names to filter the results by rule.</p>"]
    #[serde(rename="ConfigRuleNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_names: Option<Vec<String>>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeComplianceByConfigRuleResponse {
    #[doc="<p>Indicates whether each of the specified AWS Config rules is compliant.</p>"]
    #[serde(rename="ComplianceByConfigRules")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_by_config_rules: Option<Vec<ComplianceByConfigRule>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeComplianceByResourceRequest {
    #[doc="<p>Filters the results by compliance.</p> <p>The allowed values are <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>INSUFFICIENT_DATA</code>.</p>"]
    #[serde(rename="ComplianceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_types: Option<Vec<String>>,
    #[doc="<p>The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.</p>"]
    #[serde(rename="Limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the AWS resource for which you want compliance information. You can specify only one resource ID. If you specify a resource ID, you must also specify a type for <code>ResourceType</code>.</p>"]
    #[serde(rename="ResourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The types of AWS resources for which you want compliance information; for example, <code>AWS::EC2::Instance</code>. For this action, you can specify that the resource type is an AWS account by specifying <code>AWS::::Account</code>.</p>"]
    #[serde(rename="ResourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeComplianceByResourceResponse {
    #[doc="<p>Indicates whether the specified AWS resource complies with all of the AWS Config rules that evaluate it.</p>"]
    #[serde(rename="ComplianceByResources")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_by_resources: Option<Vec<ComplianceByResource>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeConfigRuleEvaluationStatusRequest {
    #[doc="<p>The name of the AWS managed Config rules for which you want status information. If you do not specify any names, AWS Config returns status information for all AWS managed Config rules that you use.</p>"]
    #[serde(rename="ConfigRuleNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_names: Option<Vec<String>>,
    #[doc="<p>The number of rule evaluation results that you want returned.</p> <p>This parameter is required if the rule limit for your account is more than the default of 50 rules.</p> <p>For more information about requesting a rule limit increase, see <a href=\"http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config\">AWS Config Limits</a> in the <i>AWS General Reference Guide</i>.</p>"]
    #[serde(rename="Limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeConfigRuleEvaluationStatusResponse {
    #[doc="<p>Status information about your AWS managed Config rules.</p>"]
    #[serde(rename="ConfigRulesEvaluationStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rules_evaluation_status: Option<Vec<ConfigRuleEvaluationStatus>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeConfigRulesRequest {
    #[doc="<p>The names of the AWS Config rules for which you want details. If you do not specify any names, AWS Config returns details for all your rules.</p>"]
    #[serde(rename="ConfigRuleNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_names: Option<Vec<String>>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeConfigRulesResponse {
    #[doc="<p>The details about your AWS Config rules.</p>"]
    #[serde(rename="ConfigRules")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rules: Option<Vec<ConfigRule>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p>The input for the <a>DescribeConfigurationRecorderStatus</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeConfigurationRecorderStatusRequest {
    #[doc="<p>The name(s) of the configuration recorder. If the name is not specified, the action returns the current status of all the configuration recorders associated with the account.</p>"]
    #[serde(rename="ConfigurationRecorderNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_recorder_names: Option<Vec<String>>,
}

#[doc="<p>The output for the <a>DescribeConfigurationRecorderStatus</a> action in JSON format.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeConfigurationRecorderStatusResponse {
    #[doc="<p>A list that contains status of the specified recorders.</p>"]
    #[serde(rename="ConfigurationRecordersStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_recorders_status: Option<Vec<ConfigurationRecorderStatus>>,
}

#[doc="<p>The input for the <a>DescribeConfigurationRecorders</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeConfigurationRecordersRequest {
    #[doc="<p>A list of configuration recorder names.</p>"]
    #[serde(rename="ConfigurationRecorderNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_recorder_names: Option<Vec<String>>,
}

#[doc="<p>The output for the <a>DescribeConfigurationRecorders</a> action.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeConfigurationRecordersResponse {
    #[doc="<p>A list that contains the descriptions of the specified configuration recorders.</p>"]
    #[serde(rename="ConfigurationRecorders")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_recorders: Option<Vec<ConfigurationRecorder>>,
}

#[doc="<p>The input for the <a>DeliveryChannelStatus</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeDeliveryChannelStatusRequest {
    #[doc="<p>A list of delivery channel names.</p>"]
    #[serde(rename="DeliveryChannelNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub delivery_channel_names: Option<Vec<String>>,
}

#[doc="<p>The output for the <a>DescribeDeliveryChannelStatus</a> action.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeDeliveryChannelStatusResponse {
    #[doc="<p>A list that contains the status of a specified delivery channel.</p>"]
    #[serde(rename="DeliveryChannelsStatus")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub delivery_channels_status: Option<Vec<DeliveryChannelStatus>>,
}

#[doc="<p>The input for the <a>DescribeDeliveryChannels</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct DescribeDeliveryChannelsRequest {
    #[doc="<p>A list of delivery channel names.</p>"]
    #[serde(rename="DeliveryChannelNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub delivery_channel_names: Option<Vec<String>>,
}

#[doc="<p>The output for the <a>DescribeDeliveryChannels</a> action.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct DescribeDeliveryChannelsResponse {
    #[doc="<p>A list that contains the descriptions of the specified delivery channel.</p>"]
    #[serde(rename="DeliveryChannels")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub delivery_channels: Option<Vec<DeliveryChannel>>,
}

#[doc="<p>Identifies an AWS resource and indicates whether it complies with the AWS Config rule that it was evaluated against.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct Evaluation {
    #[doc="<p>Supplementary information about how the evaluation determined the compliance.</p>"]
    #[serde(rename="Annotation")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub annotation: Option<String>,
    #[doc="<p>The ID of the AWS resource that was evaluated.</p>"]
    #[serde(rename="ComplianceResourceId")]
    pub compliance_resource_id: String,
    #[doc="<p>The type of AWS resource that was evaluated.</p>"]
    #[serde(rename="ComplianceResourceType")]
    pub compliance_resource_type: String,
    #[doc="<p>Indicates whether the AWS resource complies with the AWS Config rule that it was evaluated against.</p> <p>For the <code>Evaluation</code> data type, AWS Config supports only the <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>NOT_APPLICABLE</code> values. AWS Config does not support the <code>INSUFFICIENT_DATA</code> value for this data type.</p> <p>Similarly, AWS Config does not accept <code>INSUFFICIENT_DATA</code> as the value for <code>ComplianceType</code> from a <code>PutEvaluations</code> request. For example, an AWS Lambda function for a custom Config rule cannot pass an <code>INSUFFICIENT_DATA</code> value to AWS Config.</p>"]
    #[serde(rename="ComplianceType")]
    pub compliance_type: String,
    #[doc="<p>The time of the event in AWS Config that triggered the evaluation. For event-based evaluations, the time indicates when AWS Config created the configuration item that triggered the evaluation. For periodic evaluations, the time indicates when AWS Config triggered the evaluation at the frequency that you specified (for example, every 24 hours).</p>"]
    #[serde(rename="OrderingTimestamp")]
    pub ordering_timestamp: f64,
}

#[doc="<p>The details of an AWS Config evaluation. Provides the AWS resource that was evaluated, the compliance of the resource, related timestamps, and supplementary information.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct EvaluationResult {
    #[doc="<p>Supplementary information about how the evaluation determined the compliance.</p>"]
    #[serde(rename="Annotation")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub annotation: Option<String>,
    #[doc="<p>Indicates whether the AWS resource complies with the AWS Config rule that evaluated it.</p> <p>For the <code>EvaluationResult</code> data type, AWS Config supports only the <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>NOT_APPLICABLE</code> values. AWS Config does not support the <code>INSUFFICIENT_DATA</code> value for the <code>EvaluationResult</code> data type.</p>"]
    #[serde(rename="ComplianceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_type: Option<String>,
    #[doc="<p>The time when the AWS Config rule evaluated the AWS resource.</p>"]
    #[serde(rename="ConfigRuleInvokedTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_invoked_time: Option<f64>,
    #[doc="<p>Uniquely identifies the evaluation result.</p>"]
    #[serde(rename="EvaluationResultIdentifier")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub evaluation_result_identifier: Option<EvaluationResultIdentifier>,
    #[doc="<p>The time when AWS Config recorded the evaluation result.</p>"]
    #[serde(rename="ResultRecordedTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub result_recorded_time: Option<f64>,
    #[doc="<p>An encrypted token that associates an evaluation with an AWS Config rule. The token identifies the rule, the AWS resource being evaluated, and the event that triggered the evaluation.</p>"]
    #[serde(rename="ResultToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub result_token: Option<String>,
}

#[doc="<p>Uniquely identifies an evaluation result.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct EvaluationResultIdentifier {
    #[doc="<p>Identifies an AWS Config rule used to evaluate an AWS resource, and provides the type and ID of the evaluated resource.</p>"]
    #[serde(rename="EvaluationResultQualifier")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub evaluation_result_qualifier: Option<EvaluationResultQualifier>,
    #[doc="<p>The time of the event that triggered the evaluation of your AWS resources. The time can indicate when AWS Config delivered a configuration item change notification, or it can indicate when AWS Config delivered the configuration snapshot, depending on which event triggered the evaluation.</p>"]
    #[serde(rename="OrderingTimestamp")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub ordering_timestamp: Option<f64>,
}

#[doc="<p>Identifies an AWS Config rule that evaluated an AWS resource, and provides the type and ID of the resource that the rule evaluated.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct EvaluationResultQualifier {
    #[doc="<p>The name of the AWS Config rule that was used in the evaluation.</p>"]
    #[serde(rename="ConfigRuleName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_name: Option<String>,
    #[doc="<p>The ID of the evaluated AWS resource.</p>"]
    #[serde(rename="ResourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The type of AWS resource that was evaluated.</p>"]
    #[serde(rename="ResourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct GetComplianceDetailsByConfigRuleRequest {
    #[doc="<p>Filters the results by compliance.</p> <p>The allowed values are <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>NOT_APPLICABLE</code>.</p>"]
    #[serde(rename="ComplianceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_types: Option<Vec<String>>,
    #[doc="<p>The name of the AWS Config rule for which you want compliance information.</p>"]
    #[serde(rename="ConfigRuleName")]
    pub config_rule_name: String,
    #[doc="<p>The maximum number of evaluation results returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.</p>"]
    #[serde(rename="Limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetComplianceDetailsByConfigRuleResponse {
    #[doc="<p>Indicates whether the AWS resource complies with the specified AWS Config rule.</p>"]
    #[serde(rename="EvaluationResults")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub evaluation_results: Option<Vec<EvaluationResult>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct GetComplianceDetailsByResourceRequest {
    #[doc="<p>Filters the results by compliance.</p> <p>The allowed values are <code>COMPLIANT</code>, <code>NON_COMPLIANT</code>, and <code>NOT_APPLICABLE</code>.</p>"]
    #[serde(rename="ComplianceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_types: Option<Vec<String>>,
    #[doc="<p>The <code>NextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the AWS resource for which you want compliance information.</p>"]
    #[serde(rename="ResourceId")]
    pub resource_id: String,
    #[doc="<p>The type of the AWS resource for which you want compliance information.</p>"]
    #[serde(rename="ResourceType")]
    pub resource_type: String,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetComplianceDetailsByResourceResponse {
    #[doc="<p>Indicates whether the specified AWS resource complies each AWS Config rule.</p>"]
    #[serde(rename="EvaluationResults")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub evaluation_results: Option<Vec<EvaluationResult>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="NextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetComplianceSummaryByConfigRuleResponse {
    #[doc="<p>The number of AWS Config rules that are compliant and the number that are noncompliant, up to a maximum of 25 for each.</p>"]
    #[serde(rename="ComplianceSummary")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_summary: Option<ComplianceSummary>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct GetComplianceSummaryByResourceTypeRequest {
    #[doc="<p>Specify one or more resource types to get the number of resources that are compliant and the number that are noncompliant for each resource type.</p> <p>For this request, you can specify an AWS resource type such as <code>AWS::EC2::Instance</code>, and you can specify that the resource type is an AWS account by specifying <code>AWS::::Account</code>.</p>"]
    #[serde(rename="ResourceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_types: Option<Vec<String>>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetComplianceSummaryByResourceTypeResponse {
    #[doc="<p>The number of resources that are compliant and the number that are noncompliant. If one or more resource types were provided with the request, the numbers are returned for each resource type. The maximum number returned is 100.</p>"]
    #[serde(rename="ComplianceSummariesByResourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_summaries_by_resource_type: Option<Vec<ComplianceSummaryByResourceType>>,
}

#[derive(Default,Debug,Clone,Serialize)]
pub struct GetDiscoveredResourceCountsRequest {
    #[doc="<p>The maximum number of <a>ResourceCount</a> objects returned on each page. The default is 100. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.</p>"]
    #[serde(rename="limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>nextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The comma-separated list that specifies the resource types that you want the AWS Config to return. For example, (<code>\"AWS::EC2::Instance\"</code>, <code>\"AWS::IAM::User\"</code>).</p> <p>If a value for <code>resourceTypes</code> is not specified, AWS Config returns all resource types that AWS Config is recording in the region for your account.</p> <note> <p>If the configuration recorder is turned off, AWS Config returns an empty list of <a>ResourceCount</a> objects. If the configuration recorder is not recording a specific resource type (for example, S3 buckets), that resource type is not returned in the list of <a>ResourceCount</a> objects.</p> </note>"]
    #[serde(rename="resourceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_types: Option<Vec<String>>,
}

#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetDiscoveredResourceCountsResponse {
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The list of <code>ResourceCount</code> objects. Each object is listed in descending order by the number of resources.</p>"]
    #[serde(rename="resourceCounts")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_counts: Option<Vec<ResourceCount>>,
    #[doc="<p>The total number of resources that AWS Config is recording in the region for your account. If you specify resource types in the request, AWS Config returns only the total number of resources for those resource types.</p> <p class=\"title\"> <b>Example</b> </p> <ol> <li> <p>AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets, for a total of 60 resources.</p> </li> <li> <p>You make a call to the <code>GetDiscoveredResourceCounts</code> action and specify the resource type, <code>\"AWS::EC2::Instances\"</code> in the request.</p> </li> <li> <p>AWS Config returns 25 for <code>totalDiscoveredResources</code>.</p> </li> </ol>"]
    #[serde(rename="totalDiscoveredResources")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub total_discovered_resources: Option<i64>,
}

#[doc="<p>The input for the <a>GetResourceConfigHistory</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct GetResourceConfigHistoryRequest {
    #[doc="<p>The chronological order for configuration items listed. By default the results are listed in reverse chronological order.</p>"]
    #[serde(rename="chronologicalOrder")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub chronological_order: Option<String>,
    #[doc="<p>The time stamp that indicates an earlier time. If not specified, the action returns paginated results that contain configuration items that start from when the first configuration item was recorded.</p>"]
    #[serde(rename="earlierTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub earlier_time: Option<f64>,
    #[doc="<p>The time stamp that indicates a later time. If not specified, current time is taken.</p>"]
    #[serde(rename="laterTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub later_time: Option<f64>,
    #[doc="<p>The maximum number of configuration items returned on each page. The default is 10. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.</p>"]
    #[serde(rename="limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>nextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The ID of the resource (for example., <code>sg-xxxxxx</code>).</p>"]
    #[serde(rename="resourceId")]
    pub resource_id: String,
    #[doc="<p>The resource type.</p>"]
    #[serde(rename="resourceType")]
    pub resource_type: String,
}

#[doc="<p>The output for the <a>GetResourceConfigHistory</a> action.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct GetResourceConfigHistoryResponse {
    #[doc="<p>A list that contains the configuration history of one or more resources.</p>"]
    #[serde(rename="configurationItems")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub configuration_items: Option<Vec<ConfigurationItem>>,
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct ListDiscoveredResourcesRequest {
    #[doc="<p>Specifies whether AWS Config includes deleted resources in the results. By default, deleted resources are not included.</p>"]
    #[serde(rename="includeDeletedResources")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub include_deleted_resources: Option<bool>,
    #[doc="<p>The maximum number of resource identifiers returned on each page. The default is 100. You cannot specify a limit greater than 100. If you specify 0, AWS Config uses the default.</p>"]
    #[serde(rename="limit")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub limit: Option<i64>,
    #[doc="<p>The <code>nextToken</code> string returned on a previous page that you use to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The IDs of only those resources that you want AWS Config to list in the response. If you do not specify this parameter, AWS Config lists all resources of the specified type that it has discovered.</p>"]
    #[serde(rename="resourceIds")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_ids: Option<Vec<String>>,
    #[doc="<p>The custom name of only those resources that you want AWS Config to list in the response. If you do not specify this parameter, AWS Config lists all resources of the specified type that it has discovered.</p>"]
    #[serde(rename="resourceName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_name: Option<String>,
    #[doc="<p>The type of resources that you want AWS Config to list in the response.</p>"]
    #[serde(rename="resourceType")]
    pub resource_type: String,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ListDiscoveredResourcesResponse {
    #[doc="<p>The string that you use in a subsequent request to get the next page of results in a paginated response.</p>"]
    #[serde(rename="nextToken")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub next_token: Option<String>,
    #[doc="<p>The details that identify a resource that is discovered by AWS Config, including the resource type, ID, and (if available) the custom resource name.</p>"]
    #[serde(rename="resourceIdentifiers")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_identifiers: Option<Vec<ResourceIdentifier>>,
}

#[derive(Default,Debug,Clone,Serialize)]
pub struct PutConfigRuleRequest {
    #[doc="<p>The rule that you want to add to your account.</p>"]
    #[serde(rename="ConfigRule")]
    pub config_rule: ConfigRule,
}

#[doc="<p>The input for the <a>PutConfigurationRecorder</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct PutConfigurationRecorderRequest {
    #[doc="<p>The configuration recorder object that records each configuration change made to the resources.</p>"]
    #[serde(rename="ConfigurationRecorder")]
    pub configuration_recorder: ConfigurationRecorder,
}

#[doc="<p>The input for the <a>PutDeliveryChannel</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct PutDeliveryChannelRequest {
    #[doc="<p>The configuration delivery channel object that delivers the configuration information to an Amazon S3 bucket, and to an Amazon SNS topic.</p>"]
    #[serde(rename="DeliveryChannel")]
    pub delivery_channel: DeliveryChannel,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct PutEvaluationsRequest {
    #[doc="<p>The assessments that the AWS Lambda function performs. Each evaluation identifies an AWS resource and indicates whether it complies with the AWS Config rule that invokes the AWS Lambda function.</p>"]
    #[serde(rename="Evaluations")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub evaluations: Option<Vec<Evaluation>>,
    #[doc="<p>An encrypted token that associates an evaluation with an AWS Config rule. Identifies the rule and the event that triggered the evaluation</p>"]
    #[serde(rename="ResultToken")]
    pub result_token: String,
    #[doc="<p>Use this parameter to specify a test run for <code>PutEvaluations</code>. You can verify whether your AWS Lambda function will deliver evaluation results to AWS Config. No updates occur to your existing evaluations, and evaluation results are not sent to AWS Config.</p> <note> <p>When <code>TestMode</code> is <code>true</code>, <code>PutEvaluations</code> doesn't require a valid value for the <code>ResultToken</code> parameter, but the value cannot be null.</p> </note>"]
    #[serde(rename="TestMode")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub test_mode: Option<bool>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct PutEvaluationsResponse {
    #[doc="<p>Requests that failed because of a client or server error.</p>"]
    #[serde(rename="FailedEvaluations")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub failed_evaluations: Option<Vec<Evaluation>>,
}

#[doc="<p>Specifies the types of AWS resource for which AWS Config records configuration changes.</p> <p>In the recording group, you specify whether all supported types or specific types of resources are recorded.</p> <p>By default, AWS Config records configuration changes for all supported types of regional resources that AWS Config discovers in the region in which it is running. Regional resources are tied to a region and can be used only in that region. Examples of regional resources are EC2 instances and EBS volumes.</p> <p>You can also have AWS Config record configuration changes for supported types of global resources (for example, IAM resources). Global resources are not tied to an individual region and can be used in all regions.</p> <important> <p>The configuration details for any global resource are the same in all regions. If you customize AWS Config in multiple regions to record global resources, it will create multiple configuration items each time a global resource changes: one configuration item for each region. These configuration items will contain identical data. To prevent duplicate configuration items, you should consider customizing AWS Config in only one region to record global resources, unless you want the configuration items to be available in multiple regions.</p> </important> <p>If you don't want AWS Config to record all resources, you can specify which types of resources it will record with the <code>resourceTypes</code> parameter.</p> <p>For a list of supported resource types, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources\">Supported resource types</a>.</p> <p>For more information, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/select-resources.html\">Selecting Which Resources AWS Config Records</a>.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct RecordingGroup {
    #[doc="<p>Specifies whether AWS Config records configuration changes for every supported type of regional resource.</p> <p>If you set this option to <code>true</code>, when AWS Config adds support for a new type of regional resource, it automatically starts recording resources of that type.</p> <p>If you set this option to <code>true</code>, you cannot enumerate a list of <code>resourceTypes</code>.</p>"]
    #[serde(rename="allSupported")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub all_supported: Option<bool>,
    #[doc="<p>Specifies whether AWS Config includes all supported types of global resources (for example, IAM resources) with the resources that it records.</p> <p>Before you can set this option to <code>true</code>, you must set the <code>allSupported</code> option to <code>true</code>.</p> <p>If you set this option to <code>true</code>, when AWS Config adds support for a new type of global resource, it automatically starts recording resources of that type.</p> <p>The configuration details for any global resource are the same in all regions. To prevent duplicate configuration items, you should consider customizing AWS Config in only one region to record global resources.</p>"]
    #[serde(rename="includeGlobalResourceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub include_global_resource_types: Option<bool>,
    #[doc="<p>A comma-separated list that specifies the types of AWS resources for which AWS Config records configuration changes (for example, <code>AWS::EC2::Instance</code> or <code>AWS::CloudTrail::Trail</code>).</p> <p>Before you can set this option to <code>true</code>, you must set the <code>allSupported</code> option to <code>false</code>.</p> <p>If you set this option to <code>true</code>, when AWS Config adds support for a new type of resource, it will not record resources of that type unless you manually add that type to your recording group.</p> <p>For a list of valid <code>resourceTypes</code> values, see the <b>resourceType Value</b> column in <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources\">Supported AWS Resource Types</a>.</p>"]
    #[serde(rename="resourceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_types: Option<Vec<String>>,
}

#[doc="<p>The relationship of the related resource to the main resource.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct Relationship {
    #[doc="<p>The type of relationship with the related resource.</p>"]
    #[serde(rename="relationshipName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub relationship_name: Option<String>,
    #[doc="<p>The ID of the related resource (for example, <code>sg-xxxxxx</code>).</p>"]
    #[serde(rename="resourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The custom name of the related resource, if available.</p>"]
    #[serde(rename="resourceName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_name: Option<String>,
    #[doc="<p>The resource type of the related resource.</p>"]
    #[serde(rename="resourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p>An object that contains the resource type and the number of resources.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ResourceCount {
    #[doc="<p>The number of resources.</p>"]
    #[serde(rename="count")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub count: Option<i64>,
    #[doc="<p>The resource type, for example <code>\"AWS::EC2::Instance\"</code>.</p>"]
    #[serde(rename="resourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p>The details that identify a resource that is discovered by AWS Config, including the resource type, ID, and (if available) the custom resource name.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct ResourceIdentifier {
    #[doc="<p>The time that the resource was deleted.</p>"]
    #[serde(rename="resourceDeletionTime")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_deletion_time: Option<f64>,
    #[doc="<p>The ID of the resource (for example., <code>sg-xxxxxx</code>).</p>"]
    #[serde(rename="resourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_id: Option<String>,
    #[doc="<p>The custom name of the resource (if available).</p>"]
    #[serde(rename="resourceName")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_name: Option<String>,
    #[doc="<p>The type of resource.</p>"]
    #[serde(rename="resourceType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub resource_type: Option<String>,
}

#[doc="<p>Defines which resources trigger an evaluation for an AWS Config rule. The scope can include one or more resource types, a combination of a tag key and value, or a combination of one resource type and one resource ID. Specify a scope to constrain which resources trigger an evaluation for a rule. Otherwise, evaluations for the rule are triggered when any resource in your recording group changes in configuration.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct Scope {
    #[doc="<p>The IDs of the only AWS resource that you want to trigger an evaluation for the rule. If you specify a resource ID, you must specify one resource type for <code>ComplianceResourceTypes</code>.</p>"]
    #[serde(rename="ComplianceResourceId")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_resource_id: Option<String>,
    #[doc="<p>The resource types of only those AWS resources that you want to trigger an evaluation for the rule. You can only specify one type if you also specify a resource ID for <code>ComplianceResourceId</code>.</p>"]
    #[serde(rename="ComplianceResourceTypes")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub compliance_resource_types: Option<Vec<String>>,
    #[doc="<p>The tag key that is applied to only those AWS resources that you want you want to trigger an evaluation for the rule.</p>"]
    #[serde(rename="TagKey")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub tag_key: Option<String>,
    #[doc="<p>The tag value applied to only those AWS resources that you want to trigger an evaluation for the rule. If you specify a value for <code>TagValue</code>, you must also specify a value for <code>TagKey</code>.</p>"]
    #[serde(rename="TagValue")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub tag_value: Option<String>,
}

#[doc="<p>Provides the AWS Config rule owner (AWS or customer), the rule identifier, and the events that trigger the evaluation of your AWS resources.</p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct Source {
    #[doc="<p>Indicates whether AWS or the customer owns and manages the AWS Config rule.</p>"]
    #[serde(rename="Owner")]
    pub owner: String,
    #[doc="<p>Provides the source and type of the event that causes AWS Config to evaluate your AWS resources.</p>"]
    #[serde(rename="SourceDetails")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub source_details: Option<Vec<SourceDetail>>,
    #[doc="<p>For AWS Config managed rules, a predefined identifier from a list. For example, <code>IAM_PASSWORD_POLICY</code> is a managed rule. To reference a managed rule, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html\">Using AWS Managed Config Rules</a>.</p> <p>For custom rules, the identifier is the Amazon Resource Name (ARN) of the rule's AWS Lambda function, such as <code>arn:aws:lambda:us-east-2:123456789012:function:custom_rule_name</code>.</p>"]
    #[serde(rename="SourceIdentifier")]
    pub source_identifier: String,
}

#[doc="<p>Provides the source and the message types that trigger AWS Config to evaluate your AWS resources against a rule. It also provides the frequency with which you want AWS Config to run evaluations for the rule if the trigger type is periodic. You can specify the parameter values for <code>SourceDetail</code> only for custom rules. </p>"]
#[derive(Default,Debug,Clone,Serialize,Deserialize)]
pub struct SourceDetail {
    #[doc="<p>The source of the event, such as an AWS service, that triggers AWS Config to evaluate your AWS resources.</p>"]
    #[serde(rename="EventSource")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub event_source: Option<String>,
    #[doc="<p>The frequency that you want AWS Config to run evaluations for a custom rule with a periodic trigger. If you specify a value for <code>MaximumExecutionFrequency</code>, then <code>MessageType</code> must use the <code>ScheduledNotification</code> value.</p> <note> <p>By default, rules with a periodic trigger are evaluated every 24 hours. To change the frequency, specify a valid value for the <code>MaximumExecutionFrequency</code> parameter.</p> </note>"]
    #[serde(rename="MaximumExecutionFrequency")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub maximum_execution_frequency: Option<String>,
    #[doc="<p>The type of notification that triggers AWS Config to run an evaluation for a rule. You can specify the following notification types:</p> <ul> <li> <p> <code>ConfigurationItemChangeNotification</code> - Triggers an evaluation when AWS Config delivers a configuration item as a result of a resource change.</p> </li> <li> <p> <code>OversizedConfigurationItemChangeNotification</code> - Triggers an evaluation when AWS Config delivers an oversized configuration item. AWS Config may generate this notification type when a resource changes and the notification exceeds the maximum size allowed by Amazon SNS.</p> </li> <li> <p> <code>ScheduledNotification</code> - Triggers a periodic evaluation at the frequency specified for <code>MaximumExecutionFrequency</code>.</p> </li> <li> <p> <code>ConfigurationSnapshotDeliveryCompleted</code> - Triggers a periodic evaluation when AWS Config delivers a configuration snapshot.</p> </li> </ul> <p>If you want your custom rule to be triggered by configuration changes, specify both <code>ConfigurationItemChangeNotification</code> and <code>OversizedConfigurationItemChangeNotification</code>. </p>"]
    #[serde(rename="MessageType")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub message_type: Option<String>,
}

#[doc="<p/>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct StartConfigRulesEvaluationRequest {
    #[doc="<p>The list of names of Config rules that you want to run evaluations for.</p>"]
    #[serde(rename="ConfigRuleNames")]
    #[serde(skip_serializing_if="Option::is_none")]
    pub config_rule_names: Option<Vec<String>>,
}

#[doc="<p>The output when you start the evaluation for the specified Config rule.</p>"]
#[derive(Default,Debug,Clone,Deserialize)]
pub struct StartConfigRulesEvaluationResponse;

#[doc="<p>The input for the <a>StartConfigurationRecorder</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct StartConfigurationRecorderRequest {
    #[doc="<p>The name of the recorder object that records each configuration change made to the resources.</p>"]
    #[serde(rename="ConfigurationRecorderName")]
    pub configuration_recorder_name: String,
}

#[doc="<p>The input for the <a>StopConfigurationRecorder</a> action.</p>"]
#[derive(Default,Debug,Clone,Serialize)]
pub struct StopConfigurationRecorderRequest {
    #[doc="<p>The name of the recorder object that records each configuration change made to the resources.</p>"]
    #[serde(rename="ConfigurationRecorderName")]
    pub configuration_recorder_name: String,
}

/// Errors returned by DeleteConfigRule
#[derive(Debug, PartialEq)]
pub enum DeleteConfigRuleError {
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    ///<p>The rule is currently being deleted or the rule is deleting your evaluation results. Try your request again later.</p>
    ResourceInUse(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteConfigRuleError {
    pub fn from_body(body: &str) -> DeleteConfigRuleError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigRuleException" => {
                        DeleteConfigRuleError::NoSuchConfigRule(String::from(error_message))
                    }
                    "ResourceInUseException" => {
                        DeleteConfigRuleError::ResourceInUse(String::from(error_message))
                    }
                    "ValidationException" => {
                        DeleteConfigRuleError::Validation(error_message.to_string())
                    }
                    _ => DeleteConfigRuleError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteConfigRuleError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DeleteConfigRuleError {
    fn from(err: serde_json::error::Error) -> DeleteConfigRuleError {
        DeleteConfigRuleError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DeleteConfigRuleError {
    fn from(err: CredentialsError) -> DeleteConfigRuleError {
        DeleteConfigRuleError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteConfigRuleError {
    fn from(err: HttpDispatchError) -> DeleteConfigRuleError {
        DeleteConfigRuleError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteConfigRuleError {
    fn from(err: io::Error) -> DeleteConfigRuleError {
        DeleteConfigRuleError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteConfigRuleError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteConfigRuleError {
    fn description(&self) -> &str {
        match *self {
            DeleteConfigRuleError::NoSuchConfigRule(ref cause) => cause,
            DeleteConfigRuleError::ResourceInUse(ref cause) => cause,
            DeleteConfigRuleError::Validation(ref cause) => cause,
            DeleteConfigRuleError::Credentials(ref err) => err.description(),
            DeleteConfigRuleError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            DeleteConfigRuleError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteConfigurationRecorder
#[derive(Debug, PartialEq)]
pub enum DeleteConfigurationRecorderError {
    ///<p>You have specified a configuration recorder that does not exist.</p>
    NoSuchConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteConfigurationRecorderError {
    pub fn from_body(body: &str) -> DeleteConfigurationRecorderError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigurationRecorderException" => DeleteConfigurationRecorderError::NoSuchConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        DeleteConfigurationRecorderError::Validation(error_message.to_string())
                    }
                    _ => DeleteConfigurationRecorderError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteConfigurationRecorderError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DeleteConfigurationRecorderError {
    fn from(err: serde_json::error::Error) -> DeleteConfigurationRecorderError {
        DeleteConfigurationRecorderError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DeleteConfigurationRecorderError {
    fn from(err: CredentialsError) -> DeleteConfigurationRecorderError {
        DeleteConfigurationRecorderError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteConfigurationRecorderError {
    fn from(err: HttpDispatchError) -> DeleteConfigurationRecorderError {
        DeleteConfigurationRecorderError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteConfigurationRecorderError {
    fn from(err: io::Error) -> DeleteConfigurationRecorderError {
        DeleteConfigurationRecorderError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteConfigurationRecorderError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteConfigurationRecorderError {
    fn description(&self) -> &str {
        match *self {
            DeleteConfigurationRecorderError::NoSuchConfigurationRecorder(ref cause) => cause,
            DeleteConfigurationRecorderError::Validation(ref cause) => cause,
            DeleteConfigurationRecorderError::Credentials(ref err) => err.description(),
            DeleteConfigurationRecorderError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteConfigurationRecorderError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteDeliveryChannel
#[derive(Debug, PartialEq)]
pub enum DeleteDeliveryChannelError {
    ///<p>You cannot delete the delivery channel you specified because the configuration recorder is running.</p>
    LastDeliveryChannelDeleteFailed(String),
    ///<p>You have specified a delivery channel that does not exist.</p>
    NoSuchDeliveryChannel(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteDeliveryChannelError {
    pub fn from_body(body: &str) -> DeleteDeliveryChannelError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "LastDeliveryChannelDeleteFailedException" => DeleteDeliveryChannelError::LastDeliveryChannelDeleteFailed(String::from(error_message)),
                    "NoSuchDeliveryChannelException" => DeleteDeliveryChannelError::NoSuchDeliveryChannel(String::from(error_message)),
                    "ValidationException" => {
                        DeleteDeliveryChannelError::Validation(error_message.to_string())
                    }
                    _ => DeleteDeliveryChannelError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteDeliveryChannelError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DeleteDeliveryChannelError {
    fn from(err: serde_json::error::Error) -> DeleteDeliveryChannelError {
        DeleteDeliveryChannelError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DeleteDeliveryChannelError {
    fn from(err: CredentialsError) -> DeleteDeliveryChannelError {
        DeleteDeliveryChannelError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteDeliveryChannelError {
    fn from(err: HttpDispatchError) -> DeleteDeliveryChannelError {
        DeleteDeliveryChannelError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteDeliveryChannelError {
    fn from(err: io::Error) -> DeleteDeliveryChannelError {
        DeleteDeliveryChannelError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteDeliveryChannelError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteDeliveryChannelError {
    fn description(&self) -> &str {
        match *self {
            DeleteDeliveryChannelError::LastDeliveryChannelDeleteFailed(ref cause) => cause,
            DeleteDeliveryChannelError::NoSuchDeliveryChannel(ref cause) => cause,
            DeleteDeliveryChannelError::Validation(ref cause) => cause,
            DeleteDeliveryChannelError::Credentials(ref err) => err.description(),
            DeleteDeliveryChannelError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteDeliveryChannelError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeleteEvaluationResults
#[derive(Debug, PartialEq)]
pub enum DeleteEvaluationResultsError {
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    ///<p>The rule is currently being deleted or the rule is deleting your evaluation results. Try your request again later.</p>
    ResourceInUse(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeleteEvaluationResultsError {
    pub fn from_body(body: &str) -> DeleteEvaluationResultsError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigRuleException" => {
                        DeleteEvaluationResultsError::NoSuchConfigRule(String::from(error_message))
                    }
                    "ResourceInUseException" => {
                        DeleteEvaluationResultsError::ResourceInUse(String::from(error_message))
                    }
                    "ValidationException" => {
                        DeleteEvaluationResultsError::Validation(error_message.to_string())
                    }
                    _ => DeleteEvaluationResultsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeleteEvaluationResultsError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DeleteEvaluationResultsError {
    fn from(err: serde_json::error::Error) -> DeleteEvaluationResultsError {
        DeleteEvaluationResultsError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DeleteEvaluationResultsError {
    fn from(err: CredentialsError) -> DeleteEvaluationResultsError {
        DeleteEvaluationResultsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeleteEvaluationResultsError {
    fn from(err: HttpDispatchError) -> DeleteEvaluationResultsError {
        DeleteEvaluationResultsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeleteEvaluationResultsError {
    fn from(err: io::Error) -> DeleteEvaluationResultsError {
        DeleteEvaluationResultsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeleteEvaluationResultsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeleteEvaluationResultsError {
    fn description(&self) -> &str {
        match *self {
            DeleteEvaluationResultsError::NoSuchConfigRule(ref cause) => cause,
            DeleteEvaluationResultsError::ResourceInUse(ref cause) => cause,
            DeleteEvaluationResultsError::Validation(ref cause) => cause,
            DeleteEvaluationResultsError::Credentials(ref err) => err.description(),
            DeleteEvaluationResultsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeleteEvaluationResultsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DeliverConfigSnapshot
#[derive(Debug, PartialEq)]
pub enum DeliverConfigSnapshotError {
    ///<p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
    NoAvailableConfigurationRecorder(String),
    ///<p>There is no configuration recorder running.</p>
    NoRunningConfigurationRecorder(String),
    ///<p>You have specified a delivery channel that does not exist.</p>
    NoSuchDeliveryChannel(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DeliverConfigSnapshotError {
    pub fn from_body(body: &str) -> DeliverConfigSnapshotError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoAvailableConfigurationRecorderException" => DeliverConfigSnapshotError::NoAvailableConfigurationRecorder(String::from(error_message)),
                    "NoRunningConfigurationRecorderException" => DeliverConfigSnapshotError::NoRunningConfigurationRecorder(String::from(error_message)),
                    "NoSuchDeliveryChannelException" => DeliverConfigSnapshotError::NoSuchDeliveryChannel(String::from(error_message)),
                    "ValidationException" => {
                        DeliverConfigSnapshotError::Validation(error_message.to_string())
                    }
                    _ => DeliverConfigSnapshotError::Unknown(String::from(body)),
                }
            }
            Err(_) => DeliverConfigSnapshotError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DeliverConfigSnapshotError {
    fn from(err: serde_json::error::Error) -> DeliverConfigSnapshotError {
        DeliverConfigSnapshotError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DeliverConfigSnapshotError {
    fn from(err: CredentialsError) -> DeliverConfigSnapshotError {
        DeliverConfigSnapshotError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DeliverConfigSnapshotError {
    fn from(err: HttpDispatchError) -> DeliverConfigSnapshotError {
        DeliverConfigSnapshotError::HttpDispatch(err)
    }
}
impl From<io::Error> for DeliverConfigSnapshotError {
    fn from(err: io::Error) -> DeliverConfigSnapshotError {
        DeliverConfigSnapshotError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DeliverConfigSnapshotError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DeliverConfigSnapshotError {
    fn description(&self) -> &str {
        match *self {
            DeliverConfigSnapshotError::NoAvailableConfigurationRecorder(ref cause) => cause,
            DeliverConfigSnapshotError::NoRunningConfigurationRecorder(ref cause) => cause,
            DeliverConfigSnapshotError::NoSuchDeliveryChannel(ref cause) => cause,
            DeliverConfigSnapshotError::Validation(ref cause) => cause,
            DeliverConfigSnapshotError::Credentials(ref err) => err.description(),
            DeliverConfigSnapshotError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DeliverConfigSnapshotError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeComplianceByConfigRule
#[derive(Debug, PartialEq)]
pub enum DescribeComplianceByConfigRuleError {
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeComplianceByConfigRuleError {
    pub fn from_body(body: &str) -> DescribeComplianceByConfigRuleError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidNextTokenException" => DescribeComplianceByConfigRuleError::InvalidNextToken(String::from(error_message)),
                    "InvalidParameterValueException" => DescribeComplianceByConfigRuleError::InvalidParameterValue(String::from(error_message)),
                    "NoSuchConfigRuleException" => DescribeComplianceByConfigRuleError::NoSuchConfigRule(String::from(error_message)),
                    "ValidationException" => {
                        DescribeComplianceByConfigRuleError::Validation(error_message.to_string())
                    }
                    _ => DescribeComplianceByConfigRuleError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeComplianceByConfigRuleError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeComplianceByConfigRuleError {
    fn from(err: serde_json::error::Error) -> DescribeComplianceByConfigRuleError {
        DescribeComplianceByConfigRuleError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeComplianceByConfigRuleError {
    fn from(err: CredentialsError) -> DescribeComplianceByConfigRuleError {
        DescribeComplianceByConfigRuleError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeComplianceByConfigRuleError {
    fn from(err: HttpDispatchError) -> DescribeComplianceByConfigRuleError {
        DescribeComplianceByConfigRuleError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeComplianceByConfigRuleError {
    fn from(err: io::Error) -> DescribeComplianceByConfigRuleError {
        DescribeComplianceByConfigRuleError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeComplianceByConfigRuleError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeComplianceByConfigRuleError {
    fn description(&self) -> &str {
        match *self {
            DescribeComplianceByConfigRuleError::InvalidNextToken(ref cause) => cause,
            DescribeComplianceByConfigRuleError::InvalidParameterValue(ref cause) => cause,
            DescribeComplianceByConfigRuleError::NoSuchConfigRule(ref cause) => cause,
            DescribeComplianceByConfigRuleError::Validation(ref cause) => cause,
            DescribeComplianceByConfigRuleError::Credentials(ref err) => err.description(),
            DescribeComplianceByConfigRuleError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeComplianceByConfigRuleError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeComplianceByResource
#[derive(Debug, PartialEq)]
pub enum DescribeComplianceByResourceError {
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeComplianceByResourceError {
    pub fn from_body(body: &str) -> DescribeComplianceByResourceError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidNextTokenException" => DescribeComplianceByResourceError::InvalidNextToken(String::from(error_message)),
                    "InvalidParameterValueException" => DescribeComplianceByResourceError::InvalidParameterValue(String::from(error_message)),
                    "ValidationException" => {
                        DescribeComplianceByResourceError::Validation(error_message.to_string())
                    }
                    _ => DescribeComplianceByResourceError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeComplianceByResourceError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeComplianceByResourceError {
    fn from(err: serde_json::error::Error) -> DescribeComplianceByResourceError {
        DescribeComplianceByResourceError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeComplianceByResourceError {
    fn from(err: CredentialsError) -> DescribeComplianceByResourceError {
        DescribeComplianceByResourceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeComplianceByResourceError {
    fn from(err: HttpDispatchError) -> DescribeComplianceByResourceError {
        DescribeComplianceByResourceError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeComplianceByResourceError {
    fn from(err: io::Error) -> DescribeComplianceByResourceError {
        DescribeComplianceByResourceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeComplianceByResourceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeComplianceByResourceError {
    fn description(&self) -> &str {
        match *self {
            DescribeComplianceByResourceError::InvalidNextToken(ref cause) => cause,
            DescribeComplianceByResourceError::InvalidParameterValue(ref cause) => cause,
            DescribeComplianceByResourceError::Validation(ref cause) => cause,
            DescribeComplianceByResourceError::Credentials(ref err) => err.description(),
            DescribeComplianceByResourceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeComplianceByResourceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeConfigRuleEvaluationStatus
#[derive(Debug, PartialEq)]
pub enum DescribeConfigRuleEvaluationStatusError {
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeConfigRuleEvaluationStatusError {
    pub fn from_body(body: &str) -> DescribeConfigRuleEvaluationStatusError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidNextTokenException" => DescribeConfigRuleEvaluationStatusError::InvalidNextToken(String::from(error_message)),
                    "InvalidParameterValueException" => DescribeConfigRuleEvaluationStatusError::InvalidParameterValue(String::from(error_message)),
                    "NoSuchConfigRuleException" => DescribeConfigRuleEvaluationStatusError::NoSuchConfigRule(String::from(error_message)),
                    "ValidationException" => {
                        DescribeConfigRuleEvaluationStatusError::Validation(error_message
                                                                                .to_string())
                    }
                    _ => DescribeConfigRuleEvaluationStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeConfigRuleEvaluationStatusError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeConfigRuleEvaluationStatusError {
    fn from(err: serde_json::error::Error) -> DescribeConfigRuleEvaluationStatusError {
        DescribeConfigRuleEvaluationStatusError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeConfigRuleEvaluationStatusError {
    fn from(err: CredentialsError) -> DescribeConfigRuleEvaluationStatusError {
        DescribeConfigRuleEvaluationStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeConfigRuleEvaluationStatusError {
    fn from(err: HttpDispatchError) -> DescribeConfigRuleEvaluationStatusError {
        DescribeConfigRuleEvaluationStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeConfigRuleEvaluationStatusError {
    fn from(err: io::Error) -> DescribeConfigRuleEvaluationStatusError {
        DescribeConfigRuleEvaluationStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeConfigRuleEvaluationStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeConfigRuleEvaluationStatusError {
    fn description(&self) -> &str {
        match *self {
            DescribeConfigRuleEvaluationStatusError::InvalidNextToken(ref cause) => cause,
            DescribeConfigRuleEvaluationStatusError::InvalidParameterValue(ref cause) => cause,
            DescribeConfigRuleEvaluationStatusError::NoSuchConfigRule(ref cause) => cause,
            DescribeConfigRuleEvaluationStatusError::Validation(ref cause) => cause,
            DescribeConfigRuleEvaluationStatusError::Credentials(ref err) => err.description(),
            DescribeConfigRuleEvaluationStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeConfigRuleEvaluationStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeConfigRules
#[derive(Debug, PartialEq)]
pub enum DescribeConfigRulesError {
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeConfigRulesError {
    pub fn from_body(body: &str) -> DescribeConfigRulesError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidNextTokenException" => {
                        DescribeConfigRulesError::InvalidNextToken(String::from(error_message))
                    }
                    "NoSuchConfigRuleException" => {
                        DescribeConfigRulesError::NoSuchConfigRule(String::from(error_message))
                    }
                    "ValidationException" => {
                        DescribeConfigRulesError::Validation(error_message.to_string())
                    }
                    _ => DescribeConfigRulesError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeConfigRulesError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeConfigRulesError {
    fn from(err: serde_json::error::Error) -> DescribeConfigRulesError {
        DescribeConfigRulesError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeConfigRulesError {
    fn from(err: CredentialsError) -> DescribeConfigRulesError {
        DescribeConfigRulesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeConfigRulesError {
    fn from(err: HttpDispatchError) -> DescribeConfigRulesError {
        DescribeConfigRulesError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeConfigRulesError {
    fn from(err: io::Error) -> DescribeConfigRulesError {
        DescribeConfigRulesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeConfigRulesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeConfigRulesError {
    fn description(&self) -> &str {
        match *self {
            DescribeConfigRulesError::InvalidNextToken(ref cause) => cause,
            DescribeConfigRulesError::NoSuchConfigRule(ref cause) => cause,
            DescribeConfigRulesError::Validation(ref cause) => cause,
            DescribeConfigRulesError::Credentials(ref err) => err.description(),
            DescribeConfigRulesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeConfigRulesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeConfigurationRecorderStatus
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationRecorderStatusError {
    ///<p>You have specified a configuration recorder that does not exist.</p>
    NoSuchConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeConfigurationRecorderStatusError {
    pub fn from_body(body: &str) -> DescribeConfigurationRecorderStatusError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigurationRecorderException" => DescribeConfigurationRecorderStatusError::NoSuchConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        DescribeConfigurationRecorderStatusError::Validation(error_message
                                                                                 .to_string())
                    }
                    _ => DescribeConfigurationRecorderStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeConfigurationRecorderStatusError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeConfigurationRecorderStatusError {
    fn from(err: serde_json::error::Error) -> DescribeConfigurationRecorderStatusError {
        DescribeConfigurationRecorderStatusError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeConfigurationRecorderStatusError {
    fn from(err: CredentialsError) -> DescribeConfigurationRecorderStatusError {
        DescribeConfigurationRecorderStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeConfigurationRecorderStatusError {
    fn from(err: HttpDispatchError) -> DescribeConfigurationRecorderStatusError {
        DescribeConfigurationRecorderStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeConfigurationRecorderStatusError {
    fn from(err: io::Error) -> DescribeConfigurationRecorderStatusError {
        DescribeConfigurationRecorderStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeConfigurationRecorderStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeConfigurationRecorderStatusError {
    fn description(&self) -> &str {
        match *self {
            DescribeConfigurationRecorderStatusError::NoSuchConfigurationRecorder(ref cause) => {
                cause
            }
            DescribeConfigurationRecorderStatusError::Validation(ref cause) => cause,
            DescribeConfigurationRecorderStatusError::Credentials(ref err) => err.description(),
            DescribeConfigurationRecorderStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeConfigurationRecorderStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeConfigurationRecorders
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationRecordersError {
    ///<p>You have specified a configuration recorder that does not exist.</p>
    NoSuchConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeConfigurationRecordersError {
    pub fn from_body(body: &str) -> DescribeConfigurationRecordersError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigurationRecorderException" => DescribeConfigurationRecordersError::NoSuchConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        DescribeConfigurationRecordersError::Validation(error_message.to_string())
                    }
                    _ => DescribeConfigurationRecordersError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeConfigurationRecordersError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeConfigurationRecordersError {
    fn from(err: serde_json::error::Error) -> DescribeConfigurationRecordersError {
        DescribeConfigurationRecordersError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeConfigurationRecordersError {
    fn from(err: CredentialsError) -> DescribeConfigurationRecordersError {
        DescribeConfigurationRecordersError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeConfigurationRecordersError {
    fn from(err: HttpDispatchError) -> DescribeConfigurationRecordersError {
        DescribeConfigurationRecordersError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeConfigurationRecordersError {
    fn from(err: io::Error) -> DescribeConfigurationRecordersError {
        DescribeConfigurationRecordersError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeConfigurationRecordersError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeConfigurationRecordersError {
    fn description(&self) -> &str {
        match *self {
            DescribeConfigurationRecordersError::NoSuchConfigurationRecorder(ref cause) => cause,
            DescribeConfigurationRecordersError::Validation(ref cause) => cause,
            DescribeConfigurationRecordersError::Credentials(ref err) => err.description(),
            DescribeConfigurationRecordersError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeConfigurationRecordersError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeDeliveryChannelStatus
#[derive(Debug, PartialEq)]
pub enum DescribeDeliveryChannelStatusError {
    ///<p>You have specified a delivery channel that does not exist.</p>
    NoSuchDeliveryChannel(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeDeliveryChannelStatusError {
    pub fn from_body(body: &str) -> DescribeDeliveryChannelStatusError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchDeliveryChannelException" => DescribeDeliveryChannelStatusError::NoSuchDeliveryChannel(String::from(error_message)),
                    "ValidationException" => {
                        DescribeDeliveryChannelStatusError::Validation(error_message.to_string())
                    }
                    _ => DescribeDeliveryChannelStatusError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeDeliveryChannelStatusError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeDeliveryChannelStatusError {
    fn from(err: serde_json::error::Error) -> DescribeDeliveryChannelStatusError {
        DescribeDeliveryChannelStatusError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeDeliveryChannelStatusError {
    fn from(err: CredentialsError) -> DescribeDeliveryChannelStatusError {
        DescribeDeliveryChannelStatusError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeDeliveryChannelStatusError {
    fn from(err: HttpDispatchError) -> DescribeDeliveryChannelStatusError {
        DescribeDeliveryChannelStatusError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeDeliveryChannelStatusError {
    fn from(err: io::Error) -> DescribeDeliveryChannelStatusError {
        DescribeDeliveryChannelStatusError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeDeliveryChannelStatusError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeDeliveryChannelStatusError {
    fn description(&self) -> &str {
        match *self {
            DescribeDeliveryChannelStatusError::NoSuchDeliveryChannel(ref cause) => cause,
            DescribeDeliveryChannelStatusError::Validation(ref cause) => cause,
            DescribeDeliveryChannelStatusError::Credentials(ref err) => err.description(),
            DescribeDeliveryChannelStatusError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeDeliveryChannelStatusError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by DescribeDeliveryChannels
#[derive(Debug, PartialEq)]
pub enum DescribeDeliveryChannelsError {
    ///<p>You have specified a delivery channel that does not exist.</p>
    NoSuchDeliveryChannel(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl DescribeDeliveryChannelsError {
    pub fn from_body(body: &str) -> DescribeDeliveryChannelsError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchDeliveryChannelException" => DescribeDeliveryChannelsError::NoSuchDeliveryChannel(String::from(error_message)),
                    "ValidationException" => {
                        DescribeDeliveryChannelsError::Validation(error_message.to_string())
                    }
                    _ => DescribeDeliveryChannelsError::Unknown(String::from(body)),
                }
            }
            Err(_) => DescribeDeliveryChannelsError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for DescribeDeliveryChannelsError {
    fn from(err: serde_json::error::Error) -> DescribeDeliveryChannelsError {
        DescribeDeliveryChannelsError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for DescribeDeliveryChannelsError {
    fn from(err: CredentialsError) -> DescribeDeliveryChannelsError {
        DescribeDeliveryChannelsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for DescribeDeliveryChannelsError {
    fn from(err: HttpDispatchError) -> DescribeDeliveryChannelsError {
        DescribeDeliveryChannelsError::HttpDispatch(err)
    }
}
impl From<io::Error> for DescribeDeliveryChannelsError {
    fn from(err: io::Error) -> DescribeDeliveryChannelsError {
        DescribeDeliveryChannelsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for DescribeDeliveryChannelsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for DescribeDeliveryChannelsError {
    fn description(&self) -> &str {
        match *self {
            DescribeDeliveryChannelsError::NoSuchDeliveryChannel(ref cause) => cause,
            DescribeDeliveryChannelsError::Validation(ref cause) => cause,
            DescribeDeliveryChannelsError::Credentials(ref err) => err.description(),
            DescribeDeliveryChannelsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            DescribeDeliveryChannelsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetComplianceDetailsByConfigRule
#[derive(Debug, PartialEq)]
pub enum GetComplianceDetailsByConfigRuleError {
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetComplianceDetailsByConfigRuleError {
    pub fn from_body(body: &str) -> GetComplianceDetailsByConfigRuleError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidNextTokenException" => GetComplianceDetailsByConfigRuleError::InvalidNextToken(String::from(error_message)),
                    "InvalidParameterValueException" => GetComplianceDetailsByConfigRuleError::InvalidParameterValue(String::from(error_message)),
                    "NoSuchConfigRuleException" => GetComplianceDetailsByConfigRuleError::NoSuchConfigRule(String::from(error_message)),
                    "ValidationException" => {
                        GetComplianceDetailsByConfigRuleError::Validation(error_message.to_string())
                    }
                    _ => GetComplianceDetailsByConfigRuleError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetComplianceDetailsByConfigRuleError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetComplianceDetailsByConfigRuleError {
    fn from(err: serde_json::error::Error) -> GetComplianceDetailsByConfigRuleError {
        GetComplianceDetailsByConfigRuleError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetComplianceDetailsByConfigRuleError {
    fn from(err: CredentialsError) -> GetComplianceDetailsByConfigRuleError {
        GetComplianceDetailsByConfigRuleError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetComplianceDetailsByConfigRuleError {
    fn from(err: HttpDispatchError) -> GetComplianceDetailsByConfigRuleError {
        GetComplianceDetailsByConfigRuleError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetComplianceDetailsByConfigRuleError {
    fn from(err: io::Error) -> GetComplianceDetailsByConfigRuleError {
        GetComplianceDetailsByConfigRuleError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetComplianceDetailsByConfigRuleError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetComplianceDetailsByConfigRuleError {
    fn description(&self) -> &str {
        match *self {
            GetComplianceDetailsByConfigRuleError::InvalidNextToken(ref cause) => cause,
            GetComplianceDetailsByConfigRuleError::InvalidParameterValue(ref cause) => cause,
            GetComplianceDetailsByConfigRuleError::NoSuchConfigRule(ref cause) => cause,
            GetComplianceDetailsByConfigRuleError::Validation(ref cause) => cause,
            GetComplianceDetailsByConfigRuleError::Credentials(ref err) => err.description(),
            GetComplianceDetailsByConfigRuleError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetComplianceDetailsByConfigRuleError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetComplianceDetailsByResource
#[derive(Debug, PartialEq)]
pub enum GetComplianceDetailsByResourceError {
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetComplianceDetailsByResourceError {
    pub fn from_body(body: &str) -> GetComplianceDetailsByResourceError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidParameterValueException" => GetComplianceDetailsByResourceError::InvalidParameterValue(String::from(error_message)),
                    "ValidationException" => {
                        GetComplianceDetailsByResourceError::Validation(error_message.to_string())
                    }
                    _ => GetComplianceDetailsByResourceError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetComplianceDetailsByResourceError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetComplianceDetailsByResourceError {
    fn from(err: serde_json::error::Error) -> GetComplianceDetailsByResourceError {
        GetComplianceDetailsByResourceError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetComplianceDetailsByResourceError {
    fn from(err: CredentialsError) -> GetComplianceDetailsByResourceError {
        GetComplianceDetailsByResourceError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetComplianceDetailsByResourceError {
    fn from(err: HttpDispatchError) -> GetComplianceDetailsByResourceError {
        GetComplianceDetailsByResourceError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetComplianceDetailsByResourceError {
    fn from(err: io::Error) -> GetComplianceDetailsByResourceError {
        GetComplianceDetailsByResourceError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetComplianceDetailsByResourceError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetComplianceDetailsByResourceError {
    fn description(&self) -> &str {
        match *self {
            GetComplianceDetailsByResourceError::InvalidParameterValue(ref cause) => cause,
            GetComplianceDetailsByResourceError::Validation(ref cause) => cause,
            GetComplianceDetailsByResourceError::Credentials(ref err) => err.description(),
            GetComplianceDetailsByResourceError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetComplianceDetailsByResourceError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetComplianceSummaryByConfigRule
#[derive(Debug, PartialEq)]
pub enum GetComplianceSummaryByConfigRuleError {
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetComplianceSummaryByConfigRuleError {
    pub fn from_body(body: &str) -> GetComplianceSummaryByConfigRuleError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "ValidationException" => {
                        GetComplianceSummaryByConfigRuleError::Validation(error_message.to_string())
                    }
                    _ => GetComplianceSummaryByConfigRuleError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetComplianceSummaryByConfigRuleError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetComplianceSummaryByConfigRuleError {
    fn from(err: serde_json::error::Error) -> GetComplianceSummaryByConfigRuleError {
        GetComplianceSummaryByConfigRuleError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetComplianceSummaryByConfigRuleError {
    fn from(err: CredentialsError) -> GetComplianceSummaryByConfigRuleError {
        GetComplianceSummaryByConfigRuleError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetComplianceSummaryByConfigRuleError {
    fn from(err: HttpDispatchError) -> GetComplianceSummaryByConfigRuleError {
        GetComplianceSummaryByConfigRuleError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetComplianceSummaryByConfigRuleError {
    fn from(err: io::Error) -> GetComplianceSummaryByConfigRuleError {
        GetComplianceSummaryByConfigRuleError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetComplianceSummaryByConfigRuleError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetComplianceSummaryByConfigRuleError {
    fn description(&self) -> &str {
        match *self {
            GetComplianceSummaryByConfigRuleError::Validation(ref cause) => cause,
            GetComplianceSummaryByConfigRuleError::Credentials(ref err) => err.description(),
            GetComplianceSummaryByConfigRuleError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetComplianceSummaryByConfigRuleError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetComplianceSummaryByResourceType
#[derive(Debug, PartialEq)]
pub enum GetComplianceSummaryByResourceTypeError {
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetComplianceSummaryByResourceTypeError {
    pub fn from_body(body: &str) -> GetComplianceSummaryByResourceTypeError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidParameterValueException" => GetComplianceSummaryByResourceTypeError::InvalidParameterValue(String::from(error_message)),
                    "ValidationException" => {
                        GetComplianceSummaryByResourceTypeError::Validation(error_message
                                                                                .to_string())
                    }
                    _ => GetComplianceSummaryByResourceTypeError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetComplianceSummaryByResourceTypeError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetComplianceSummaryByResourceTypeError {
    fn from(err: serde_json::error::Error) -> GetComplianceSummaryByResourceTypeError {
        GetComplianceSummaryByResourceTypeError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetComplianceSummaryByResourceTypeError {
    fn from(err: CredentialsError) -> GetComplianceSummaryByResourceTypeError {
        GetComplianceSummaryByResourceTypeError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetComplianceSummaryByResourceTypeError {
    fn from(err: HttpDispatchError) -> GetComplianceSummaryByResourceTypeError {
        GetComplianceSummaryByResourceTypeError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetComplianceSummaryByResourceTypeError {
    fn from(err: io::Error) -> GetComplianceSummaryByResourceTypeError {
        GetComplianceSummaryByResourceTypeError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetComplianceSummaryByResourceTypeError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetComplianceSummaryByResourceTypeError {
    fn description(&self) -> &str {
        match *self {
            GetComplianceSummaryByResourceTypeError::InvalidParameterValue(ref cause) => cause,
            GetComplianceSummaryByResourceTypeError::Validation(ref cause) => cause,
            GetComplianceSummaryByResourceTypeError::Credentials(ref err) => err.description(),
            GetComplianceSummaryByResourceTypeError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetComplianceSummaryByResourceTypeError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetDiscoveredResourceCounts
#[derive(Debug, PartialEq)]
pub enum GetDiscoveredResourceCountsError {
    ///<p>The specified limit is outside the allowable range.</p>
    InvalidLimit(String),
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetDiscoveredResourceCountsError {
    pub fn from_body(body: &str) -> GetDiscoveredResourceCountsError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidLimitException" => {
                        GetDiscoveredResourceCountsError::InvalidLimit(String::from(error_message))
                    }
                    "InvalidNextTokenException" => GetDiscoveredResourceCountsError::InvalidNextToken(String::from(error_message)),
                    "ValidationException" => {
                        GetDiscoveredResourceCountsError::Validation(error_message.to_string())
                    }
                    _ => GetDiscoveredResourceCountsError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetDiscoveredResourceCountsError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetDiscoveredResourceCountsError {
    fn from(err: serde_json::error::Error) -> GetDiscoveredResourceCountsError {
        GetDiscoveredResourceCountsError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetDiscoveredResourceCountsError {
    fn from(err: CredentialsError) -> GetDiscoveredResourceCountsError {
        GetDiscoveredResourceCountsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetDiscoveredResourceCountsError {
    fn from(err: HttpDispatchError) -> GetDiscoveredResourceCountsError {
        GetDiscoveredResourceCountsError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetDiscoveredResourceCountsError {
    fn from(err: io::Error) -> GetDiscoveredResourceCountsError {
        GetDiscoveredResourceCountsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetDiscoveredResourceCountsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetDiscoveredResourceCountsError {
    fn description(&self) -> &str {
        match *self {
            GetDiscoveredResourceCountsError::InvalidLimit(ref cause) => cause,
            GetDiscoveredResourceCountsError::InvalidNextToken(ref cause) => cause,
            GetDiscoveredResourceCountsError::Validation(ref cause) => cause,
            GetDiscoveredResourceCountsError::Credentials(ref err) => err.description(),
            GetDiscoveredResourceCountsError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetDiscoveredResourceCountsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by GetResourceConfigHistory
#[derive(Debug, PartialEq)]
pub enum GetResourceConfigHistoryError {
    ///<p>The specified limit is outside the allowable range.</p>
    InvalidLimit(String),
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>The specified time range is not valid. The earlier time is not chronologically before the later time.</p>
    InvalidTimeRange(String),
    ///<p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
    NoAvailableConfigurationRecorder(String),
    ///<p>You have specified a resource that is either unknown or has not been discovered.</p>
    ResourceNotDiscovered(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl GetResourceConfigHistoryError {
    pub fn from_body(body: &str) -> GetResourceConfigHistoryError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidLimitException" => {
                        GetResourceConfigHistoryError::InvalidLimit(String::from(error_message))
                    }
                    "InvalidNextTokenException" => {
                        GetResourceConfigHistoryError::InvalidNextToken(String::from(error_message))
                    }
                    "InvalidTimeRangeException" => {
                        GetResourceConfigHistoryError::InvalidTimeRange(String::from(error_message))
                    }
                    "NoAvailableConfigurationRecorderException" => GetResourceConfigHistoryError::NoAvailableConfigurationRecorder(String::from(error_message)),
                    "ResourceNotDiscoveredException" => GetResourceConfigHistoryError::ResourceNotDiscovered(String::from(error_message)),
                    "ValidationException" => {
                        GetResourceConfigHistoryError::Validation(error_message.to_string())
                    }
                    _ => GetResourceConfigHistoryError::Unknown(String::from(body)),
                }
            }
            Err(_) => GetResourceConfigHistoryError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for GetResourceConfigHistoryError {
    fn from(err: serde_json::error::Error) -> GetResourceConfigHistoryError {
        GetResourceConfigHistoryError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for GetResourceConfigHistoryError {
    fn from(err: CredentialsError) -> GetResourceConfigHistoryError {
        GetResourceConfigHistoryError::Credentials(err)
    }
}
impl From<HttpDispatchError> for GetResourceConfigHistoryError {
    fn from(err: HttpDispatchError) -> GetResourceConfigHistoryError {
        GetResourceConfigHistoryError::HttpDispatch(err)
    }
}
impl From<io::Error> for GetResourceConfigHistoryError {
    fn from(err: io::Error) -> GetResourceConfigHistoryError {
        GetResourceConfigHistoryError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for GetResourceConfigHistoryError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for GetResourceConfigHistoryError {
    fn description(&self) -> &str {
        match *self {
            GetResourceConfigHistoryError::InvalidLimit(ref cause) => cause,
            GetResourceConfigHistoryError::InvalidNextToken(ref cause) => cause,
            GetResourceConfigHistoryError::InvalidTimeRange(ref cause) => cause,
            GetResourceConfigHistoryError::NoAvailableConfigurationRecorder(ref cause) => cause,
            GetResourceConfigHistoryError::ResourceNotDiscovered(ref cause) => cause,
            GetResourceConfigHistoryError::Validation(ref cause) => cause,
            GetResourceConfigHistoryError::Credentials(ref err) => err.description(),
            GetResourceConfigHistoryError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            GetResourceConfigHistoryError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by ListDiscoveredResources
#[derive(Debug, PartialEq)]
pub enum ListDiscoveredResourcesError {
    ///<p>The specified limit is outside the allowable range.</p>
    InvalidLimit(String),
    ///<p>The specified next token is invalid. Specify the <code>NextToken</code> string that was returned in the previous response to get the next page of results.</p>
    InvalidNextToken(String),
    ///<p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
    NoAvailableConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl ListDiscoveredResourcesError {
    pub fn from_body(body: &str) -> ListDiscoveredResourcesError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidLimitException" => {
                        ListDiscoveredResourcesError::InvalidLimit(String::from(error_message))
                    }
                    "InvalidNextTokenException" => {
                        ListDiscoveredResourcesError::InvalidNextToken(String::from(error_message))
                    }
                    "NoAvailableConfigurationRecorderException" => ListDiscoveredResourcesError::NoAvailableConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        ListDiscoveredResourcesError::Validation(error_message.to_string())
                    }
                    _ => ListDiscoveredResourcesError::Unknown(String::from(body)),
                }
            }
            Err(_) => ListDiscoveredResourcesError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for ListDiscoveredResourcesError {
    fn from(err: serde_json::error::Error) -> ListDiscoveredResourcesError {
        ListDiscoveredResourcesError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for ListDiscoveredResourcesError {
    fn from(err: CredentialsError) -> ListDiscoveredResourcesError {
        ListDiscoveredResourcesError::Credentials(err)
    }
}
impl From<HttpDispatchError> for ListDiscoveredResourcesError {
    fn from(err: HttpDispatchError) -> ListDiscoveredResourcesError {
        ListDiscoveredResourcesError::HttpDispatch(err)
    }
}
impl From<io::Error> for ListDiscoveredResourcesError {
    fn from(err: io::Error) -> ListDiscoveredResourcesError {
        ListDiscoveredResourcesError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for ListDiscoveredResourcesError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for ListDiscoveredResourcesError {
    fn description(&self) -> &str {
        match *self {
            ListDiscoveredResourcesError::InvalidLimit(ref cause) => cause,
            ListDiscoveredResourcesError::InvalidNextToken(ref cause) => cause,
            ListDiscoveredResourcesError::NoAvailableConfigurationRecorder(ref cause) => cause,
            ListDiscoveredResourcesError::Validation(ref cause) => cause,
            ListDiscoveredResourcesError::Credentials(ref err) => err.description(),
            ListDiscoveredResourcesError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            ListDiscoveredResourcesError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PutConfigRule
#[derive(Debug, PartialEq)]
pub enum PutConfigRuleError {
    ///<p>Indicates one of the following errors:</p> <ul> <li> <p>The rule cannot be created because the IAM role assigned to AWS Config lacks permissions to perform the config:Put* action.</p> </li> <li> <p>The AWS Lambda function cannot be invoked. Check the function ARN, and check the function's permissions.</p> </li> </ul>
    InsufficientPermissions(String),
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>Failed to add the AWS Config rule because the account already contains the maximum number of 50 rules. Consider deleting any deactivated rules before adding new rules.</p>
    MaxNumberOfConfigRulesExceeded(String),
    ///<p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
    NoAvailableConfigurationRecorder(String),
    ///<p>The rule is currently being deleted or the rule is deleting your evaluation results. Try your request again later.</p>
    ResourceInUse(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PutConfigRuleError {
    pub fn from_body(body: &str) -> PutConfigRuleError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InsufficientPermissionsException" => {
                        PutConfigRuleError::InsufficientPermissions(String::from(error_message))
                    }
                    "InvalidParameterValueException" => {
                        PutConfigRuleError::InvalidParameterValue(String::from(error_message))
                    }
                    "MaxNumberOfConfigRulesExceededException" => PutConfigRuleError::MaxNumberOfConfigRulesExceeded(String::from(error_message)),
                    "NoAvailableConfigurationRecorderException" => PutConfigRuleError::NoAvailableConfigurationRecorder(String::from(error_message)),
                    "ResourceInUseException" => {
                        PutConfigRuleError::ResourceInUse(String::from(error_message))
                    }
                    "ValidationException" => {
                        PutConfigRuleError::Validation(error_message.to_string())
                    }
                    _ => PutConfigRuleError::Unknown(String::from(body)),
                }
            }
            Err(_) => PutConfigRuleError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for PutConfigRuleError {
    fn from(err: serde_json::error::Error) -> PutConfigRuleError {
        PutConfigRuleError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for PutConfigRuleError {
    fn from(err: CredentialsError) -> PutConfigRuleError {
        PutConfigRuleError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PutConfigRuleError {
    fn from(err: HttpDispatchError) -> PutConfigRuleError {
        PutConfigRuleError::HttpDispatch(err)
    }
}
impl From<io::Error> for PutConfigRuleError {
    fn from(err: io::Error) -> PutConfigRuleError {
        PutConfigRuleError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PutConfigRuleError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PutConfigRuleError {
    fn description(&self) -> &str {
        match *self {
            PutConfigRuleError::InsufficientPermissions(ref cause) => cause,
            PutConfigRuleError::InvalidParameterValue(ref cause) => cause,
            PutConfigRuleError::MaxNumberOfConfigRulesExceeded(ref cause) => cause,
            PutConfigRuleError::NoAvailableConfigurationRecorder(ref cause) => cause,
            PutConfigRuleError::ResourceInUse(ref cause) => cause,
            PutConfigRuleError::Validation(ref cause) => cause,
            PutConfigRuleError::Credentials(ref err) => err.description(),
            PutConfigRuleError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            PutConfigRuleError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PutConfigurationRecorder
#[derive(Debug, PartialEq)]
pub enum PutConfigurationRecorderError {
    ///<p>You have provided a configuration recorder name that is not valid.</p>
    InvalidConfigurationRecorderName(String),
    ///<p>AWS Config throws an exception if the recording group does not contain a valid list of resource types. Invalid values could also be incorrectly formatted.</p>
    InvalidRecordingGroup(String),
    ///<p>You have provided a null or empty role ARN.</p>
    InvalidRole(String),
    ///<p>You have reached the limit on the number of recorders you can create.</p>
    MaxNumberOfConfigurationRecordersExceeded(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PutConfigurationRecorderError {
    pub fn from_body(body: &str) -> PutConfigurationRecorderError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidConfigurationRecorderNameException" => PutConfigurationRecorderError::InvalidConfigurationRecorderName(String::from(error_message)),
                    "InvalidRecordingGroupException" => PutConfigurationRecorderError::InvalidRecordingGroup(String::from(error_message)),
                    "InvalidRoleException" => {
                        PutConfigurationRecorderError::InvalidRole(String::from(error_message))
                    }
                    "MaxNumberOfConfigurationRecordersExceededException" => PutConfigurationRecorderError::MaxNumberOfConfigurationRecordersExceeded(String::from(error_message)),
                    "ValidationException" => {
                        PutConfigurationRecorderError::Validation(error_message.to_string())
                    }
                    _ => PutConfigurationRecorderError::Unknown(String::from(body)),
                }
            }
            Err(_) => PutConfigurationRecorderError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for PutConfigurationRecorderError {
    fn from(err: serde_json::error::Error) -> PutConfigurationRecorderError {
        PutConfigurationRecorderError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for PutConfigurationRecorderError {
    fn from(err: CredentialsError) -> PutConfigurationRecorderError {
        PutConfigurationRecorderError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PutConfigurationRecorderError {
    fn from(err: HttpDispatchError) -> PutConfigurationRecorderError {
        PutConfigurationRecorderError::HttpDispatch(err)
    }
}
impl From<io::Error> for PutConfigurationRecorderError {
    fn from(err: io::Error) -> PutConfigurationRecorderError {
        PutConfigurationRecorderError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PutConfigurationRecorderError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PutConfigurationRecorderError {
    fn description(&self) -> &str {
        match *self {
            PutConfigurationRecorderError::InvalidConfigurationRecorderName(ref cause) => cause,
            PutConfigurationRecorderError::InvalidRecordingGroup(ref cause) => cause,
            PutConfigurationRecorderError::InvalidRole(ref cause) => cause,
            PutConfigurationRecorderError::MaxNumberOfConfigurationRecordersExceeded(ref cause) => {
                cause
            }
            PutConfigurationRecorderError::Validation(ref cause) => cause,
            PutConfigurationRecorderError::Credentials(ref err) => err.description(),
            PutConfigurationRecorderError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            PutConfigurationRecorderError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PutDeliveryChannel
#[derive(Debug, PartialEq)]
pub enum PutDeliveryChannelError {
    ///<p>Your Amazon S3 bucket policy does not permit AWS Config to write to it.</p>
    InsufficientDeliveryPolicy(String),
    ///<p>The specified delivery channel name is not valid.</p>
    InvalidDeliveryChannelName(String),
    ///<p>The specified Amazon S3 key prefix is not valid.</p>
    InvalidS3KeyPrefix(String),
    ///<p>The specified Amazon SNS topic does not exist.</p>
    InvalidSNSTopicARN(String),
    ///<p>You have reached the limit on the number of delivery channels you can create.</p>
    MaxNumberOfDeliveryChannelsExceeded(String),
    ///<p>There are no configuration recorders available to provide the role needed to describe your resources. Create a configuration recorder.</p>
    NoAvailableConfigurationRecorder(String),
    ///<p>The specified Amazon S3 bucket does not exist.</p>
    NoSuchBucket(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PutDeliveryChannelError {
    pub fn from_body(body: &str) -> PutDeliveryChannelError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InsufficientDeliveryPolicyException" => PutDeliveryChannelError::InsufficientDeliveryPolicy(String::from(error_message)),
                    "InvalidDeliveryChannelNameException" => PutDeliveryChannelError::InvalidDeliveryChannelName(String::from(error_message)),
                    "InvalidS3KeyPrefixException" => {
                        PutDeliveryChannelError::InvalidS3KeyPrefix(String::from(error_message))
                    }
                    "InvalidSNSTopicARNException" => {
                        PutDeliveryChannelError::InvalidSNSTopicARN(String::from(error_message))
                    }
                    "MaxNumberOfDeliveryChannelsExceededException" => PutDeliveryChannelError::MaxNumberOfDeliveryChannelsExceeded(String::from(error_message)),
                    "NoAvailableConfigurationRecorderException" => PutDeliveryChannelError::NoAvailableConfigurationRecorder(String::from(error_message)),
                    "NoSuchBucketException" => {
                        PutDeliveryChannelError::NoSuchBucket(String::from(error_message))
                    }
                    "ValidationException" => {
                        PutDeliveryChannelError::Validation(error_message.to_string())
                    }
                    _ => PutDeliveryChannelError::Unknown(String::from(body)),
                }
            }
            Err(_) => PutDeliveryChannelError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for PutDeliveryChannelError {
    fn from(err: serde_json::error::Error) -> PutDeliveryChannelError {
        PutDeliveryChannelError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for PutDeliveryChannelError {
    fn from(err: CredentialsError) -> PutDeliveryChannelError {
        PutDeliveryChannelError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PutDeliveryChannelError {
    fn from(err: HttpDispatchError) -> PutDeliveryChannelError {
        PutDeliveryChannelError::HttpDispatch(err)
    }
}
impl From<io::Error> for PutDeliveryChannelError {
    fn from(err: io::Error) -> PutDeliveryChannelError {
        PutDeliveryChannelError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PutDeliveryChannelError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PutDeliveryChannelError {
    fn description(&self) -> &str {
        match *self {
            PutDeliveryChannelError::InsufficientDeliveryPolicy(ref cause) => cause,
            PutDeliveryChannelError::InvalidDeliveryChannelName(ref cause) => cause,
            PutDeliveryChannelError::InvalidS3KeyPrefix(ref cause) => cause,
            PutDeliveryChannelError::InvalidSNSTopicARN(ref cause) => cause,
            PutDeliveryChannelError::MaxNumberOfDeliveryChannelsExceeded(ref cause) => cause,
            PutDeliveryChannelError::NoAvailableConfigurationRecorder(ref cause) => cause,
            PutDeliveryChannelError::NoSuchBucket(ref cause) => cause,
            PutDeliveryChannelError::Validation(ref cause) => cause,
            PutDeliveryChannelError::Credentials(ref err) => err.description(),
            PutDeliveryChannelError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            PutDeliveryChannelError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by PutEvaluations
#[derive(Debug, PartialEq)]
pub enum PutEvaluationsError {
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>The specified <code>ResultToken</code> is invalid.</p>
    InvalidResultToken(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl PutEvaluationsError {
    pub fn from_body(body: &str) -> PutEvaluationsError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidParameterValueException" => {
                        PutEvaluationsError::InvalidParameterValue(String::from(error_message))
                    }
                    "InvalidResultTokenException" => {
                        PutEvaluationsError::InvalidResultToken(String::from(error_message))
                    }
                    "NoSuchConfigRuleException" => {
                        PutEvaluationsError::NoSuchConfigRule(String::from(error_message))
                    }
                    "ValidationException" => {
                        PutEvaluationsError::Validation(error_message.to_string())
                    }
                    _ => PutEvaluationsError::Unknown(String::from(body)),
                }
            }
            Err(_) => PutEvaluationsError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for PutEvaluationsError {
    fn from(err: serde_json::error::Error) -> PutEvaluationsError {
        PutEvaluationsError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for PutEvaluationsError {
    fn from(err: CredentialsError) -> PutEvaluationsError {
        PutEvaluationsError::Credentials(err)
    }
}
impl From<HttpDispatchError> for PutEvaluationsError {
    fn from(err: HttpDispatchError) -> PutEvaluationsError {
        PutEvaluationsError::HttpDispatch(err)
    }
}
impl From<io::Error> for PutEvaluationsError {
    fn from(err: io::Error) -> PutEvaluationsError {
        PutEvaluationsError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for PutEvaluationsError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for PutEvaluationsError {
    fn description(&self) -> &str {
        match *self {
            PutEvaluationsError::InvalidParameterValue(ref cause) => cause,
            PutEvaluationsError::InvalidResultToken(ref cause) => cause,
            PutEvaluationsError::NoSuchConfigRule(ref cause) => cause,
            PutEvaluationsError::Validation(ref cause) => cause,
            PutEvaluationsError::Credentials(ref err) => err.description(),
            PutEvaluationsError::HttpDispatch(ref dispatch_error) => dispatch_error.description(),
            PutEvaluationsError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by StartConfigRulesEvaluation
#[derive(Debug, PartialEq)]
pub enum StartConfigRulesEvaluationError {
    ///<p>One or more of the specified parameters are invalid. Verify that your parameters are valid and try again.</p>
    InvalidParameterValue(String),
    ///<p>This exception is thrown if an evaluation is in progress or if you call the <a>StartConfigRulesEvaluation</a> API more than once per minute.</p>
    LimitExceeded(String),
    ///<p>One or more AWS Config rules in the request are invalid. Verify that the rule names are correct and try again.</p>
    NoSuchConfigRule(String),
    ///<p>The rule is currently being deleted or the rule is deleting your evaluation results. Try your request again later.</p>
    ResourceInUse(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl StartConfigRulesEvaluationError {
    pub fn from_body(body: &str) -> StartConfigRulesEvaluationError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "InvalidParameterValueException" => StartConfigRulesEvaluationError::InvalidParameterValue(String::from(error_message)),
                    "LimitExceededException" => {
                        StartConfigRulesEvaluationError::LimitExceeded(String::from(error_message))
                    }
                    "NoSuchConfigRuleException" => StartConfigRulesEvaluationError::NoSuchConfigRule(String::from(error_message)),
                    "ResourceInUseException" => {
                        StartConfigRulesEvaluationError::ResourceInUse(String::from(error_message))
                    }
                    "ValidationException" => {
                        StartConfigRulesEvaluationError::Validation(error_message.to_string())
                    }
                    _ => StartConfigRulesEvaluationError::Unknown(String::from(body)),
                }
            }
            Err(_) => StartConfigRulesEvaluationError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for StartConfigRulesEvaluationError {
    fn from(err: serde_json::error::Error) -> StartConfigRulesEvaluationError {
        StartConfigRulesEvaluationError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for StartConfigRulesEvaluationError {
    fn from(err: CredentialsError) -> StartConfigRulesEvaluationError {
        StartConfigRulesEvaluationError::Credentials(err)
    }
}
impl From<HttpDispatchError> for StartConfigRulesEvaluationError {
    fn from(err: HttpDispatchError) -> StartConfigRulesEvaluationError {
        StartConfigRulesEvaluationError::HttpDispatch(err)
    }
}
impl From<io::Error> for StartConfigRulesEvaluationError {
    fn from(err: io::Error) -> StartConfigRulesEvaluationError {
        StartConfigRulesEvaluationError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for StartConfigRulesEvaluationError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for StartConfigRulesEvaluationError {
    fn description(&self) -> &str {
        match *self {
            StartConfigRulesEvaluationError::InvalidParameterValue(ref cause) => cause,
            StartConfigRulesEvaluationError::LimitExceeded(ref cause) => cause,
            StartConfigRulesEvaluationError::NoSuchConfigRule(ref cause) => cause,
            StartConfigRulesEvaluationError::ResourceInUse(ref cause) => cause,
            StartConfigRulesEvaluationError::Validation(ref cause) => cause,
            StartConfigRulesEvaluationError::Credentials(ref err) => err.description(),
            StartConfigRulesEvaluationError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            StartConfigRulesEvaluationError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by StartConfigurationRecorder
#[derive(Debug, PartialEq)]
pub enum StartConfigurationRecorderError {
    ///<p>There is no delivery channel available to record configurations.</p>
    NoAvailableDeliveryChannel(String),
    ///<p>You have specified a configuration recorder that does not exist.</p>
    NoSuchConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl StartConfigurationRecorderError {
    pub fn from_body(body: &str) -> StartConfigurationRecorderError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoAvailableDeliveryChannelException" => StartConfigurationRecorderError::NoAvailableDeliveryChannel(String::from(error_message)),
                    "NoSuchConfigurationRecorderException" => StartConfigurationRecorderError::NoSuchConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        StartConfigurationRecorderError::Validation(error_message.to_string())
                    }
                    _ => StartConfigurationRecorderError::Unknown(String::from(body)),
                }
            }
            Err(_) => StartConfigurationRecorderError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for StartConfigurationRecorderError {
    fn from(err: serde_json::error::Error) -> StartConfigurationRecorderError {
        StartConfigurationRecorderError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for StartConfigurationRecorderError {
    fn from(err: CredentialsError) -> StartConfigurationRecorderError {
        StartConfigurationRecorderError::Credentials(err)
    }
}
impl From<HttpDispatchError> for StartConfigurationRecorderError {
    fn from(err: HttpDispatchError) -> StartConfigurationRecorderError {
        StartConfigurationRecorderError::HttpDispatch(err)
    }
}
impl From<io::Error> for StartConfigurationRecorderError {
    fn from(err: io::Error) -> StartConfigurationRecorderError {
        StartConfigurationRecorderError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for StartConfigurationRecorderError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for StartConfigurationRecorderError {
    fn description(&self) -> &str {
        match *self {
            StartConfigurationRecorderError::NoAvailableDeliveryChannel(ref cause) => cause,
            StartConfigurationRecorderError::NoSuchConfigurationRecorder(ref cause) => cause,
            StartConfigurationRecorderError::Validation(ref cause) => cause,
            StartConfigurationRecorderError::Credentials(ref err) => err.description(),
            StartConfigurationRecorderError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            StartConfigurationRecorderError::Unknown(ref cause) => cause,
        }
    }
}
/// Errors returned by StopConfigurationRecorder
#[derive(Debug, PartialEq)]
pub enum StopConfigurationRecorderError {
    ///<p>You have specified a configuration recorder that does not exist.</p>
    NoSuchConfigurationRecorder(String),
    /// An error occurred dispatching the HTTP request
    HttpDispatch(HttpDispatchError),
    /// An error was encountered with AWS credentials.
    Credentials(CredentialsError),
    /// A validation error occurred.  Details from AWS are provided.
    Validation(String),
    /// An unknown error occurred.  The raw HTTP response is provided.
    Unknown(String),
}


impl StopConfigurationRecorderError {
    pub fn from_body(body: &str) -> StopConfigurationRecorderError {
        match from_str::<SerdeJsonValue>(body) {
            Ok(json) => {
                let raw_error_type = json.get("__type")
                    .and_then(|e| e.as_str())
                    .unwrap_or("Unknown");
                let error_message = json.get("message").and_then(|m| m.as_str()).unwrap_or(body);

                let pieces: Vec<&str> = raw_error_type.split("#").collect();
                let error_type = pieces.last().expect("Expected error type");

                match *error_type {
                    "NoSuchConfigurationRecorderException" => StopConfigurationRecorderError::NoSuchConfigurationRecorder(String::from(error_message)),
                    "ValidationException" => {
                        StopConfigurationRecorderError::Validation(error_message.to_string())
                    }
                    _ => StopConfigurationRecorderError::Unknown(String::from(body)),
                }
            }
            Err(_) => StopConfigurationRecorderError::Unknown(String::from(body)),
        }
    }
}

impl From<serde_json::error::Error> for StopConfigurationRecorderError {
    fn from(err: serde_json::error::Error) -> StopConfigurationRecorderError {
        StopConfigurationRecorderError::Unknown(err.description().to_string())
    }
}
impl From<CredentialsError> for StopConfigurationRecorderError {
    fn from(err: CredentialsError) -> StopConfigurationRecorderError {
        StopConfigurationRecorderError::Credentials(err)
    }
}
impl From<HttpDispatchError> for StopConfigurationRecorderError {
    fn from(err: HttpDispatchError) -> StopConfigurationRecorderError {
        StopConfigurationRecorderError::HttpDispatch(err)
    }
}
impl From<io::Error> for StopConfigurationRecorderError {
    fn from(err: io::Error) -> StopConfigurationRecorderError {
        StopConfigurationRecorderError::HttpDispatch(HttpDispatchError::from(err))
    }
}
impl fmt::Display for StopConfigurationRecorderError {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{}", self.description())
    }
}
impl Error for StopConfigurationRecorderError {
    fn description(&self) -> &str {
        match *self {
            StopConfigurationRecorderError::NoSuchConfigurationRecorder(ref cause) => cause,
            StopConfigurationRecorderError::Validation(ref cause) => cause,
            StopConfigurationRecorderError::Credentials(ref err) => err.description(),
            StopConfigurationRecorderError::HttpDispatch(ref dispatch_error) => {
                dispatch_error.description()
            }
            StopConfigurationRecorderError::Unknown(ref cause) => cause,
        }
    }
}
/// Trait representing the capabilities of the Config Service API. Config Service clients implement this trait.
pub trait ConfigService {
    #[doc="<p>Deletes the specified AWS Config rule and all of its evaluation results.</p> <p>AWS Config sets the state of a rule to <code>DELETING</code> until the deletion is complete. You cannot update a rule while it is in this state. If you make a <code>PutConfigRule</code> or <code>DeleteConfigRule</code> request for the rule, you will receive a <code>ResourceInUseException</code>.</p> <p>You can check the state of a rule by using the <code>DescribeConfigRules</code> request.</p>"]
    fn delete_config_rule(&self,
                          input: &DeleteConfigRuleRequest)
                          -> Result<(), DeleteConfigRuleError>;


    #[doc="<p>Deletes the configuration recorder.</p> <p>After the configuration recorder is deleted, AWS Config will not record resource configuration changes until you create a new configuration recorder.</p> <p>This action does not delete the configuration information that was previously recorded. You will be able to access the previously recorded information by using the <code>GetResourceConfigHistory</code> action, but you will not be able to access this information in the AWS Config console until you create a new configuration recorder.</p>"]
    fn delete_configuration_recorder(&self,
                                     input: &DeleteConfigurationRecorderRequest)
                                     -> Result<(), DeleteConfigurationRecorderError>;


    #[doc="<p>Deletes the delivery channel.</p> <p>Before you can delete the delivery channel, you must stop the configuration recorder by using the <a>StopConfigurationRecorder</a> action.</p>"]
    fn delete_delivery_channel(&self,
                               input: &DeleteDeliveryChannelRequest)
                               -> Result<(), DeleteDeliveryChannelError>;


    #[doc="<p>Deletes the evaluation results for the specified Config rule. You can specify one Config rule per request. After you delete the evaluation results, you can call the <a>StartConfigRulesEvaluation</a> API to start evaluating your AWS resources against the rule.</p>"]
    fn delete_evaluation_results
        (&self,
         input: &DeleteEvaluationResultsRequest)
         -> Result<DeleteEvaluationResultsResponse, DeleteEvaluationResultsError>;


    #[doc="<p>Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After the delivery has started, AWS Config sends following notifications using an Amazon SNS topic that you have specified.</p> <ul> <li> <p>Notification of starting the delivery.</p> </li> <li> <p>Notification of delivery completed, if the delivery was successfully completed.</p> </li> <li> <p>Notification of delivery failure, if the delivery failed to complete.</p> </li> </ul>"]
    fn deliver_config_snapshot
        (&self,
         input: &DeliverConfigSnapshotRequest)
         -> Result<DeliverConfigSnapshotResponse, DeliverConfigSnapshotError>;


    #[doc="<p>Indicates whether the specified AWS Config rules are compliant. If a rule is noncompliant, this action returns the number of AWS resources that do not comply with the rule.</p> <p>A rule is compliant if all of the evaluated resources comply with it, and it is noncompliant if any of these resources do not comply.</p> <p>If AWS Config has no current evaluation results for the rule, it returns <code>INSUFFICIENT_DATA</code>. This result might indicate one of the following conditions:</p> <ul> <li> <p>AWS Config has never invoked an evaluation for the rule. To check whether it has, use the <code>DescribeConfigRuleEvaluationStatus</code> action to get the <code>LastSuccessfulInvocationTime</code> and <code>LastFailedInvocationTime</code>.</p> </li> <li> <p>The rule's AWS Lambda function is failing to send evaluation results to AWS Config. Verify that the role that you assigned to your configuration recorder includes the <code>config:PutEvaluations</code> permission. If the rule is a custom rule, verify that the AWS Lambda execution role includes the <code>config:PutEvaluations</code> permission.</p> </li> <li> <p>The rule's AWS Lambda function has returned <code>NOT_APPLICABLE</code> for all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.</p> </li> </ul>"]
    fn describe_compliance_by_config_rule
        (&self,
         input: &DescribeComplianceByConfigRuleRequest)
         -> Result<DescribeComplianceByConfigRuleResponse, DescribeComplianceByConfigRuleError>;


    #[doc="<p>Indicates whether the specified AWS resources are compliant. If a resource is noncompliant, this action returns the number of AWS Config rules that the resource does not comply with.</p> <p>A resource is compliant if it complies with all the AWS Config rules that evaluate it. It is noncompliant if it does not comply with one or more of these rules.</p> <p>If AWS Config has no current evaluation results for the resource, it returns <code>INSUFFICIENT_DATA</code>. This result might indicate one of the following conditions about the rules that evaluate the resource:</p> <ul> <li> <p>AWS Config has never invoked an evaluation for the rule. To check whether it has, use the <code>DescribeConfigRuleEvaluationStatus</code> action to get the <code>LastSuccessfulInvocationTime</code> and <code>LastFailedInvocationTime</code>.</p> </li> <li> <p>The rule's AWS Lambda function is failing to send evaluation results to AWS Config. Verify that the role that you assigned to your configuration recorder includes the <code>config:PutEvaluations</code> permission. If the rule is a custom rule, verify that the AWS Lambda execution role includes the <code>config:PutEvaluations</code> permission.</p> </li> <li> <p>The rule's AWS Lambda function has returned <code>NOT_APPLICABLE</code> for all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.</p> </li> </ul>"]
    fn describe_compliance_by_resource
        (&self,
         input: &DescribeComplianceByResourceRequest)
         -> Result<DescribeComplianceByResourceResponse, DescribeComplianceByResourceError>;


    #[doc="<p>Returns status information for each of your AWS managed Config rules. The status includes information such as the last time AWS Config invoked the rule, the last time AWS Config failed to invoke the rule, and the related error for the last failure.</p>"]
    fn describe_config_rule_evaluation_status
        (&self,
         input: &DescribeConfigRuleEvaluationStatusRequest)
         -> Result<DescribeConfigRuleEvaluationStatusResponse,
                   DescribeConfigRuleEvaluationStatusError>;


    #[doc="<p>Returns details about your AWS Config rules.</p>"]
    fn describe_config_rules(&self,
                             input: &DescribeConfigRulesRequest)
                             -> Result<DescribeConfigRulesResponse, DescribeConfigRulesError>;


    #[doc="<p>Returns the current status of the specified configuration recorder. If a configuration recorder is not specified, this action returns the status of all configuration recorder associated with the account.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> </note>"]
    fn describe_configuration_recorder_status
        (&self,
         input: &DescribeConfigurationRecorderStatusRequest)
         -> Result<DescribeConfigurationRecorderStatusResponse,
                   DescribeConfigurationRecorderStatusError>;


    #[doc="<p>Returns the details for the specified configuration recorders. If the configuration recorder is not specified, this action returns the details for all configuration recorders associated with the account.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> </note>"]
    fn describe_configuration_recorders
        (&self,
         input: &DescribeConfigurationRecordersRequest)
         -> Result<DescribeConfigurationRecordersResponse, DescribeConfigurationRecordersError>;


    #[doc="<p>Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action returns the current status of all delivery channels associated with the account.</p> <note> <p>Currently, you can specify only one delivery channel per region in your account.</p> </note>"]
    fn describe_delivery_channel_status
        (&self,
         input: &DescribeDeliveryChannelStatusRequest)
         -> Result<DescribeDeliveryChannelStatusResponse, DescribeDeliveryChannelStatusError>;


    #[doc="<p>Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns the details of all delivery channels associated with the account.</p> <note> <p>Currently, you can specify only one delivery channel per region in your account.</p> </note>"]
    fn describe_delivery_channels
        (&self,
         input: &DescribeDeliveryChannelsRequest)
         -> Result<DescribeDeliveryChannelsResponse, DescribeDeliveryChannelsError>;


    #[doc="<p>Returns the evaluation results for the specified AWS Config rule. The results indicate which AWS resources were evaluated by the rule, when each resource was last evaluated, and whether each resource complies with the rule.</p>"]
    fn get_compliance_details_by_config_rule
        (&self,
         input: &GetComplianceDetailsByConfigRuleRequest)
         -> Result<GetComplianceDetailsByConfigRuleResponse, GetComplianceDetailsByConfigRuleError>;


    #[doc="<p>Returns the evaluation results for the specified AWS resource. The results indicate which AWS Config rules were used to evaluate the resource, when each rule was last used, and whether the resource complies with each rule.</p>"]
    fn get_compliance_details_by_resource
        (&self,
         input: &GetComplianceDetailsByResourceRequest)
         -> Result<GetComplianceDetailsByResourceResponse, GetComplianceDetailsByResourceError>;


    #[doc="<p>Returns the number of AWS Config rules that are compliant and noncompliant, up to a maximum of 25 for each.</p>"]
    fn get_compliance_summary_by_config_rule
        (&self)
         -> Result<GetComplianceSummaryByConfigRuleResponse, GetComplianceSummaryByConfigRuleError>;


    #[doc="<p>Returns the number of resources that are compliant and the number that are noncompliant. You can specify one or more resource types to get these numbers for each resource type. The maximum number returned is 100.</p>"]
    fn get_compliance_summary_by_resource_type
        (&self,
         input: &GetComplianceSummaryByResourceTypeRequest)
         -> Result<GetComplianceSummaryByResourceTypeResponse,
                   GetComplianceSummaryByResourceTypeError>;


    #[doc="<p>Returns the resource types, the number of each resource type, and the total number of resources that AWS Config is recording in this region for your AWS account. </p> <p class=\"title\"> <b>Example</b> </p> <ol> <li> <p>AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets.</p> </li> <li> <p>You make a call to the <code>GetDiscoveredResourceCounts</code> action and specify that you want all resource types. </p> </li> <li> <p>AWS Config returns the following:</p> <ul> <li> <p>The resource types (EC2 instances, IAM users, and S3 buckets)</p> </li> <li> <p>The number of each resource type (25, 20, and 15)</p> </li> <li> <p>The total number of all resources (60)</p> </li> </ul> </li> </ol> <p>The response is paginated. By default, AWS Config lists 100 <a>ResourceCount</a> objects on each page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p> <note> <p>If you make a call to the <a>GetDiscoveredResourceCounts</a> action, you may not immediately receive resource counts in the following situations:</p> <ul> <li> <p>You are a new AWS Config customer</p> </li> <li> <p>You just enabled resource recording</p> </li> </ul> <p>It may take a few minutes for AWS Config to record and count your resources. Wait a few minutes and then retry the <a>GetDiscoveredResourceCounts</a> action. </p> </note>"]
    fn get_discovered_resource_counts
        (&self,
         input: &GetDiscoveredResourceCountsRequest)
         -> Result<GetDiscoveredResourceCountsResponse, GetDiscoveredResourceCountsError>;


    #[doc="<p>Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval.</p> <p>The response is paginated. By default, AWS Config returns a limit of 10 configuration items per page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p> <note> <p>Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified <code>limit</code>. In such cases, you can make another call, using the <code>nextToken</code>.</p> </note>"]
    fn get_resource_config_history
        (&self,
         input: &GetResourceConfigHistoryRequest)
         -> Result<GetResourceConfigHistoryResponse, GetResourceConfigHistoryError>;


    #[doc="<p>Accepts a resource type and returns a list of resource identifiers for the resources of that type. A resource identifier includes the resource type, ID, and (if available) the custom resource name. The results consist of resources that AWS Config has discovered, including those that AWS Config is not currently recording. You can narrow the results to include only resources that have specific resource IDs or a resource name.</p> <note> <p>You can specify either resource IDs or a resource name but not both in the same request.</p> </note> <p>The response is paginated. By default, AWS Config lists 100 resource identifiers on each page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p>"]
    fn list_discovered_resources
        (&self,
         input: &ListDiscoveredResourcesRequest)
         -> Result<ListDiscoveredResourcesResponse, ListDiscoveredResourcesError>;


    #[doc="<p>Adds or updates an AWS Config rule for evaluating whether your AWS resources comply with your desired configurations.</p> <p>You can use this action for custom Config rules and AWS managed Config rules. A custom Config rule is a rule that you develop and maintain. An AWS managed Config rule is a customizable, predefined rule that AWS Config provides.</p> <p>If you are adding a new custom Config rule, you must first create the AWS Lambda function that the rule invokes to evaluate your resources. When you use the <code>PutConfigRule</code> action to add the rule to AWS Config, you must specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. Specify the ARN for the <code>SourceIdentifier</code> key. This key is part of the <code>Source</code> object, which is part of the <code>ConfigRule</code> object. </p> <p>If you are adding an AWS managed Config rule, specify the rule's identifier for the <code>SourceIdentifier</code> key. To reference AWS managed Config rule identifiers, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html\">About AWS Managed Config Rules</a>.</p> <p>For any new rule that you add, specify the <code>ConfigRuleName</code> in the <code>ConfigRule</code> object. Do not specify the <code>ConfigRuleArn</code> or the <code>ConfigRuleId</code>. These values are generated by AWS Config for new rules.</p> <p>If you are updating a rule that you added previously, you can specify the rule by <code>ConfigRuleName</code>, <code>ConfigRuleId</code>, or <code>ConfigRuleArn</code> in the <code>ConfigRule</code> data type that you use in this request.</p> <p>The maximum number of rules that AWS Config supports is 50.</p> <p>For more information about requesting a rule limit increase, see <a href=\"http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config\">AWS Config Limits</a> in the <i>AWS General Reference Guide</i>.</p> <p>For more information about developing and using AWS Config rules, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html\">Evaluating AWS Resource Configurations with AWS Config</a> in the <i>AWS Config Developer Guide</i>.</p>"]
    fn put_config_rule(&self, input: &PutConfigRuleRequest) -> Result<(), PutConfigRuleError>;


    #[doc="<p>Creates a new configuration recorder to record the selected resource configurations.</p> <p>You can use this action to change the role <code>roleARN</code> and/or the <code>recordingGroup</code> of an existing recorder. To change the role, call the action on the existing configuration recorder and specify a role.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> <p>If <code>ConfigurationRecorder</code> does not have the <b>recordingGroup</b> parameter specified, the default is to record all supported resource types.</p> </note>"]
    fn put_configuration_recorder(&self,
                                  input: &PutConfigurationRecorderRequest)
                                  -> Result<(), PutConfigurationRecorderError>;


    #[doc="<p>Creates a delivery channel object to deliver configuration information to an Amazon S3 bucket and Amazon SNS topic.</p> <p>Before you can create a delivery channel, you must create a configuration recorder.</p> <p>You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed.</p> <note> <p>You can have only one delivery channel per region in your account.</p> </note>"]
    fn put_delivery_channel(&self,
                            input: &PutDeliveryChannelRequest)
                            -> Result<(), PutDeliveryChannelError>;


    #[doc="<p>Used by an AWS Lambda function to deliver evaluation results to AWS Config. This action is required in every AWS Lambda function that is invoked by an AWS Config rule.</p>"]
    fn put_evaluations(&self,
                       input: &PutEvaluationsRequest)
                       -> Result<PutEvaluationsResponse, PutEvaluationsError>;


    #[doc="<p>Runs an on-demand evaluation for the specified Config rules against the last known configuration state of the resources. Use <code>StartConfigRulesEvaluation</code> when you want to test a rule that you updated is working as expected. <code>StartConfigRulesEvaluation</code> does not re-record the latest configuration state for your resources; it re-runs an evaluation against the last known state of your resources. </p> <p>You can specify up to 25 Config rules per request. </p> <p>An existing <code>StartConfigRulesEvaluation</code> call must complete for the specified rules before you can call the API again. If you chose to have AWS Config stream to an Amazon SNS topic, you will receive a <code>ConfigRuleEvaluationStarted</code> notification when the evaluation starts.</p> <note> <p>You don't need to call the <code>StartConfigRulesEvaluation</code> API to run an evaluation for a new rule. When you create a new rule, AWS Config automatically evaluates your resources against the rule. </p> </note> <p>The <code>StartConfigRulesEvaluation</code> API is useful if you want to run on-demand evaluations, such as the following example:</p> <ol> <li> <p>You have a custom rule that evaluates your IAM resources every 24 hours.</p> </li> <li> <p>You update your Lambda function to add additional conditions to your rule.</p> </li> <li> <p>Instead of waiting for the next periodic evaluation, you call the <code>StartConfigRulesEvaluation</code> API.</p> </li> <li> <p>AWS Config invokes your Lambda function and evaluates your IAM resources.</p> </li> <li> <p>Your custom rule will still run periodic evaluations every 24 hours.</p> </li> </ol>"]
    fn start_config_rules_evaluation
        (&self,
         input: &StartConfigRulesEvaluationRequest)
         -> Result<StartConfigRulesEvaluationResponse, StartConfigRulesEvaluationError>;


    #[doc="<p>Starts recording configurations of the AWS resources you have selected to record in your AWS account.</p> <p>You must have created at least one delivery channel to successfully start the configuration recorder.</p>"]
    fn start_configuration_recorder(&self,
                                    input: &StartConfigurationRecorderRequest)
                                    -> Result<(), StartConfigurationRecorderError>;


    #[doc="<p>Stops recording configurations of the AWS resources you have selected to record in your AWS account.</p>"]
    fn stop_configuration_recorder(&self,
                                   input: &StopConfigurationRecorderRequest)
                                   -> Result<(), StopConfigurationRecorderError>;
}
/// A client for the Config Service API.
pub struct ConfigServiceClient<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    credentials_provider: P,
    region: region::Region,
    dispatcher: D,
}

impl<P, D> ConfigServiceClient<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    pub fn new(request_dispatcher: D, credentials_provider: P, region: region::Region) -> Self {
        ConfigServiceClient {
            credentials_provider: credentials_provider,
            region: region,
            dispatcher: request_dispatcher,
        }
    }
}

impl<P, D> ConfigService for ConfigServiceClient<P, D>
    where P: ProvideAwsCredentials,
          D: DispatchSignedRequest
{
    #[doc="<p>Deletes the specified AWS Config rule and all of its evaluation results.</p> <p>AWS Config sets the state of a rule to <code>DELETING</code> until the deletion is complete. You cannot update a rule while it is in this state. If you make a <code>PutConfigRule</code> or <code>DeleteConfigRule</code> request for the rule, you will receive a <code>ResourceInUseException</code>.</p> <p>You can check the state of a rule by using the <code>DescribeConfigRules</code> request.</p>"]
    fn delete_config_rule(&self,
                          input: &DeleteConfigRuleRequest)
                          -> Result<(), DeleteConfigRuleError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.DeleteConfigRule");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteConfigRuleError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the configuration recorder.</p> <p>After the configuration recorder is deleted, AWS Config will not record resource configuration changes until you create a new configuration recorder.</p> <p>This action does not delete the configuration information that was previously recorded. You will be able to access the previously recorded information by using the <code>GetResourceConfigHistory</code> action, but you will not be able to access this information in the AWS Config console until you create a new configuration recorder.</p>"]
    fn delete_configuration_recorder(&self,
                                     input: &DeleteConfigurationRecorderRequest)
                                     -> Result<(), DeleteConfigurationRecorderError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DeleteConfigurationRecorder");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteConfigurationRecorderError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the delivery channel.</p> <p>Before you can delete the delivery channel, you must stop the configuration recorder by using the <a>StopConfigurationRecorder</a> action.</p>"]
    fn delete_delivery_channel(&self,
                               input: &DeleteDeliveryChannelRequest)
                               -> Result<(), DeleteDeliveryChannelError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.DeleteDeliveryChannel");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteDeliveryChannelError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Deletes the evaluation results for the specified Config rule. You can specify one Config rule per request. After you delete the evaluation results, you can call the <a>StartConfigRulesEvaluation</a> API to start evaluating your AWS resources against the rule.</p>"]
    fn delete_evaluation_results
        (&self,
         input: &DeleteEvaluationResultsRequest)
         -> Result<DeleteEvaluationResultsResponse, DeleteEvaluationResultsError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DeleteEvaluationResults");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DeleteEvaluationResultsResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeleteEvaluationResultsError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Schedules delivery of a configuration snapshot to the Amazon S3 bucket in the specified delivery channel. After the delivery has started, AWS Config sends following notifications using an Amazon SNS topic that you have specified.</p> <ul> <li> <p>Notification of starting the delivery.</p> </li> <li> <p>Notification of delivery completed, if the delivery was successfully completed.</p> </li> <li> <p>Notification of delivery failure, if the delivery failed to complete.</p> </li> </ul>"]
    fn deliver_config_snapshot
        (&self,
         input: &DeliverConfigSnapshotRequest)
         -> Result<DeliverConfigSnapshotResponse, DeliverConfigSnapshotError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.DeliverConfigSnapshot");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DeliverConfigSnapshotResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DeliverConfigSnapshotError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Indicates whether the specified AWS Config rules are compliant. If a rule is noncompliant, this action returns the number of AWS resources that do not comply with the rule.</p> <p>A rule is compliant if all of the evaluated resources comply with it, and it is noncompliant if any of these resources do not comply.</p> <p>If AWS Config has no current evaluation results for the rule, it returns <code>INSUFFICIENT_DATA</code>. This result might indicate one of the following conditions:</p> <ul> <li> <p>AWS Config has never invoked an evaluation for the rule. To check whether it has, use the <code>DescribeConfigRuleEvaluationStatus</code> action to get the <code>LastSuccessfulInvocationTime</code> and <code>LastFailedInvocationTime</code>.</p> </li> <li> <p>The rule's AWS Lambda function is failing to send evaluation results to AWS Config. Verify that the role that you assigned to your configuration recorder includes the <code>config:PutEvaluations</code> permission. If the rule is a custom rule, verify that the AWS Lambda execution role includes the <code>config:PutEvaluations</code> permission.</p> </li> <li> <p>The rule's AWS Lambda function has returned <code>NOT_APPLICABLE</code> for all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.</p> </li> </ul>"]
    fn describe_compliance_by_config_rule
        (&self,
         input: &DescribeComplianceByConfigRuleRequest)
         -> Result<DescribeComplianceByConfigRuleResponse, DescribeComplianceByConfigRuleError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeComplianceByConfigRule");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeComplianceByConfigRuleResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeComplianceByConfigRuleError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Indicates whether the specified AWS resources are compliant. If a resource is noncompliant, this action returns the number of AWS Config rules that the resource does not comply with.</p> <p>A resource is compliant if it complies with all the AWS Config rules that evaluate it. It is noncompliant if it does not comply with one or more of these rules.</p> <p>If AWS Config has no current evaluation results for the resource, it returns <code>INSUFFICIENT_DATA</code>. This result might indicate one of the following conditions about the rules that evaluate the resource:</p> <ul> <li> <p>AWS Config has never invoked an evaluation for the rule. To check whether it has, use the <code>DescribeConfigRuleEvaluationStatus</code> action to get the <code>LastSuccessfulInvocationTime</code> and <code>LastFailedInvocationTime</code>.</p> </li> <li> <p>The rule's AWS Lambda function is failing to send evaluation results to AWS Config. Verify that the role that you assigned to your configuration recorder includes the <code>config:PutEvaluations</code> permission. If the rule is a custom rule, verify that the AWS Lambda execution role includes the <code>config:PutEvaluations</code> permission.</p> </li> <li> <p>The rule's AWS Lambda function has returned <code>NOT_APPLICABLE</code> for all evaluation results. This can occur if the resources were deleted or removed from the rule's scope.</p> </li> </ul>"]
    fn describe_compliance_by_resource
        (&self,
         input: &DescribeComplianceByResourceRequest)
         -> Result<DescribeComplianceByResourceResponse, DescribeComplianceByResourceError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeComplianceByResource");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeComplianceByResourceResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeComplianceByResourceError::from_body(String::from_utf8_lossy(&body)
                                                                     .as_ref()))
            }
        }
    }


    #[doc="<p>Returns status information for each of your AWS managed Config rules. The status includes information such as the last time AWS Config invoked the rule, the last time AWS Config failed to invoke the rule, and the related error for the last failure.</p>"]
    fn describe_config_rule_evaluation_status
        (&self,
         input: &DescribeConfigRuleEvaluationStatusRequest)
         -> Result<DescribeConfigRuleEvaluationStatusResponse,
                   DescribeConfigRuleEvaluationStatusError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeConfigRuleEvaluationStatus");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeConfigRuleEvaluationStatusResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeConfigRuleEvaluationStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns details about your AWS Config rules.</p>"]
    fn describe_config_rules(&self,
                             input: &DescribeConfigRulesRequest)
                             -> Result<DescribeConfigRulesResponse, DescribeConfigRulesError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.DescribeConfigRules");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeConfigRulesResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeConfigRulesError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns the current status of the specified configuration recorder. If a configuration recorder is not specified, this action returns the status of all configuration recorder associated with the account.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> </note>"]
    fn describe_configuration_recorder_status
        (&self,
         input: &DescribeConfigurationRecorderStatusRequest)
         -> Result<DescribeConfigurationRecorderStatusResponse,
                   DescribeConfigurationRecorderStatusError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeConfigurationRecorderStatus");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeConfigurationRecorderStatusResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeConfigurationRecorderStatusError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns the details for the specified configuration recorders. If the configuration recorder is not specified, this action returns the details for all configuration recorders associated with the account.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> </note>"]
    fn describe_configuration_recorders
        (&self,
         input: &DescribeConfigurationRecordersRequest)
         -> Result<DescribeConfigurationRecordersResponse, DescribeConfigurationRecordersError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeConfigurationRecorders");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeConfigurationRecordersResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeConfigurationRecordersError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Returns the current status of the specified delivery channel. If a delivery channel is not specified, this action returns the current status of all delivery channels associated with the account.</p> <note> <p>Currently, you can specify only one delivery channel per region in your account.</p> </note>"]
    fn describe_delivery_channel_status
        (&self,
         input: &DescribeDeliveryChannelStatusRequest)
         -> Result<DescribeDeliveryChannelStatusResponse, DescribeDeliveryChannelStatusError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeDeliveryChannelStatus");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeDeliveryChannelStatusResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeDeliveryChannelStatusError::from_body(String::from_utf8_lossy(&body)
                                                                      .as_ref()))
            }
        }
    }


    #[doc="<p>Returns details about the specified delivery channel. If a delivery channel is not specified, this action returns the details of all delivery channels associated with the account.</p> <note> <p>Currently, you can specify only one delivery channel per region in your account.</p> </note>"]
    fn describe_delivery_channels
        (&self,
         input: &DescribeDeliveryChannelsRequest)
         -> Result<DescribeDeliveryChannelsResponse, DescribeDeliveryChannelsError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.DescribeDeliveryChannels");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<DescribeDeliveryChannelsResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(DescribeDeliveryChannelsError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Returns the evaluation results for the specified AWS Config rule. The results indicate which AWS resources were evaluated by the rule, when each resource was last evaluated, and whether each resource complies with the rule.</p>"]
    fn get_compliance_details_by_config_rule
        (&self,
         input: &GetComplianceDetailsByConfigRuleRequest)
         -> Result<GetComplianceDetailsByConfigRuleResponse, GetComplianceDetailsByConfigRuleError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetComplianceDetailsByConfigRule");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetComplianceDetailsByConfigRuleResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetComplianceDetailsByConfigRuleError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns the evaluation results for the specified AWS resource. The results indicate which AWS Config rules were used to evaluate the resource, when each rule was last used, and whether the resource complies with each rule.</p>"]
    fn get_compliance_details_by_resource
        (&self,
         input: &GetComplianceDetailsByResourceRequest)
         -> Result<GetComplianceDetailsByResourceResponse, GetComplianceDetailsByResourceError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetComplianceDetailsByResource");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetComplianceDetailsByResourceResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetComplianceDetailsByResourceError::from_body(String::from_utf8_lossy(&body)
                                                                       .as_ref()))
            }
        }
    }


    #[doc="<p>Returns the number of AWS Config rules that are compliant and noncompliant, up to a maximum of 25 for each.</p>"]
    fn get_compliance_summary_by_config_rule
        (&self)
         -> Result<GetComplianceSummaryByConfigRuleResponse, GetComplianceSummaryByConfigRuleError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetComplianceSummaryByConfigRule");
        request.set_payload(Some(b"{}".to_vec()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetComplianceSummaryByConfigRuleResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetComplianceSummaryByConfigRuleError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns the number of resources that are compliant and the number that are noncompliant. You can specify one or more resource types to get these numbers for each resource type. The maximum number returned is 100.</p>"]
    fn get_compliance_summary_by_resource_type
        (&self,
         input: &GetComplianceSummaryByResourceTypeRequest)
         -> Result<GetComplianceSummaryByResourceTypeResponse,
                   GetComplianceSummaryByResourceTypeError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetComplianceSummaryByResourceType");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetComplianceSummaryByResourceTypeResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetComplianceSummaryByResourceTypeError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Returns the resource types, the number of each resource type, and the total number of resources that AWS Config is recording in this region for your AWS account. </p> <p class=\"title\"> <b>Example</b> </p> <ol> <li> <p>AWS Config is recording three resource types in the US East (Ohio) Region for your account: 25 EC2 instances, 20 IAM users, and 15 S3 buckets.</p> </li> <li> <p>You make a call to the <code>GetDiscoveredResourceCounts</code> action and specify that you want all resource types. </p> </li> <li> <p>AWS Config returns the following:</p> <ul> <li> <p>The resource types (EC2 instances, IAM users, and S3 buckets)</p> </li> <li> <p>The number of each resource type (25, 20, and 15)</p> </li> <li> <p>The total number of all resources (60)</p> </li> </ul> </li> </ol> <p>The response is paginated. By default, AWS Config lists 100 <a>ResourceCount</a> objects on each page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p> <note> <p>If you make a call to the <a>GetDiscoveredResourceCounts</a> action, you may not immediately receive resource counts in the following situations:</p> <ul> <li> <p>You are a new AWS Config customer</p> </li> <li> <p>You just enabled resource recording</p> </li> </ul> <p>It may take a few minutes for AWS Config to record and count your resources. Wait a few minutes and then retry the <a>GetDiscoveredResourceCounts</a> action. </p> </note>"]
    fn get_discovered_resource_counts
        (&self,
         input: &GetDiscoveredResourceCountsRequest)
         -> Result<GetDiscoveredResourceCountsResponse, GetDiscoveredResourceCountsError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetDiscoveredResourceCounts");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetDiscoveredResourceCountsResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetDiscoveredResourceCountsError::from_body(String::from_utf8_lossy(&body)
                                                                    .as_ref()))
            }
        }
    }


    #[doc="<p>Returns a list of configuration items for the specified resource. The list contains details about each state of the resource during the specified time interval.</p> <p>The response is paginated. By default, AWS Config returns a limit of 10 configuration items per page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p> <note> <p>Each call to the API is limited to span a duration of seven days. It is likely that the number of records returned is smaller than the specified <code>limit</code>. In such cases, you can make another call, using the <code>nextToken</code>.</p> </note>"]
    fn get_resource_config_history
        (&self,
         input: &GetResourceConfigHistoryRequest)
         -> Result<GetResourceConfigHistoryResponse, GetResourceConfigHistoryError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.GetResourceConfigHistory");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<GetResourceConfigHistoryResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(GetResourceConfigHistoryError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Accepts a resource type and returns a list of resource identifiers for the resources of that type. A resource identifier includes the resource type, ID, and (if available) the custom resource name. The results consist of resources that AWS Config has discovered, including those that AWS Config is not currently recording. You can narrow the results to include only resources that have specific resource IDs or a resource name.</p> <note> <p>You can specify either resource IDs or a resource name but not both in the same request.</p> </note> <p>The response is paginated. By default, AWS Config lists 100 resource identifiers on each page. You can customize this number with the <code>limit</code> parameter. The response includes a <code>nextToken</code> string. To get the next page of results, run the request again and specify the string for the <code>nextToken</code> parameter.</p>"]
    fn list_discovered_resources
        (&self,
         input: &ListDiscoveredResourcesRequest)
         -> Result<ListDiscoveredResourcesResponse, ListDiscoveredResourcesError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.ListDiscoveredResources");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<ListDiscoveredResourcesResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(ListDiscoveredResourcesError::from_body(String::from_utf8_lossy(&body)
                                                                .as_ref()))
            }
        }
    }


    #[doc="<p>Adds or updates an AWS Config rule for evaluating whether your AWS resources comply with your desired configurations.</p> <p>You can use this action for custom Config rules and AWS managed Config rules. A custom Config rule is a rule that you develop and maintain. An AWS managed Config rule is a customizable, predefined rule that AWS Config provides.</p> <p>If you are adding a new custom Config rule, you must first create the AWS Lambda function that the rule invokes to evaluate your resources. When you use the <code>PutConfigRule</code> action to add the rule to AWS Config, you must specify the Amazon Resource Name (ARN) that AWS Lambda assigns to the function. Specify the ARN for the <code>SourceIdentifier</code> key. This key is part of the <code>Source</code> object, which is part of the <code>ConfigRule</code> object. </p> <p>If you are adding an AWS managed Config rule, specify the rule's identifier for the <code>SourceIdentifier</code> key. To reference AWS managed Config rule identifiers, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_use-managed-rules.html\">About AWS Managed Config Rules</a>.</p> <p>For any new rule that you add, specify the <code>ConfigRuleName</code> in the <code>ConfigRule</code> object. Do not specify the <code>ConfigRuleArn</code> or the <code>ConfigRuleId</code>. These values are generated by AWS Config for new rules.</p> <p>If you are updating a rule that you added previously, you can specify the rule by <code>ConfigRuleName</code>, <code>ConfigRuleId</code>, or <code>ConfigRuleArn</code> in the <code>ConfigRule</code> data type that you use in this request.</p> <p>The maximum number of rules that AWS Config supports is 50.</p> <p>For more information about requesting a rule limit increase, see <a href=\"http://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html#limits_config\">AWS Config Limits</a> in the <i>AWS General Reference Guide</i>.</p> <p>For more information about developing and using AWS Config rules, see <a href=\"http://docs.aws.amazon.com/config/latest/developerguide/evaluate-config.html\">Evaluating AWS Resource Configurations with AWS Config</a> in the <i>AWS Config Developer Guide</i>.</p>"]
    fn put_config_rule(&self, input: &PutConfigRuleRequest) -> Result<(), PutConfigRuleError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.PutConfigRule");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PutConfigRuleError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Creates a new configuration recorder to record the selected resource configurations.</p> <p>You can use this action to change the role <code>roleARN</code> and/or the <code>recordingGroup</code> of an existing recorder. To change the role, call the action on the existing configuration recorder and specify a role.</p> <note> <p>Currently, you can specify only one configuration recorder per region in your account.</p> <p>If <code>ConfigurationRecorder</code> does not have the <b>recordingGroup</b> parameter specified, the default is to record all supported resource types.</p> </note>"]
    fn put_configuration_recorder(&self,
                                  input: &PutConfigurationRecorderRequest)
                                  -> Result<(), PutConfigurationRecorderError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.PutConfigurationRecorder");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PutConfigurationRecorderError::from_body(String::from_utf8_lossy(&body)
                                                                 .as_ref()))
            }
        }
    }


    #[doc="<p>Creates a delivery channel object to deliver configuration information to an Amazon S3 bucket and Amazon SNS topic.</p> <p>Before you can create a delivery channel, you must create a configuration recorder.</p> <p>You can use this action to change the Amazon S3 bucket or an Amazon SNS topic of the existing delivery channel. To change the Amazon S3 bucket or an Amazon SNS topic, call this action and specify the changed values for the S3 bucket and the SNS topic. If you specify a different value for either the S3 bucket or the SNS topic, this action will keep the existing value for the parameter that is not changed.</p> <note> <p>You can have only one delivery channel per region in your account.</p> </note>"]
    fn put_delivery_channel(&self,
                            input: &PutDeliveryChannelRequest)
                            -> Result<(), PutDeliveryChannelError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.PutDeliveryChannel");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PutDeliveryChannelError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Used by an AWS Lambda function to deliver evaluation results to AWS Config. This action is required in every AWS Lambda function that is invoked by an AWS Config rule.</p>"]
    fn put_evaluations(&self,
                       input: &PutEvaluationsRequest)
                       -> Result<PutEvaluationsResponse, PutEvaluationsError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target", "StarlingDoveService.PutEvaluations");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<PutEvaluationsResponse>(String::from_utf8_lossy(&body)
                                                                      .as_ref())
                           .unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(PutEvaluationsError::from_body(String::from_utf8_lossy(&body).as_ref()))
            }
        }
    }


    #[doc="<p>Runs an on-demand evaluation for the specified Config rules against the last known configuration state of the resources. Use <code>StartConfigRulesEvaluation</code> when you want to test a rule that you updated is working as expected. <code>StartConfigRulesEvaluation</code> does not re-record the latest configuration state for your resources; it re-runs an evaluation against the last known state of your resources. </p> <p>You can specify up to 25 Config rules per request. </p> <p>An existing <code>StartConfigRulesEvaluation</code> call must complete for the specified rules before you can call the API again. If you chose to have AWS Config stream to an Amazon SNS topic, you will receive a <code>ConfigRuleEvaluationStarted</code> notification when the evaluation starts.</p> <note> <p>You don't need to call the <code>StartConfigRulesEvaluation</code> API to run an evaluation for a new rule. When you create a new rule, AWS Config automatically evaluates your resources against the rule. </p> </note> <p>The <code>StartConfigRulesEvaluation</code> API is useful if you want to run on-demand evaluations, such as the following example:</p> <ol> <li> <p>You have a custom rule that evaluates your IAM resources every 24 hours.</p> </li> <li> <p>You update your Lambda function to add additional conditions to your rule.</p> </li> <li> <p>Instead of waiting for the next periodic evaluation, you call the <code>StartConfigRulesEvaluation</code> API.</p> </li> <li> <p>AWS Config invokes your Lambda function and evaluates your IAM resources.</p> </li> <li> <p>Your custom rule will still run periodic evaluations every 24 hours.</p> </li> </ol>"]
    fn start_config_rules_evaluation
        (&self,
         input: &StartConfigRulesEvaluationRequest)
         -> Result<StartConfigRulesEvaluationResponse, StartConfigRulesEvaluationError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.StartConfigRulesEvaluation");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Ok(serde_json::from_str::<StartConfigRulesEvaluationResponse>(String::from_utf8_lossy(&body).as_ref()).unwrap())
            }
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(StartConfigRulesEvaluationError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Starts recording configurations of the AWS resources you have selected to record in your AWS account.</p> <p>You must have created at least one delivery channel to successfully start the configuration recorder.</p>"]
    fn start_configuration_recorder(&self,
                                    input: &StartConfigurationRecorderRequest)
                                    -> Result<(), StartConfigurationRecorderError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.StartConfigurationRecorder");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(StartConfigurationRecorderError::from_body(String::from_utf8_lossy(&body)
                                                                   .as_ref()))
            }
        }
    }


    #[doc="<p>Stops recording configurations of the AWS resources you have selected to record in your AWS account.</p>"]
    fn stop_configuration_recorder(&self,
                                   input: &StopConfigurationRecorderRequest)
                                   -> Result<(), StopConfigurationRecorderError> {
        let mut request = SignedRequest::new("POST", "config", &self.region, "/");

        request.set_content_type("application/x-amz-json-1.1".to_owned());
        request.add_header("x-amz-target",
                           "StarlingDoveService.StopConfigurationRecorder");
        let encoded = serde_json::to_string(input).unwrap();
        request.set_payload(Some(encoded.into_bytes()));

        request.sign_with_plus(&try!(self.credentials_provider.credentials()), true);

        let mut response = try!(self.dispatcher.dispatch(&request));

        match response.status {
            StatusCode::Ok => Ok(()),
            _ => {
                let mut body: Vec<u8> = Vec::new();
                try!(response.body.read_to_end(&mut body));
                Err(StopConfigurationRecorderError::from_body(String::from_utf8_lossy(&body)
                                                                  .as_ref()))
            }
        }
    }
}

#[cfg(test)]
mod protocol_tests {}