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
// =================================================================
//
//                           * 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.
//
// =================================================================

use std::error::Error;
use std::fmt;

use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};

use rusoto_core::proto;
use rusoto_core::request::HttpResponse;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};

impl StepFunctionsClient {
    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
        let mut request = SignedRequest::new(http_method, "states", &self.region, request_uri);

        request.set_content_type("application/x-amz-json-1.0".to_owned());

        request
    }

    async fn sign_and_dispatch<E>(
        &self,
        request: SignedRequest,
        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
    ) -> Result<HttpResponse, RusotoError<E>> {
        let mut response = self.client.sign_and_dispatch(request).await?;
        if !response.status.is_success() {
            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
            return Err(from_response(response));
        }

        Ok(response)
    }
}

use serde_json;
/// <p>Contains details about an activity that failed during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about an activity.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityListItem {
    /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
    /// <p>The date the activity is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
    /// <p>The name of the activity.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
}

/// <p>Contains details about an activity schedule failure that occurred during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityScheduleFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about an activity scheduled during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityScheduledEventDetails {
    /// <p>The maximum allowed duration between two heartbeats for the activity task.</p>
    #[serde(rename = "heartbeatInSeconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub heartbeat_in_seconds: Option<i64>,
    /// <p>The JSON data input to the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>Contains details about the input for an execution history event.</p>
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The Amazon Resource Name (ARN) of the scheduled activity.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The maximum allowed duration of the activity task.</p>
    #[serde(rename = "timeoutInSeconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timeout_in_seconds: Option<i64>,
}

/// <p>Contains details about the start of an activity during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityStartedEventDetails {
    /// <p>The name of the worker that the task is assigned to. These names are provided by the workers when calling <a>GetActivityTask</a>.</p>
    #[serde(rename = "workerName")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub worker_name: Option<String>,
}

/// <p>Contains details about an activity that successfully terminated during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivitySucceededEventDetails {
    /// <p>The JSON data output by the activity task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
}

/// <p>Contains details about an activity timeout that occurred during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivityTimedOutEventDetails {
    /// <p>A more detailed explanation of the cause of the timeout.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>An object that describes workflow billing details.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BillingDetails {
    /// <p>Billed duration of your workflow, in milliseconds.</p>
    #[serde(rename = "billedDurationInMilliseconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub billed_duration_in_milliseconds: Option<i64>,
    /// <p>Billed memory consumption of your workflow, in MB.</p>
    #[serde(rename = "billedMemoryUsedInMB")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub billed_memory_used_in_mb: Option<i64>,
}

/// <p>Provides details about execution input or output.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CloudWatchEventsExecutionDataDetails {
    /// <p>Indicates whether input or output was included in the response. Always <code>true</code> for API calls. </p>
    #[serde(rename = "included")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub included: Option<bool>,
}

/// <p><p/></p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct CloudWatchLogsLogGroup {
    /// <p>The ARN of the the CloudWatch log group to which you want your logs emitted to. The ARN must end with <code>:*</code> </p>
    #[serde(rename = "logGroupArn")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub log_group_arn: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateActivityInput {
    /// <p>The name of the activity to create. This name must be unique for your AWS account and region for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>AWS Step Functions Developer Guide</i>.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The list of tags to add to a resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    #[serde(rename = "tags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<Tag>>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateActivityOutput {
    /// <p>The Amazon Resource Name (ARN) that identifies the created activity.</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
    /// <p>The date the activity is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateStateMachineInput {
    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
    #[serde(rename = "definition")]
    pub definition: String,
    /// <p><p>Defines what execution history events are logged and where they are logged.</p> <note> <p>By default, the <code>level</code> is set to <code>OFF</code>. For more information see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/cloudwatch-log-level.html">Log Levels</a> in the AWS Step Functions User Guide.</p> </note></p>
    #[serde(rename = "loggingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logging_configuration: Option<LoggingConfiguration>,
    /// <p>The name of the state machine. </p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The Amazon Resource Name (ARN) of the IAM role to use for this state machine.</p>
    #[serde(rename = "roleArn")]
    pub role_arn: String,
    /// <p>Tags to be added when creating a state machine.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    #[serde(rename = "tags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<Tag>>,
    /// <p>Selects whether AWS X-Ray tracing is enabled.</p>
    #[serde(rename = "tracingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tracing_configuration: Option<TracingConfiguration>,
    /// <p>Determines whether a Standard or Express state machine is created. The default is <code>STANDARD</code>. You cannot update the <code>type</code> of a state machine once it has been created.</p>
    #[serde(rename = "type")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateStateMachineOutput {
    /// <p>The date the state machine is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
    /// <p>The Amazon Resource Name (ARN) that identifies the created state machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteActivityInput {
    /// <p>The Amazon Resource Name (ARN) of the activity to delete.</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteActivityOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteStateMachineInput {
    /// <p>The Amazon Resource Name (ARN) of the state machine to delete.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteStateMachineOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeActivityInput {
    /// <p>The Amazon Resource Name (ARN) of the activity to describe.</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeActivityOutput {
    /// <p>The Amazon Resource Name (ARN) that identifies the activity.</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
    /// <p>The date the activity is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
    /// <p>The name of the activity.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the execution to describe.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeExecutionOutput {
    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
    /// <p>The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<CloudWatchEventsExecutionDataDetails>,
    /// <p>The name of the execution.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// <p><p>The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p> <note> <p>This field is set only if the execution succeeds. If the execution fails, this field is null.</p> </note></p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<CloudWatchEventsExecutionDataDetails>,
    /// <p>The date the execution is started.</p>
    #[serde(rename = "startDate")]
    pub start_date: f64,
    /// <p>The Amazon Resource Name (ARN) of the executed stated machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>The current status of the execution.</p>
    #[serde(rename = "status")]
    pub status: String,
    /// <p>If the execution has already ended, the date the execution stopped.</p>
    #[serde(rename = "stopDate")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stop_date: Option<f64>,
    /// <p>The AWS X-Ray trace header that was passed to the execution.</p>
    #[serde(rename = "traceHeader")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trace_header: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeStateMachineForExecutionInput {
    /// <p>The Amazon Resource Name (ARN) of the execution you want state machine information for.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeStateMachineForExecutionOutput {
    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
    #[serde(rename = "definition")]
    pub definition: String,
    #[serde(rename = "loggingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logging_configuration: Option<LoggingConfiguration>,
    /// <p>The name of the state machine associated with the execution.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The Amazon Resource Name (ARN) of the IAM role of the State Machine for the execution. </p>
    #[serde(rename = "roleArn")]
    pub role_arn: String,
    /// <p>The Amazon Resource Name (ARN) of the state machine associated with the execution.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>Selects whether AWS X-Ray tracing is enabled.</p>
    #[serde(rename = "tracingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tracing_configuration: Option<TracingConfiguration>,
    /// <p>The date and time the state machine associated with an execution was updated. For a newly created state machine, this is the creation date.</p>
    #[serde(rename = "updateDate")]
    pub update_date: f64,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeStateMachineInput {
    /// <p>The Amazon Resource Name (ARN) of the state machine to describe.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeStateMachineOutput {
    /// <p>The date the state machine is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
    #[serde(rename = "definition")]
    pub definition: String,
    #[serde(rename = "loggingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logging_configuration: Option<LoggingConfiguration>,
    /// <p>The name of the state machine.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains security by granting Step Functions access to AWS resources.)</p>
    #[serde(rename = "roleArn")]
    pub role_arn: String,
    /// <p>The Amazon Resource Name (ARN) that identifies the state machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>The current status of the state machine.</p>
    #[serde(rename = "status")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// <p>Selects whether AWS X-Ray tracing is enabled.</p>
    #[serde(rename = "tracingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tracing_configuration: Option<TracingConfiguration>,
    /// <p>The <code>type</code> of the state machine (<code>STANDARD</code> or <code>EXPRESS</code>).</p>
    #[serde(rename = "type")]
    pub type_: String,
}

/// <p>Contains details about an abort of an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionAbortedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about an execution failure event.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionListItem {
    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
    /// <p>The name of the execution.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The date the execution started.</p>
    #[serde(rename = "startDate")]
    pub start_date: f64,
    /// <p>The Amazon Resource Name (ARN) of the executed state machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>The current status of the execution.</p>
    #[serde(rename = "status")]
    pub status: String,
    /// <p>If the execution already ended, the date the execution stopped.</p>
    #[serde(rename = "stopDate")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub stop_date: Option<f64>,
}

/// <p>Contains details about the start of the execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionStartedEventDetails {
    /// <p>The JSON data input to the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>Contains details about the input for an execution history event.</p>
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role used for executing AWS Lambda tasks.</p>
    #[serde(rename = "roleArn")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub role_arn: Option<String>,
}

/// <p>Contains details about the successful termination of the execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionSucceededEventDetails {
    /// <p>The JSON data output by the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
}

/// <p>Contains details about the execution timeout that occurred during the execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ExecutionTimedOutEventDetails {
    /// <p>A more detailed explanation of the cause of the timeout.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetActivityTaskInput {
    /// <p>The Amazon Resource Name (ARN) of the activity to retrieve tasks from (assigned when you create the task using <a>CreateActivity</a>.)</p>
    #[serde(rename = "activityArn")]
    pub activity_arn: String,
    /// <p>You can provide an arbitrary name in order to identify the worker that the task is assigned to. This name is used when it is logged in the execution history.</p>
    #[serde(rename = "workerName")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub worker_name: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetActivityTaskOutput {
    /// <p>The string that contains the JSON input data for the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>A token that identifies the scheduled task. This token must be copied and included in subsequent calls to <a>SendTaskHeartbeat</a>, <a>SendTaskSuccess</a> or <a>SendTaskFailure</a> in order to report the progress or completion of the task.</p>
    #[serde(rename = "taskToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_token: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetExecutionHistoryInput {
    /// <p>The Amazon Resource Name (ARN) of the execution.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
    /// <p>You can select whether execution data (input or output of a history event) is returned. The default is <code>true</code>.</p>
    #[serde(rename = "includeExecutionData")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub include_execution_data: Option<bool>,
    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
    #[serde(rename = "maxResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
    /// <p>Lists events in descending order of their <code>timeStamp</code>.</p>
    #[serde(rename = "reverseOrder")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub reverse_order: Option<bool>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetExecutionHistoryOutput {
    /// <p>The list of events that occurred in the execution.</p>
    #[serde(rename = "events")]
    pub events: Vec<HistoryEvent>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
}

/// <p>Contains details about the events of an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct HistoryEvent {
    #[serde(rename = "activityFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_failed_event_details: Option<ActivityFailedEventDetails>,
    /// <p>Contains details about an activity schedule event that failed during an execution.</p>
    #[serde(rename = "activityScheduleFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_schedule_failed_event_details: Option<ActivityScheduleFailedEventDetails>,
    #[serde(rename = "activityScheduledEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_scheduled_event_details: Option<ActivityScheduledEventDetails>,
    #[serde(rename = "activityStartedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_started_event_details: Option<ActivityStartedEventDetails>,
    #[serde(rename = "activitySucceededEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_succeeded_event_details: Option<ActivitySucceededEventDetails>,
    #[serde(rename = "activityTimedOutEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub activity_timed_out_event_details: Option<ActivityTimedOutEventDetails>,
    #[serde(rename = "executionAbortedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution_aborted_event_details: Option<ExecutionAbortedEventDetails>,
    #[serde(rename = "executionFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution_failed_event_details: Option<ExecutionFailedEventDetails>,
    #[serde(rename = "executionStartedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution_started_event_details: Option<ExecutionStartedEventDetails>,
    #[serde(rename = "executionSucceededEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution_succeeded_event_details: Option<ExecutionSucceededEventDetails>,
    #[serde(rename = "executionTimedOutEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub execution_timed_out_event_details: Option<ExecutionTimedOutEventDetails>,
    /// <p>The id of the event. Events are numbered sequentially, starting at one.</p>
    #[serde(rename = "id")]
    pub id: i64,
    #[serde(rename = "lambdaFunctionFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_failed_event_details: Option<LambdaFunctionFailedEventDetails>,
    #[serde(rename = "lambdaFunctionScheduleFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_schedule_failed_event_details:
        Option<LambdaFunctionScheduleFailedEventDetails>,
    #[serde(rename = "lambdaFunctionScheduledEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_scheduled_event_details: Option<LambdaFunctionScheduledEventDetails>,
    /// <p>Contains details about a lambda function that failed to start during an execution.</p>
    #[serde(rename = "lambdaFunctionStartFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_start_failed_event_details: Option<LambdaFunctionStartFailedEventDetails>,
    /// <p>Contains details about a lambda function that terminated successfully during an execution.</p>
    #[serde(rename = "lambdaFunctionSucceededEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_succeeded_event_details: Option<LambdaFunctionSucceededEventDetails>,
    #[serde(rename = "lambdaFunctionTimedOutEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub lambda_function_timed_out_event_details: Option<LambdaFunctionTimedOutEventDetails>,
    /// <p>Contains details about an iteration of a Map state that was aborted.</p>
    #[serde(rename = "mapIterationAbortedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub map_iteration_aborted_event_details: Option<MapIterationEventDetails>,
    /// <p>Contains details about an iteration of a Map state that failed.</p>
    #[serde(rename = "mapIterationFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub map_iteration_failed_event_details: Option<MapIterationEventDetails>,
    /// <p>Contains details about an iteration of a Map state that was started.</p>
    #[serde(rename = "mapIterationStartedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub map_iteration_started_event_details: Option<MapIterationEventDetails>,
    /// <p>Contains details about an iteration of a Map state that succeeded.</p>
    #[serde(rename = "mapIterationSucceededEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub map_iteration_succeeded_event_details: Option<MapIterationEventDetails>,
    /// <p>Contains details about Map state that was started.</p>
    #[serde(rename = "mapStateStartedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub map_state_started_event_details: Option<MapStateStartedEventDetails>,
    /// <p>The id of the previous event.</p>
    #[serde(rename = "previousEventId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub previous_event_id: Option<i64>,
    #[serde(rename = "stateEnteredEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state_entered_event_details: Option<StateEnteredEventDetails>,
    #[serde(rename = "stateExitedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state_exited_event_details: Option<StateExitedEventDetails>,
    /// <p>Contains details about the failure of a task.</p>
    #[serde(rename = "taskFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_failed_event_details: Option<TaskFailedEventDetails>,
    /// <p>Contains details about a task that was scheduled.</p>
    #[serde(rename = "taskScheduledEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_scheduled_event_details: Option<TaskScheduledEventDetails>,
    /// <p>Contains details about a task that failed to start.</p>
    #[serde(rename = "taskStartFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_start_failed_event_details: Option<TaskStartFailedEventDetails>,
    /// <p>Contains details about a task that was started.</p>
    #[serde(rename = "taskStartedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_started_event_details: Option<TaskStartedEventDetails>,
    /// <p>Contains details about a task that where the submit failed.</p>
    #[serde(rename = "taskSubmitFailedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_submit_failed_event_details: Option<TaskSubmitFailedEventDetails>,
    /// <p>Contains details about a submitted task.</p>
    #[serde(rename = "taskSubmittedEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_submitted_event_details: Option<TaskSubmittedEventDetails>,
    /// <p>Contains details about a task that succeeded.</p>
    #[serde(rename = "taskSucceededEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_succeeded_event_details: Option<TaskSucceededEventDetails>,
    /// <p>Contains details about a task that timed out.</p>
    #[serde(rename = "taskTimedOutEventDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_timed_out_event_details: Option<TaskTimedOutEventDetails>,
    /// <p>The date and time the event occurred.</p>
    #[serde(rename = "timestamp")]
    pub timestamp: f64,
    /// <p>The type of the event.</p>
    #[serde(rename = "type")]
    pub type_: String,
}

/// <p>Provides details about input or output in an execution history event.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct HistoryEventExecutionDataDetails {
    /// <p>Indicates whether input or output was truncated in the response. Always <code>false</code> for API calls.</p>
    #[serde(rename = "truncated")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub truncated: Option<bool>,
}

/// <p>Contains details about a lambda function that failed during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about a failed lambda function schedule event that occurred during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionScheduleFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about a lambda function scheduled during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionScheduledEventDetails {
    /// <p>The JSON data input to the lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>Contains details about input for an execution history event.</p>
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The Amazon Resource Name (ARN) of the scheduled lambda function.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The maximum allowed duration of the lambda function.</p>
    #[serde(rename = "timeoutInSeconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timeout_in_seconds: Option<i64>,
}

/// <p>Contains details about a lambda function that failed to start during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionStartFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

/// <p>Contains details about a lambda function that successfully terminated during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionSucceededEventDetails {
    /// <p>The JSON data output by the lambda function. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
}

/// <p>Contains details about a lambda function timeout that occurred during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct LambdaFunctionTimedOutEventDetails {
    /// <p>A more detailed explanation of the cause of the timeout.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListActivitiesInput {
    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
    #[serde(rename = "maxResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListActivitiesOutput {
    /// <p>The list of activities.</p>
    #[serde(rename = "activities")]
    pub activities: Vec<ActivityListItem>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListExecutionsInput {
    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
    #[serde(rename = "maxResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
    /// <p>The Amazon Resource Name (ARN) of the state machine whose executions is listed.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>If specified, only list the executions whose current execution status matches the given filter.</p>
    #[serde(rename = "statusFilter")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub status_filter: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListExecutionsOutput {
    /// <p>The list of matching executions.</p>
    #[serde(rename = "executions")]
    pub executions: Vec<ExecutionListItem>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListStateMachinesInput {
    /// <p>The maximum number of results that are returned per call. You can use <code>nextToken</code> to obtain further pages of results. The default is 100 and the maximum allowed page size is 1000. A value of 0 uses the default.</p> <p>This is only an upper limit. The actual number of results returned per call might be fewer than the specified maximum.</p>
    #[serde(rename = "maxResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub max_results: Option<i64>,
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListStateMachinesOutput {
    /// <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
    #[serde(rename = "nextToken")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub next_token: Option<String>,
    #[serde(rename = "stateMachines")]
    pub state_machines: Vec<StateMachineListItem>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListTagsForResourceInput {
    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
    #[serde(rename = "resourceArn")]
    pub resource_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListTagsForResourceOutput {
    /// <p>An array of tags associated with the resource.</p>
    #[serde(rename = "tags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<Tag>>,
}

/// <p><p/></p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct LogDestination {
    /// <p>An object describing a CloudWatch log group. For more information, see <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-loggroup.html">AWS::Logs::LogGroup</a> in the AWS CloudFormation User Guide.</p>
    #[serde(rename = "cloudWatchLogsLogGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cloud_watch_logs_log_group: Option<CloudWatchLogsLogGroup>,
}

/// <p>The <code>LoggingConfiguration</code> data type is used to set CloudWatch Logs options.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct LoggingConfiguration {
    /// <p>An array of objects that describes where your execution history events will be logged. Limited to size 1. Required, if your log level is not set to <code>OFF</code>.</p>
    #[serde(rename = "destinations")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub destinations: Option<Vec<LogDestination>>,
    /// <p>Determines whether execution data is included in your log. When set to <code>false</code>, data is excluded.</p>
    #[serde(rename = "includeExecutionData")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub include_execution_data: Option<bool>,
    /// <p>Defines which category of execution history events are logged.</p>
    #[serde(rename = "level")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub level: Option<String>,
}

/// <p>Contains details about an iteration of a Map state.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MapIterationEventDetails {
    /// <p>The index of the array belonging to the Map state iteration.</p>
    #[serde(rename = "index")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub index: Option<i64>,
    /// <p>The name of the iteration’s parent Map state.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

/// <p>Details about a Map state that was started.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MapStateStartedEventDetails {
    /// <p>The size of the array for Map state iterations.</p>
    #[serde(rename = "length")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub length: Option<i64>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SendTaskFailureInput {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
    #[serde(rename = "taskToken")]
    pub task_token: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SendTaskFailureOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SendTaskHeartbeatInput {
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
    #[serde(rename = "taskToken")]
    pub task_token: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SendTaskHeartbeatOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SendTaskSuccessInput {
    /// <p>The JSON output of the task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    pub output: String,
    /// <p>The token that represents this task. Task tokens are generated by Step Functions when tasks are assigned to a worker, or in the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/input-output-contextobject.html">context object</a> when a workflow enters a task state. See <a>GetActivityTaskOutput$taskToken</a>.</p>
    #[serde(rename = "taskToken")]
    pub task_token: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SendTaskSuccessOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StartExecutionInput {
    /// <p>The string that contains the JSON input data for the execution, for example:</p> <p> <code>"input": "{\"first_name\" : \"test\"}"</code> </p> <note> <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"input": "{}"</code> </p> </note> <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>The name of the execution. This name must be unique for your AWS account, region, and state machine for 90 days. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html#service-limits-state-machine-executions"> Limits Related to State Machine Executions</a> in the <i>AWS Step Functions Developer Guide</i>.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>Passes the AWS X-Ray trace header. The trace header can also be passed in the request payload.</p>
    #[serde(rename = "traceHeader")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trace_header: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StartExecutionOutput {
    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
    /// <p>The date the execution is started.</p>
    #[serde(rename = "startDate")]
    pub start_date: f64,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StartSyncExecutionInput {
    /// <p>The string that contains the JSON input data for the execution, for example:</p> <p> <code>"input": "{\"first_name\" : \"test\"}"</code> </p> <note> <p>If you don't include any JSON input data, you still must include the two braces, for example: <code>"input": "{}"</code> </p> </note> <p>Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>The name of the execution.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// <p>The Amazon Resource Name (ARN) of the state machine to execute.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>Passes the AWS X-Ray trace header. The trace header can also be passed in the request payload.</p>
    #[serde(rename = "traceHeader")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trace_header: Option<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StartSyncExecutionOutput {
    /// <p>An object that describes workflow billing details, including billed duration and memory use.</p>
    #[serde(rename = "billingDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub billing_details: Option<BillingDetails>,
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The Amazon Resource Name (ARN) that identifies the execution.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
    /// <p>The string that contains the JSON input data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<CloudWatchEventsExecutionDataDetails>,
    /// <p>The name of the execution.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// <p><p>The JSON output data of the execution. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p> <note> <p>This field is set only if the execution succeeds. If the execution fails, this field is null.</p> </note></p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<CloudWatchEventsExecutionDataDetails>,
    /// <p>The date the execution is started.</p>
    #[serde(rename = "startDate")]
    pub start_date: f64,
    /// <p>The Amazon Resource Name (ARN) that identifies the state machine.</p>
    #[serde(rename = "stateMachineArn")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub state_machine_arn: Option<String>,
    /// <p>The current status of the execution.</p>
    #[serde(rename = "status")]
    pub status: String,
    /// <p>If the execution has already ended, the date the execution stopped.</p>
    #[serde(rename = "stopDate")]
    pub stop_date: f64,
    /// <p>The AWS X-Ray trace header that was passed to the execution.</p>
    #[serde(rename = "traceHeader")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub trace_header: Option<String>,
}

/// <p>Contains details about a state entered during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StateEnteredEventDetails {
    /// <p>The string that contains the JSON input data for the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "input")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input: Option<String>,
    /// <p>Contains details about the input for an execution history event.</p>
    #[serde(rename = "inputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub input_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The name of the state.</p>
    #[serde(rename = "name")]
    pub name: String,
}

/// <p>Contains details about an exit from a state during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StateExitedEventDetails {
    /// <p>The name of the state.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The JSON output data of the state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
}

/// <p>Contains details about the state machine.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StateMachineListItem {
    /// <p>The date the state machine is created.</p>
    #[serde(rename = "creationDate")]
    pub creation_date: f64,
    /// <p>The name of the state machine.</p> <p>A name must <i>not</i> contain:</p> <ul> <li> <p>white space</p> </li> <li> <p>brackets <code>&lt; &gt; { } [ ]</code> </p> </li> <li> <p>wildcard characters <code>? *</code> </p> </li> <li> <p>special characters <code>" # % \ ^ | ~ ` $ &amp; , ; : /</code> </p> </li> <li> <p>control characters (<code>U+0000-001F</code>, <code>U+007F-009F</code>)</p> </li> </ul> <p>To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The Amazon Resource Name (ARN) that identifies the state machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p><p/></p>
    #[serde(rename = "type")]
    pub type_: String,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StopExecutionInput {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The Amazon Resource Name (ARN) of the execution to stop.</p>
    #[serde(rename = "executionArn")]
    pub execution_arn: String,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct StopExecutionOutput {
    /// <p>The date the execution is stopped.</p>
    #[serde(rename = "stopDate")]
    pub stop_date: f64,
}

/// <p>Tags are key-value pairs that can be associated with Step Functions state machines and activities.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Tag {
    /// <p>The key of a tag.</p>
    #[serde(rename = "key")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// <p>The value of a tag.</p>
    #[serde(rename = "value")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceInput {
    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
    #[serde(rename = "resourceArn")]
    pub resource_arn: String,
    /// <p>The list of tags to add to a resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    #[serde(rename = "tags")]
    pub tags: Vec<Tag>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TagResourceOutput {}

/// <p>Contains details about a task failure event.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about a task scheduled during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskScheduledEventDetails {
    /// <p>The maximum allowed duration between two heartbeats for the task.</p>
    #[serde(rename = "heartbeatInSeconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub heartbeat_in_seconds: Option<i64>,
    /// <p>The JSON data passed to the resource referenced in a task state. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "parameters")]
    pub parameters: String,
    /// <p>The region of the scheduled task</p>
    #[serde(rename = "region")]
    pub region: String,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
    /// <p>The maximum allowed duration of the task.</p>
    #[serde(rename = "timeoutInSeconds")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub timeout_in_seconds: Option<i64>,
}

/// <p>Contains details about a task that failed to start during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskStartFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about the start of a task during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskStartedEventDetails {
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about a task that failed to submit during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskSubmitFailedEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about a task submitted to a resource .</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskSubmittedEventDetails {
    /// <p>The response from a resource when a task has started. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about the successful completion of a task state.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskSucceededEventDetails {
    /// <p>The full JSON response from a resource when a task has succeeded. This response becomes the output of the related task. Length constraints apply to the payload size, and are expressed as bytes in UTF-8 encoding.</p>
    #[serde(rename = "output")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// <p>Contains details about the output of an execution history event.</p>
    #[serde(rename = "outputDetails")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub output_details: Option<HistoryEventExecutionDataDetails>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Contains details about a resource timeout that occurred during an execution.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskTimedOutEventDetails {
    /// <p>A more detailed explanation of the cause of the failure.</p>
    #[serde(rename = "cause")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cause: Option<String>,
    /// <p>The error code of the failure.</p>
    #[serde(rename = "error")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// <p>The service name of the resource in a task state.</p>
    #[serde(rename = "resource")]
    pub resource: String,
    /// <p>The action of the resource called by a task state.</p>
    #[serde(rename = "resourceType")]
    pub resource_type: String,
}

/// <p>Selects whether or not the state machine's AWS X-Ray tracing is enabled. Default is <code>false</code> </p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TracingConfiguration {
    /// <p>When set to <code>true</code>, AWS X-Ray tracing is enabled.</p>
    #[serde(rename = "enabled")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub enabled: Option<bool>,
}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceInput {
    /// <p>The Amazon Resource Name (ARN) for the Step Functions state machine or activity.</p>
    #[serde(rename = "resourceArn")]
    pub resource_arn: String,
    /// <p>The list of tags to remove from the resource.</p>
    #[serde(rename = "tagKeys")]
    pub tag_keys: Vec<String>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UntagResourceOutput {}

#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateStateMachineInput {
    /// <p>The Amazon States Language definition of the state machine. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a>.</p>
    #[serde(rename = "definition")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub definition: Option<String>,
    /// <p>The <code>LoggingConfiguration</code> data type is used to set CloudWatch Logs options.</p>
    #[serde(rename = "loggingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub logging_configuration: Option<LoggingConfiguration>,
    /// <p>The Amazon Resource Name (ARN) of the IAM role of the state machine.</p>
    #[serde(rename = "roleArn")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub role_arn: Option<String>,
    /// <p>The Amazon Resource Name (ARN) of the state machine.</p>
    #[serde(rename = "stateMachineArn")]
    pub state_machine_arn: String,
    /// <p>Selects whether AWS X-Ray tracing is enabled.</p>
    #[serde(rename = "tracingConfiguration")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tracing_configuration: Option<TracingConfiguration>,
}

#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateStateMachineOutput {
    /// <p>The date and time the state machine was updated.</p>
    #[serde(rename = "updateDate")]
    pub update_date: f64,
}

/// Errors returned by CreateActivity
#[derive(Debug, PartialEq)]
pub enum CreateActivityError {
    /// <p>The maximum number of activities has been reached. Existing activities must be deleted before a new activity can be created.</p>
    ActivityLimitExceeded(String),
    /// <p>The provided name is invalid.</p>
    InvalidName(String),
    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
    TooManyTags(String),
}

impl CreateActivityError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateActivityError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ActivityLimitExceeded" => {
                    return RusotoError::Service(CreateActivityError::ActivityLimitExceeded(
                        err.msg,
                    ))
                }
                "InvalidName" => {
                    return RusotoError::Service(CreateActivityError::InvalidName(err.msg))
                }
                "TooManyTags" => {
                    return RusotoError::Service(CreateActivityError::TooManyTags(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for CreateActivityError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            CreateActivityError::ActivityLimitExceeded(ref cause) => write!(f, "{}", cause),
            CreateActivityError::InvalidName(ref cause) => write!(f, "{}", cause),
            CreateActivityError::TooManyTags(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for CreateActivityError {}
/// Errors returned by CreateStateMachine
#[derive(Debug, PartialEq)]
pub enum CreateStateMachineError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided Amazon States Language definition is invalid.</p>
    InvalidDefinition(String),
    /// <p><p/></p>
    InvalidLoggingConfiguration(String),
    /// <p>The provided name is invalid.</p>
    InvalidName(String),
    /// <p>Your <code>tracingConfiguration</code> key does not match, or <code>enabled</code> has not been set to <code>true</code> or <code>false</code>.</p>
    InvalidTracingConfiguration(String),
    /// <p>A state machine with the same name but a different definition or role ARN already exists.</p>
    StateMachineAlreadyExists(String),
    /// <p>The specified state machine is being deleted.</p>
    StateMachineDeleting(String),
    /// <p>The maximum number of state machines has been reached. Existing state machines must be deleted before a new state machine can be created.</p>
    StateMachineLimitExceeded(String),
    /// <p><p/></p>
    StateMachineTypeNotSupported(String),
    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
    TooManyTags(String),
}

impl CreateStateMachineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStateMachineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(CreateStateMachineError::InvalidArn(err.msg))
                }
                "InvalidDefinition" => {
                    return RusotoError::Service(CreateStateMachineError::InvalidDefinition(
                        err.msg,
                    ))
                }
                "InvalidLoggingConfiguration" => {
                    return RusotoError::Service(
                        CreateStateMachineError::InvalidLoggingConfiguration(err.msg),
                    )
                }
                "InvalidName" => {
                    return RusotoError::Service(CreateStateMachineError::InvalidName(err.msg))
                }
                "InvalidTracingConfiguration" => {
                    return RusotoError::Service(
                        CreateStateMachineError::InvalidTracingConfiguration(err.msg),
                    )
                }
                "StateMachineAlreadyExists" => {
                    return RusotoError::Service(
                        CreateStateMachineError::StateMachineAlreadyExists(err.msg),
                    )
                }
                "StateMachineDeleting" => {
                    return RusotoError::Service(CreateStateMachineError::StateMachineDeleting(
                        err.msg,
                    ))
                }
                "StateMachineLimitExceeded" => {
                    return RusotoError::Service(
                        CreateStateMachineError::StateMachineLimitExceeded(err.msg),
                    )
                }
                "StateMachineTypeNotSupported" => {
                    return RusotoError::Service(
                        CreateStateMachineError::StateMachineTypeNotSupported(err.msg),
                    )
                }
                "TooManyTags" => {
                    return RusotoError::Service(CreateStateMachineError::TooManyTags(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for CreateStateMachineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            CreateStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::InvalidDefinition(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::InvalidLoggingConfiguration(ref cause) => {
                write!(f, "{}", cause)
            }
            CreateStateMachineError::InvalidName(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::InvalidTracingConfiguration(ref cause) => {
                write!(f, "{}", cause)
            }
            CreateStateMachineError::StateMachineAlreadyExists(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::StateMachineLimitExceeded(ref cause) => write!(f, "{}", cause),
            CreateStateMachineError::StateMachineTypeNotSupported(ref cause) => {
                write!(f, "{}", cause)
            }
            CreateStateMachineError::TooManyTags(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for CreateStateMachineError {}
/// Errors returned by DeleteActivity
#[derive(Debug, PartialEq)]
pub enum DeleteActivityError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl DeleteActivityError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteActivityError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(DeleteActivityError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DeleteActivityError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DeleteActivityError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DeleteActivityError {}
/// Errors returned by DeleteStateMachine
#[derive(Debug, PartialEq)]
pub enum DeleteStateMachineError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl DeleteStateMachineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStateMachineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(DeleteStateMachineError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DeleteStateMachineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DeleteStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DeleteStateMachineError {}
/// Errors returned by DescribeActivity
#[derive(Debug, PartialEq)]
pub enum DescribeActivityError {
    /// <p>The specified activity does not exist.</p>
    ActivityDoesNotExist(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl DescribeActivityError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeActivityError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ActivityDoesNotExist" => {
                    return RusotoError::Service(DescribeActivityError::ActivityDoesNotExist(
                        err.msg,
                    ))
                }
                "InvalidArn" => {
                    return RusotoError::Service(DescribeActivityError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribeActivityError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribeActivityError::ActivityDoesNotExist(ref cause) => write!(f, "{}", cause),
            DescribeActivityError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DescribeActivityError {}
/// Errors returned by DescribeExecution
#[derive(Debug, PartialEq)]
pub enum DescribeExecutionError {
    /// <p>The specified execution does not exist.</p>
    ExecutionDoesNotExist(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl DescribeExecutionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeExecutionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ExecutionDoesNotExist" => {
                    return RusotoError::Service(DescribeExecutionError::ExecutionDoesNotExist(
                        err.msg,
                    ))
                }
                "InvalidArn" => {
                    return RusotoError::Service(DescribeExecutionError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribeExecutionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribeExecutionError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
            DescribeExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DescribeExecutionError {}
/// Errors returned by DescribeStateMachine
#[derive(Debug, PartialEq)]
pub enum DescribeStateMachineError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The specified state machine does not exist.</p>
    StateMachineDoesNotExist(String),
}

impl DescribeStateMachineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStateMachineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(DescribeStateMachineError::InvalidArn(err.msg))
                }
                "StateMachineDoesNotExist" => {
                    return RusotoError::Service(
                        DescribeStateMachineError::StateMachineDoesNotExist(err.msg),
                    )
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribeStateMachineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribeStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
            DescribeStateMachineError::StateMachineDoesNotExist(ref cause) => {
                write!(f, "{}", cause)
            }
        }
    }
}
impl Error for DescribeStateMachineError {}
/// Errors returned by DescribeStateMachineForExecution
#[derive(Debug, PartialEq)]
pub enum DescribeStateMachineForExecutionError {
    /// <p>The specified execution does not exist.</p>
    ExecutionDoesNotExist(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl DescribeStateMachineForExecutionError {
    pub fn from_response(
        res: BufferedHttpResponse,
    ) -> RusotoError<DescribeStateMachineForExecutionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ExecutionDoesNotExist" => {
                    return RusotoError::Service(
                        DescribeStateMachineForExecutionError::ExecutionDoesNotExist(err.msg),
                    )
                }
                "InvalidArn" => {
                    return RusotoError::Service(DescribeStateMachineForExecutionError::InvalidArn(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribeStateMachineForExecutionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribeStateMachineForExecutionError::ExecutionDoesNotExist(ref cause) => {
                write!(f, "{}", cause)
            }
            DescribeStateMachineForExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DescribeStateMachineForExecutionError {}
/// Errors returned by GetActivityTask
#[derive(Debug, PartialEq)]
pub enum GetActivityTaskError {
    /// <p>The specified activity does not exist.</p>
    ActivityDoesNotExist(String),
    /// <p>The maximum number of workers concurrently polling for activity tasks has been reached.</p>
    ActivityWorkerLimitExceeded(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl GetActivityTaskError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetActivityTaskError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ActivityDoesNotExist" => {
                    return RusotoError::Service(GetActivityTaskError::ActivityDoesNotExist(
                        err.msg,
                    ))
                }
                "ActivityWorkerLimitExceeded" => {
                    return RusotoError::Service(GetActivityTaskError::ActivityWorkerLimitExceeded(
                        err.msg,
                    ))
                }
                "InvalidArn" => {
                    return RusotoError::Service(GetActivityTaskError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for GetActivityTaskError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            GetActivityTaskError::ActivityDoesNotExist(ref cause) => write!(f, "{}", cause),
            GetActivityTaskError::ActivityWorkerLimitExceeded(ref cause) => write!(f, "{}", cause),
            GetActivityTaskError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for GetActivityTaskError {}
/// Errors returned by GetExecutionHistory
#[derive(Debug, PartialEq)]
pub enum GetExecutionHistoryError {
    /// <p>The specified execution does not exist.</p>
    ExecutionDoesNotExist(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),
}

impl GetExecutionHistoryError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExecutionHistoryError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ExecutionDoesNotExist" => {
                    return RusotoError::Service(GetExecutionHistoryError::ExecutionDoesNotExist(
                        err.msg,
                    ))
                }
                "InvalidArn" => {
                    return RusotoError::Service(GetExecutionHistoryError::InvalidArn(err.msg))
                }
                "InvalidToken" => {
                    return RusotoError::Service(GetExecutionHistoryError::InvalidToken(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for GetExecutionHistoryError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            GetExecutionHistoryError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
            GetExecutionHistoryError::InvalidArn(ref cause) => write!(f, "{}", cause),
            GetExecutionHistoryError::InvalidToken(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for GetExecutionHistoryError {}
/// Errors returned by ListActivities
#[derive(Debug, PartialEq)]
pub enum ListActivitiesError {
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),
}

impl ListActivitiesError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListActivitiesError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidToken" => {
                    return RusotoError::Service(ListActivitiesError::InvalidToken(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ListActivitiesError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ListActivitiesError::InvalidToken(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ListActivitiesError {}
/// Errors returned by ListExecutions
#[derive(Debug, PartialEq)]
pub enum ListExecutionsError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),
    /// <p>The specified state machine does not exist.</p>
    StateMachineDoesNotExist(String),
    /// <p><p/></p>
    StateMachineTypeNotSupported(String),
}

impl ListExecutionsError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListExecutionsError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(ListExecutionsError::InvalidArn(err.msg))
                }
                "InvalidToken" => {
                    return RusotoError::Service(ListExecutionsError::InvalidToken(err.msg))
                }
                "StateMachineDoesNotExist" => {
                    return RusotoError::Service(ListExecutionsError::StateMachineDoesNotExist(
                        err.msg,
                    ))
                }
                "StateMachineTypeNotSupported" => {
                    return RusotoError::Service(ListExecutionsError::StateMachineTypeNotSupported(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ListExecutionsError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ListExecutionsError::InvalidArn(ref cause) => write!(f, "{}", cause),
            ListExecutionsError::InvalidToken(ref cause) => write!(f, "{}", cause),
            ListExecutionsError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
            ListExecutionsError::StateMachineTypeNotSupported(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ListExecutionsError {}
/// Errors returned by ListStateMachines
#[derive(Debug, PartialEq)]
pub enum ListStateMachinesError {
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),
}

impl ListStateMachinesError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListStateMachinesError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidToken" => {
                    return RusotoError::Service(ListStateMachinesError::InvalidToken(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ListStateMachinesError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ListStateMachinesError::InvalidToken(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ListStateMachinesError {}
/// Errors returned by ListTagsForResource
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
    ResourceNotFound(String),
}

impl ListTagsForResourceError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(ListTagsForResourceError::InvalidArn(err.msg))
                }
                "ResourceNotFound" => {
                    return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ListTagsForResourceError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ListTagsForResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
            ListTagsForResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ListTagsForResourceError {}
/// Errors returned by SendTaskFailure
#[derive(Debug, PartialEq)]
pub enum SendTaskFailureError {
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),

    TaskDoesNotExist(String),

    TaskTimedOut(String),
}

impl SendTaskFailureError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskFailureError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidToken" => {
                    return RusotoError::Service(SendTaskFailureError::InvalidToken(err.msg))
                }
                "TaskDoesNotExist" => {
                    return RusotoError::Service(SendTaskFailureError::TaskDoesNotExist(err.msg))
                }
                "TaskTimedOut" => {
                    return RusotoError::Service(SendTaskFailureError::TaskTimedOut(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for SendTaskFailureError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            SendTaskFailureError::InvalidToken(ref cause) => write!(f, "{}", cause),
            SendTaskFailureError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
            SendTaskFailureError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for SendTaskFailureError {}
/// Errors returned by SendTaskHeartbeat
#[derive(Debug, PartialEq)]
pub enum SendTaskHeartbeatError {
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),

    TaskDoesNotExist(String),

    TaskTimedOut(String),
}

impl SendTaskHeartbeatError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskHeartbeatError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidToken" => {
                    return RusotoError::Service(SendTaskHeartbeatError::InvalidToken(err.msg))
                }
                "TaskDoesNotExist" => {
                    return RusotoError::Service(SendTaskHeartbeatError::TaskDoesNotExist(err.msg))
                }
                "TaskTimedOut" => {
                    return RusotoError::Service(SendTaskHeartbeatError::TaskTimedOut(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for SendTaskHeartbeatError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            SendTaskHeartbeatError::InvalidToken(ref cause) => write!(f, "{}", cause),
            SendTaskHeartbeatError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
            SendTaskHeartbeatError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for SendTaskHeartbeatError {}
/// Errors returned by SendTaskSuccess
#[derive(Debug, PartialEq)]
pub enum SendTaskSuccessError {
    /// <p>The provided JSON output data is invalid.</p>
    InvalidOutput(String),
    /// <p>The provided token is invalid.</p>
    InvalidToken(String),

    TaskDoesNotExist(String),

    TaskTimedOut(String),
}

impl SendTaskSuccessError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SendTaskSuccessError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidOutput" => {
                    return RusotoError::Service(SendTaskSuccessError::InvalidOutput(err.msg))
                }
                "InvalidToken" => {
                    return RusotoError::Service(SendTaskSuccessError::InvalidToken(err.msg))
                }
                "TaskDoesNotExist" => {
                    return RusotoError::Service(SendTaskSuccessError::TaskDoesNotExist(err.msg))
                }
                "TaskTimedOut" => {
                    return RusotoError::Service(SendTaskSuccessError::TaskTimedOut(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for SendTaskSuccessError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            SendTaskSuccessError::InvalidOutput(ref cause) => write!(f, "{}", cause),
            SendTaskSuccessError::InvalidToken(ref cause) => write!(f, "{}", cause),
            SendTaskSuccessError::TaskDoesNotExist(ref cause) => write!(f, "{}", cause),
            SendTaskSuccessError::TaskTimedOut(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for SendTaskSuccessError {}
/// Errors returned by StartExecution
#[derive(Debug, PartialEq)]
pub enum StartExecutionError {
    /// <p><p>The execution has the same <code>name</code> as another execution (but a different <code>input</code>).</p> <note> <p>Executions with the same <code>name</code> and <code>input</code> are considered idempotent.</p> </note></p>
    ExecutionAlreadyExists(String),
    /// <p>The maximum number of running executions has been reached. Running executions must end or be stopped before a new execution can be started.</p>
    ExecutionLimitExceeded(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided JSON input data is invalid.</p>
    InvalidExecutionInput(String),
    /// <p>The provided name is invalid.</p>
    InvalidName(String),
    /// <p>The specified state machine is being deleted.</p>
    StateMachineDeleting(String),
    /// <p>The specified state machine does not exist.</p>
    StateMachineDoesNotExist(String),
}

impl StartExecutionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartExecutionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ExecutionAlreadyExists" => {
                    return RusotoError::Service(StartExecutionError::ExecutionAlreadyExists(
                        err.msg,
                    ))
                }
                "ExecutionLimitExceeded" => {
                    return RusotoError::Service(StartExecutionError::ExecutionLimitExceeded(
                        err.msg,
                    ))
                }
                "InvalidArn" => {
                    return RusotoError::Service(StartExecutionError::InvalidArn(err.msg))
                }
                "InvalidExecutionInput" => {
                    return RusotoError::Service(StartExecutionError::InvalidExecutionInput(
                        err.msg,
                    ))
                }
                "InvalidName" => {
                    return RusotoError::Service(StartExecutionError::InvalidName(err.msg))
                }
                "StateMachineDeleting" => {
                    return RusotoError::Service(StartExecutionError::StateMachineDeleting(err.msg))
                }
                "StateMachineDoesNotExist" => {
                    return RusotoError::Service(StartExecutionError::StateMachineDoesNotExist(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for StartExecutionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            StartExecutionError::ExecutionAlreadyExists(ref cause) => write!(f, "{}", cause),
            StartExecutionError::ExecutionLimitExceeded(ref cause) => write!(f, "{}", cause),
            StartExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
            StartExecutionError::InvalidExecutionInput(ref cause) => write!(f, "{}", cause),
            StartExecutionError::InvalidName(ref cause) => write!(f, "{}", cause),
            StartExecutionError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
            StartExecutionError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for StartExecutionError {}
/// Errors returned by StartSyncExecution
#[derive(Debug, PartialEq)]
pub enum StartSyncExecutionError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided JSON input data is invalid.</p>
    InvalidExecutionInput(String),
    /// <p>The provided name is invalid.</p>
    InvalidName(String),
    /// <p>The specified state machine is being deleted.</p>
    StateMachineDeleting(String),
    /// <p>The specified state machine does not exist.</p>
    StateMachineDoesNotExist(String),
    /// <p><p/></p>
    StateMachineTypeNotSupported(String),
}

impl StartSyncExecutionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartSyncExecutionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(StartSyncExecutionError::InvalidArn(err.msg))
                }
                "InvalidExecutionInput" => {
                    return RusotoError::Service(StartSyncExecutionError::InvalidExecutionInput(
                        err.msg,
                    ))
                }
                "InvalidName" => {
                    return RusotoError::Service(StartSyncExecutionError::InvalidName(err.msg))
                }
                "StateMachineDeleting" => {
                    return RusotoError::Service(StartSyncExecutionError::StateMachineDeleting(
                        err.msg,
                    ))
                }
                "StateMachineDoesNotExist" => {
                    return RusotoError::Service(StartSyncExecutionError::StateMachineDoesNotExist(
                        err.msg,
                    ))
                }
                "StateMachineTypeNotSupported" => {
                    return RusotoError::Service(
                        StartSyncExecutionError::StateMachineTypeNotSupported(err.msg),
                    )
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for StartSyncExecutionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            StartSyncExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
            StartSyncExecutionError::InvalidExecutionInput(ref cause) => write!(f, "{}", cause),
            StartSyncExecutionError::InvalidName(ref cause) => write!(f, "{}", cause),
            StartSyncExecutionError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
            StartSyncExecutionError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
            StartSyncExecutionError::StateMachineTypeNotSupported(ref cause) => {
                write!(f, "{}", cause)
            }
        }
    }
}
impl Error for StartSyncExecutionError {}
/// Errors returned by StopExecution
#[derive(Debug, PartialEq)]
pub enum StopExecutionError {
    /// <p>The specified execution does not exist.</p>
    ExecutionDoesNotExist(String),
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
}

impl StopExecutionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopExecutionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "ExecutionDoesNotExist" => {
                    return RusotoError::Service(StopExecutionError::ExecutionDoesNotExist(err.msg))
                }
                "InvalidArn" => {
                    return RusotoError::Service(StopExecutionError::InvalidArn(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for StopExecutionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            StopExecutionError::ExecutionDoesNotExist(ref cause) => write!(f, "{}", cause),
            StopExecutionError::InvalidArn(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for StopExecutionError {}
/// Errors returned by TagResource
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
    ResourceNotFound(String),
    /// <p>You've exceeded the number of tags allowed for a resource. See the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/limits.html"> Limits Topic</a> in the AWS Step Functions Developer Guide.</p>
    TooManyTags(String),
}

impl TagResourceError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => return RusotoError::Service(TagResourceError::InvalidArn(err.msg)),
                "ResourceNotFound" => {
                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
                }
                "TooManyTags" => {
                    return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for TagResourceError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            TagResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
            TagResourceError::TooManyTags(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for TagResourceError {}
/// Errors returned by UntagResource
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>Could not find the referenced resource. Only state machine and activity ARNs are supported.</p>
    ResourceNotFound(String),
}

impl UntagResourceError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(UntagResourceError::InvalidArn(err.msg))
                }
                "ResourceNotFound" => {
                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for UntagResourceError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            UntagResourceError::InvalidArn(ref cause) => write!(f, "{}", cause),
            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for UntagResourceError {}
/// Errors returned by UpdateStateMachine
#[derive(Debug, PartialEq)]
pub enum UpdateStateMachineError {
    /// <p>The provided Amazon Resource Name (ARN) is invalid.</p>
    InvalidArn(String),
    /// <p>The provided Amazon States Language definition is invalid.</p>
    InvalidDefinition(String),
    /// <p><p/></p>
    InvalidLoggingConfiguration(String),
    /// <p>Your <code>tracingConfiguration</code> key does not match, or <code>enabled</code> has not been set to <code>true</code> or <code>false</code>.</p>
    InvalidTracingConfiguration(String),
    /// <p>Request is missing a required parameter. This error occurs if both <code>definition</code> and <code>roleArn</code> are not specified.</p>
    MissingRequiredParameter(String),
    /// <p>The specified state machine is being deleted.</p>
    StateMachineDeleting(String),
    /// <p>The specified state machine does not exist.</p>
    StateMachineDoesNotExist(String),
}

impl UpdateStateMachineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStateMachineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InvalidArn" => {
                    return RusotoError::Service(UpdateStateMachineError::InvalidArn(err.msg))
                }
                "InvalidDefinition" => {
                    return RusotoError::Service(UpdateStateMachineError::InvalidDefinition(
                        err.msg,
                    ))
                }
                "InvalidLoggingConfiguration" => {
                    return RusotoError::Service(
                        UpdateStateMachineError::InvalidLoggingConfiguration(err.msg),
                    )
                }
                "InvalidTracingConfiguration" => {
                    return RusotoError::Service(
                        UpdateStateMachineError::InvalidTracingConfiguration(err.msg),
                    )
                }
                "MissingRequiredParameter" => {
                    return RusotoError::Service(UpdateStateMachineError::MissingRequiredParameter(
                        err.msg,
                    ))
                }
                "StateMachineDeleting" => {
                    return RusotoError::Service(UpdateStateMachineError::StateMachineDeleting(
                        err.msg,
                    ))
                }
                "StateMachineDoesNotExist" => {
                    return RusotoError::Service(UpdateStateMachineError::StateMachineDoesNotExist(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for UpdateStateMachineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            UpdateStateMachineError::InvalidArn(ref cause) => write!(f, "{}", cause),
            UpdateStateMachineError::InvalidDefinition(ref cause) => write!(f, "{}", cause),
            UpdateStateMachineError::InvalidLoggingConfiguration(ref cause) => {
                write!(f, "{}", cause)
            }
            UpdateStateMachineError::InvalidTracingConfiguration(ref cause) => {
                write!(f, "{}", cause)
            }
            UpdateStateMachineError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
            UpdateStateMachineError::StateMachineDeleting(ref cause) => write!(f, "{}", cause),
            UpdateStateMachineError::StateMachineDoesNotExist(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for UpdateStateMachineError {}
/// Trait representing the capabilities of the AWS SFN API. AWS SFN clients implement this trait.
#[async_trait]
pub trait StepFunctions {
    /// <p><p>Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the <code>GetActivityTask</code> API action and respond using <code>SendTask*</code> API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateActivity</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateActivity</code>&#39;s idempotency check is based on the activity <code>name</code>. If a following request has different <code>tags</code> values, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>tags</code> will not be updated, even if they are different.</p> </note></p>
    async fn create_activity(
        &self,
        input: CreateActivityInput,
    ) -> Result<CreateActivityOutput, RusotoError<CreateActivityError>>;

    /// <p><p>Creates a state machine. A state machine consists of a collection of states that can do work (<code>Task</code> states), determine to which states to transition next (<code>Choice</code> states), stop an execution with an error (<code>Fail</code> states), and so on. State machines are specified using a JSON-based, structured language. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> in the AWS Step Functions User Guide.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateStateMachine</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateStateMachine</code>&#39;s idempotency check is based on the state machine <code>name</code>, <code>definition</code>, <code>type</code>, <code>LoggingConfiguration</code> and <code>TracingConfiguration</code>. If a following request has a different <code>roleArn</code> or <code>tags</code>, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>roleArn</code> and <code>tags</code> will not be updated, even if they are different.</p> </note></p>
    async fn create_state_machine(
        &self,
        input: CreateStateMachineInput,
    ) -> Result<CreateStateMachineOutput, RusotoError<CreateStateMachineError>>;

    /// <p>Deletes an activity.</p>
    async fn delete_activity(
        &self,
        input: DeleteActivityInput,
    ) -> Result<DeleteActivityOutput, RusotoError<DeleteActivityError>>;

    /// <p><p>Deletes a state machine. This is an asynchronous operation: It sets the state machine&#39;s status to <code>DELETING</code> and begins the deletion process. </p> <note> <p>For <code>EXPRESS</code>state machines, the deletion will happen eventually (usually less than a minute). Running executions may emit logs after <code>DeleteStateMachine</code> API is called.</p> </note></p>
    async fn delete_state_machine(
        &self,
        input: DeleteStateMachineInput,
    ) -> Result<DeleteStateMachineOutput, RusotoError<DeleteStateMachineError>>;

    /// <p><p>Describes an activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn describe_activity(
        &self,
        input: DescribeActivityInput,
    ) -> Result<DescribeActivityOutput, RusotoError<DescribeActivityError>>;

    /// <p>Describes an execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn describe_execution(
        &self,
        input: DescribeExecutionInput,
    ) -> Result<DescribeExecutionOutput, RusotoError<DescribeExecutionError>>;

    /// <p><p>Describes a state machine.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn describe_state_machine(
        &self,
        input: DescribeStateMachineInput,
    ) -> Result<DescribeStateMachineOutput, RusotoError<DescribeStateMachineError>>;

    /// <p>Describes the state machine associated with a specific execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn describe_state_machine_for_execution(
        &self,
        input: DescribeStateMachineForExecutionInput,
    ) -> Result<
        DescribeStateMachineForExecutionOutput,
        RusotoError<DescribeStateMachineForExecutionError>,
    >;

    /// <p><p>Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns a <code>taskToken</code> with a null string.</p> <important> <p>Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum time the service may hold the poll request).</p> <p>Polling with <code>GetActivityTask</code> can cause latency in some implementations. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html">Avoid Latency When Polling for Activity Tasks</a> in the Step Functions Developer Guide.</p> </important></p>
    async fn get_activity_task(
        &self,
        input: GetActivityTaskInput,
    ) -> Result<GetActivityTaskOutput, RusotoError<GetActivityTaskError>>;

    /// <p>Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the <code>timeStamp</code> of the events. Use the <code>reverseOrder</code> parameter to get the latest events first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn get_execution_history(
        &self,
        input: GetExecutionHistoryInput,
    ) -> Result<GetExecutionHistoryOutput, RusotoError<GetExecutionHistoryError>>;

    /// <p><p>Lists the existing activities.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn list_activities(
        &self,
        input: ListActivitiesInput,
    ) -> Result<ListActivitiesOutput, RusotoError<ListActivitiesError>>;

    /// <p>Lists the executions of a state machine that meet the filtering criteria. Results are sorted by time, with the most recent execution first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn list_executions(
        &self,
        input: ListExecutionsInput,
    ) -> Result<ListExecutionsOutput, RusotoError<ListExecutionsError>>;

    /// <p><p>Lists the existing state machines.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn list_state_machines(
        &self,
        input: ListStateMachinesInput,
    ) -> Result<ListStateMachinesOutput, RusotoError<ListStateMachinesError>>;

    /// <p>List tags for a given resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    async fn list_tags_for_resource(
        &self,
        input: ListTagsForResourceInput,
    ) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>>;

    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> failed.</p>
    async fn send_task_failure(
        &self,
        input: SendTaskFailureInput,
    ) -> Result<SendTaskFailureOutput, RusotoError<SendTaskFailureError>>;

    /// <p><p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report to Step Functions that the task represented by the specified <code>taskToken</code> is still making progress. This action resets the <code>Heartbeat</code> clock. The <code>Heartbeat</code> threshold is specified in the state machine&#39;s Amazon States Language definition (<code>HeartbeatSeconds</code>). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains an <code>ActivityTimedOut</code> entry for activities, or a <code>TaskTimedOut</code> entry for for tasks using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a> or <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern.</p> <note> <p>The <code>Timeout</code> of a task, defined in the state machine&#39;s Amazon States Language definition, is its maximum allowed duration, regardless of the number of <a>SendTaskHeartbeat</a> requests received. Use <code>HeartbeatSeconds</code> to configure the timeout interval for heartbeats.</p> </note></p>
    async fn send_task_heartbeat(
        &self,
        input: SendTaskHeartbeatInput,
    ) -> Result<SendTaskHeartbeatOutput, RusotoError<SendTaskHeartbeatError>>;

    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> completed successfully.</p>
    async fn send_task_success(
        &self,
        input: SendTaskSuccessInput,
    ) -> Result<SendTaskSuccessOutput, RusotoError<SendTaskSuccessError>>;

    /// <p><p>Starts a state machine execution.</p> <note> <p> <code>StartExecution</code> is idempotent. If <code>StartExecution</code> is called with the same name and input as a running execution, the call will succeed and return the same response as the original request. If the execution is closed or if the input is different, it will return a 400 <code>ExecutionAlreadyExists</code> error. Names can be reused after 90 days. </p> </note></p>
    async fn start_execution(
        &self,
        input: StartExecutionInput,
    ) -> Result<StartExecutionOutput, RusotoError<StartExecutionError>>;

    /// <p>Starts a Synchronous Express state machine execution.</p>
    async fn start_sync_execution(
        &self,
        input: StartSyncExecutionInput,
    ) -> Result<StartSyncExecutionOutput, RusotoError<StartSyncExecutionError>>;

    /// <p>Stops an execution.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn stop_execution(
        &self,
        input: StopExecutionInput,
    ) -> Result<StopExecutionOutput, RusotoError<StopExecutionError>>;

    /// <p>Add a tag to a Step Functions resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    async fn tag_resource(
        &self,
        input: TagResourceInput,
    ) -> Result<TagResourceOutput, RusotoError<TagResourceError>>;

    /// <p>Remove a tag from a Step Functions resource</p>
    async fn untag_resource(
        &self,
        input: UntagResourceInput,
    ) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>>;

    /// <p><p>Updates an existing state machine by modifying its <code>definition</code>, <code>roleArn</code>, or <code>loggingConfiguration</code>. Running executions will continue to use the previous <code>definition</code> and <code>roleArn</code>. You must include at least one of <code>definition</code> or <code>roleArn</code> or you will receive a <code>MissingRequiredParameter</code> error.</p> <note> <p>All <code>StartExecution</code> calls within a few seconds will use the updated <code>definition</code> and <code>roleArn</code>. Executions started immediately after calling <code>UpdateStateMachine</code> may use the previous state machine <code>definition</code> and <code>roleArn</code>. </p> </note></p>
    async fn update_state_machine(
        &self,
        input: UpdateStateMachineInput,
    ) -> Result<UpdateStateMachineOutput, RusotoError<UpdateStateMachineError>>;
}
/// A client for the AWS SFN API.
#[derive(Clone)]
pub struct StepFunctionsClient {
    client: Client,
    region: region::Region,
}

impl StepFunctionsClient {
    /// Creates a client backed by the default tokio event loop.
    ///
    /// The client will use the default credentials provider and tls client.
    pub fn new(region: region::Region) -> StepFunctionsClient {
        StepFunctionsClient {
            client: Client::shared(),
            region,
        }
    }

    pub fn new_with<P, D>(
        request_dispatcher: D,
        credentials_provider: P,
        region: region::Region,
    ) -> StepFunctionsClient
    where
        P: ProvideAwsCredentials + Send + Sync + 'static,
        D: DispatchSignedRequest + Send + Sync + 'static,
    {
        StepFunctionsClient {
            client: Client::new_with(credentials_provider, request_dispatcher),
            region,
        }
    }

    pub fn new_with_client(client: Client, region: region::Region) -> StepFunctionsClient {
        StepFunctionsClient { client, region }
    }
}

#[async_trait]
impl StepFunctions for StepFunctionsClient {
    /// <p><p>Creates an activity. An activity is a task that you write in any programming language and host on any machine that has access to AWS Step Functions. Activities must poll Step Functions using the <code>GetActivityTask</code> API action and respond using <code>SendTask*</code> API actions. This function lets Step Functions know the existence of your activity and returns an identifier for use in a state machine and when polling from the activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateActivity</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateActivity</code>&#39;s idempotency check is based on the activity <code>name</code>. If a following request has different <code>tags</code> values, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>tags</code> will not be updated, even if they are different.</p> </note></p>
    async fn create_activity(
        &self,
        input: CreateActivityInput,
    ) -> Result<CreateActivityOutput, RusotoError<CreateActivityError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.CreateActivity");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, CreateActivityError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<CreateActivityOutput, _>()
    }

    /// <p><p>Creates a state machine. A state machine consists of a collection of states that can do work (<code>Task</code> states), determine to which states to transition next (<code>Choice</code> states), stop an execution with an error (<code>Fail</code> states), and so on. State machines are specified using a JSON-based, structured language. For more information, see <a href="https://docs.aws.amazon.com/step-functions/latest/dg/concepts-amazon-states-language.html">Amazon States Language</a> in the AWS Step Functions User Guide.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <note> <p> <code>CreateStateMachine</code> is an idempotent API. Subsequent requests won’t create a duplicate resource if it was already created. <code>CreateStateMachine</code>&#39;s idempotency check is based on the state machine <code>name</code>, <code>definition</code>, <code>type</code>, <code>LoggingConfiguration</code> and <code>TracingConfiguration</code>. If a following request has a different <code>roleArn</code> or <code>tags</code>, Step Functions will ignore these differences and treat it as an idempotent request of the previous. In this case, <code>roleArn</code> and <code>tags</code> will not be updated, even if they are different.</p> </note></p>
    async fn create_state_machine(
        &self,
        input: CreateStateMachineInput,
    ) -> Result<CreateStateMachineOutput, RusotoError<CreateStateMachineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.CreateStateMachine");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, CreateStateMachineError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<CreateStateMachineOutput, _>()
    }

    /// <p>Deletes an activity.</p>
    async fn delete_activity(
        &self,
        input: DeleteActivityInput,
    ) -> Result<DeleteActivityOutput, RusotoError<DeleteActivityError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.DeleteActivity");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DeleteActivityError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<DeleteActivityOutput, _>()
    }

    /// <p><p>Deletes a state machine. This is an asynchronous operation: It sets the state machine&#39;s status to <code>DELETING</code> and begins the deletion process. </p> <note> <p>For <code>EXPRESS</code>state machines, the deletion will happen eventually (usually less than a minute). Running executions may emit logs after <code>DeleteStateMachine</code> API is called.</p> </note></p>
    async fn delete_state_machine(
        &self,
        input: DeleteStateMachineInput,
    ) -> Result<DeleteStateMachineOutput, RusotoError<DeleteStateMachineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.DeleteStateMachine");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DeleteStateMachineError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<DeleteStateMachineOutput, _>()
    }

    /// <p><p>Describes an activity.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn describe_activity(
        &self,
        input: DescribeActivityInput,
    ) -> Result<DescribeActivityOutput, RusotoError<DescribeActivityError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.DescribeActivity");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DescribeActivityError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<DescribeActivityOutput, _>()
    }

    /// <p>Describes an execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn describe_execution(
        &self,
        input: DescribeExecutionInput,
    ) -> Result<DescribeExecutionOutput, RusotoError<DescribeExecutionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.DescribeExecution");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DescribeExecutionError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<DescribeExecutionOutput, _>()
    }

    /// <p><p>Describes a state machine.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn describe_state_machine(
        &self,
        input: DescribeStateMachineInput,
    ) -> Result<DescribeStateMachineOutput, RusotoError<DescribeStateMachineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.DescribeStateMachine");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DescribeStateMachineError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<DescribeStateMachineOutput, _>()
    }

    /// <p>Describes the state machine associated with a specific execution.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn describe_state_machine_for_execution(
        &self,
        input: DescribeStateMachineForExecutionInput,
    ) -> Result<
        DescribeStateMachineForExecutionOutput,
        RusotoError<DescribeStateMachineForExecutionError>,
    > {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header(
            "x-amz-target",
            "AWSStepFunctions.DescribeStateMachineForExecution",
        );
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(
                request,
                DescribeStateMachineForExecutionError::from_response,
            )
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response)
            .deserialize::<DescribeStateMachineForExecutionOutput, _>()
    }

    /// <p><p>Used by workers to retrieve a task (with the specified activity ARN) which has been scheduled for execution by a running state machine. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available (i.e. an execution of a task of this type is needed.) The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns a <code>taskToken</code> with a null string.</p> <important> <p>Workers should set their client side socket timeout to at least 65 seconds (5 seconds higher than the maximum time the service may hold the poll request).</p> <p>Polling with <code>GetActivityTask</code> can cause latency in some implementations. See <a href="https://docs.aws.amazon.com/step-functions/latest/dg/bp-activity-pollers.html">Avoid Latency When Polling for Activity Tasks</a> in the Step Functions Developer Guide.</p> </important></p>
    async fn get_activity_task(
        &self,
        input: GetActivityTaskInput,
    ) -> Result<GetActivityTaskOutput, RusotoError<GetActivityTaskError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.GetActivityTask");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, GetActivityTaskError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<GetActivityTaskOutput, _>()
    }

    /// <p>Returns the history of the specified execution as a list of events. By default, the results are returned in ascending order of the <code>timeStamp</code> of the events. Use the <code>reverseOrder</code> parameter to get the latest events first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn get_execution_history(
        &self,
        input: GetExecutionHistoryInput,
    ) -> Result<GetExecutionHistoryOutput, RusotoError<GetExecutionHistoryError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.GetExecutionHistory");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, GetExecutionHistoryError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<GetExecutionHistoryOutput, _>()
    }

    /// <p><p>Lists the existing activities.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn list_activities(
        &self,
        input: ListActivitiesInput,
    ) -> Result<ListActivitiesOutput, RusotoError<ListActivitiesError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.ListActivities");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, ListActivitiesError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<ListActivitiesOutput, _>()
    }

    /// <p>Lists the executions of a state machine that meet the filtering criteria. Results are sorted by time, with the most recent execution first.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn list_executions(
        &self,
        input: ListExecutionsInput,
    ) -> Result<ListExecutionsOutput, RusotoError<ListExecutionsError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.ListExecutions");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, ListExecutionsError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<ListExecutionsOutput, _>()
    }

    /// <p><p>Lists the existing state machines.</p> <p>If <code>nextToken</code> is returned, there are more results available. The value of <code>nextToken</code> is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p> <note> <p>This operation is eventually consistent. The results are best effort and may not reflect very recent updates and changes.</p> </note></p>
    async fn list_state_machines(
        &self,
        input: ListStateMachinesInput,
    ) -> Result<ListStateMachinesOutput, RusotoError<ListStateMachinesError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.ListStateMachines");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, ListStateMachinesError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<ListStateMachinesOutput, _>()
    }

    /// <p>List tags for a given resource.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    async fn list_tags_for_resource(
        &self,
        input: ListTagsForResourceInput,
    ) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.ListTagsForResource");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceOutput, _>()
    }

    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> failed.</p>
    async fn send_task_failure(
        &self,
        input: SendTaskFailureInput,
    ) -> Result<SendTaskFailureOutput, RusotoError<SendTaskFailureError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskFailure");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, SendTaskFailureError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskFailureOutput, _>()
    }

    /// <p><p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report to Step Functions that the task represented by the specified <code>taskToken</code> is still making progress. This action resets the <code>Heartbeat</code> clock. The <code>Heartbeat</code> threshold is specified in the state machine&#39;s Amazon States Language definition (<code>HeartbeatSeconds</code>). This action does not in itself create an event in the execution history. However, if the task times out, the execution history contains an <code>ActivityTimedOut</code> entry for activities, or a <code>TaskTimedOut</code> entry for for tasks using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-sync">job run</a> or <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern.</p> <note> <p>The <code>Timeout</code> of a task, defined in the state machine&#39;s Amazon States Language definition, is its maximum allowed duration, regardless of the number of <a>SendTaskHeartbeat</a> requests received. Use <code>HeartbeatSeconds</code> to configure the timeout interval for heartbeats.</p> </note></p>
    async fn send_task_heartbeat(
        &self,
        input: SendTaskHeartbeatInput,
    ) -> Result<SendTaskHeartbeatOutput, RusotoError<SendTaskHeartbeatError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskHeartbeat");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, SendTaskHeartbeatError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskHeartbeatOutput, _>()
    }

    /// <p>Used by activity workers and task states using the <a href="https://docs.aws.amazon.com/step-functions/latest/dg/connect-to-resource.html#connect-wait-token">callback</a> pattern to report that the task identified by the <code>taskToken</code> completed successfully.</p>
    async fn send_task_success(
        &self,
        input: SendTaskSuccessInput,
    ) -> Result<SendTaskSuccessOutput, RusotoError<SendTaskSuccessError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.SendTaskSuccess");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, SendTaskSuccessError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<SendTaskSuccessOutput, _>()
    }

    /// <p><p>Starts a state machine execution.</p> <note> <p> <code>StartExecution</code> is idempotent. If <code>StartExecution</code> is called with the same name and input as a running execution, the call will succeed and return the same response as the original request. If the execution is closed or if the input is different, it will return a 400 <code>ExecutionAlreadyExists</code> error. Names can be reused after 90 days. </p> </note></p>
    async fn start_execution(
        &self,
        input: StartExecutionInput,
    ) -> Result<StartExecutionOutput, RusotoError<StartExecutionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.StartExecution");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, StartExecutionError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<StartExecutionOutput, _>()
    }

    /// <p>Starts a Synchronous Express state machine execution.</p>
    async fn start_sync_execution(
        &self,
        input: StartSyncExecutionInput,
    ) -> Result<StartSyncExecutionOutput, RusotoError<StartSyncExecutionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.StartSyncExecution");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, StartSyncExecutionError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<StartSyncExecutionOutput, _>()
    }

    /// <p>Stops an execution.</p> <p>This API action is not supported by <code>EXPRESS</code> state machines.</p>
    async fn stop_execution(
        &self,
        input: StopExecutionInput,
    ) -> Result<StopExecutionOutput, RusotoError<StopExecutionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.StopExecution");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, StopExecutionError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<StopExecutionOutput, _>()
    }

    /// <p>Add a tag to a Step Functions resource.</p> <p>An array of key-value pairs. For more information, see <a href="https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html">Using Cost Allocation Tags</a> in the <i>AWS Billing and Cost Management User Guide</i>, and <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/access_iam-tags.html">Controlling Access Using IAM Tags</a>.</p> <p>Tags may only contain Unicode letters, digits, white space, or these symbols: <code>_ . : / = + - @</code>.</p>
    async fn tag_resource(
        &self,
        input: TagResourceInput,
    ) -> Result<TagResourceOutput, RusotoError<TagResourceError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.TagResource");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, TagResourceError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceOutput, _>()
    }

    /// <p>Remove a tag from a Step Functions resource</p>
    async fn untag_resource(
        &self,
        input: UntagResourceInput,
    ) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.UntagResource");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, UntagResourceError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceOutput, _>()
    }

    /// <p><p>Updates an existing state machine by modifying its <code>definition</code>, <code>roleArn</code>, or <code>loggingConfiguration</code>. Running executions will continue to use the previous <code>definition</code> and <code>roleArn</code>. You must include at least one of <code>definition</code> or <code>roleArn</code> or you will receive a <code>MissingRequiredParameter</code> error.</p> <note> <p>All <code>StartExecution</code> calls within a few seconds will use the updated <code>definition</code> and <code>roleArn</code>. Executions started immediately after calling <code>UpdateStateMachine</code> may use the previous state machine <code>definition</code> and <code>roleArn</code>. </p> </note></p>
    async fn update_state_machine(
        &self,
        input: UpdateStateMachineInput,
    ) -> Result<UpdateStateMachineOutput, RusotoError<UpdateStateMachineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "AWSStepFunctions.UpdateStateMachine");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, UpdateStateMachineError::from_response)
            .await?;
        let mut response = response;
        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
        proto::json::ResponsePayload::new(&response).deserialize::<UpdateStateMachineOutput, _>()
    }
}