rusoto_datapipeline/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl DataPipelineClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request =
31            SignedRequest::new(http_method, "datapipeline", &self.region, request_uri);
32
33        request.set_content_type("application/x-amz-json-1.1".to_owned());
34
35        request
36    }
37
38    async fn sign_and_dispatch<E>(
39        &self,
40        request: SignedRequest,
41        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
42    ) -> Result<HttpResponse, RusotoError<E>> {
43        let mut response = self.client.sign_and_dispatch(request).await?;
44        if !response.status.is_success() {
45            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
46            return Err(from_response(response));
47        }
48
49        Ok(response)
50    }
51}
52
53use serde_json;
54/// <p>Contains the parameters for ActivatePipeline.</p>
55#[derive(Clone, Debug, Default, PartialEq, Serialize)]
56#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
57pub struct ActivatePipelineInput {
58    /// <p>A list of parameter values to pass to the pipeline at activation.</p>
59    #[serde(rename = "parameterValues")]
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub parameter_values: Option<Vec<ParameterValue>>,
62    /// <p>The ID of the pipeline.</p>
63    #[serde(rename = "pipelineId")]
64    pub pipeline_id: String,
65    /// <p>The date and time to resume the pipeline. By default, the pipeline resumes from the last completed execution.</p>
66    #[serde(rename = "startTimestamp")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub start_timestamp: Option<f64>,
69}
70
71/// <p>Contains the output of ActivatePipeline.</p>
72#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
73#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
74pub struct ActivatePipelineOutput {}
75
76/// <p>Contains the parameters for AddTags.</p>
77#[derive(Clone, Debug, Default, PartialEq, Serialize)]
78#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
79pub struct AddTagsInput {
80    /// <p>The ID of the pipeline.</p>
81    #[serde(rename = "pipelineId")]
82    pub pipeline_id: String,
83    /// <p>The tags to add, as key/value pairs.</p>
84    #[serde(rename = "tags")]
85    pub tags: Vec<Tag>,
86}
87
88/// <p>Contains the output of AddTags.</p>
89#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
90#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
91pub struct AddTagsOutput {}
92
93/// <p>Contains the parameters for CreatePipeline.</p>
94#[derive(Clone, Debug, Default, PartialEq, Serialize)]
95#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
96pub struct CreatePipelineInput {
97    /// <p>The description for the pipeline.</p>
98    #[serde(rename = "description")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub description: Option<String>,
101    /// <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>
102    #[serde(rename = "name")]
103    pub name: String,
104    /// <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>
105    #[serde(rename = "tags")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub tags: Option<Vec<Tag>>,
108    /// <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>
109    #[serde(rename = "uniqueId")]
110    pub unique_id: String,
111}
112
113/// <p>Contains the output of CreatePipeline.</p>
114#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
115#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
116pub struct CreatePipelineOutput {
117    /// <p>The ID that AWS Data Pipeline assigns the newly created pipeline. For example, <code>df-06372391ZG65EXAMPLE</code>.</p>
118    #[serde(rename = "pipelineId")]
119    pub pipeline_id: String,
120}
121
122/// <p>Contains the parameters for DeactivatePipeline.</p>
123#[derive(Clone, Debug, Default, PartialEq, Serialize)]
124#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
125pub struct DeactivatePipelineInput {
126    /// <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>
127    #[serde(rename = "cancelActive")]
128    #[serde(skip_serializing_if = "Option::is_none")]
129    pub cancel_active: Option<bool>,
130    /// <p>The ID of the pipeline.</p>
131    #[serde(rename = "pipelineId")]
132    pub pipeline_id: String,
133}
134
135/// <p>Contains the output of DeactivatePipeline.</p>
136#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
137#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
138pub struct DeactivatePipelineOutput {}
139
140/// <p>Contains the parameters for DeletePipeline.</p>
141#[derive(Clone, Debug, Default, PartialEq, Serialize)]
142#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
143pub struct DeletePipelineInput {
144    /// <p>The ID of the pipeline.</p>
145    #[serde(rename = "pipelineId")]
146    pub pipeline_id: String,
147}
148
149/// <p>Contains the parameters for DescribeObjects.</p>
150#[derive(Clone, Debug, Default, PartialEq, Serialize)]
151#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
152pub struct DescribeObjectsInput {
153    /// <p>Indicates whether any expressions in the object should be evaluated when the object descriptions are returned.</p>
154    #[serde(rename = "evaluateExpressions")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub evaluate_expressions: Option<bool>,
157    /// <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>
158    #[serde(rename = "marker")]
159    #[serde(skip_serializing_if = "Option::is_none")]
160    pub marker: Option<String>,
161    /// <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>
162    #[serde(rename = "objectIds")]
163    pub object_ids: Vec<String>,
164    /// <p>The ID of the pipeline that contains the object definitions.</p>
165    #[serde(rename = "pipelineId")]
166    pub pipeline_id: String,
167}
168
169/// <p>Contains the output of DescribeObjects.</p>
170#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
171#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
172pub struct DescribeObjectsOutput {
173    /// <p>Indicates whether there are more results to return.</p>
174    #[serde(rename = "hasMoreResults")]
175    #[serde(skip_serializing_if = "Option::is_none")]
176    pub has_more_results: Option<bool>,
177    /// <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>
178    #[serde(rename = "marker")]
179    #[serde(skip_serializing_if = "Option::is_none")]
180    pub marker: Option<String>,
181    /// <p>An array of object definitions.</p>
182    #[serde(rename = "pipelineObjects")]
183    pub pipeline_objects: Vec<PipelineObject>,
184}
185
186/// <p>Contains the parameters for DescribePipelines.</p>
187#[derive(Clone, Debug, Default, PartialEq, Serialize)]
188#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
189pub struct DescribePipelinesInput {
190    /// <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>
191    #[serde(rename = "pipelineIds")]
192    pub pipeline_ids: Vec<String>,
193}
194
195/// <p>Contains the output of DescribePipelines.</p>
196#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
197#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
198pub struct DescribePipelinesOutput {
199    /// <p>An array of descriptions for the specified pipelines.</p>
200    #[serde(rename = "pipelineDescriptionList")]
201    pub pipeline_description_list: Vec<PipelineDescription>,
202}
203
204/// <p>Contains the parameters for EvaluateExpression.</p>
205#[derive(Clone, Debug, Default, PartialEq, Serialize)]
206#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
207pub struct EvaluateExpressionInput {
208    /// <p>The expression to evaluate.</p>
209    #[serde(rename = "expression")]
210    pub expression: String,
211    /// <p>The ID of the object.</p>
212    #[serde(rename = "objectId")]
213    pub object_id: String,
214    /// <p>The ID of the pipeline.</p>
215    #[serde(rename = "pipelineId")]
216    pub pipeline_id: String,
217}
218
219/// <p>Contains the output of EvaluateExpression.</p>
220#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
221#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
222pub struct EvaluateExpressionOutput {
223    /// <p>The evaluated expression.</p>
224    #[serde(rename = "evaluatedExpression")]
225    pub evaluated_expression: String,
226}
227
228/// <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>
229#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
230pub struct Field {
231    /// <p>The field identifier.</p>
232    #[serde(rename = "key")]
233    pub key: String,
234    /// <p>The field value, expressed as the identifier of another object.</p>
235    #[serde(rename = "refValue")]
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub ref_value: Option<String>,
238    /// <p>The field value, expressed as a String.</p>
239    #[serde(rename = "stringValue")]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    pub string_value: Option<String>,
242}
243
244/// <p>Contains the parameters for GetPipelineDefinition.</p>
245#[derive(Clone, Debug, Default, PartialEq, Serialize)]
246#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
247pub struct GetPipelineDefinitionInput {
248    /// <p>The ID of the pipeline.</p>
249    #[serde(rename = "pipelineId")]
250    pub pipeline_id: String,
251    /// <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>
252    #[serde(rename = "version")]
253    #[serde(skip_serializing_if = "Option::is_none")]
254    pub version: Option<String>,
255}
256
257/// <p>Contains the output of GetPipelineDefinition.</p>
258#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
259#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
260pub struct GetPipelineDefinitionOutput {
261    /// <p>The parameter objects used in the pipeline definition.</p>
262    #[serde(rename = "parameterObjects")]
263    #[serde(skip_serializing_if = "Option::is_none")]
264    pub parameter_objects: Option<Vec<ParameterObject>>,
265    /// <p>The parameter values used in the pipeline definition.</p>
266    #[serde(rename = "parameterValues")]
267    #[serde(skip_serializing_if = "Option::is_none")]
268    pub parameter_values: Option<Vec<ParameterValue>>,
269    /// <p>The objects defined in the pipeline.</p>
270    #[serde(rename = "pipelineObjects")]
271    #[serde(skip_serializing_if = "Option::is_none")]
272    pub pipeline_objects: Option<Vec<PipelineObject>>,
273}
274
275/// <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>
276#[derive(Clone, Debug, Default, PartialEq, Serialize)]
277#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
278pub struct InstanceIdentity {
279    /// <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>
280    #[serde(rename = "document")]
281    #[serde(skip_serializing_if = "Option::is_none")]
282    pub document: Option<String>,
283    /// <p>A signature which can be used to verify the accuracy and authenticity of the information provided in the instance identity document.</p>
284    #[serde(rename = "signature")]
285    #[serde(skip_serializing_if = "Option::is_none")]
286    pub signature: Option<String>,
287}
288
289/// <p>Contains the parameters for ListPipelines.</p>
290#[derive(Clone, Debug, Default, PartialEq, Serialize)]
291#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
292pub struct ListPipelinesInput {
293    /// <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>
294    #[serde(rename = "marker")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub marker: Option<String>,
297}
298
299/// <p>Contains the output of ListPipelines.</p>
300#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
301#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
302pub struct ListPipelinesOutput {
303    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
304    #[serde(rename = "hasMoreResults")]
305    #[serde(skip_serializing_if = "Option::is_none")]
306    pub has_more_results: Option<bool>,
307    /// <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>
308    #[serde(rename = "marker")]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    pub marker: Option<String>,
311    /// <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>
312    #[serde(rename = "pipelineIdList")]
313    pub pipeline_id_list: Vec<PipelineIdName>,
314}
315
316/// <p>Contains a logical operation for comparing the value of a field with a specified value.</p>
317#[derive(Clone, Debug, Default, PartialEq, Serialize)]
318#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
319pub struct Operator {
320    /// <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>
321    #[serde(rename = "type")]
322    #[serde(skip_serializing_if = "Option::is_none")]
323    pub type_: Option<String>,
324    /// <p>The value that the actual field value will be compared with.</p>
325    #[serde(rename = "values")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub values: Option<Vec<String>>,
328}
329
330/// <p>The attributes allowed or specified with a parameter object.</p>
331#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
332pub struct ParameterAttribute {
333    /// <p>The field identifier.</p>
334    #[serde(rename = "key")]
335    pub key: String,
336    /// <p>The field value, expressed as a String.</p>
337    #[serde(rename = "stringValue")]
338    pub string_value: String,
339}
340
341/// <p>Contains information about a parameter object.</p>
342#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
343pub struct ParameterObject {
344    /// <p>The attributes of the parameter object.</p>
345    #[serde(rename = "attributes")]
346    pub attributes: Vec<ParameterAttribute>,
347    /// <p>The ID of the parameter object. </p>
348    #[serde(rename = "id")]
349    pub id: String,
350}
351
352/// <p>A value or list of parameter values. </p>
353#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
354pub struct ParameterValue {
355    /// <p>The ID of the parameter value.</p>
356    #[serde(rename = "id")]
357    pub id: String,
358    /// <p>The field value, expressed as a String.</p>
359    #[serde(rename = "stringValue")]
360    pub string_value: String,
361}
362
363/// <p>Contains pipeline metadata.</p>
364#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
365#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
366pub struct PipelineDescription {
367    /// <p>Description of the pipeline.</p>
368    #[serde(rename = "description")]
369    #[serde(skip_serializing_if = "Option::is_none")]
370    pub description: Option<String>,
371    /// <p>A list of read-only fields that contain metadata about the pipeline: @userId, @accountId, and @pipelineState.</p>
372    #[serde(rename = "fields")]
373    pub fields: Vec<Field>,
374    /// <p>The name of the pipeline.</p>
375    #[serde(rename = "name")]
376    pub name: String,
377    /// <p>The pipeline identifier that was assigned by AWS Data Pipeline. This is a string of the form <code>df-297EG78HU43EEXAMPLE</code>.</p>
378    #[serde(rename = "pipelineId")]
379    pub pipeline_id: String,
380    /// <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>
381    #[serde(rename = "tags")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub tags: Option<Vec<Tag>>,
384}
385
386/// <p>Contains the name and identifier of a pipeline.</p>
387#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
388#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
389pub struct PipelineIdName {
390    /// <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>
391    #[serde(rename = "id")]
392    #[serde(skip_serializing_if = "Option::is_none")]
393    pub id: Option<String>,
394    /// <p>The name of the pipeline.</p>
395    #[serde(rename = "name")]
396    #[serde(skip_serializing_if = "Option::is_none")]
397    pub name: Option<String>,
398}
399
400/// <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>
401#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
402pub struct PipelineObject {
403    /// <p>Key-value pairs that define the properties of the object.</p>
404    #[serde(rename = "fields")]
405    pub fields: Vec<Field>,
406    /// <p>The ID of the object.</p>
407    #[serde(rename = "id")]
408    pub id: String,
409    /// <p>The name of the object.</p>
410    #[serde(rename = "name")]
411    pub name: String,
412}
413
414/// <p>Contains the parameters for PollForTask.</p>
415#[derive(Clone, Debug, Default, PartialEq, Serialize)]
416#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
417pub struct PollForTaskInput {
418    /// <p>The public DNS name of the calling task runner.</p>
419    #[serde(rename = "hostname")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub hostname: Option<String>,
422    /// <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>
423    #[serde(rename = "instanceIdentity")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub instance_identity: Option<InstanceIdentity>,
426    /// <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>
427    #[serde(rename = "workerGroup")]
428    pub worker_group: String,
429}
430
431/// <p>Contains the output of PollForTask.</p>
432#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
433#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
434pub struct PollForTaskOutput {
435    /// <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>
436    #[serde(rename = "taskObject")]
437    #[serde(skip_serializing_if = "Option::is_none")]
438    pub task_object: Option<TaskObject>,
439}
440
441/// <p>Contains the parameters for PutPipelineDefinition.</p>
442#[derive(Clone, Debug, Default, PartialEq, Serialize)]
443#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
444pub struct PutPipelineDefinitionInput {
445    /// <p>The parameter objects used with the pipeline.</p>
446    #[serde(rename = "parameterObjects")]
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub parameter_objects: Option<Vec<ParameterObject>>,
449    /// <p>The parameter values used with the pipeline.</p>
450    #[serde(rename = "parameterValues")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub parameter_values: Option<Vec<ParameterValue>>,
453    /// <p>The ID of the pipeline.</p>
454    #[serde(rename = "pipelineId")]
455    pub pipeline_id: String,
456    /// <p>The objects that define the pipeline. These objects overwrite the existing pipeline definition.</p>
457    #[serde(rename = "pipelineObjects")]
458    pub pipeline_objects: Vec<PipelineObject>,
459}
460
461/// <p>Contains the output of PutPipelineDefinition.</p>
462#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
463#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
464pub struct PutPipelineDefinitionOutput {
465    /// <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>
466    #[serde(rename = "errored")]
467    pub errored: bool,
468    /// <p>The validation errors that are associated with the objects defined in <code>pipelineObjects</code>.</p>
469    #[serde(rename = "validationErrors")]
470    #[serde(skip_serializing_if = "Option::is_none")]
471    pub validation_errors: Option<Vec<ValidationError>>,
472    /// <p>The validation warnings that are associated with the objects defined in <code>pipelineObjects</code>.</p>
473    #[serde(rename = "validationWarnings")]
474    #[serde(skip_serializing_if = "Option::is_none")]
475    pub validation_warnings: Option<Vec<ValidationWarning>>,
476}
477
478/// <p>Defines the query to run against an object.</p>
479#[derive(Clone, Debug, Default, PartialEq, Serialize)]
480#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
481pub struct Query {
482    /// <p>List of selectors that define the query. An object must satisfy all of the selectors to match the query.</p>
483    #[serde(rename = "selectors")]
484    #[serde(skip_serializing_if = "Option::is_none")]
485    pub selectors: Option<Vec<Selector>>,
486}
487
488/// <p>Contains the parameters for QueryObjects.</p>
489#[derive(Clone, Debug, Default, PartialEq, Serialize)]
490#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
491pub struct QueryObjectsInput {
492    /// <p>The maximum number of object names that <code>QueryObjects</code> will return in a single call. The default value is 100. </p>
493    #[serde(rename = "limit")]
494    #[serde(skip_serializing_if = "Option::is_none")]
495    pub limit: Option<i64>,
496    /// <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>
497    #[serde(rename = "marker")]
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub marker: Option<String>,
500    /// <p>The ID of the pipeline.</p>
501    #[serde(rename = "pipelineId")]
502    pub pipeline_id: String,
503    /// <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>
504    #[serde(rename = "query")]
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub query: Option<Query>,
507    /// <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>
508    #[serde(rename = "sphere")]
509    pub sphere: String,
510}
511
512/// <p>Contains the output of QueryObjects.</p>
513#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
514#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
515pub struct QueryObjectsOutput {
516    /// <p>Indicates whether there are more results that can be obtained by a subsequent call.</p>
517    #[serde(rename = "hasMoreResults")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub has_more_results: Option<bool>,
520    /// <p>The identifiers that match the query selectors.</p>
521    #[serde(rename = "ids")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub ids: Option<Vec<String>>,
524    /// <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>
525    #[serde(rename = "marker")]
526    #[serde(skip_serializing_if = "Option::is_none")]
527    pub marker: Option<String>,
528}
529
530/// <p>Contains the parameters for RemoveTags.</p>
531#[derive(Clone, Debug, Default, PartialEq, Serialize)]
532#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
533pub struct RemoveTagsInput {
534    /// <p>The ID of the pipeline.</p>
535    #[serde(rename = "pipelineId")]
536    pub pipeline_id: String,
537    /// <p>The keys of the tags to remove.</p>
538    #[serde(rename = "tagKeys")]
539    pub tag_keys: Vec<String>,
540}
541
542/// <p>Contains the output of RemoveTags.</p>
543#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
544#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
545pub struct RemoveTagsOutput {}
546
547/// <p>Contains the parameters for ReportTaskProgress.</p>
548#[derive(Clone, Debug, Default, PartialEq, Serialize)]
549#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
550pub struct ReportTaskProgressInput {
551    /// <p>Key-value pairs that define the properties of the ReportTaskProgressInput object.</p>
552    #[serde(rename = "fields")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub fields: Option<Vec<Field>>,
555    /// <p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>
556    #[serde(rename = "taskId")]
557    pub task_id: String,
558}
559
560/// <p>Contains the output of ReportTaskProgress.</p>
561#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
562#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
563pub struct ReportTaskProgressOutput {
564    /// <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>
565    #[serde(rename = "canceled")]
566    pub canceled: bool,
567}
568
569/// <p>Contains the parameters for ReportTaskRunnerHeartbeat.</p>
570#[derive(Clone, Debug, Default, PartialEq, Serialize)]
571#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
572pub struct ReportTaskRunnerHeartbeatInput {
573    /// <p>The public DNS name of the task runner.</p>
574    #[serde(rename = "hostname")]
575    #[serde(skip_serializing_if = "Option::is_none")]
576    pub hostname: Option<String>,
577    /// <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>
578    #[serde(rename = "taskrunnerId")]
579    pub taskrunner_id: String,
580    /// <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>
581    #[serde(rename = "workerGroup")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub worker_group: Option<String>,
584}
585
586/// <p>Contains the output of ReportTaskRunnerHeartbeat.</p>
587#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
588#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
589pub struct ReportTaskRunnerHeartbeatOutput {
590    /// <p>Indicates whether the calling task runner should terminate.</p>
591    #[serde(rename = "terminate")]
592    pub terminate: bool,
593}
594
595/// <p>A comparision that is used to determine whether a query should return this object.</p>
596#[derive(Clone, Debug, Default, PartialEq, Serialize)]
597#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
598pub struct Selector {
599    /// <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>
600    #[serde(rename = "fieldName")]
601    #[serde(skip_serializing_if = "Option::is_none")]
602    pub field_name: Option<String>,
603    #[serde(rename = "operator")]
604    #[serde(skip_serializing_if = "Option::is_none")]
605    pub operator: Option<Operator>,
606}
607
608/// <p>Contains the parameters for SetStatus.</p>
609#[derive(Clone, Debug, Default, PartialEq, Serialize)]
610#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
611pub struct SetStatusInput {
612    /// <p>The IDs of the objects. The corresponding objects can be either physical or components, but not a mix of both types.</p>
613    #[serde(rename = "objectIds")]
614    pub object_ids: Vec<String>,
615    /// <p>The ID of the pipeline that contains the objects.</p>
616    #[serde(rename = "pipelineId")]
617    pub pipeline_id: String,
618    /// <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>
619    #[serde(rename = "status")]
620    pub status: String,
621}
622
623/// <p>Contains the parameters for SetTaskStatus.</p>
624#[derive(Clone, Debug, Default, PartialEq, Serialize)]
625#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
626pub struct SetTaskStatusInput {
627    /// <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>
628    #[serde(rename = "errorId")]
629    #[serde(skip_serializing_if = "Option::is_none")]
630    pub error_id: Option<String>,
631    /// <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>
632    #[serde(rename = "errorMessage")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub error_message: Option<String>,
635    /// <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>
636    #[serde(rename = "errorStackTrace")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub error_stack_trace: Option<String>,
639    /// <p>The ID of the task assigned to the task runner. This value is provided in the response for <a>PollForTask</a>.</p>
640    #[serde(rename = "taskId")]
641    pub task_id: String,
642    /// <p>If <code>FINISHED</code>, the task successfully completed. If <code>FAILED</code>, the task ended unsuccessfully. Preconditions use false.</p>
643    #[serde(rename = "taskStatus")]
644    pub task_status: String,
645}
646
647/// <p>Contains the output of SetTaskStatus.</p>
648#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
649#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
650pub struct SetTaskStatusOutput {}
651
652/// <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>
653#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
654pub struct Tag {
655    /// <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>
656    #[serde(rename = "key")]
657    pub key: String,
658    /// <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>
659    #[serde(rename = "value")]
660    pub value: String,
661}
662
663/// <p>Contains information about a pipeline task that is assigned to a task runner.</p>
664#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
665#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
666pub struct TaskObject {
667    /// <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>
668    #[serde(rename = "attemptId")]
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub attempt_id: Option<String>,
671    /// <p>Connection information for the location where the task runner will publish the output of the task.</p>
672    #[serde(rename = "objects")]
673    #[serde(skip_serializing_if = "Option::is_none")]
674    pub objects: Option<::std::collections::HashMap<String, PipelineObject>>,
675    /// <p>The ID of the pipeline that provided the task.</p>
676    #[serde(rename = "pipelineId")]
677    #[serde(skip_serializing_if = "Option::is_none")]
678    pub pipeline_id: Option<String>,
679    /// <p>An internal identifier for the task. This ID is passed to the <a>SetTaskStatus</a> and <a>ReportTaskProgress</a> actions.</p>
680    #[serde(rename = "taskId")]
681    #[serde(skip_serializing_if = "Option::is_none")]
682    pub task_id: Option<String>,
683}
684
685/// <p>Contains the parameters for ValidatePipelineDefinition.</p>
686#[derive(Clone, Debug, Default, PartialEq, Serialize)]
687#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
688pub struct ValidatePipelineDefinitionInput {
689    /// <p>The parameter objects used with the pipeline.</p>
690    #[serde(rename = "parameterObjects")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub parameter_objects: Option<Vec<ParameterObject>>,
693    /// <p>The parameter values used with the pipeline.</p>
694    #[serde(rename = "parameterValues")]
695    #[serde(skip_serializing_if = "Option::is_none")]
696    pub parameter_values: Option<Vec<ParameterValue>>,
697    /// <p>The ID of the pipeline.</p>
698    #[serde(rename = "pipelineId")]
699    pub pipeline_id: String,
700    /// <p>The objects that define the pipeline changes to validate against the pipeline.</p>
701    #[serde(rename = "pipelineObjects")]
702    pub pipeline_objects: Vec<PipelineObject>,
703}
704
705/// <p>Contains the output of ValidatePipelineDefinition.</p>
706#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
707#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
708pub struct ValidatePipelineDefinitionOutput {
709    /// <p>Indicates whether there were validation errors.</p>
710    #[serde(rename = "errored")]
711    pub errored: bool,
712    /// <p>Any validation errors that were found.</p>
713    #[serde(rename = "validationErrors")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub validation_errors: Option<Vec<ValidationError>>,
716    /// <p>Any validation warnings that were found.</p>
717    #[serde(rename = "validationWarnings")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub validation_warnings: Option<Vec<ValidationWarning>>,
720}
721
722/// <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>
723#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
724#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
725pub struct ValidationError {
726    /// <p>A description of the validation error.</p>
727    #[serde(rename = "errors")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub errors: Option<Vec<String>>,
730    /// <p>The identifier of the object that contains the validation error.</p>
731    #[serde(rename = "id")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub id: Option<String>,
734}
735
736/// <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>
737#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
738#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
739pub struct ValidationWarning {
740    /// <p>The identifier of the object that contains the validation warning.</p>
741    #[serde(rename = "id")]
742    #[serde(skip_serializing_if = "Option::is_none")]
743    pub id: Option<String>,
744    /// <p>A description of the validation warning.</p>
745    #[serde(rename = "warnings")]
746    #[serde(skip_serializing_if = "Option::is_none")]
747    pub warnings: Option<Vec<String>>,
748}
749
750/// Errors returned by ActivatePipeline
751#[derive(Debug, PartialEq)]
752pub enum ActivatePipelineError {
753    /// <p>An internal service error occurred.</p>
754    InternalServiceError(String),
755    /// <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>
756    InvalidRequest(String),
757    /// <p>The specified pipeline has been deleted.</p>
758    PipelineDeleted(String),
759    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
760    PipelineNotFound(String),
761}
762
763impl ActivatePipelineError {
764    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ActivatePipelineError> {
765        if let Some(err) = proto::json::Error::parse(&res) {
766            match err.typ.as_str() {
767                "InternalServiceError" => {
768                    return RusotoError::Service(ActivatePipelineError::InternalServiceError(
769                        err.msg,
770                    ))
771                }
772                "InvalidRequestException" => {
773                    return RusotoError::Service(ActivatePipelineError::InvalidRequest(err.msg))
774                }
775                "PipelineDeletedException" => {
776                    return RusotoError::Service(ActivatePipelineError::PipelineDeleted(err.msg))
777                }
778                "PipelineNotFoundException" => {
779                    return RusotoError::Service(ActivatePipelineError::PipelineNotFound(err.msg))
780                }
781                "ValidationException" => return RusotoError::Validation(err.msg),
782                _ => {}
783            }
784        }
785        RusotoError::Unknown(res)
786    }
787}
788impl fmt::Display for ActivatePipelineError {
789    #[allow(unused_variables)]
790    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
791        match *self {
792            ActivatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
793            ActivatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
794            ActivatePipelineError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
795            ActivatePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
796        }
797    }
798}
799impl Error for ActivatePipelineError {}
800/// Errors returned by AddTags
801#[derive(Debug, PartialEq)]
802pub enum AddTagsError {
803    /// <p>An internal service error occurred.</p>
804    InternalServiceError(String),
805    /// <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>
806    InvalidRequest(String),
807    /// <p>The specified pipeline has been deleted.</p>
808    PipelineDeleted(String),
809    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
810    PipelineNotFound(String),
811}
812
813impl AddTagsError {
814    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsError> {
815        if let Some(err) = proto::json::Error::parse(&res) {
816            match err.typ.as_str() {
817                "InternalServiceError" => {
818                    return RusotoError::Service(AddTagsError::InternalServiceError(err.msg))
819                }
820                "InvalidRequestException" => {
821                    return RusotoError::Service(AddTagsError::InvalidRequest(err.msg))
822                }
823                "PipelineDeletedException" => {
824                    return RusotoError::Service(AddTagsError::PipelineDeleted(err.msg))
825                }
826                "PipelineNotFoundException" => {
827                    return RusotoError::Service(AddTagsError::PipelineNotFound(err.msg))
828                }
829                "ValidationException" => return RusotoError::Validation(err.msg),
830                _ => {}
831            }
832        }
833        RusotoError::Unknown(res)
834    }
835}
836impl fmt::Display for AddTagsError {
837    #[allow(unused_variables)]
838    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
839        match *self {
840            AddTagsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
841            AddTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
842            AddTagsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
843            AddTagsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
844        }
845    }
846}
847impl Error for AddTagsError {}
848/// Errors returned by CreatePipeline
849#[derive(Debug, PartialEq)]
850pub enum CreatePipelineError {
851    /// <p>An internal service error occurred.</p>
852    InternalServiceError(String),
853    /// <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>
854    InvalidRequest(String),
855}
856
857impl CreatePipelineError {
858    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePipelineError> {
859        if let Some(err) = proto::json::Error::parse(&res) {
860            match err.typ.as_str() {
861                "InternalServiceError" => {
862                    return RusotoError::Service(CreatePipelineError::InternalServiceError(err.msg))
863                }
864                "InvalidRequestException" => {
865                    return RusotoError::Service(CreatePipelineError::InvalidRequest(err.msg))
866                }
867                "ValidationException" => return RusotoError::Validation(err.msg),
868                _ => {}
869            }
870        }
871        RusotoError::Unknown(res)
872    }
873}
874impl fmt::Display for CreatePipelineError {
875    #[allow(unused_variables)]
876    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
877        match *self {
878            CreatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
879            CreatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
880        }
881    }
882}
883impl Error for CreatePipelineError {}
884/// Errors returned by DeactivatePipeline
885#[derive(Debug, PartialEq)]
886pub enum DeactivatePipelineError {
887    /// <p>An internal service error occurred.</p>
888    InternalServiceError(String),
889    /// <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>
890    InvalidRequest(String),
891    /// <p>The specified pipeline has been deleted.</p>
892    PipelineDeleted(String),
893    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
894    PipelineNotFound(String),
895}
896
897impl DeactivatePipelineError {
898    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeactivatePipelineError> {
899        if let Some(err) = proto::json::Error::parse(&res) {
900            match err.typ.as_str() {
901                "InternalServiceError" => {
902                    return RusotoError::Service(DeactivatePipelineError::InternalServiceError(
903                        err.msg,
904                    ))
905                }
906                "InvalidRequestException" => {
907                    return RusotoError::Service(DeactivatePipelineError::InvalidRequest(err.msg))
908                }
909                "PipelineDeletedException" => {
910                    return RusotoError::Service(DeactivatePipelineError::PipelineDeleted(err.msg))
911                }
912                "PipelineNotFoundException" => {
913                    return RusotoError::Service(DeactivatePipelineError::PipelineNotFound(err.msg))
914                }
915                "ValidationException" => return RusotoError::Validation(err.msg),
916                _ => {}
917            }
918        }
919        RusotoError::Unknown(res)
920    }
921}
922impl fmt::Display for DeactivatePipelineError {
923    #[allow(unused_variables)]
924    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
925        match *self {
926            DeactivatePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
927            DeactivatePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
928            DeactivatePipelineError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
929            DeactivatePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
930        }
931    }
932}
933impl Error for DeactivatePipelineError {}
934/// Errors returned by DeletePipeline
935#[derive(Debug, PartialEq)]
936pub enum DeletePipelineError {
937    /// <p>An internal service error occurred.</p>
938    InternalServiceError(String),
939    /// <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>
940    InvalidRequest(String),
941    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
942    PipelineNotFound(String),
943}
944
945impl DeletePipelineError {
946    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePipelineError> {
947        if let Some(err) = proto::json::Error::parse(&res) {
948            match err.typ.as_str() {
949                "InternalServiceError" => {
950                    return RusotoError::Service(DeletePipelineError::InternalServiceError(err.msg))
951                }
952                "InvalidRequestException" => {
953                    return RusotoError::Service(DeletePipelineError::InvalidRequest(err.msg))
954                }
955                "PipelineNotFoundException" => {
956                    return RusotoError::Service(DeletePipelineError::PipelineNotFound(err.msg))
957                }
958                "ValidationException" => return RusotoError::Validation(err.msg),
959                _ => {}
960            }
961        }
962        RusotoError::Unknown(res)
963    }
964}
965impl fmt::Display for DeletePipelineError {
966    #[allow(unused_variables)]
967    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
968        match *self {
969            DeletePipelineError::InternalServiceError(ref cause) => write!(f, "{}", cause),
970            DeletePipelineError::InvalidRequest(ref cause) => write!(f, "{}", cause),
971            DeletePipelineError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
972        }
973    }
974}
975impl Error for DeletePipelineError {}
976/// Errors returned by DescribeObjects
977#[derive(Debug, PartialEq)]
978pub enum DescribeObjectsError {
979    /// <p>An internal service error occurred.</p>
980    InternalServiceError(String),
981    /// <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>
982    InvalidRequest(String),
983    /// <p>The specified pipeline has been deleted.</p>
984    PipelineDeleted(String),
985    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
986    PipelineNotFound(String),
987}
988
989impl DescribeObjectsError {
990    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeObjectsError> {
991        if let Some(err) = proto::json::Error::parse(&res) {
992            match err.typ.as_str() {
993                "InternalServiceError" => {
994                    return RusotoError::Service(DescribeObjectsError::InternalServiceError(
995                        err.msg,
996                    ))
997                }
998                "InvalidRequestException" => {
999                    return RusotoError::Service(DescribeObjectsError::InvalidRequest(err.msg))
1000                }
1001                "PipelineDeletedException" => {
1002                    return RusotoError::Service(DescribeObjectsError::PipelineDeleted(err.msg))
1003                }
1004                "PipelineNotFoundException" => {
1005                    return RusotoError::Service(DescribeObjectsError::PipelineNotFound(err.msg))
1006                }
1007                "ValidationException" => return RusotoError::Validation(err.msg),
1008                _ => {}
1009            }
1010        }
1011        RusotoError::Unknown(res)
1012    }
1013}
1014impl fmt::Display for DescribeObjectsError {
1015    #[allow(unused_variables)]
1016    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1017        match *self {
1018            DescribeObjectsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1019            DescribeObjectsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1020            DescribeObjectsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1021            DescribeObjectsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1022        }
1023    }
1024}
1025impl Error for DescribeObjectsError {}
1026/// Errors returned by DescribePipelines
1027#[derive(Debug, PartialEq)]
1028pub enum DescribePipelinesError {
1029    /// <p>An internal service error occurred.</p>
1030    InternalServiceError(String),
1031    /// <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>
1032    InvalidRequest(String),
1033    /// <p>The specified pipeline has been deleted.</p>
1034    PipelineDeleted(String),
1035    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1036    PipelineNotFound(String),
1037}
1038
1039impl DescribePipelinesError {
1040    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribePipelinesError> {
1041        if let Some(err) = proto::json::Error::parse(&res) {
1042            match err.typ.as_str() {
1043                "InternalServiceError" => {
1044                    return RusotoError::Service(DescribePipelinesError::InternalServiceError(
1045                        err.msg,
1046                    ))
1047                }
1048                "InvalidRequestException" => {
1049                    return RusotoError::Service(DescribePipelinesError::InvalidRequest(err.msg))
1050                }
1051                "PipelineDeletedException" => {
1052                    return RusotoError::Service(DescribePipelinesError::PipelineDeleted(err.msg))
1053                }
1054                "PipelineNotFoundException" => {
1055                    return RusotoError::Service(DescribePipelinesError::PipelineNotFound(err.msg))
1056                }
1057                "ValidationException" => return RusotoError::Validation(err.msg),
1058                _ => {}
1059            }
1060        }
1061        RusotoError::Unknown(res)
1062    }
1063}
1064impl fmt::Display for DescribePipelinesError {
1065    #[allow(unused_variables)]
1066    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1067        match *self {
1068            DescribePipelinesError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1069            DescribePipelinesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1070            DescribePipelinesError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1071            DescribePipelinesError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1072        }
1073    }
1074}
1075impl Error for DescribePipelinesError {}
1076/// Errors returned by EvaluateExpression
1077#[derive(Debug, PartialEq)]
1078pub enum EvaluateExpressionError {
1079    /// <p>An internal service error occurred.</p>
1080    InternalServiceError(String),
1081    /// <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>
1082    InvalidRequest(String),
1083    /// <p>The specified pipeline has been deleted.</p>
1084    PipelineDeleted(String),
1085    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1086    PipelineNotFound(String),
1087    /// <p>The specified task was not found. </p>
1088    TaskNotFound(String),
1089}
1090
1091impl EvaluateExpressionError {
1092    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EvaluateExpressionError> {
1093        if let Some(err) = proto::json::Error::parse(&res) {
1094            match err.typ.as_str() {
1095                "InternalServiceError" => {
1096                    return RusotoError::Service(EvaluateExpressionError::InternalServiceError(
1097                        err.msg,
1098                    ))
1099                }
1100                "InvalidRequestException" => {
1101                    return RusotoError::Service(EvaluateExpressionError::InvalidRequest(err.msg))
1102                }
1103                "PipelineDeletedException" => {
1104                    return RusotoError::Service(EvaluateExpressionError::PipelineDeleted(err.msg))
1105                }
1106                "PipelineNotFoundException" => {
1107                    return RusotoError::Service(EvaluateExpressionError::PipelineNotFound(err.msg))
1108                }
1109                "TaskNotFoundException" => {
1110                    return RusotoError::Service(EvaluateExpressionError::TaskNotFound(err.msg))
1111                }
1112                "ValidationException" => return RusotoError::Validation(err.msg),
1113                _ => {}
1114            }
1115        }
1116        RusotoError::Unknown(res)
1117    }
1118}
1119impl fmt::Display for EvaluateExpressionError {
1120    #[allow(unused_variables)]
1121    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1122        match *self {
1123            EvaluateExpressionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1124            EvaluateExpressionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1125            EvaluateExpressionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1126            EvaluateExpressionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1127            EvaluateExpressionError::TaskNotFound(ref cause) => write!(f, "{}", cause),
1128        }
1129    }
1130}
1131impl Error for EvaluateExpressionError {}
1132/// Errors returned by GetPipelineDefinition
1133#[derive(Debug, PartialEq)]
1134pub enum GetPipelineDefinitionError {
1135    /// <p>An internal service error occurred.</p>
1136    InternalServiceError(String),
1137    /// <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>
1138    InvalidRequest(String),
1139    /// <p>The specified pipeline has been deleted.</p>
1140    PipelineDeleted(String),
1141    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1142    PipelineNotFound(String),
1143}
1144
1145impl GetPipelineDefinitionError {
1146    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetPipelineDefinitionError> {
1147        if let Some(err) = proto::json::Error::parse(&res) {
1148            match err.typ.as_str() {
1149                "InternalServiceError" => {
1150                    return RusotoError::Service(GetPipelineDefinitionError::InternalServiceError(
1151                        err.msg,
1152                    ))
1153                }
1154                "InvalidRequestException" => {
1155                    return RusotoError::Service(GetPipelineDefinitionError::InvalidRequest(
1156                        err.msg,
1157                    ))
1158                }
1159                "PipelineDeletedException" => {
1160                    return RusotoError::Service(GetPipelineDefinitionError::PipelineDeleted(
1161                        err.msg,
1162                    ))
1163                }
1164                "PipelineNotFoundException" => {
1165                    return RusotoError::Service(GetPipelineDefinitionError::PipelineNotFound(
1166                        err.msg,
1167                    ))
1168                }
1169                "ValidationException" => return RusotoError::Validation(err.msg),
1170                _ => {}
1171            }
1172        }
1173        RusotoError::Unknown(res)
1174    }
1175}
1176impl fmt::Display for GetPipelineDefinitionError {
1177    #[allow(unused_variables)]
1178    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1179        match *self {
1180            GetPipelineDefinitionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1181            GetPipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1182            GetPipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1183            GetPipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1184        }
1185    }
1186}
1187impl Error for GetPipelineDefinitionError {}
1188/// Errors returned by ListPipelines
1189#[derive(Debug, PartialEq)]
1190pub enum ListPipelinesError {
1191    /// <p>An internal service error occurred.</p>
1192    InternalServiceError(String),
1193    /// <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>
1194    InvalidRequest(String),
1195}
1196
1197impl ListPipelinesError {
1198    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPipelinesError> {
1199        if let Some(err) = proto::json::Error::parse(&res) {
1200            match err.typ.as_str() {
1201                "InternalServiceError" => {
1202                    return RusotoError::Service(ListPipelinesError::InternalServiceError(err.msg))
1203                }
1204                "InvalidRequestException" => {
1205                    return RusotoError::Service(ListPipelinesError::InvalidRequest(err.msg))
1206                }
1207                "ValidationException" => return RusotoError::Validation(err.msg),
1208                _ => {}
1209            }
1210        }
1211        RusotoError::Unknown(res)
1212    }
1213}
1214impl fmt::Display for ListPipelinesError {
1215    #[allow(unused_variables)]
1216    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1217        match *self {
1218            ListPipelinesError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1219            ListPipelinesError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1220        }
1221    }
1222}
1223impl Error for ListPipelinesError {}
1224/// Errors returned by PollForTask
1225#[derive(Debug, PartialEq)]
1226pub enum PollForTaskError {
1227    /// <p>An internal service error occurred.</p>
1228    InternalServiceError(String),
1229    /// <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>
1230    InvalidRequest(String),
1231    /// <p>The specified task was not found. </p>
1232    TaskNotFound(String),
1233}
1234
1235impl PollForTaskError {
1236    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PollForTaskError> {
1237        if let Some(err) = proto::json::Error::parse(&res) {
1238            match err.typ.as_str() {
1239                "InternalServiceError" => {
1240                    return RusotoError::Service(PollForTaskError::InternalServiceError(err.msg))
1241                }
1242                "InvalidRequestException" => {
1243                    return RusotoError::Service(PollForTaskError::InvalidRequest(err.msg))
1244                }
1245                "TaskNotFoundException" => {
1246                    return RusotoError::Service(PollForTaskError::TaskNotFound(err.msg))
1247                }
1248                "ValidationException" => return RusotoError::Validation(err.msg),
1249                _ => {}
1250            }
1251        }
1252        RusotoError::Unknown(res)
1253    }
1254}
1255impl fmt::Display for PollForTaskError {
1256    #[allow(unused_variables)]
1257    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1258        match *self {
1259            PollForTaskError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1260            PollForTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1261            PollForTaskError::TaskNotFound(ref cause) => write!(f, "{}", cause),
1262        }
1263    }
1264}
1265impl Error for PollForTaskError {}
1266/// Errors returned by PutPipelineDefinition
1267#[derive(Debug, PartialEq)]
1268pub enum PutPipelineDefinitionError {
1269    /// <p>An internal service error occurred.</p>
1270    InternalServiceError(String),
1271    /// <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>
1272    InvalidRequest(String),
1273    /// <p>The specified pipeline has been deleted.</p>
1274    PipelineDeleted(String),
1275    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1276    PipelineNotFound(String),
1277}
1278
1279impl PutPipelineDefinitionError {
1280    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutPipelineDefinitionError> {
1281        if let Some(err) = proto::json::Error::parse(&res) {
1282            match err.typ.as_str() {
1283                "InternalServiceError" => {
1284                    return RusotoError::Service(PutPipelineDefinitionError::InternalServiceError(
1285                        err.msg,
1286                    ))
1287                }
1288                "InvalidRequestException" => {
1289                    return RusotoError::Service(PutPipelineDefinitionError::InvalidRequest(
1290                        err.msg,
1291                    ))
1292                }
1293                "PipelineDeletedException" => {
1294                    return RusotoError::Service(PutPipelineDefinitionError::PipelineDeleted(
1295                        err.msg,
1296                    ))
1297                }
1298                "PipelineNotFoundException" => {
1299                    return RusotoError::Service(PutPipelineDefinitionError::PipelineNotFound(
1300                        err.msg,
1301                    ))
1302                }
1303                "ValidationException" => return RusotoError::Validation(err.msg),
1304                _ => {}
1305            }
1306        }
1307        RusotoError::Unknown(res)
1308    }
1309}
1310impl fmt::Display for PutPipelineDefinitionError {
1311    #[allow(unused_variables)]
1312    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1313        match *self {
1314            PutPipelineDefinitionError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1315            PutPipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1316            PutPipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1317            PutPipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1318        }
1319    }
1320}
1321impl Error for PutPipelineDefinitionError {}
1322/// Errors returned by QueryObjects
1323#[derive(Debug, PartialEq)]
1324pub enum QueryObjectsError {
1325    /// <p>An internal service error occurred.</p>
1326    InternalServiceError(String),
1327    /// <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>
1328    InvalidRequest(String),
1329    /// <p>The specified pipeline has been deleted.</p>
1330    PipelineDeleted(String),
1331    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1332    PipelineNotFound(String),
1333}
1334
1335impl QueryObjectsError {
1336    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<QueryObjectsError> {
1337        if let Some(err) = proto::json::Error::parse(&res) {
1338            match err.typ.as_str() {
1339                "InternalServiceError" => {
1340                    return RusotoError::Service(QueryObjectsError::InternalServiceError(err.msg))
1341                }
1342                "InvalidRequestException" => {
1343                    return RusotoError::Service(QueryObjectsError::InvalidRequest(err.msg))
1344                }
1345                "PipelineDeletedException" => {
1346                    return RusotoError::Service(QueryObjectsError::PipelineDeleted(err.msg))
1347                }
1348                "PipelineNotFoundException" => {
1349                    return RusotoError::Service(QueryObjectsError::PipelineNotFound(err.msg))
1350                }
1351                "ValidationException" => return RusotoError::Validation(err.msg),
1352                _ => {}
1353            }
1354        }
1355        RusotoError::Unknown(res)
1356    }
1357}
1358impl fmt::Display for QueryObjectsError {
1359    #[allow(unused_variables)]
1360    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1361        match *self {
1362            QueryObjectsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1363            QueryObjectsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1364            QueryObjectsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1365            QueryObjectsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1366        }
1367    }
1368}
1369impl Error for QueryObjectsError {}
1370/// Errors returned by RemoveTags
1371#[derive(Debug, PartialEq)]
1372pub enum RemoveTagsError {
1373    /// <p>An internal service error occurred.</p>
1374    InternalServiceError(String),
1375    /// <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>
1376    InvalidRequest(String),
1377    /// <p>The specified pipeline has been deleted.</p>
1378    PipelineDeleted(String),
1379    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1380    PipelineNotFound(String),
1381}
1382
1383impl RemoveTagsError {
1384    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsError> {
1385        if let Some(err) = proto::json::Error::parse(&res) {
1386            match err.typ.as_str() {
1387                "InternalServiceError" => {
1388                    return RusotoError::Service(RemoveTagsError::InternalServiceError(err.msg))
1389                }
1390                "InvalidRequestException" => {
1391                    return RusotoError::Service(RemoveTagsError::InvalidRequest(err.msg))
1392                }
1393                "PipelineDeletedException" => {
1394                    return RusotoError::Service(RemoveTagsError::PipelineDeleted(err.msg))
1395                }
1396                "PipelineNotFoundException" => {
1397                    return RusotoError::Service(RemoveTagsError::PipelineNotFound(err.msg))
1398                }
1399                "ValidationException" => return RusotoError::Validation(err.msg),
1400                _ => {}
1401            }
1402        }
1403        RusotoError::Unknown(res)
1404    }
1405}
1406impl fmt::Display for RemoveTagsError {
1407    #[allow(unused_variables)]
1408    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1409        match *self {
1410            RemoveTagsError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1411            RemoveTagsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1412            RemoveTagsError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1413            RemoveTagsError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1414        }
1415    }
1416}
1417impl Error for RemoveTagsError {}
1418/// Errors returned by ReportTaskProgress
1419#[derive(Debug, PartialEq)]
1420pub enum ReportTaskProgressError {
1421    /// <p>An internal service error occurred.</p>
1422    InternalServiceError(String),
1423    /// <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>
1424    InvalidRequest(String),
1425    /// <p>The specified pipeline has been deleted.</p>
1426    PipelineDeleted(String),
1427    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1428    PipelineNotFound(String),
1429    /// <p>The specified task was not found. </p>
1430    TaskNotFound(String),
1431}
1432
1433impl ReportTaskProgressError {
1434    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReportTaskProgressError> {
1435        if let Some(err) = proto::json::Error::parse(&res) {
1436            match err.typ.as_str() {
1437                "InternalServiceError" => {
1438                    return RusotoError::Service(ReportTaskProgressError::InternalServiceError(
1439                        err.msg,
1440                    ))
1441                }
1442                "InvalidRequestException" => {
1443                    return RusotoError::Service(ReportTaskProgressError::InvalidRequest(err.msg))
1444                }
1445                "PipelineDeletedException" => {
1446                    return RusotoError::Service(ReportTaskProgressError::PipelineDeleted(err.msg))
1447                }
1448                "PipelineNotFoundException" => {
1449                    return RusotoError::Service(ReportTaskProgressError::PipelineNotFound(err.msg))
1450                }
1451                "TaskNotFoundException" => {
1452                    return RusotoError::Service(ReportTaskProgressError::TaskNotFound(err.msg))
1453                }
1454                "ValidationException" => return RusotoError::Validation(err.msg),
1455                _ => {}
1456            }
1457        }
1458        RusotoError::Unknown(res)
1459    }
1460}
1461impl fmt::Display for ReportTaskProgressError {
1462    #[allow(unused_variables)]
1463    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1464        match *self {
1465            ReportTaskProgressError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1466            ReportTaskProgressError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1467            ReportTaskProgressError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1468            ReportTaskProgressError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1469            ReportTaskProgressError::TaskNotFound(ref cause) => write!(f, "{}", cause),
1470        }
1471    }
1472}
1473impl Error for ReportTaskProgressError {}
1474/// Errors returned by ReportTaskRunnerHeartbeat
1475#[derive(Debug, PartialEq)]
1476pub enum ReportTaskRunnerHeartbeatError {
1477    /// <p>An internal service error occurred.</p>
1478    InternalServiceError(String),
1479    /// <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>
1480    InvalidRequest(String),
1481}
1482
1483impl ReportTaskRunnerHeartbeatError {
1484    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReportTaskRunnerHeartbeatError> {
1485        if let Some(err) = proto::json::Error::parse(&res) {
1486            match err.typ.as_str() {
1487                "InternalServiceError" => {
1488                    return RusotoError::Service(
1489                        ReportTaskRunnerHeartbeatError::InternalServiceError(err.msg),
1490                    )
1491                }
1492                "InvalidRequestException" => {
1493                    return RusotoError::Service(ReportTaskRunnerHeartbeatError::InvalidRequest(
1494                        err.msg,
1495                    ))
1496                }
1497                "ValidationException" => return RusotoError::Validation(err.msg),
1498                _ => {}
1499            }
1500        }
1501        RusotoError::Unknown(res)
1502    }
1503}
1504impl fmt::Display for ReportTaskRunnerHeartbeatError {
1505    #[allow(unused_variables)]
1506    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1507        match *self {
1508            ReportTaskRunnerHeartbeatError::InternalServiceError(ref cause) => {
1509                write!(f, "{}", cause)
1510            }
1511            ReportTaskRunnerHeartbeatError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1512        }
1513    }
1514}
1515impl Error for ReportTaskRunnerHeartbeatError {}
1516/// Errors returned by SetStatus
1517#[derive(Debug, PartialEq)]
1518pub enum SetStatusError {
1519    /// <p>An internal service error occurred.</p>
1520    InternalServiceError(String),
1521    /// <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>
1522    InvalidRequest(String),
1523    /// <p>The specified pipeline has been deleted.</p>
1524    PipelineDeleted(String),
1525    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1526    PipelineNotFound(String),
1527}
1528
1529impl SetStatusError {
1530    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetStatusError> {
1531        if let Some(err) = proto::json::Error::parse(&res) {
1532            match err.typ.as_str() {
1533                "InternalServiceError" => {
1534                    return RusotoError::Service(SetStatusError::InternalServiceError(err.msg))
1535                }
1536                "InvalidRequestException" => {
1537                    return RusotoError::Service(SetStatusError::InvalidRequest(err.msg))
1538                }
1539                "PipelineDeletedException" => {
1540                    return RusotoError::Service(SetStatusError::PipelineDeleted(err.msg))
1541                }
1542                "PipelineNotFoundException" => {
1543                    return RusotoError::Service(SetStatusError::PipelineNotFound(err.msg))
1544                }
1545                "ValidationException" => return RusotoError::Validation(err.msg),
1546                _ => {}
1547            }
1548        }
1549        RusotoError::Unknown(res)
1550    }
1551}
1552impl fmt::Display for SetStatusError {
1553    #[allow(unused_variables)]
1554    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1555        match *self {
1556            SetStatusError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1557            SetStatusError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1558            SetStatusError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1559            SetStatusError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1560        }
1561    }
1562}
1563impl Error for SetStatusError {}
1564/// Errors returned by SetTaskStatus
1565#[derive(Debug, PartialEq)]
1566pub enum SetTaskStatusError {
1567    /// <p>An internal service error occurred.</p>
1568    InternalServiceError(String),
1569    /// <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>
1570    InvalidRequest(String),
1571    /// <p>The specified pipeline has been deleted.</p>
1572    PipelineDeleted(String),
1573    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1574    PipelineNotFound(String),
1575    /// <p>The specified task was not found. </p>
1576    TaskNotFound(String),
1577}
1578
1579impl SetTaskStatusError {
1580    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SetTaskStatusError> {
1581        if let Some(err) = proto::json::Error::parse(&res) {
1582            match err.typ.as_str() {
1583                "InternalServiceError" => {
1584                    return RusotoError::Service(SetTaskStatusError::InternalServiceError(err.msg))
1585                }
1586                "InvalidRequestException" => {
1587                    return RusotoError::Service(SetTaskStatusError::InvalidRequest(err.msg))
1588                }
1589                "PipelineDeletedException" => {
1590                    return RusotoError::Service(SetTaskStatusError::PipelineDeleted(err.msg))
1591                }
1592                "PipelineNotFoundException" => {
1593                    return RusotoError::Service(SetTaskStatusError::PipelineNotFound(err.msg))
1594                }
1595                "TaskNotFoundException" => {
1596                    return RusotoError::Service(SetTaskStatusError::TaskNotFound(err.msg))
1597                }
1598                "ValidationException" => return RusotoError::Validation(err.msg),
1599                _ => {}
1600            }
1601        }
1602        RusotoError::Unknown(res)
1603    }
1604}
1605impl fmt::Display for SetTaskStatusError {
1606    #[allow(unused_variables)]
1607    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1608        match *self {
1609            SetTaskStatusError::InternalServiceError(ref cause) => write!(f, "{}", cause),
1610            SetTaskStatusError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1611            SetTaskStatusError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1612            SetTaskStatusError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1613            SetTaskStatusError::TaskNotFound(ref cause) => write!(f, "{}", cause),
1614        }
1615    }
1616}
1617impl Error for SetTaskStatusError {}
1618/// Errors returned by ValidatePipelineDefinition
1619#[derive(Debug, PartialEq)]
1620pub enum ValidatePipelineDefinitionError {
1621    /// <p>An internal service error occurred.</p>
1622    InternalServiceError(String),
1623    /// <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>
1624    InvalidRequest(String),
1625    /// <p>The specified pipeline has been deleted.</p>
1626    PipelineDeleted(String),
1627    /// <p>The specified pipeline was not found. Verify that you used the correct user and account identifiers.</p>
1628    PipelineNotFound(String),
1629}
1630
1631impl ValidatePipelineDefinitionError {
1632    pub fn from_response(
1633        res: BufferedHttpResponse,
1634    ) -> RusotoError<ValidatePipelineDefinitionError> {
1635        if let Some(err) = proto::json::Error::parse(&res) {
1636            match err.typ.as_str() {
1637                "InternalServiceError" => {
1638                    return RusotoError::Service(
1639                        ValidatePipelineDefinitionError::InternalServiceError(err.msg),
1640                    )
1641                }
1642                "InvalidRequestException" => {
1643                    return RusotoError::Service(ValidatePipelineDefinitionError::InvalidRequest(
1644                        err.msg,
1645                    ))
1646                }
1647                "PipelineDeletedException" => {
1648                    return RusotoError::Service(ValidatePipelineDefinitionError::PipelineDeleted(
1649                        err.msg,
1650                    ))
1651                }
1652                "PipelineNotFoundException" => {
1653                    return RusotoError::Service(ValidatePipelineDefinitionError::PipelineNotFound(
1654                        err.msg,
1655                    ))
1656                }
1657                "ValidationException" => return RusotoError::Validation(err.msg),
1658                _ => {}
1659            }
1660        }
1661        RusotoError::Unknown(res)
1662    }
1663}
1664impl fmt::Display for ValidatePipelineDefinitionError {
1665    #[allow(unused_variables)]
1666    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1667        match *self {
1668            ValidatePipelineDefinitionError::InternalServiceError(ref cause) => {
1669                write!(f, "{}", cause)
1670            }
1671            ValidatePipelineDefinitionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1672            ValidatePipelineDefinitionError::PipelineDeleted(ref cause) => write!(f, "{}", cause),
1673            ValidatePipelineDefinitionError::PipelineNotFound(ref cause) => write!(f, "{}", cause),
1674        }
1675    }
1676}
1677impl Error for ValidatePipelineDefinitionError {}
1678/// Trait representing the capabilities of the AWS Data Pipeline API. AWS Data Pipeline clients implement this trait.
1679#[async_trait]
1680pub trait DataPipeline {
1681    /// <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>
1682    async fn activate_pipeline(
1683        &self,
1684        input: ActivatePipelineInput,
1685    ) -> Result<ActivatePipelineOutput, RusotoError<ActivatePipelineError>>;
1686
1687    /// <p>Adds or modifies tags for the specified pipeline.</p>
1688    async fn add_tags(
1689        &self,
1690        input: AddTagsInput,
1691    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>>;
1692
1693    /// <p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>
1694    async fn create_pipeline(
1695        &self,
1696        input: CreatePipelineInput,
1697    ) -> Result<CreatePipelineOutput, RusotoError<CreatePipelineError>>;
1698
1699    /// <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>
1700    async fn deactivate_pipeline(
1701        &self,
1702        input: DeactivatePipelineInput,
1703    ) -> Result<DeactivatePipelineOutput, RusotoError<DeactivatePipelineError>>;
1704
1705    /// <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>
1706    async fn delete_pipeline(
1707        &self,
1708        input: DeletePipelineInput,
1709    ) -> Result<(), RusotoError<DeletePipelineError>>;
1710
1711    /// <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>
1712    async fn describe_objects(
1713        &self,
1714        input: DescribeObjectsInput,
1715    ) -> Result<DescribeObjectsOutput, RusotoError<DescribeObjectsError>>;
1716
1717    /// <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>
1718    async fn describe_pipelines(
1719        &self,
1720        input: DescribePipelinesInput,
1721    ) -> Result<DescribePipelinesOutput, RusotoError<DescribePipelinesError>>;
1722
1723    /// <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>
1724    async fn evaluate_expression(
1725        &self,
1726        input: EvaluateExpressionInput,
1727    ) -> Result<EvaluateExpressionOutput, RusotoError<EvaluateExpressionError>>;
1728
1729    /// <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>
1730    async fn get_pipeline_definition(
1731        &self,
1732        input: GetPipelineDefinitionInput,
1733    ) -> Result<GetPipelineDefinitionOutput, RusotoError<GetPipelineDefinitionError>>;
1734
1735    /// <p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>
1736    async fn list_pipelines(
1737        &self,
1738        input: ListPipelinesInput,
1739    ) -> Result<ListPipelinesOutput, RusotoError<ListPipelinesError>>;
1740
1741    /// <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>
1742    async fn poll_for_task(
1743        &self,
1744        input: PollForTaskInput,
1745    ) -> Result<PollForTaskOutput, RusotoError<PollForTaskError>>;
1746
1747    /// <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>
1748    async fn put_pipeline_definition(
1749        &self,
1750        input: PutPipelineDefinitionInput,
1751    ) -> Result<PutPipelineDefinitionOutput, RusotoError<PutPipelineDefinitionError>>;
1752
1753    /// <p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>
1754    async fn query_objects(
1755        &self,
1756        input: QueryObjectsInput,
1757    ) -> Result<QueryObjectsOutput, RusotoError<QueryObjectsError>>;
1758
1759    /// <p>Removes existing tags from the specified pipeline.</p>
1760    async fn remove_tags(
1761        &self,
1762        input: RemoveTagsInput,
1763    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>>;
1764
1765    /// <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>
1766    async fn report_task_progress(
1767        &self,
1768        input: ReportTaskProgressInput,
1769    ) -> Result<ReportTaskProgressOutput, RusotoError<ReportTaskProgressError>>;
1770
1771    /// <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>
1772    async fn report_task_runner_heartbeat(
1773        &self,
1774        input: ReportTaskRunnerHeartbeatInput,
1775    ) -> Result<ReportTaskRunnerHeartbeatOutput, RusotoError<ReportTaskRunnerHeartbeatError>>;
1776
1777    /// <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>
1778    async fn set_status(&self, input: SetStatusInput) -> Result<(), RusotoError<SetStatusError>>;
1779
1780    /// <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>
1781    async fn set_task_status(
1782        &self,
1783        input: SetTaskStatusInput,
1784    ) -> Result<SetTaskStatusOutput, RusotoError<SetTaskStatusError>>;
1785
1786    /// <p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>
1787    async fn validate_pipeline_definition(
1788        &self,
1789        input: ValidatePipelineDefinitionInput,
1790    ) -> Result<ValidatePipelineDefinitionOutput, RusotoError<ValidatePipelineDefinitionError>>;
1791}
1792/// A client for the AWS Data Pipeline API.
1793#[derive(Clone)]
1794pub struct DataPipelineClient {
1795    client: Client,
1796    region: region::Region,
1797}
1798
1799impl DataPipelineClient {
1800    /// Creates a client backed by the default tokio event loop.
1801    ///
1802    /// The client will use the default credentials provider and tls client.
1803    pub fn new(region: region::Region) -> DataPipelineClient {
1804        DataPipelineClient {
1805            client: Client::shared(),
1806            region,
1807        }
1808    }
1809
1810    pub fn new_with<P, D>(
1811        request_dispatcher: D,
1812        credentials_provider: P,
1813        region: region::Region,
1814    ) -> DataPipelineClient
1815    where
1816        P: ProvideAwsCredentials + Send + Sync + 'static,
1817        D: DispatchSignedRequest + Send + Sync + 'static,
1818    {
1819        DataPipelineClient {
1820            client: Client::new_with(credentials_provider, request_dispatcher),
1821            region,
1822        }
1823    }
1824
1825    pub fn new_with_client(client: Client, region: region::Region) -> DataPipelineClient {
1826        DataPipelineClient { client, region }
1827    }
1828}
1829
1830#[async_trait]
1831impl DataPipeline for DataPipelineClient {
1832    /// <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>
1833    async fn activate_pipeline(
1834        &self,
1835        input: ActivatePipelineInput,
1836    ) -> Result<ActivatePipelineOutput, RusotoError<ActivatePipelineError>> {
1837        let mut request = self.new_signed_request("POST", "/");
1838        request.add_header("x-amz-target", "DataPipeline.ActivatePipeline");
1839        let encoded = serde_json::to_string(&input).unwrap();
1840        request.set_payload(Some(encoded));
1841
1842        let response = self
1843            .sign_and_dispatch(request, ActivatePipelineError::from_response)
1844            .await?;
1845        let mut response = response;
1846        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1847        proto::json::ResponsePayload::new(&response).deserialize::<ActivatePipelineOutput, _>()
1848    }
1849
1850    /// <p>Adds or modifies tags for the specified pipeline.</p>
1851    async fn add_tags(
1852        &self,
1853        input: AddTagsInput,
1854    ) -> Result<AddTagsOutput, RusotoError<AddTagsError>> {
1855        let mut request = self.new_signed_request("POST", "/");
1856        request.add_header("x-amz-target", "DataPipeline.AddTags");
1857        let encoded = serde_json::to_string(&input).unwrap();
1858        request.set_payload(Some(encoded));
1859
1860        let response = self
1861            .sign_and_dispatch(request, AddTagsError::from_response)
1862            .await?;
1863        let mut response = response;
1864        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1865        proto::json::ResponsePayload::new(&response).deserialize::<AddTagsOutput, _>()
1866    }
1867
1868    /// <p>Creates a new, empty pipeline. Use <a>PutPipelineDefinition</a> to populate the pipeline.</p>
1869    async fn create_pipeline(
1870        &self,
1871        input: CreatePipelineInput,
1872    ) -> Result<CreatePipelineOutput, RusotoError<CreatePipelineError>> {
1873        let mut request = self.new_signed_request("POST", "/");
1874        request.add_header("x-amz-target", "DataPipeline.CreatePipeline");
1875        let encoded = serde_json::to_string(&input).unwrap();
1876        request.set_payload(Some(encoded));
1877
1878        let response = self
1879            .sign_and_dispatch(request, CreatePipelineError::from_response)
1880            .await?;
1881        let mut response = response;
1882        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1883        proto::json::ResponsePayload::new(&response).deserialize::<CreatePipelineOutput, _>()
1884    }
1885
1886    /// <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>
1887    async fn deactivate_pipeline(
1888        &self,
1889        input: DeactivatePipelineInput,
1890    ) -> Result<DeactivatePipelineOutput, RusotoError<DeactivatePipelineError>> {
1891        let mut request = self.new_signed_request("POST", "/");
1892        request.add_header("x-amz-target", "DataPipeline.DeactivatePipeline");
1893        let encoded = serde_json::to_string(&input).unwrap();
1894        request.set_payload(Some(encoded));
1895
1896        let response = self
1897            .sign_and_dispatch(request, DeactivatePipelineError::from_response)
1898            .await?;
1899        let mut response = response;
1900        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1901        proto::json::ResponsePayload::new(&response).deserialize::<DeactivatePipelineOutput, _>()
1902    }
1903
1904    /// <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>
1905    async fn delete_pipeline(
1906        &self,
1907        input: DeletePipelineInput,
1908    ) -> Result<(), RusotoError<DeletePipelineError>> {
1909        let mut request = self.new_signed_request("POST", "/");
1910        request.add_header("x-amz-target", "DataPipeline.DeletePipeline");
1911        let encoded = serde_json::to_string(&input).unwrap();
1912        request.set_payload(Some(encoded));
1913
1914        let response = self
1915            .sign_and_dispatch(request, DeletePipelineError::from_response)
1916            .await?;
1917        std::mem::drop(response);
1918        Ok(())
1919    }
1920
1921    /// <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>
1922    async fn describe_objects(
1923        &self,
1924        input: DescribeObjectsInput,
1925    ) -> Result<DescribeObjectsOutput, RusotoError<DescribeObjectsError>> {
1926        let mut request = self.new_signed_request("POST", "/");
1927        request.add_header("x-amz-target", "DataPipeline.DescribeObjects");
1928        let encoded = serde_json::to_string(&input).unwrap();
1929        request.set_payload(Some(encoded));
1930
1931        let response = self
1932            .sign_and_dispatch(request, DescribeObjectsError::from_response)
1933            .await?;
1934        let mut response = response;
1935        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1936        proto::json::ResponsePayload::new(&response).deserialize::<DescribeObjectsOutput, _>()
1937    }
1938
1939    /// <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>
1940    async fn describe_pipelines(
1941        &self,
1942        input: DescribePipelinesInput,
1943    ) -> Result<DescribePipelinesOutput, RusotoError<DescribePipelinesError>> {
1944        let mut request = self.new_signed_request("POST", "/");
1945        request.add_header("x-amz-target", "DataPipeline.DescribePipelines");
1946        let encoded = serde_json::to_string(&input).unwrap();
1947        request.set_payload(Some(encoded));
1948
1949        let response = self
1950            .sign_and_dispatch(request, DescribePipelinesError::from_response)
1951            .await?;
1952        let mut response = response;
1953        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1954        proto::json::ResponsePayload::new(&response).deserialize::<DescribePipelinesOutput, _>()
1955    }
1956
1957    /// <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>
1958    async fn evaluate_expression(
1959        &self,
1960        input: EvaluateExpressionInput,
1961    ) -> Result<EvaluateExpressionOutput, RusotoError<EvaluateExpressionError>> {
1962        let mut request = self.new_signed_request("POST", "/");
1963        request.add_header("x-amz-target", "DataPipeline.EvaluateExpression");
1964        let encoded = serde_json::to_string(&input).unwrap();
1965        request.set_payload(Some(encoded));
1966
1967        let response = self
1968            .sign_and_dispatch(request, EvaluateExpressionError::from_response)
1969            .await?;
1970        let mut response = response;
1971        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1972        proto::json::ResponsePayload::new(&response).deserialize::<EvaluateExpressionOutput, _>()
1973    }
1974
1975    /// <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>
1976    async fn get_pipeline_definition(
1977        &self,
1978        input: GetPipelineDefinitionInput,
1979    ) -> Result<GetPipelineDefinitionOutput, RusotoError<GetPipelineDefinitionError>> {
1980        let mut request = self.new_signed_request("POST", "/");
1981        request.add_header("x-amz-target", "DataPipeline.GetPipelineDefinition");
1982        let encoded = serde_json::to_string(&input).unwrap();
1983        request.set_payload(Some(encoded));
1984
1985        let response = self
1986            .sign_and_dispatch(request, GetPipelineDefinitionError::from_response)
1987            .await?;
1988        let mut response = response;
1989        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1990        proto::json::ResponsePayload::new(&response).deserialize::<GetPipelineDefinitionOutput, _>()
1991    }
1992
1993    /// <p>Lists the pipeline identifiers for all active pipelines that you have permission to access.</p>
1994    async fn list_pipelines(
1995        &self,
1996        input: ListPipelinesInput,
1997    ) -> Result<ListPipelinesOutput, RusotoError<ListPipelinesError>> {
1998        let mut request = self.new_signed_request("POST", "/");
1999        request.add_header("x-amz-target", "DataPipeline.ListPipelines");
2000        let encoded = serde_json::to_string(&input).unwrap();
2001        request.set_payload(Some(encoded));
2002
2003        let response = self
2004            .sign_and_dispatch(request, ListPipelinesError::from_response)
2005            .await?;
2006        let mut response = response;
2007        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2008        proto::json::ResponsePayload::new(&response).deserialize::<ListPipelinesOutput, _>()
2009    }
2010
2011    /// <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>
2012    async fn poll_for_task(
2013        &self,
2014        input: PollForTaskInput,
2015    ) -> Result<PollForTaskOutput, RusotoError<PollForTaskError>> {
2016        let mut request = self.new_signed_request("POST", "/");
2017        request.add_header("x-amz-target", "DataPipeline.PollForTask");
2018        let encoded = serde_json::to_string(&input).unwrap();
2019        request.set_payload(Some(encoded));
2020
2021        let response = self
2022            .sign_and_dispatch(request, PollForTaskError::from_response)
2023            .await?;
2024        let mut response = response;
2025        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2026        proto::json::ResponsePayload::new(&response).deserialize::<PollForTaskOutput, _>()
2027    }
2028
2029    /// <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>
2030    async fn put_pipeline_definition(
2031        &self,
2032        input: PutPipelineDefinitionInput,
2033    ) -> Result<PutPipelineDefinitionOutput, RusotoError<PutPipelineDefinitionError>> {
2034        let mut request = self.new_signed_request("POST", "/");
2035        request.add_header("x-amz-target", "DataPipeline.PutPipelineDefinition");
2036        let encoded = serde_json::to_string(&input).unwrap();
2037        request.set_payload(Some(encoded));
2038
2039        let response = self
2040            .sign_and_dispatch(request, PutPipelineDefinitionError::from_response)
2041            .await?;
2042        let mut response = response;
2043        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2044        proto::json::ResponsePayload::new(&response).deserialize::<PutPipelineDefinitionOutput, _>()
2045    }
2046
2047    /// <p>Queries the specified pipeline for the names of objects that match the specified set of conditions.</p>
2048    async fn query_objects(
2049        &self,
2050        input: QueryObjectsInput,
2051    ) -> Result<QueryObjectsOutput, RusotoError<QueryObjectsError>> {
2052        let mut request = self.new_signed_request("POST", "/");
2053        request.add_header("x-amz-target", "DataPipeline.QueryObjects");
2054        let encoded = serde_json::to_string(&input).unwrap();
2055        request.set_payload(Some(encoded));
2056
2057        let response = self
2058            .sign_and_dispatch(request, QueryObjectsError::from_response)
2059            .await?;
2060        let mut response = response;
2061        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2062        proto::json::ResponsePayload::new(&response).deserialize::<QueryObjectsOutput, _>()
2063    }
2064
2065    /// <p>Removes existing tags from the specified pipeline.</p>
2066    async fn remove_tags(
2067        &self,
2068        input: RemoveTagsInput,
2069    ) -> Result<RemoveTagsOutput, RusotoError<RemoveTagsError>> {
2070        let mut request = self.new_signed_request("POST", "/");
2071        request.add_header("x-amz-target", "DataPipeline.RemoveTags");
2072        let encoded = serde_json::to_string(&input).unwrap();
2073        request.set_payload(Some(encoded));
2074
2075        let response = self
2076            .sign_and_dispatch(request, RemoveTagsError::from_response)
2077            .await?;
2078        let mut response = response;
2079        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2080        proto::json::ResponsePayload::new(&response).deserialize::<RemoveTagsOutput, _>()
2081    }
2082
2083    /// <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>
2084    async fn report_task_progress(
2085        &self,
2086        input: ReportTaskProgressInput,
2087    ) -> Result<ReportTaskProgressOutput, RusotoError<ReportTaskProgressError>> {
2088        let mut request = self.new_signed_request("POST", "/");
2089        request.add_header("x-amz-target", "DataPipeline.ReportTaskProgress");
2090        let encoded = serde_json::to_string(&input).unwrap();
2091        request.set_payload(Some(encoded));
2092
2093        let response = self
2094            .sign_and_dispatch(request, ReportTaskProgressError::from_response)
2095            .await?;
2096        let mut response = response;
2097        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2098        proto::json::ResponsePayload::new(&response).deserialize::<ReportTaskProgressOutput, _>()
2099    }
2100
2101    /// <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>
2102    async fn report_task_runner_heartbeat(
2103        &self,
2104        input: ReportTaskRunnerHeartbeatInput,
2105    ) -> Result<ReportTaskRunnerHeartbeatOutput, RusotoError<ReportTaskRunnerHeartbeatError>> {
2106        let mut request = self.new_signed_request("POST", "/");
2107        request.add_header("x-amz-target", "DataPipeline.ReportTaskRunnerHeartbeat");
2108        let encoded = serde_json::to_string(&input).unwrap();
2109        request.set_payload(Some(encoded));
2110
2111        let response = self
2112            .sign_and_dispatch(request, ReportTaskRunnerHeartbeatError::from_response)
2113            .await?;
2114        let mut response = response;
2115        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2116        proto::json::ResponsePayload::new(&response)
2117            .deserialize::<ReportTaskRunnerHeartbeatOutput, _>()
2118    }
2119
2120    /// <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>
2121    async fn set_status(&self, input: SetStatusInput) -> Result<(), RusotoError<SetStatusError>> {
2122        let mut request = self.new_signed_request("POST", "/");
2123        request.add_header("x-amz-target", "DataPipeline.SetStatus");
2124        let encoded = serde_json::to_string(&input).unwrap();
2125        request.set_payload(Some(encoded));
2126
2127        let response = self
2128            .sign_and_dispatch(request, SetStatusError::from_response)
2129            .await?;
2130        std::mem::drop(response);
2131        Ok(())
2132    }
2133
2134    /// <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>
2135    async fn set_task_status(
2136        &self,
2137        input: SetTaskStatusInput,
2138    ) -> Result<SetTaskStatusOutput, RusotoError<SetTaskStatusError>> {
2139        let mut request = self.new_signed_request("POST", "/");
2140        request.add_header("x-amz-target", "DataPipeline.SetTaskStatus");
2141        let encoded = serde_json::to_string(&input).unwrap();
2142        request.set_payload(Some(encoded));
2143
2144        let response = self
2145            .sign_and_dispatch(request, SetTaskStatusError::from_response)
2146            .await?;
2147        let mut response = response;
2148        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2149        proto::json::ResponsePayload::new(&response).deserialize::<SetTaskStatusOutput, _>()
2150    }
2151
2152    /// <p>Validates the specified pipeline definition to ensure that it is well formed and can be run without error.</p>
2153    async fn validate_pipeline_definition(
2154        &self,
2155        input: ValidatePipelineDefinitionInput,
2156    ) -> Result<ValidatePipelineDefinitionOutput, RusotoError<ValidatePipelineDefinitionError>>
2157    {
2158        let mut request = self.new_signed_request("POST", "/");
2159        request.add_header("x-amz-target", "DataPipeline.ValidatePipelineDefinition");
2160        let encoded = serde_json::to_string(&input).unwrap();
2161        request.set_payload(Some(encoded));
2162
2163        let response = self
2164            .sign_and_dispatch(request, ValidatePipelineDefinitionError::from_response)
2165            .await?;
2166        let mut response = response;
2167        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2168        proto::json::ResponsePayload::new(&response)
2169            .deserialize::<ValidatePipelineDefinitionOutput, _>()
2170    }
2171}