logo
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
// =================================================================
//
//                           * 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 DataPipelineClient {
    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
        let mut request =
            SignedRequest::new(http_method, "datapipeline", &self.region, request_uri);

        request.set_content_type("application/x-amz-json-1.1".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 the parameters for ActivatePipeline.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ActivatePipelineInput {
    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
    #[serde(rename = "parameterValues")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_values: Option<Vec<ParameterValue>>,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
    #[serde(rename = "startTimestamp")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub start_timestamp: Option<f64>,
}

/// <p>Contains the output of ActivatePipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ActivatePipelineOutput {}

/// <p>Contains the parameters for AddTags.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct AddTagsInput {
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The tags to add, as key/value pairs.</p>
    #[serde(rename = "tags")]
    pub tags: Vec<Tag>,
}

/// <p>Contains the output of AddTags.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AddTagsOutput {}

/// <p>Contains the parameters for CreatePipeline.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreatePipelineInput {
    /// <p>The description for the pipeline.</p>
    #[serde(rename = "description")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// <p>The name for the pipeline. You can use the same name for multiple pipelines associated with your AWS account, because AWS Data Pipeline assigns each pipeline a unique pipeline identifier.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>A list of tags to associate with the pipeline at creation. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
    #[serde(rename = "tags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<Tag>>,
    /// <p>A unique identifier. This identifier is not the same as the pipeline identifier assigned by AWS Data Pipeline. You are responsible for defining the format and ensuring the uniqueness of this identifier. You use this parameter to ensure idempotency during repeated calls to <code>CreatePipeline</code>. For example, if the first call to <code>CreatePipeline</code> does not succeed, you can pass in the same unique identifier and pipeline name combination on a subsequent call to <code>CreatePipeline</code>. <code>CreatePipeline</code> ensures that if a pipeline already exists with the same name and unique identifier, a new pipeline is not created. Instead, you'll receive the pipeline identifier from the previous attempt. The uniqueness of the name and unique identifier combination is scoped to the AWS account or IAM user credentials.</p>
    #[serde(rename = "uniqueId")]
    pub unique_id: String,
}

/// <p>Contains the output of CreatePipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreatePipelineOutput {
    /// <p>The ID that AWS Data Pipeline assigns the newly created pipeline. For example, <code>df-06372391ZG65EXAMPLE</code>.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
}

/// <p>Contains the parameters for DeactivatePipeline.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeactivatePipelineInput {
    /// <p>Indicates whether to cancel any running objects. The default is true, which sets the state of any running objects to <code>CANCELED</code>. If this value is false, the pipeline is deactivated after all running objects finish.</p>
    #[serde(rename = "cancelActive")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub cancel_active: Option<bool>,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
}

/// <p>Contains the output of DeactivatePipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeactivatePipelineOutput {}

/// <p>Contains the parameters for DeletePipeline.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeletePipelineInput {
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
}

/// <p>Contains the parameters for DescribeObjects.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeObjectsInput {
    /// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
    #[serde(rename = "evaluateExpressions")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub evaluate_expressions: Option<bool>,
    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>DescribeObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    /// <p>The IDs of the pipeline objects that contain the definitions to be described. You can pass as many as 25 identifiers in a single call to <code>DescribeObjects</code>.</p>
    #[serde(rename = "objectIds")]
    pub object_ids: Vec<String>,
    /// <p>The ID of the pipeline that contains the object definitions.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
}

/// <p>Contains the output of DescribeObjects.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeObjectsOutput {
    /// <p>Indicates whether there are more results to return.</p>
    #[serde(rename = "hasMoreResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub has_more_results: Option<bool>,
    /// <p>The starting point for the next page of results. To view the next page of results, call <code>DescribeObjects</code> again with this marker value. If the value is null, there are no more results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    /// <p>An array of object definitions.</p>
    #[serde(rename = "pipelineObjects")]
    pub pipeline_objects: Vec<PipelineObject>,
}

/// <p>Contains the parameters for DescribePipelines.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribePipelinesInput {
    /// <p>The IDs of the pipelines to describe. You can pass as many as 25 identifiers in a single call. To obtain pipeline IDs, call <a>ListPipelines</a>.</p>
    #[serde(rename = "pipelineIds")]
    pub pipeline_ids: Vec<String>,
}

/// <p>Contains the output of DescribePipelines.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribePipelinesOutput {
    /// <p>An array of descriptions for the specified pipelines.</p>
    #[serde(rename = "pipelineDescriptionList")]
    pub pipeline_description_list: Vec<PipelineDescription>,
}

/// <p>Contains the parameters for EvaluateExpression.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct EvaluateExpressionInput {
    /// <p>The expression to evaluate.</p>
    #[serde(rename = "expression")]
    pub expression: String,
    /// <p>The ID of the object.</p>
    #[serde(rename = "objectId")]
    pub object_id: String,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
}

/// <p>Contains the output of EvaluateExpression.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct EvaluateExpressionOutput {
    /// <p>The evaluated expression.</p>
    #[serde(rename = "evaluatedExpression")]
    pub evaluated_expression: String,
}

/// <p>A key-value pair that describes a property of a pipeline object. The value is specified as either a string value (<code>StringValue</code>) or a reference to another object (<code>RefValue</code>) but not as both.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Field {
    /// <p>The field identifier.</p>
    #[serde(rename = "key")]
    pub key: String,
    /// <p>The field value, expressed as the identifier of another object.</p>
    #[serde(rename = "refValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ref_value: Option<String>,
    /// <p>The field value, expressed as a String.</p>
    #[serde(rename = "stringValue")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub string_value: Option<String>,
}

/// <p>Contains the parameters for GetPipelineDefinition.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetPipelineDefinitionInput {
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The version of the pipeline definition to retrieve. Set this parameter to <code>latest</code> (default) to use the last definition saved to the pipeline or <code>active</code> to use the last definition that was activated.</p>
    #[serde(rename = "version")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
}

/// <p>Contains the output of GetPipelineDefinition.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GetPipelineDefinitionOutput {
    /// <p>The parameter objects used in the pipeline definition.</p>
    #[serde(rename = "parameterObjects")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_objects: Option<Vec<ParameterObject>>,
    /// <p>The parameter values used in the pipeline definition.</p>
    #[serde(rename = "parameterValues")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_values: Option<Vec<ParameterValue>>,
    /// <p>The objects defined in the pipeline.</p>
    #[serde(rename = "pipelineObjects")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pipeline_objects: Option<Vec<PipelineObject>>,
}

/// <p><p>Identity information for the EC2 instance that is hosting the task runner. You can get this value by calling a metadata URI from the EC2 instance. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p></p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct InstanceIdentity {
    /// <p>A description of an EC2 instance that is generated when the instance is launched and exposed to the instance via the instance metadata service in the form of a JSON representation of an object.</p>
    #[serde(rename = "document")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub document: Option<String>,
    /// <p>A signature which can be used to verify the accuracy and authenticity of the information provided in the instance identity document.</p>
    #[serde(rename = "signature")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub signature: Option<String>,
}

/// <p>Contains the parameters for ListPipelines.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListPipelinesInput {
    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>ListPipelines</code> with the marker value from the previous call to retrieve the next set of results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

/// <p>Contains the output of ListPipelines.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListPipelinesOutput {
    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
    #[serde(rename = "hasMoreResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub has_more_results: Option<bool>,
    /// <p>The starting point for the next page of results. To view the next page of results, call <code>ListPipelinesOutput</code> again with this marker value. If the value is null, there are no more results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    /// <p>The pipeline identifiers. If you require additional information about the pipelines, you can use these identifiers to call <a>DescribePipelines</a> and <a>GetPipelineDefinition</a>.</p>
    #[serde(rename = "pipelineIdList")]
    pub pipeline_id_list: Vec<PipelineIdName>,
}

/// <p>Contains a logical operation for comparing the value of a field with a specified value.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct Operator {
    /// <p> The logical operation to be performed: equal (<code>EQ</code>), equal reference (<code>REF_EQ</code>), less than or equal (<code>LE</code>), greater than or equal (<code>GE</code>), or between (<code>BETWEEN</code>). Equal reference (<code>REF_EQ</code>) can be used only with reference fields. The other comparison types can be used only with String fields. The comparison types you can use apply only to certain object fields, as detailed below. </p> <p> The comparison operators EQ and REF_EQ act on the following fields: </p> <ul> <li>name</li> <li>@sphere</li> <li>parent</li> <li>@componentParent</li> <li>@instanceParent</li> <li>@status</li> <li>@scheduledStartTime</li> <li>@scheduledEndTime</li> <li>@actualStartTime</li> <li>@actualEndTime</li> </ul> <p> The comparison operators <code>GE</code>, <code>LE</code>, and <code>BETWEEN</code> act on the following fields: </p> <ul> <li>@scheduledStartTime</li> <li>@scheduledEndTime</li> <li>@actualStartTime</li> <li>@actualEndTime</li> </ul> <p>Note that fields beginning with the at sign (@) are read-only and set by the web service. When you name fields, you should choose names containing only alpha-numeric values, as symbols may be reserved by AWS Data Pipeline. User-defined fields that you add to a pipeline should prefix their name with the string "my".</p>
    #[serde(rename = "type")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub type_: Option<String>,
    /// <p>The value that the actual field value will be compared with.</p>
    #[serde(rename = "values")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub values: Option<Vec<String>>,
}

/// <p>The attributes allowed or specified with a parameter object.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ParameterAttribute {
    /// <p>The field identifier.</p>
    #[serde(rename = "key")]
    pub key: String,
    /// <p>The field value, expressed as a String.</p>
    #[serde(rename = "stringValue")]
    pub string_value: String,
}

/// <p>Contains information about a parameter object.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ParameterObject {
    /// <p>The attributes of the parameter object.</p>
    #[serde(rename = "attributes")]
    pub attributes: Vec<ParameterAttribute>,
    /// <p>The ID of the parameter object. </p>
    #[serde(rename = "id")]
    pub id: String,
}

/// <p>A value or list of parameter values. </p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ParameterValue {
    /// <p>The ID of the parameter value.</p>
    #[serde(rename = "id")]
    pub id: String,
    /// <p>The field value, expressed as a String.</p>
    #[serde(rename = "stringValue")]
    pub string_value: String,
}

/// <p>Contains pipeline metadata.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PipelineDescription {
    /// <p>Description of the pipeline.</p>
    #[serde(rename = "description")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// <p>A list of read-only fields that contain metadata about the pipeline: @userId, @accountId, and @pipelineState.</p>
    #[serde(rename = "fields")]
    pub fields: Vec<Field>,
    /// <p>The name of the pipeline.</p>
    #[serde(rename = "name")]
    pub name: String,
    /// <p>The pipeline identifier that was assigned by AWS Data Pipeline. This is a string of the form <code>df-297EG78HU43EEXAMPLE</code>.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>A list of tags to associated with a pipeline. Tags let you control access to pipelines. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
    #[serde(rename = "tags")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<Tag>>,
}

/// <p>Contains the name and identifier of a pipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PipelineIdName {
    /// <p>The ID of the pipeline that was assigned by AWS Data Pipeline. This is a string of the form <code>df-297EG78HU43EEXAMPLE</code>.</p>
    #[serde(rename = "id")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// <p>The name of the pipeline.</p>
    #[serde(rename = "name")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
}

/// <p>Contains information about a pipeline object. This can be a logical, physical, or physical attempt pipeline object. The complete set of components of a pipeline defines the pipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct PipelineObject {
    /// <p>Key-value pairs that define the properties of the object.</p>
    #[serde(rename = "fields")]
    pub fields: Vec<Field>,
    /// <p>The ID of the object.</p>
    #[serde(rename = "id")]
    pub id: String,
    /// <p>The name of the object.</p>
    #[serde(rename = "name")]
    pub name: String,
}

/// <p>Contains the parameters for PollForTask.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PollForTaskInput {
    /// <p>The public DNS name of the calling task runner.</p>
    #[serde(rename = "hostname")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hostname: Option<String>,
    /// <p>Identity information for the EC2 instance that is hosting the task runner. You can get this value from the instance using <code>http://169.254.169.254/latest/meta-data/instance-id</code>. For more information, see <a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html">Instance Metadata</a> in the <i>Amazon Elastic Compute Cloud User Guide.</i> Passing in this value proves that your task runner is running on an EC2 instance, and ensures the proper AWS Data Pipeline service charges are applied to your pipeline.</p>
    #[serde(rename = "instanceIdentity")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub instance_identity: Option<InstanceIdentity>,
    /// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code> in the call to <code>PollForTask</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
    #[serde(rename = "workerGroup")]
    pub worker_group: String,
}

/// <p>Contains the output of PollForTask.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PollForTaskOutput {
    /// <p>The information needed to complete the task that is being assigned to the task runner. One of the fields returned in this object is <code>taskId</code>, which contains an identifier for the task being assigned. The calling task runner uses <code>taskId</code> in subsequent calls to <a>ReportTaskProgress</a> and <a>SetTaskStatus</a>.</p>
    #[serde(rename = "taskObject")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_object: Option<TaskObject>,
}

/// <p>Contains the parameters for PutPipelineDefinition.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutPipelineDefinitionInput {
    /// <p>The parameter objects used with the pipeline.</p>
    #[serde(rename = "parameterObjects")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_objects: Option<Vec<ParameterObject>>,
    /// <p>The parameter values used with the pipeline.</p>
    #[serde(rename = "parameterValues")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_values: Option<Vec<ParameterValue>>,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>
    #[serde(rename = "pipelineObjects")]
    pub pipeline_objects: Vec<PipelineObject>,
}

/// <p>Contains the output of PutPipelineDefinition.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct PutPipelineDefinitionOutput {
    /// <p>Indicates whether there were validation errors, and the pipeline definition is stored but cannot be activated until you correct the pipeline and call <code>PutPipelineDefinition</code> to commit the corrected pipeline.</p>
    #[serde(rename = "errored")]
    pub errored: bool,
    /// <p>The validation errors that are associated with the objects defined in <code>pipelineObjects</code>.</p>
    #[serde(rename = "validationErrors")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validation_errors: Option<Vec<ValidationError>>,
    /// <p>The validation warnings that are associated with the objects defined in <code>pipelineObjects</code>.</p>
    #[serde(rename = "validationWarnings")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validation_warnings: Option<Vec<ValidationWarning>>,
}

/// <p>Defines the query to run against an object.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct Query {
    /// <p>List of selectors that define the query. An object must satisfy all of the selectors to match the query.</p>
    #[serde(rename = "selectors")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub selectors: Option<Vec<Selector>>,
}

/// <p>Contains the parameters for QueryObjects.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct QueryObjectsInput {
    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>
    #[serde(rename = "limit")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub limit: Option<i64>,
    /// <p>The starting point for the results to be returned. For the first call, this value should be empty. As long as there are more results, continue to call <code>QueryObjects</code> with the marker value from the previous call to retrieve the next set of results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The query that defines the objects to be returned. The <code>Query</code> object can contain a maximum of ten selectors. The conditions in the query are limited to top-level String fields in the object. These filters can be applied to components, instances, and attempts.</p>
    #[serde(rename = "query")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub query: Option<Query>,
    /// <p>Indicates whether the query applies to components or instances. The possible values are: <code>COMPONENT</code>, <code>INSTANCE</code>, and <code>ATTEMPT</code>.</p>
    #[serde(rename = "sphere")]
    pub sphere: String,
}

/// <p>Contains the output of QueryObjects.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct QueryObjectsOutput {
    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
    #[serde(rename = "hasMoreResults")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub has_more_results: Option<bool>,
    /// <p>The identifiers that match the query selectors.</p>
    #[serde(rename = "ids")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub ids: Option<Vec<String>>,
    /// <p>The starting point for the next page of results. To view the next page of results, call <code>QueryObjects</code> again with this marker value. If the value is null, there are no more results.</p>
    #[serde(rename = "marker")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub marker: Option<String>,
}

/// <p>Contains the parameters for RemoveTags.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct RemoveTagsInput {
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The keys of the tags to remove.</p>
    #[serde(rename = "tagKeys")]
    pub tag_keys: Vec<String>,
}

/// <p>Contains the output of RemoveTags.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RemoveTagsOutput {}

/// <p>Contains the parameters for ReportTaskProgress.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ReportTaskProgressInput {
    /// <p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>
    #[serde(rename = "fields")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub fields: Option<Vec<Field>>,
    /// <p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>
    #[serde(rename = "taskId")]
    pub task_id: String,
}

/// <p>Contains the output of ReportTaskProgress.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReportTaskProgressOutput {
    /// <p>If true, the calling task runner should cancel processing of the task. The task runner does not need to call <a>SetTaskStatus</a> for canceled tasks.</p>
    #[serde(rename = "canceled")]
    pub canceled: bool,
}

/// <p>Contains the parameters for ReportTaskRunnerHeartbeat.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ReportTaskRunnerHeartbeatInput {
    /// <p>The public DNS name of the task runner.</p>
    #[serde(rename = "hostname")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub hostname: Option<String>,
    /// <p>The ID of the task runner. This value should be unique across your AWS account. In the case of AWS Data Pipeline Task Runner launched on a resource managed by AWS Data Pipeline, the web service provides a unique identifier when it launches the application. If you have written a custom task runner, you should assign a unique identifier for the task runner.</p>
    #[serde(rename = "taskrunnerId")]
    pub taskrunner_id: String,
    /// <p>The type of task the task runner is configured to accept and process. The worker group is set as a field on objects in the pipeline when they are created. You can only specify a single value for <code>workerGroup</code>. There are no wildcard values permitted in <code>workerGroup</code>; the string must be an exact, case-sensitive, match.</p>
    #[serde(rename = "workerGroup")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub worker_group: Option<String>,
}

/// <p>Contains the output of ReportTaskRunnerHeartbeat.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ReportTaskRunnerHeartbeatOutput {
    /// <p>Indicates whether the calling task runner should terminate.</p>
    #[serde(rename = "terminate")]
    pub terminate: bool,
}

/// <p>A comparision that is used to determine whether a query should return this object.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct Selector {
    /// <p>The name of the field that the operator will be applied to. The field name is the "key" portion of the field definition in the pipeline definition syntax that is used by the AWS Data Pipeline API. If the field is not set on the object, the condition fails.</p>
    #[serde(rename = "fieldName")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub field_name: Option<String>,
    #[serde(rename = "operator")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub operator: Option<Operator>,
}

/// <p>Contains the parameters for SetStatus.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SetStatusInput {
    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
    #[serde(rename = "objectIds")]
    pub object_ids: Vec<String>,
    /// <p>The ID of the pipeline that contains the objects.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The status to be set on all the objects specified in <code>objectIds</code>. For components, use <code>PAUSE</code> or <code>RESUME</code>. For instances, use <code>TRY_CANCEL</code>, <code>RERUN</code>, or <code>MARK_FINISHED</code>.</p>
    #[serde(rename = "status")]
    pub status: String,
}

/// <p>Contains the parameters for SetTaskStatus.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct SetTaskStatusInput {
    /// <p>If an error occurred during the task, this value specifies the error code. This value is set on the physical attempt object. It is used to display error information to the user. It should not start with string "Service_" which is reserved by the system.</p>
    #[serde(rename = "errorId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error_id: Option<String>,
    /// <p>If an error occurred during the task, this value specifies a text description of the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
    #[serde(rename = "errorMessage")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error_message: Option<String>,
    /// <p>If an error occurred during the task, this value specifies the stack trace associated with the error. This value is set on the physical attempt object. It is used to display error information to the user. The web service does not parse this value.</p>
    #[serde(rename = "errorStackTrace")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub error_stack_trace: Option<String>,
    /// <p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>
    #[serde(rename = "taskId")]
    pub task_id: String,
    /// <p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>
    #[serde(rename = "taskStatus")]
    pub task_status: String,
}

/// <p>Contains the output of SetTaskStatus.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SetTaskStatusOutput {}

/// <p>Tags are key/value pairs defined by a user and associated with a pipeline to control access. AWS Data Pipeline allows you to associate ten tags per pipeline. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Tag {
    /// <p>The key name of a tag defined by a user. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
    #[serde(rename = "key")]
    pub key: String,
    /// <p>The optional value portion of a tag defined by a user. For more information, see <a href="http://docs.aws.amazon.com/datapipeline/latest/DeveloperGuide/dp-control-access.html">Controlling User Access to Pipelines</a> in the <i>AWS Data Pipeline Developer Guide</i>.</p>
    #[serde(rename = "value")]
    pub value: String,
}

/// <p>Contains information about a pipeline task that is assigned to a task runner.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TaskObject {
    /// <p>The ID of the pipeline task attempt object. AWS Data Pipeline uses this value to track how many times a task is attempted.</p>
    #[serde(rename = "attemptId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub attempt_id: Option<String>,
    /// <p>Connection information for the location where the task runner will publish the output of the task.</p>
    #[serde(rename = "objects")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub objects: Option<::std::collections::HashMap<String, PipelineObject>>,
    /// <p>The ID of the pipeline that provided the task.</p>
    #[serde(rename = "pipelineId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub pipeline_id: Option<String>,
    /// <p>An internal identifier for the task. This ID is passed to the <a>SetTaskStatus</a> and <a>ReportTaskProgress</a> actions.</p>
    #[serde(rename = "taskId")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub task_id: Option<String>,
}

/// <p>Contains the parameters for ValidatePipelineDefinition.</p>
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ValidatePipelineDefinitionInput {
    /// <p>The parameter objects used with the pipeline.</p>
    #[serde(rename = "parameterObjects")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_objects: Option<Vec<ParameterObject>>,
    /// <p>The parameter values used with the pipeline.</p>
    #[serde(rename = "parameterValues")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub parameter_values: Option<Vec<ParameterValue>>,
    /// <p>The ID of the pipeline.</p>
    #[serde(rename = "pipelineId")]
    pub pipeline_id: String,
    /// <p>The objects that define the pipeline changes to validate against the pipeline.</p>
    #[serde(rename = "pipelineObjects")]
    pub pipeline_objects: Vec<PipelineObject>,
}

/// <p>Contains the output of ValidatePipelineDefinition.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ValidatePipelineDefinitionOutput {
    /// <p>Indicates whether there were validation errors.</p>
    #[serde(rename = "errored")]
    pub errored: bool,
    /// <p>Any validation errors that were found.</p>
    #[serde(rename = "validationErrors")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validation_errors: Option<Vec<ValidationError>>,
    /// <p>Any validation warnings that were found.</p>
    #[serde(rename = "validationWarnings")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub validation_warnings: Option<Vec<ValidationWarning>>,
}

/// <p>Defines a validation error. Validation errors prevent pipeline activation. The set of validation errors that can be returned are defined by AWS Data Pipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ValidationError {
    /// <p>A description of the validation error.</p>
    #[serde(rename = "errors")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub errors: Option<Vec<String>>,
    /// <p>The identifier of the object that contains the validation error.</p>
    #[serde(rename = "id")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
}

/// <p>Defines a validation warning. Validation warnings do not prevent pipeline activation. The set of validation warnings that can be returned are defined by AWS Data Pipeline.</p>
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ValidationWarning {
    /// <p>The identifier of the object that contains the validation warning.</p>
    #[serde(rename = "id")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// <p>A description of the validation warning.</p>
    #[serde(rename = "warnings")]
    #[serde(skip_serializing_if = "Option::is_none")]
    pub warnings: Option<Vec<String>>,
}

/// Errors returned by ActivatePipeline
#[derive(Debug, PartialEq)]
pub enum ActivatePipelineError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl ActivatePipelineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ActivatePipelineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(ActivatePipelineError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(ActivatePipelineError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(ActivatePipelineError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(ActivatePipelineError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ActivatePipelineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ActivatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            ActivatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            ActivatePipelineError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            ActivatePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ActivatePipelineError {}
/// Errors returned by AddTags
#[derive(Debug, PartialEq)]
pub enum AddTagsError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl AddTagsError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(AddTagsError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(AddTagsError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(AddTagsError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(AddTagsError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for AddTagsError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            AddTagsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            AddTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            AddTagsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            AddTagsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for AddTagsError {}
/// Errors returned by CreatePipeline
#[derive(Debug, PartialEq)]
pub enum CreatePipelineError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
}

impl CreatePipelineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePipelineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(CreatePipelineError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(CreatePipelineError::InvalidRequest(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for CreatePipelineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            CreatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            CreatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for CreatePipelineError {}
/// Errors returned by DeactivatePipeline
#[derive(Debug, PartialEq)]
pub enum DeactivatePipelineError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl DeactivatePipelineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeactivatePipelineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(DeactivatePipelineError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(DeactivatePipelineError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(DeactivatePipelineError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(DeactivatePipelineError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DeactivatePipelineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DeactivatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            DeactivatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            DeactivatePipelineError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            DeactivatePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DeactivatePipelineError {}
/// Errors returned by DeletePipeline
#[derive(Debug, PartialEq)]
pub enum DeletePipelineError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl DeletePipelineError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePipelineError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(DeletePipelineError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(DeletePipelineError::InvalidRequest(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(DeletePipelineError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DeletePipelineError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DeletePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            DeletePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            DeletePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DeletePipelineError {}
/// Errors returned by DescribeObjects
#[derive(Debug, PartialEq)]
pub enum DescribeObjectsError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl DescribeObjectsError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeObjectsError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(DescribeObjectsError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(DescribeObjectsError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(DescribeObjectsError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(DescribeObjectsError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribeObjectsError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribeObjectsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            DescribeObjectsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            DescribeObjectsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            DescribeObjectsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DescribeObjectsError {}
/// Errors returned by DescribePipelines
#[derive(Debug, PartialEq)]
pub enum DescribePipelinesError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl DescribePipelinesError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePipelinesError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(DescribePipelinesError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(DescribePipelinesError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(DescribePipelinesError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(DescribePipelinesError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for DescribePipelinesError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            DescribePipelinesError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            DescribePipelinesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            DescribePipelinesError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            DescribePipelinesError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for DescribePipelinesError {}
/// Errors returned by EvaluateExpression
#[derive(Debug, PartialEq)]
pub enum EvaluateExpressionError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
    /// <p>The specified task was not found. </p>
    TaskNotFound(String),
}

impl EvaluateExpressionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EvaluateExpressionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(EvaluateExpressionError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(EvaluateExpressionError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(EvaluateExpressionError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(EvaluateExpressionError::PipelineNotFound(err.msg))
                }
                "TaskNotFoundException" => {
                    return RusotoError::Service(EvaluateExpressionError::TaskNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for EvaluateExpressionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            EvaluateExpressionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            EvaluateExpressionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            EvaluateExpressionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            EvaluateExpressionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
            EvaluateExpressionError::TaskNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for EvaluateExpressionError {}
/// Errors returned by GetPipelineDefinition
#[derive(Debug, PartialEq)]
pub enum GetPipelineDefinitionError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl GetPipelineDefinitionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPipelineDefinitionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(GetPipelineDefinitionError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(GetPipelineDefinitionError::InvalidRequest(
                        err.msg,
                    ))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(GetPipelineDefinitionError::PipelineDeleted(
                        err.msg,
                    ))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(GetPipelineDefinitionError::PipelineNotFound(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for GetPipelineDefinitionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            GetPipelineDefinitionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            GetPipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            GetPipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            GetPipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for GetPipelineDefinitionError {}
/// Errors returned by ListPipelines
#[derive(Debug, PartialEq)]
pub enum ListPipelinesError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
}

impl ListPipelinesError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPipelinesError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(ListPipelinesError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(ListPipelinesError::InvalidRequest(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ListPipelinesError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ListPipelinesError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            ListPipelinesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ListPipelinesError {}
/// Errors returned by PollForTask
#[derive(Debug, PartialEq)]
pub enum PollForTaskError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified task was not found. </p>
    TaskNotFound(String),
}

impl PollForTaskError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PollForTaskError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(PollForTaskError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(PollForTaskError::InvalidRequest(err.msg))
                }
                "TaskNotFoundException" => {
                    return RusotoError::Service(PollForTaskError::TaskNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for PollForTaskError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            PollForTaskError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            PollForTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            PollForTaskError::TaskNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for PollForTaskError {}
/// Errors returned by PutPipelineDefinition
#[derive(Debug, PartialEq)]
pub enum PutPipelineDefinitionError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl PutPipelineDefinitionError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutPipelineDefinitionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(PutPipelineDefinitionError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(PutPipelineDefinitionError::InvalidRequest(
                        err.msg,
                    ))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(PutPipelineDefinitionError::PipelineDeleted(
                        err.msg,
                    ))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(PutPipelineDefinitionError::PipelineNotFound(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for PutPipelineDefinitionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            PutPipelineDefinitionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            PutPipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            PutPipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            PutPipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for PutPipelineDefinitionError {}
/// Errors returned by QueryObjects
#[derive(Debug, PartialEq)]
pub enum QueryObjectsError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl QueryObjectsError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<QueryObjectsError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(QueryObjectsError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(QueryObjectsError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(QueryObjectsError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(QueryObjectsError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for QueryObjectsError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            QueryObjectsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            QueryObjectsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            QueryObjectsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            QueryObjectsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for QueryObjectsError {}
/// Errors returned by RemoveTags
#[derive(Debug, PartialEq)]
pub enum RemoveTagsError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl RemoveTagsError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(RemoveTagsError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(RemoveTagsError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(RemoveTagsError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(RemoveTagsError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for RemoveTagsError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            RemoveTagsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            RemoveTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            RemoveTagsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            RemoveTagsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for RemoveTagsError {}
/// Errors returned by ReportTaskProgress
#[derive(Debug, PartialEq)]
pub enum ReportTaskProgressError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
    /// <p>The specified task was not found. </p>
    TaskNotFound(String),
}

impl ReportTaskProgressError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReportTaskProgressError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(ReportTaskProgressError::InternalServiceError(
                        err.msg,
                    ))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(ReportTaskProgressError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(ReportTaskProgressError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(ReportTaskProgressError::PipelineNotFound(err.msg))
                }
                "TaskNotFoundException" => {
                    return RusotoError::Service(ReportTaskProgressError::TaskNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ReportTaskProgressError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ReportTaskProgressError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            ReportTaskProgressError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            ReportTaskProgressError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            ReportTaskProgressError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
            ReportTaskProgressError::TaskNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ReportTaskProgressError {}
/// Errors returned by ReportTaskRunnerHeartbeat
#[derive(Debug, PartialEq)]
pub enum ReportTaskRunnerHeartbeatError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
}

impl ReportTaskRunnerHeartbeatError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReportTaskRunnerHeartbeatError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(
                        ReportTaskRunnerHeartbeatError::InternalServiceError(err.msg),
                    )
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(ReportTaskRunnerHeartbeatError::InvalidRequest(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ReportTaskRunnerHeartbeatError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ReportTaskRunnerHeartbeatError::InternalServiceError(ref cause) => {
                write!(f, "{}", cause)
            }
            ReportTaskRunnerHeartbeatError::InvalidRequest(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ReportTaskRunnerHeartbeatError {}
/// Errors returned by SetStatus
#[derive(Debug, PartialEq)]
pub enum SetStatusError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl SetStatusError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetStatusError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(SetStatusError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(SetStatusError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(SetStatusError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(SetStatusError::PipelineNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for SetStatusError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            SetStatusError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            SetStatusError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            SetStatusError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            SetStatusError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for SetStatusError {}
/// Errors returned by SetTaskStatus
#[derive(Debug, PartialEq)]
pub enum SetTaskStatusError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
    /// <p>The specified task was not found. </p>
    TaskNotFound(String),
}

impl SetTaskStatusError {
    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetTaskStatusError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(SetTaskStatusError::InternalServiceError(err.msg))
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(SetTaskStatusError::InvalidRequest(err.msg))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(SetTaskStatusError::PipelineDeleted(err.msg))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(SetTaskStatusError::PipelineNotFound(err.msg))
                }
                "TaskNotFoundException" => {
                    return RusotoError::Service(SetTaskStatusError::TaskNotFound(err.msg))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for SetTaskStatusError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            SetTaskStatusError::InternalServiceError(ref cause) => write!(f, "{}", cause),
            SetTaskStatusError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            SetTaskStatusError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            SetTaskStatusError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
            SetTaskStatusError::TaskNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for SetTaskStatusError {}
/// Errors returned by ValidatePipelineDefinition
#[derive(Debug, PartialEq)]
pub enum ValidatePipelineDefinitionError {
    /// <p>An internal service error occurred.</p>
    InternalServiceError(String),
    /// <p>The request was not valid. Verify that your request was properly formatted, that the signature was generated with the correct credentials, and that you haven't exceeded any of the service limits for your account.</p>
    InvalidRequest(String),
    /// <p>The specified pipeline has been deleted.</p>
    PipelineDeleted(String),
    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
    PipelineNotFound(String),
}

impl ValidatePipelineDefinitionError {
    pub fn from_response(
        res: BufferedHttpResponse,
    ) -> RusotoError<ValidatePipelineDefinitionError> {
        if let Some(err) = proto::json::Error::parse(&res) {
            match err.typ.as_str() {
                "InternalServiceError" => {
                    return RusotoError::Service(
                        ValidatePipelineDefinitionError::InternalServiceError(err.msg),
                    )
                }
                "InvalidRequestException" => {
                    return RusotoError::Service(ValidatePipelineDefinitionError::InvalidRequest(
                        err.msg,
                    ))
                }
                "PipelineDeletedException" => {
                    return RusotoError::Service(ValidatePipelineDefinitionError::PipelineDeleted(
                        err.msg,
                    ))
                }
                "PipelineNotFoundException" => {
                    return RusotoError::Service(ValidatePipelineDefinitionError::PipelineNotFound(
                        err.msg,
                    ))
                }
                "ValidationException" => return RusotoError::Validation(err.msg),
                _ => {}
            }
        }
        RusotoError::Unknown(res)
    }
}
impl fmt::Display for ValidatePipelineDefinitionError {
    #[allow(unused_variables)]
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        match *self {
            ValidatePipelineDefinitionError::InternalServiceError(ref cause) => {
                write!(f, "{}", cause)
            }
            ValidatePipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
            ValidatePipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
            ValidatePipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
        }
    }
}
impl Error for ValidatePipelineDefinitionError {}
/// Trait representing the capabilities of the AWS Data Pipeline API. AWS Data Pipeline clients implement this trait.
#[async_trait]
pub trait DataPipeline {
    /// <p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p> <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <a>DeactivatePipeline</a>.</p> <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p>
    async fn activate_pipeline(
        &self,
        input: ActivatePipelineInput,
    ) -> Result<ActivatePipelineOutput, RusotoError<ActivatePipelineError>>;

    /// <p>Adds or modifies tags for the specified pipeline.</p>
    async fn add_tags(
        &self,
        input: AddTagsInput,
    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>>;

    /// <p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>
    async fn create_pipeline(
        &self,
        input: CreatePipelineInput,
    ) -> Result<CreatePipelineOutput, RusotoError<CreatePipelineError>>;

    /// <p>Deactivates the specified running pipeline. The pipeline is set to the <code>DEACTIVATING</code> state until the deactivation process completes.</p> <p>To resume a deactivated pipeline, use <a>ActivatePipeline</a>. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.</p>
    async fn deactivate_pipeline(
        &self,
        input: DeactivatePipelineInput,
    ) -> Result<DeactivatePipelineOutput, RusotoError<DeactivatePipelineError>>;

    /// <p>Deletes a pipeline, its pipeline definition, and its run history. AWS Data Pipeline attempts to cancel instances associated with the pipeline that are currently being processed by task runners.</p> <p>Deleting a pipeline cannot be undone. You cannot query or restore a deleted pipeline. To temporarily pause a pipeline instead of deleting it, call <a>SetStatus</a> with the status set to <code>PAUSE</code> on individual components. Components that are paused by <a>SetStatus</a> can be resumed.</p>
    async fn delete_pipeline(
        &self,
        input: DeletePipelineInput,
    ) -> Result<(), RusotoError<DeletePipelineError>>;

    /// <p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p>
    async fn describe_objects(
        &self,
        input: DescribeObjectsInput,
    ) -> Result<DescribeObjectsOutput, RusotoError<DescribeObjectsError>>;

    /// <p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p> <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <a>GetPipelineDefinition</a>.</p>
    async fn describe_pipelines(
        &self,
        input: DescribePipelinesInput,
    ) -> Result<DescribePipelinesOutput, RusotoError<DescribePipelinesError>>;

    /// <p>Task runners call <code>EvaluateExpression</code> to evaluate a string in the context of the specified object. For example, a task runner can evaluate SQL queries stored in Amazon S3.</p>
    async fn evaluate_expression(
        &self,
        input: EvaluateExpressionInput,
    ) -> Result<EvaluateExpressionOutput, RusotoError<EvaluateExpressionError>>;

    /// <p>Gets the definition of the specified pipeline. You can call <code>GetPipelineDefinition</code> to retrieve the pipeline definition that you provided using <a>PutPipelineDefinition</a>.</p>
    async fn get_pipeline_definition(
        &self,
        input: GetPipelineDefinitionInput,
    ) -> Result<GetPipelineDefinitionOutput, RusotoError<GetPipelineDefinitionError>>;

    /// <p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>
    async fn list_pipelines(
        &self,
        input: ListPipelinesInput,
    ) -> Result<ListPipelinesOutput, RusotoError<ListPipelinesError>>;

    /// <p>Task runners call <code>PollForTask</code> to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the <code>workerGroup</code> parameter. The task returned can come from any of the pipelines that match the <code>workerGroup</code> value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.</p> <p>If tasks are ready in the work queue, <code>PollForTask</code> returns a response immediately. If no tasks are available in the queue, <code>PollForTask</code> uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call <code>PollForTask</code> again on the same <code>workerGroup</code> until it receives a response, and this can take up to 90 seconds. </p>
    async fn poll_for_task(
        &self,
        input: PollForTaskInput,
    ) -> Result<PollForTaskOutput, RusotoError<PollForTaskError>>;

    /// <p>Adds tasks, schedules, and preconditions to the specified pipeline. You can use <code>PutPipelineDefinition</code> to populate a new pipeline.</p> <p> <code>PutPipelineDefinition</code> also validates the configuration as it adds it to the pipeline. Changes to the pipeline are saved unless one of the following three validation errors exists in the pipeline. </p> <ol> <li>An object is missing a name or identifier field.</li> <li>A string or reference field is empty.</li> <li>The number of objects in the pipeline exceeds the maximum allowed objects.</li> <li>The pipeline is in a FINISHED state.</li> </ol> <p> Pipeline object definitions are passed to the <code>PutPipelineDefinition</code> action and returned by the <a>GetPipelineDefinition</a> action. </p>
    async fn put_pipeline_definition(
        &self,
        input: PutPipelineDefinitionInput,
    ) -> Result<PutPipelineDefinitionOutput, RusotoError<PutPipelineDefinitionError>>;

    /// <p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>
    async fn query_objects(
        &self,
        input: QueryObjectsInput,
    ) -> Result<QueryObjectsOutput, RusotoError<QueryObjectsError>>;

    /// <p>Removes existing tags from the specified pipeline.</p>
    async fn remove_tags(
        &self,
        input: RemoveTagsInput,
    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>>;

    /// <p>Task runners call <code>ReportTaskProgress</code> when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent <a>PollForTask</a> call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a <code>reportProgressTimeout</code> field in your pipeline.</p> <p>If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to <a>PollForTask</a>. Task runners should call <code>ReportTaskProgress</code> every 60 seconds.</p>
    async fn report_task_progress(
        &self,
        input: ReportTaskProgressInput,
    ) -> Result<ReportTaskProgressOutput, RusotoError<ReportTaskProgressError>>;

    /// <p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p>
    async fn report_task_runner_heartbeat(
        &self,
        input: ReportTaskRunnerHeartbeatInput,
    ) -> Result<ReportTaskRunnerHeartbeatOutput, RusotoError<ReportTaskRunnerHeartbeatError>>;

    /// <p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p>
    async fn set_status(&self, input: SetStatusInput) -> Result<(), RusotoError<SetStatusError>>;

    /// <p>Task runners call <code>SetTaskStatus</code> to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call <code>SetTaskStatus</code> for tasks that are canceled by the web service during a call to <a>ReportTaskProgress</a>.</p>
    async fn set_task_status(
        &self,
        input: SetTaskStatusInput,
    ) -> Result<SetTaskStatusOutput, RusotoError<SetTaskStatusError>>;

    /// <p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>
    async fn validate_pipeline_definition(
        &self,
        input: ValidatePipelineDefinitionInput,
    ) -> Result<ValidatePipelineDefinitionOutput, RusotoError<ValidatePipelineDefinitionError>>;
}
/// A client for the AWS Data Pipeline API.
#[derive(Clone)]
pub struct DataPipelineClient {
    client: Client,
    region: region::Region,
}

impl DataPipelineClient {
    /// 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) -> DataPipelineClient {
        DataPipelineClient {
            client: Client::shared(),
            region,
        }
    }

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

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

#[async_trait]
impl DataPipeline for DataPipelineClient {
    /// <p>Validates the specified pipeline and starts processing pipeline tasks. If the pipeline does not pass validation, activation fails.</p> <p>If you need to pause the pipeline to investigate an issue with a component, such as a data source or script, call <a>DeactivatePipeline</a>.</p> <p>To activate a finished pipeline, modify the end date for the pipeline and then activate it.</p>
    async fn activate_pipeline(
        &self,
        input: ActivatePipelineInput,
    ) -> Result<ActivatePipelineOutput, RusotoError<ActivatePipelineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.ActivatePipeline");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Adds or modifies tags for the specified pipeline.</p>
    async fn add_tags(
        &self,
        input: AddTagsInput,
    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.AddTags");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>
    async fn create_pipeline(
        &self,
        input: CreatePipelineInput,
    ) -> Result<CreatePipelineOutput, RusotoError<CreatePipelineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.CreatePipeline");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Deactivates the specified running pipeline. The pipeline is set to the <code>DEACTIVATING</code> state until the deactivation process completes.</p> <p>To resume a deactivated pipeline, use <a>ActivatePipeline</a>. By default, the pipeline resumes from the last completed execution. Optionally, you can specify the date and time to resume the pipeline.</p>
    async fn deactivate_pipeline(
        &self,
        input: DeactivatePipelineInput,
    ) -> Result<DeactivatePipelineOutput, RusotoError<DeactivatePipelineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.DeactivatePipeline");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Deletes a pipeline, its pipeline definition, and its run history. AWS Data Pipeline attempts to cancel instances associated with the pipeline that are currently being processed by task runners.</p> <p>Deleting a pipeline cannot be undone. You cannot query or restore a deleted pipeline. To temporarily pause a pipeline instead of deleting it, call <a>SetStatus</a> with the status set to <code>PAUSE</code> on individual components. Components that are paused by <a>SetStatus</a> can be resumed.</p>
    async fn delete_pipeline(
        &self,
        input: DeletePipelineInput,
    ) -> Result<(), RusotoError<DeletePipelineError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.DeletePipeline");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, DeletePipelineError::from_response)
            .await?;
        std::mem::drop(response);
        Ok(())
    }

    /// <p>Gets the object definitions for a set of objects associated with the pipeline. Object definitions are composed of a set of fields that define the properties of the object.</p>
    async fn describe_objects(
        &self,
        input: DescribeObjectsInput,
    ) -> Result<DescribeObjectsOutput, RusotoError<DescribeObjectsError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.DescribeObjects");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Retrieves metadata about one or more pipelines. The information retrieved includes the name of the pipeline, the pipeline identifier, its current state, and the user account that owns the pipeline. Using account credentials, you can retrieve metadata about pipelines that you or your IAM users have created. If you are using an IAM user account, you can retrieve metadata about only those pipelines for which you have read permissions.</p> <p>To retrieve the full pipeline definition instead of metadata about the pipeline, call <a>GetPipelineDefinition</a>.</p>
    async fn describe_pipelines(
        &self,
        input: DescribePipelinesInput,
    ) -> Result<DescribePipelinesOutput, RusotoError<DescribePipelinesError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.DescribePipelines");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Task runners call <code>EvaluateExpression</code> to evaluate a string in the context of the specified object. For example, a task runner can evaluate SQL queries stored in Amazon S3.</p>
    async fn evaluate_expression(
        &self,
        input: EvaluateExpressionInput,
    ) -> Result<EvaluateExpressionOutput, RusotoError<EvaluateExpressionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.EvaluateExpression");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Gets the definition of the specified pipeline. You can call <code>GetPipelineDefinition</code> to retrieve the pipeline definition that you provided using <a>PutPipelineDefinition</a>.</p>
    async fn get_pipeline_definition(
        &self,
        input: GetPipelineDefinitionInput,
    ) -> Result<GetPipelineDefinitionOutput, RusotoError<GetPipelineDefinitionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.GetPipelineDefinition");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>
    async fn list_pipelines(
        &self,
        input: ListPipelinesInput,
    ) -> Result<ListPipelinesOutput, RusotoError<ListPipelinesError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.ListPipelines");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Task runners call <code>PollForTask</code> to receive a task to perform from AWS Data Pipeline. The task runner specifies which tasks it can perform by setting a value for the <code>workerGroup</code> parameter. The task returned can come from any of the pipelines that match the <code>workerGroup</code> value passed in by the task runner and that was launched using the IAM user credentials specified by the task runner.</p> <p>If tasks are ready in the work queue, <code>PollForTask</code> returns a response immediately. If no tasks are available in the queue, <code>PollForTask</code> uses long-polling and holds on to a poll connection for up to a 90 seconds, during which time the first newly scheduled task is handed to the task runner. To accomodate this, set the socket timeout in your task runner to 90 seconds. The task runner should not call <code>PollForTask</code> again on the same <code>workerGroup</code> until it receives a response, and this can take up to 90 seconds. </p>
    async fn poll_for_task(
        &self,
        input: PollForTaskInput,
    ) -> Result<PollForTaskOutput, RusotoError<PollForTaskError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.PollForTask");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Adds tasks, schedules, and preconditions to the specified pipeline. You can use <code>PutPipelineDefinition</code> to populate a new pipeline.</p> <p> <code>PutPipelineDefinition</code> also validates the configuration as it adds it to the pipeline. Changes to the pipeline are saved unless one of the following three validation errors exists in the pipeline. </p> <ol> <li>An object is missing a name or identifier field.</li> <li>A string or reference field is empty.</li> <li>The number of objects in the pipeline exceeds the maximum allowed objects.</li> <li>The pipeline is in a FINISHED state.</li> </ol> <p> Pipeline object definitions are passed to the <code>PutPipelineDefinition</code> action and returned by the <a>GetPipelineDefinition</a> action. </p>
    async fn put_pipeline_definition(
        &self,
        input: PutPipelineDefinitionInput,
    ) -> Result<PutPipelineDefinitionOutput, RusotoError<PutPipelineDefinitionError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.PutPipelineDefinition");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>
    async fn query_objects(
        &self,
        input: QueryObjectsInput,
    ) -> Result<QueryObjectsOutput, RusotoError<QueryObjectsError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.QueryObjects");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Removes existing tags from the specified pipeline.</p>
    async fn remove_tags(
        &self,
        input: RemoveTagsInput,
    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.RemoveTags");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Task runners call <code>ReportTaskProgress</code> when assigned a task to acknowledge that it has the task. If the web service does not receive this acknowledgement within 2 minutes, it assigns the task in a subsequent <a>PollForTask</a> call. After this initial acknowledgement, the task runner only needs to report progress every 15 minutes to maintain its ownership of the task. You can change this reporting time from 15 minutes by specifying a <code>reportProgressTimeout</code> field in your pipeline.</p> <p>If a task runner does not report its status after 5 minutes, AWS Data Pipeline assumes that the task runner is unable to process the task and reassigns the task in a subsequent response to <a>PollForTask</a>. Task runners should call <code>ReportTaskProgress</code> every 60 seconds.</p>
    async fn report_task_progress(
        &self,
        input: ReportTaskProgressInput,
    ) -> Result<ReportTaskProgressOutput, RusotoError<ReportTaskProgressError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.ReportTaskProgress");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Task runners call <code>ReportTaskRunnerHeartbeat</code> every 15 minutes to indicate that they are operational. If the AWS Data Pipeline Task Runner is launched on a resource managed by AWS Data Pipeline, the web service can use this call to detect when the task runner application has failed and restart a new instance.</p>
    async fn report_task_runner_heartbeat(
        &self,
        input: ReportTaskRunnerHeartbeatInput,
    ) -> Result<ReportTaskRunnerHeartbeatOutput, RusotoError<ReportTaskRunnerHeartbeatError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.ReportTaskRunnerHeartbeat");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Requests that the status of the specified physical or logical pipeline objects be updated in the specified pipeline. This update might not occur immediately, but is eventually consistent. The status that can be set depends on the type of object (for example, DataNode or Activity). You cannot perform this operation on <code>FINISHED</code> pipelines and attempting to do so returns <code>InvalidRequestException</code>.</p>
    async fn set_status(&self, input: SetStatusInput) -> Result<(), RusotoError<SetStatusError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.SetStatus");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

        let response = self
            .sign_and_dispatch(request, SetStatusError::from_response)
            .await?;
        std::mem::drop(response);
        Ok(())
    }

    /// <p>Task runners call <code>SetTaskStatus</code> to notify AWS Data Pipeline that a task is completed and provide information about the final status. A task runner makes this call regardless of whether the task was sucessful. A task runner does not need to call <code>SetTaskStatus</code> for tasks that are canceled by the web service during a call to <a>ReportTaskProgress</a>.</p>
    async fn set_task_status(
        &self,
        input: SetTaskStatusInput,
    ) -> Result<SetTaskStatusOutput, RusotoError<SetTaskStatusError>> {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.SetTaskStatus");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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

    /// <p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>
    async fn validate_pipeline_definition(
        &self,
        input: ValidatePipelineDefinitionInput,
    ) -> Result<ValidatePipelineDefinitionOutput, RusotoError<ValidatePipelineDefinitionError>>
    {
        let mut request = self.new_signed_request("POST", "/");
        request.add_header("x-amz-target", "DataPipeline.ValidatePipelineDefinition");
        let encoded = serde_json::to_string(&input).unwrap();
        request.set_payload(Some(encoded));

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