rusoto_dataexchange/
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::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>The destination for the asset.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct AssetDestinationEntry {
31    /// <p>The unique identifier for the asset.</p>
32    #[serde(rename = "AssetId")]
33    pub asset_id: String,
34    /// <p>The S3 bucket that is the destination for the asset.</p>
35    #[serde(rename = "Bucket")]
36    pub bucket: String,
37    /// <p>The name of the object in Amazon S3 for the asset.</p>
38    #[serde(rename = "Key")]
39    #[serde(skip_serializing_if = "Option::is_none")]
40    pub key: Option<String>,
41}
42
43#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
44#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
45pub struct AssetDetails {
46    #[serde(rename = "S3SnapshotAsset")]
47    #[serde(skip_serializing_if = "Option::is_none")]
48    pub s3_snapshot_asset: Option<S3SnapshotAsset>,
49}
50
51/// <p>An asset in AWS Data Exchange is a piece of data that can be stored as an S3 object. The asset can be a structured data file, an image file, or some other data file. When you create an import job for your files, you create an asset in AWS Data Exchange for each of those files.</p>
52#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
53#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
54pub struct AssetEntry {
55    /// <p>The ARN for the asset.</p>
56    #[serde(rename = "Arn")]
57    pub arn: String,
58    /// <p>Information about the asset, including its size.</p>
59    #[serde(rename = "AssetDetails")]
60    pub asset_details: AssetDetails,
61    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
62    #[serde(rename = "AssetType")]
63    pub asset_type: String,
64    /// <p>The date and time that the asset was created, in ISO 8601 format.</p>
65    #[serde(rename = "CreatedAt")]
66    pub created_at: f64,
67    /// <p>The unique identifier for the data set associated with this asset.</p>
68    #[serde(rename = "DataSetId")]
69    pub data_set_id: String,
70    /// <p>The unique identifier for the asset.</p>
71    #[serde(rename = "Id")]
72    pub id: String,
73    /// <p>The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.</p>
74    #[serde(rename = "Name")]
75    pub name: String,
76    /// <p>The unique identifier for the revision associated with this asset.</p>
77    #[serde(rename = "RevisionId")]
78    pub revision_id: String,
79    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
80    #[serde(rename = "SourceId")]
81    #[serde(skip_serializing_if = "Option::is_none")]
82    pub source_id: Option<String>,
83    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
84    #[serde(rename = "UpdatedAt")]
85    pub updated_at: f64,
86}
87
88/// <p>The source of the assets.</p>
89#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
90pub struct AssetSourceEntry {
91    /// <p>The S3 bucket that's part of the source of the asset.</p>
92    #[serde(rename = "Bucket")]
93    pub bucket: String,
94    /// <p>The name of the object in Amazon S3 for the asset.</p>
95    #[serde(rename = "Key")]
96    pub key: String,
97}
98
99#[derive(Clone, Debug, Default, PartialEq, Serialize)]
100#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
101pub struct CancelJobRequest {
102    /// <p>The unique identifier for a job.</p>
103    #[serde(rename = "JobId")]
104    pub job_id: String,
105}
106
107/// <p>The request body for CreateDataSet.</p>
108#[derive(Clone, Debug, Default, PartialEq, Serialize)]
109#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
110pub struct CreateDataSetRequest {
111    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
112    #[serde(rename = "AssetType")]
113    pub asset_type: String,
114    /// <p>A description for the data set. This value can be up to 16,348 characters long.</p>
115    #[serde(rename = "Description")]
116    pub description: String,
117    /// <p>The name of the data set.</p>
118    #[serde(rename = "Name")]
119    pub name: String,
120    /// <p>A data set tag is an optional label that you can assign to a data set when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.</p>
121    #[serde(rename = "Tags")]
122    #[serde(skip_serializing_if = "Option::is_none")]
123    pub tags: Option<::std::collections::HashMap<String, String>>,
124}
125
126#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
127#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
128pub struct CreateDataSetResponse {
129    /// <p>The ARN for the data set.</p>
130    #[serde(rename = "Arn")]
131    #[serde(skip_serializing_if = "Option::is_none")]
132    pub arn: Option<String>,
133    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
134    #[serde(rename = "AssetType")]
135    #[serde(skip_serializing_if = "Option::is_none")]
136    pub asset_type: Option<String>,
137    /// <p>The date and time that the data set was created, in ISO 8601 format.</p>
138    #[serde(rename = "CreatedAt")]
139    #[serde(skip_serializing_if = "Option::is_none")]
140    pub created_at: Option<f64>,
141    /// <p>The description for the data set.</p>
142    #[serde(rename = "Description")]
143    #[serde(skip_serializing_if = "Option::is_none")]
144    pub description: Option<String>,
145    /// <p>The unique identifier for the data set.</p>
146    #[serde(rename = "Id")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub id: Option<String>,
149    /// <p>The name of the data set.</p>
150    #[serde(rename = "Name")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub name: Option<String>,
153    /// <p>A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).</p>
154    #[serde(rename = "Origin")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub origin: Option<String>,
157    /// <p>If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.</p>
158    #[serde(rename = "OriginDetails")]
159    #[serde(skip_serializing_if = "Option::is_none")]
160    pub origin_details: Option<OriginDetails>,
161    /// <p>The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.</p>
162    #[serde(rename = "SourceId")]
163    #[serde(skip_serializing_if = "Option::is_none")]
164    pub source_id: Option<String>,
165    /// <p>The tags for the data set.</p>
166    #[serde(rename = "Tags")]
167    #[serde(skip_serializing_if = "Option::is_none")]
168    pub tags: Option<::std::collections::HashMap<String, String>>,
169    /// <p>The date and time that the data set was last updated, in ISO 8601 format.</p>
170    #[serde(rename = "UpdatedAt")]
171    #[serde(skip_serializing_if = "Option::is_none")]
172    pub updated_at: Option<f64>,
173}
174
175/// <p>The request body for CreateJob.</p>
176#[derive(Clone, Debug, Default, PartialEq, Serialize)]
177#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
178pub struct CreateJobRequest {
179    /// <p>The details for the CreateJob request.</p>
180    #[serde(rename = "Details")]
181    pub details: RequestDetails,
182    /// <p>The type of job to be created.</p>
183    #[serde(rename = "Type")]
184    pub type_: String,
185}
186
187#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
188#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
189pub struct CreateJobResponse {
190    /// <p>The ARN for the job.</p>
191    #[serde(rename = "Arn")]
192    #[serde(skip_serializing_if = "Option::is_none")]
193    pub arn: Option<String>,
194    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
195    #[serde(rename = "CreatedAt")]
196    #[serde(skip_serializing_if = "Option::is_none")]
197    pub created_at: Option<f64>,
198    /// <p>Details about the job.</p>
199    #[serde(rename = "Details")]
200    #[serde(skip_serializing_if = "Option::is_none")]
201    pub details: Option<ResponseDetails>,
202    /// <p>The errors associated with jobs.</p>
203    #[serde(rename = "Errors")]
204    #[serde(skip_serializing_if = "Option::is_none")]
205    pub errors: Option<Vec<JobError>>,
206    /// <p>The unique identifier for the job.</p>
207    #[serde(rename = "Id")]
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub id: Option<String>,
210    /// <p>The state of the job.</p>
211    #[serde(rename = "State")]
212    #[serde(skip_serializing_if = "Option::is_none")]
213    pub state: Option<String>,
214    /// <p>The job type.</p>
215    #[serde(rename = "Type")]
216    #[serde(skip_serializing_if = "Option::is_none")]
217    pub type_: Option<String>,
218    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
219    #[serde(rename = "UpdatedAt")]
220    #[serde(skip_serializing_if = "Option::is_none")]
221    pub updated_at: Option<f64>,
222}
223
224/// <p>The request body for CreateRevision.</p>
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct CreateRevisionRequest {
228    /// <p>An optional comment about the revision.</p>
229    #[serde(rename = "Comment")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub comment: Option<String>,
232    /// <p>The unique identifier for a data set.</p>
233    #[serde(rename = "DataSetId")]
234    pub data_set_id: String,
235    /// <p>A revision tag is an optional label that you can assign to a revision when you create it. Each tag consists of a key and an optional value, both of which you define. When you use tagging, you can also use tag-based access control in IAM policies to control access to these data sets and revisions.</p>
236    #[serde(rename = "Tags")]
237    #[serde(skip_serializing_if = "Option::is_none")]
238    pub tags: Option<::std::collections::HashMap<String, String>>,
239}
240
241#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
242#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
243pub struct CreateRevisionResponse {
244    /// <p>The ARN for the revision</p>
245    #[serde(rename = "Arn")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub arn: Option<String>,
248    /// <p>An optional comment about the revision.</p>
249    #[serde(rename = "Comment")]
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub comment: Option<String>,
252    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
253    #[serde(rename = "CreatedAt")]
254    #[serde(skip_serializing_if = "Option::is_none")]
255    pub created_at: Option<f64>,
256    /// <p>The unique identifier for the data set associated with this revision.</p>
257    #[serde(rename = "DataSetId")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub data_set_id: Option<String>,
260    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p> <p>Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
261    #[serde(rename = "Finalized")]
262    #[serde(skip_serializing_if = "Option::is_none")]
263    pub finalized: Option<bool>,
264    /// <p>The unique identifier for the revision.</p>
265    #[serde(rename = "Id")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub id: Option<String>,
268    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
269    #[serde(rename = "SourceId")]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    pub source_id: Option<String>,
272    /// <p>The tags for the revision.</p>
273    #[serde(rename = "Tags")]
274    #[serde(skip_serializing_if = "Option::is_none")]
275    pub tags: Option<::std::collections::HashMap<String, String>>,
276    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
277    #[serde(rename = "UpdatedAt")]
278    #[serde(skip_serializing_if = "Option::is_none")]
279    pub updated_at: Option<f64>,
280}
281
282/// <p>A data set is an AWS resource with one or more revisions.</p>
283#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
284#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
285pub struct DataSetEntry {
286    /// <p>The ARN for the data set.</p>
287    #[serde(rename = "Arn")]
288    pub arn: String,
289    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
290    #[serde(rename = "AssetType")]
291    pub asset_type: String,
292    /// <p>The date and time that the data set was created, in ISO 8601 format.</p>
293    #[serde(rename = "CreatedAt")]
294    pub created_at: f64,
295    /// <p>The description for the data set.</p>
296    #[serde(rename = "Description")]
297    pub description: String,
298    /// <p>The unique identifier for the data set.</p>
299    #[serde(rename = "Id")]
300    pub id: String,
301    /// <p>The name of the data set.</p>
302    #[serde(rename = "Name")]
303    pub name: String,
304    /// <p>A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).</p>
305    #[serde(rename = "Origin")]
306    pub origin: String,
307    /// <p>If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.</p>
308    #[serde(rename = "OriginDetails")]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    pub origin_details: Option<OriginDetails>,
311    /// <p>The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.</p>
312    #[serde(rename = "SourceId")]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    pub source_id: Option<String>,
315    /// <p>The date and time that the data set was last updated, in ISO 8601 format.</p>
316    #[serde(rename = "UpdatedAt")]
317    pub updated_at: f64,
318}
319
320#[derive(Clone, Debug, Default, PartialEq, Serialize)]
321#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
322pub struct DeleteAssetRequest {
323    /// <p>The unique identifier for an asset.</p>
324    #[serde(rename = "AssetId")]
325    pub asset_id: String,
326    /// <p>The unique identifier for a data set.</p>
327    #[serde(rename = "DataSetId")]
328    pub data_set_id: String,
329    /// <p>The unique identifier for a revision.</p>
330    #[serde(rename = "RevisionId")]
331    pub revision_id: String,
332}
333
334#[derive(Clone, Debug, Default, PartialEq, Serialize)]
335#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
336pub struct DeleteDataSetRequest {
337    /// <p>The unique identifier for a data set.</p>
338    #[serde(rename = "DataSetId")]
339    pub data_set_id: String,
340}
341
342#[derive(Clone, Debug, Default, PartialEq, Serialize)]
343#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
344pub struct DeleteRevisionRequest {
345    /// <p>The unique identifier for a data set.</p>
346    #[serde(rename = "DataSetId")]
347    pub data_set_id: String,
348    /// <p>The unique identifier for a revision.</p>
349    #[serde(rename = "RevisionId")]
350    pub revision_id: String,
351}
352
353#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
354#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
355pub struct Details {
356    #[serde(rename = "ImportAssetFromSignedUrlJobErrorDetails")]
357    #[serde(skip_serializing_if = "Option::is_none")]
358    pub import_asset_from_signed_url_job_error_details:
359        Option<ImportAssetFromSignedUrlJobErrorDetails>,
360    #[serde(rename = "ImportAssetsFromS3JobErrorDetails")]
361    #[serde(skip_serializing_if = "Option::is_none")]
362    pub import_assets_from_s3_job_error_details: Option<Vec<AssetSourceEntry>>,
363}
364
365/// <p>Details of the operation to be performed by the job.</p>
366#[derive(Clone, Debug, Default, PartialEq, Serialize)]
367#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
368pub struct ExportAssetToSignedUrlRequestDetails {
369    /// <p>The unique identifier for the asset that is exported to a signed URL.</p>
370    #[serde(rename = "AssetId")]
371    pub asset_id: String,
372    /// <p>The unique identifier for the data set associated with this export job.</p>
373    #[serde(rename = "DataSetId")]
374    pub data_set_id: String,
375    /// <p>The unique identifier for the revision associated with this export request.</p>
376    #[serde(rename = "RevisionId")]
377    pub revision_id: String,
378}
379
380/// <p>The details of the export to signed URL response.</p>
381#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
382#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
383pub struct ExportAssetToSignedUrlResponseDetails {
384    /// <p>The unique identifier for the asset associated with this export job.</p>
385    #[serde(rename = "AssetId")]
386    pub asset_id: String,
387    /// <p>The unique identifier for the data set associated with this export job.</p>
388    #[serde(rename = "DataSetId")]
389    pub data_set_id: String,
390    /// <p>The unique identifier for the revision associated with this export response.</p>
391    #[serde(rename = "RevisionId")]
392    pub revision_id: String,
393    /// <p>The signed URL for the export request.</p>
394    #[serde(rename = "SignedUrl")]
395    #[serde(skip_serializing_if = "Option::is_none")]
396    pub signed_url: Option<String>,
397    /// <p>The date and time that the signed URL expires, in ISO 8601 format.</p>
398    #[serde(rename = "SignedUrlExpiresAt")]
399    #[serde(skip_serializing_if = "Option::is_none")]
400    pub signed_url_expires_at: Option<f64>,
401}
402
403/// <p>Details of the operation to be performed by the job.</p>
404#[derive(Clone, Debug, Default, PartialEq, Serialize)]
405#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
406pub struct ExportAssetsToS3RequestDetails {
407    /// <p>The destination for the asset.</p>
408    #[serde(rename = "AssetDestinations")]
409    pub asset_destinations: Vec<AssetDestinationEntry>,
410    /// <p>The unique identifier for the data set associated with this export job.</p>
411    #[serde(rename = "DataSetId")]
412    pub data_set_id: String,
413    /// <p>Encryption configuration for the export job.</p>
414    #[serde(rename = "Encryption")]
415    #[serde(skip_serializing_if = "Option::is_none")]
416    pub encryption: Option<ExportServerSideEncryption>,
417    /// <p>The unique identifier for the revision associated with this export request.</p>
418    #[serde(rename = "RevisionId")]
419    pub revision_id: String,
420}
421
422/// <p>Details about the export to Amazon S3 response.</p>
423#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
424#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
425pub struct ExportAssetsToS3ResponseDetails {
426    /// <p>The destination in Amazon S3 where the asset is exported.</p>
427    #[serde(rename = "AssetDestinations")]
428    pub asset_destinations: Vec<AssetDestinationEntry>,
429    /// <p>The unique identifier for the data set associated with this export job.</p>
430    #[serde(rename = "DataSetId")]
431    pub data_set_id: String,
432    /// <p>Encryption configuration of the export job.</p>
433    #[serde(rename = "Encryption")]
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub encryption: Option<ExportServerSideEncryption>,
436    /// <p>The unique identifier for the revision associated with this export response.</p>
437    #[serde(rename = "RevisionId")]
438    pub revision_id: String,
439}
440
441/// <p>Encryption configuration of the export job. Includes the encryption type as well as the AWS KMS key. The KMS key is only necessary if you chose the KMS encryption type.</p>
442#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
443pub struct ExportServerSideEncryption {
444    /// <p>The Amazon Resource Name (ARN) of the the AWS KMS key you want to use to encrypt the Amazon S3 objects. This parameter is required if you choose aws:kms as an encryption type.</p>
445    #[serde(rename = "KmsKeyArn")]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    pub kms_key_arn: Option<String>,
448    /// <p>The type of server side encryption used for encrypting the objects in Amazon S3.</p>
449    #[serde(rename = "Type")]
450    pub type_: String,
451}
452
453#[derive(Clone, Debug, Default, PartialEq, Serialize)]
454#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
455pub struct GetAssetRequest {
456    /// <p>The unique identifier for an asset.</p>
457    #[serde(rename = "AssetId")]
458    pub asset_id: String,
459    /// <p>The unique identifier for a data set.</p>
460    #[serde(rename = "DataSetId")]
461    pub data_set_id: String,
462    /// <p>The unique identifier for a revision.</p>
463    #[serde(rename = "RevisionId")]
464    pub revision_id: String,
465}
466
467#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
468#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
469pub struct GetAssetResponse {
470    /// <p>The ARN for the asset.</p>
471    #[serde(rename = "Arn")]
472    #[serde(skip_serializing_if = "Option::is_none")]
473    pub arn: Option<String>,
474    /// <p>Information about the asset, including its size.</p>
475    #[serde(rename = "AssetDetails")]
476    #[serde(skip_serializing_if = "Option::is_none")]
477    pub asset_details: Option<AssetDetails>,
478    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
479    #[serde(rename = "AssetType")]
480    #[serde(skip_serializing_if = "Option::is_none")]
481    pub asset_type: Option<String>,
482    /// <p>The date and time that the asset was created, in ISO 8601 format.</p>
483    #[serde(rename = "CreatedAt")]
484    #[serde(skip_serializing_if = "Option::is_none")]
485    pub created_at: Option<f64>,
486    /// <p>The unique identifier for the data set associated with this asset.</p>
487    #[serde(rename = "DataSetId")]
488    #[serde(skip_serializing_if = "Option::is_none")]
489    pub data_set_id: Option<String>,
490    /// <p>The unique identifier for the asset.</p>
491    #[serde(rename = "Id")]
492    #[serde(skip_serializing_if = "Option::is_none")]
493    pub id: Option<String>,
494    /// <p>The name of the asset When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.</p>
495    #[serde(rename = "Name")]
496    #[serde(skip_serializing_if = "Option::is_none")]
497    pub name: Option<String>,
498    /// <p>The unique identifier for the revision associated with this asset.</p>
499    #[serde(rename = "RevisionId")]
500    #[serde(skip_serializing_if = "Option::is_none")]
501    pub revision_id: Option<String>,
502    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
503    #[serde(rename = "SourceId")]
504    #[serde(skip_serializing_if = "Option::is_none")]
505    pub source_id: Option<String>,
506    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
507    #[serde(rename = "UpdatedAt")]
508    #[serde(skip_serializing_if = "Option::is_none")]
509    pub updated_at: Option<f64>,
510}
511
512#[derive(Clone, Debug, Default, PartialEq, Serialize)]
513#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
514pub struct GetDataSetRequest {
515    /// <p>The unique identifier for a data set.</p>
516    #[serde(rename = "DataSetId")]
517    pub data_set_id: String,
518}
519
520#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
521#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
522pub struct GetDataSetResponse {
523    /// <p>The ARN for the data set.</p>
524    #[serde(rename = "Arn")]
525    #[serde(skip_serializing_if = "Option::is_none")]
526    pub arn: Option<String>,
527    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
528    #[serde(rename = "AssetType")]
529    #[serde(skip_serializing_if = "Option::is_none")]
530    pub asset_type: Option<String>,
531    /// <p>The date and time that the data set was created, in ISO 8601 format.</p>
532    #[serde(rename = "CreatedAt")]
533    #[serde(skip_serializing_if = "Option::is_none")]
534    pub created_at: Option<f64>,
535    /// <p>The description for the data set.</p>
536    #[serde(rename = "Description")]
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub description: Option<String>,
539    /// <p>The unique identifier for the data set.</p>
540    #[serde(rename = "Id")]
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub id: Option<String>,
543    /// <p>The name of the data set.</p>
544    #[serde(rename = "Name")]
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub name: Option<String>,
547    /// <p>A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).</p>
548    #[serde(rename = "Origin")]
549    #[serde(skip_serializing_if = "Option::is_none")]
550    pub origin: Option<String>,
551    /// <p>If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.</p>
552    #[serde(rename = "OriginDetails")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub origin_details: Option<OriginDetails>,
555    /// <p>The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.</p>
556    #[serde(rename = "SourceId")]
557    #[serde(skip_serializing_if = "Option::is_none")]
558    pub source_id: Option<String>,
559    /// <p>The tags for the data set.</p>
560    #[serde(rename = "Tags")]
561    #[serde(skip_serializing_if = "Option::is_none")]
562    pub tags: Option<::std::collections::HashMap<String, String>>,
563    /// <p>The date and time that the data set was last updated, in ISO 8601 format.</p>
564    #[serde(rename = "UpdatedAt")]
565    #[serde(skip_serializing_if = "Option::is_none")]
566    pub updated_at: Option<f64>,
567}
568
569#[derive(Clone, Debug, Default, PartialEq, Serialize)]
570#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
571pub struct GetJobRequest {
572    /// <p>The unique identifier for a job.</p>
573    #[serde(rename = "JobId")]
574    pub job_id: String,
575}
576
577#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
578#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
579pub struct GetJobResponse {
580    /// <p>The ARN for the job.</p>
581    #[serde(rename = "Arn")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub arn: Option<String>,
584    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
585    #[serde(rename = "CreatedAt")]
586    #[serde(skip_serializing_if = "Option::is_none")]
587    pub created_at: Option<f64>,
588    /// <p>Details about the job.</p>
589    #[serde(rename = "Details")]
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub details: Option<ResponseDetails>,
592    /// <p>The errors associated with jobs.</p>
593    #[serde(rename = "Errors")]
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub errors: Option<Vec<JobError>>,
596    /// <p>The unique identifier for the job.</p>
597    #[serde(rename = "Id")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub id: Option<String>,
600    /// <p>The state of the job.</p>
601    #[serde(rename = "State")]
602    #[serde(skip_serializing_if = "Option::is_none")]
603    pub state: Option<String>,
604    /// <p>The job type.</p>
605    #[serde(rename = "Type")]
606    #[serde(skip_serializing_if = "Option::is_none")]
607    pub type_: Option<String>,
608    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
609    #[serde(rename = "UpdatedAt")]
610    #[serde(skip_serializing_if = "Option::is_none")]
611    pub updated_at: Option<f64>,
612}
613
614#[derive(Clone, Debug, Default, PartialEq, Serialize)]
615#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
616pub struct GetRevisionRequest {
617    /// <p>The unique identifier for a data set.</p>
618    #[serde(rename = "DataSetId")]
619    pub data_set_id: String,
620    /// <p>The unique identifier for a revision.</p>
621    #[serde(rename = "RevisionId")]
622    pub revision_id: String,
623}
624
625#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
626#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
627pub struct GetRevisionResponse {
628    /// <p>The ARN for the revision</p>
629    #[serde(rename = "Arn")]
630    #[serde(skip_serializing_if = "Option::is_none")]
631    pub arn: Option<String>,
632    /// <p>An optional comment about the revision.</p>
633    #[serde(rename = "Comment")]
634    #[serde(skip_serializing_if = "Option::is_none")]
635    pub comment: Option<String>,
636    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
637    #[serde(rename = "CreatedAt")]
638    #[serde(skip_serializing_if = "Option::is_none")]
639    pub created_at: Option<f64>,
640    /// <p>The unique identifier for the data set associated with this revision.</p>
641    #[serde(rename = "DataSetId")]
642    #[serde(skip_serializing_if = "Option::is_none")]
643    pub data_set_id: Option<String>,
644    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p> <p>Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
645    #[serde(rename = "Finalized")]
646    #[serde(skip_serializing_if = "Option::is_none")]
647    pub finalized: Option<bool>,
648    /// <p>The unique identifier for the revision.</p>
649    #[serde(rename = "Id")]
650    #[serde(skip_serializing_if = "Option::is_none")]
651    pub id: Option<String>,
652    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
653    #[serde(rename = "SourceId")]
654    #[serde(skip_serializing_if = "Option::is_none")]
655    pub source_id: Option<String>,
656    /// <p>The tags for the revision.</p>
657    #[serde(rename = "Tags")]
658    #[serde(skip_serializing_if = "Option::is_none")]
659    pub tags: Option<::std::collections::HashMap<String, String>>,
660    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
661    #[serde(rename = "UpdatedAt")]
662    #[serde(skip_serializing_if = "Option::is_none")]
663    pub updated_at: Option<f64>,
664}
665
666#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
667#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
668pub struct ImportAssetFromSignedUrlJobErrorDetails {
669    #[serde(rename = "AssetName")]
670    pub asset_name: String,
671}
672
673/// <p>Details of the operation to be performed by the job.</p>
674#[derive(Clone, Debug, Default, PartialEq, Serialize)]
675#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
676pub struct ImportAssetFromSignedUrlRequestDetails {
677    /// <p>The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name.</p>
678    #[serde(rename = "AssetName")]
679    pub asset_name: String,
680    /// <p>The unique identifier for the data set associated with this import job.</p>
681    #[serde(rename = "DataSetId")]
682    pub data_set_id: String,
683    /// <p>The Base64-encoded Md5 hash for the asset, used to ensure the integrity of the file at that location.</p>
684    #[serde(rename = "Md5Hash")]
685    pub md_5_hash: String,
686    /// <p>The unique identifier for the revision associated with this import request.</p>
687    #[serde(rename = "RevisionId")]
688    pub revision_id: String,
689}
690
691/// <p>The details in the response for an import request, including the signed URL and other information.</p>
692#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
693#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
694pub struct ImportAssetFromSignedUrlResponseDetails {
695    /// <p>The name for the asset associated with this import response.</p>
696    #[serde(rename = "AssetName")]
697    pub asset_name: String,
698    /// <p>The unique identifier for the data set associated with this import job.</p>
699    #[serde(rename = "DataSetId")]
700    pub data_set_id: String,
701    /// <p>The Base64-encoded Md5 hash for the asset, used to ensure the integrity of the file at that location.</p>
702    #[serde(rename = "Md5Hash")]
703    #[serde(skip_serializing_if = "Option::is_none")]
704    pub md_5_hash: Option<String>,
705    /// <p>The unique identifier for the revision associated with this import response.</p>
706    #[serde(rename = "RevisionId")]
707    pub revision_id: String,
708    /// <p>The signed URL.</p>
709    #[serde(rename = "SignedUrl")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub signed_url: Option<String>,
712    /// <p>The time and date at which the signed URL expires, in ISO 8601 format.</p>
713    #[serde(rename = "SignedUrlExpiresAt")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub signed_url_expires_at: Option<f64>,
716}
717
718/// <p>Details of the operation to be performed by the job.</p>
719#[derive(Clone, Debug, Default, PartialEq, Serialize)]
720#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
721pub struct ImportAssetsFromS3RequestDetails {
722    /// <p>Is a list of S3 bucket and object key pairs.</p>
723    #[serde(rename = "AssetSources")]
724    pub asset_sources: Vec<AssetSourceEntry>,
725    /// <p>The unique identifier for the data set associated with this import job.</p>
726    #[serde(rename = "DataSetId")]
727    pub data_set_id: String,
728    /// <p>The unique identifier for the revision associated with this import request.</p>
729    #[serde(rename = "RevisionId")]
730    pub revision_id: String,
731}
732
733/// <p>Details from an import from Amazon S3 response.</p>
734#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
735#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
736pub struct ImportAssetsFromS3ResponseDetails {
737    /// <p>Is a list of Amazon S3 bucket and object key pairs.</p>
738    #[serde(rename = "AssetSources")]
739    pub asset_sources: Vec<AssetSourceEntry>,
740    /// <p>The unique identifier for the data set associated with this import job.</p>
741    #[serde(rename = "DataSetId")]
742    pub data_set_id: String,
743    /// <p>The unique identifier for the revision associated with this import response.</p>
744    #[serde(rename = "RevisionId")]
745    pub revision_id: String,
746}
747
748/// <p>AWS Data Exchange Jobs are asynchronous import or export operations used to create or copy assets. A data set owner can both import and export as they see fit. Someone with an entitlement to a data set can only export. Jobs are deleted 90 days after they are created.</p>
749#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
750#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
751pub struct JobEntry {
752    /// <p>The ARN for the job.</p>
753    #[serde(rename = "Arn")]
754    pub arn: String,
755    /// <p>The date and time that the job was created, in ISO 8601 format.</p>
756    #[serde(rename = "CreatedAt")]
757    pub created_at: f64,
758    /// <p>Details of the operation to be performed by the job, such as export destination details or import source details.</p>
759    #[serde(rename = "Details")]
760    pub details: ResponseDetails,
761    /// <p>Errors for jobs.</p>
762    #[serde(rename = "Errors")]
763    #[serde(skip_serializing_if = "Option::is_none")]
764    pub errors: Option<Vec<JobError>>,
765    /// <p>The unique identifier for the job.</p>
766    #[serde(rename = "Id")]
767    pub id: String,
768    /// <p>The state of the job.</p>
769    #[serde(rename = "State")]
770    pub state: String,
771    /// <p>The job type.</p>
772    #[serde(rename = "Type")]
773    pub type_: String,
774    /// <p>The date and time that the job was last updated, in ISO 8601 format.</p>
775    #[serde(rename = "UpdatedAt")]
776    pub updated_at: f64,
777}
778
779/// <p>An error that occurred with the job request.</p>
780#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
781#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
782pub struct JobError {
783    /// <p>The code for the job error.</p>
784    #[serde(rename = "Code")]
785    pub code: String,
786    #[serde(rename = "Details")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub details: Option<Details>,
789    /// <p>The name of the limit that was reached.</p>
790    #[serde(rename = "LimitName")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub limit_name: Option<String>,
793    /// <p>The value of the exceeded limit.</p>
794    #[serde(rename = "LimitValue")]
795    #[serde(skip_serializing_if = "Option::is_none")]
796    pub limit_value: Option<f64>,
797    /// <p>The message related to the job error.</p>
798    #[serde(rename = "Message")]
799    pub message: String,
800    /// <p>The unique identifier for the resource related to the error.</p>
801    #[serde(rename = "ResourceId")]
802    #[serde(skip_serializing_if = "Option::is_none")]
803    pub resource_id: Option<String>,
804    /// <p>The type of resource related to the error.</p>
805    #[serde(rename = "ResourceType")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    pub resource_type: Option<String>,
808}
809
810#[derive(Clone, Debug, Default, PartialEq, Serialize)]
811#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
812pub struct ListDataSetRevisionsRequest {
813    /// <p>The unique identifier for a data set.</p>
814    #[serde(rename = "DataSetId")]
815    pub data_set_id: String,
816    /// <p>The maximum number of results returned by a single call.</p>
817    #[serde(rename = "MaxResults")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub max_results: Option<i64>,
820    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
821    #[serde(rename = "NextToken")]
822    #[serde(skip_serializing_if = "Option::is_none")]
823    pub next_token: Option<String>,
824}
825
826#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
827#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
828pub struct ListDataSetRevisionsResponse {
829    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
830    #[serde(rename = "NextToken")]
831    #[serde(skip_serializing_if = "Option::is_none")]
832    pub next_token: Option<String>,
833    /// <p>The asset objects listed by the request.</p>
834    #[serde(rename = "Revisions")]
835    #[serde(skip_serializing_if = "Option::is_none")]
836    pub revisions: Option<Vec<RevisionEntry>>,
837}
838
839#[derive(Clone, Debug, Default, PartialEq, Serialize)]
840#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
841pub struct ListDataSetsRequest {
842    /// <p>The maximum number of results returned by a single call.</p>
843    #[serde(rename = "MaxResults")]
844    #[serde(skip_serializing_if = "Option::is_none")]
845    pub max_results: Option<i64>,
846    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
847    #[serde(rename = "NextToken")]
848    #[serde(skip_serializing_if = "Option::is_none")]
849    pub next_token: Option<String>,
850    /// <p>A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).</p>
851    #[serde(rename = "Origin")]
852    #[serde(skip_serializing_if = "Option::is_none")]
853    pub origin: Option<String>,
854}
855
856#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
857#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
858pub struct ListDataSetsResponse {
859    /// <p>The data set objects listed by the request.</p>
860    #[serde(rename = "DataSets")]
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub data_sets: Option<Vec<DataSetEntry>>,
863    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
864    #[serde(rename = "NextToken")]
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub next_token: Option<String>,
867}
868
869#[derive(Clone, Debug, Default, PartialEq, Serialize)]
870#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
871pub struct ListJobsRequest {
872    /// <p>The unique identifier for a data set.</p>
873    #[serde(rename = "DataSetId")]
874    #[serde(skip_serializing_if = "Option::is_none")]
875    pub data_set_id: Option<String>,
876    /// <p>The maximum number of results returned by a single call.</p>
877    #[serde(rename = "MaxResults")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub max_results: Option<i64>,
880    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
881    #[serde(rename = "NextToken")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub next_token: Option<String>,
884    /// <p>The unique identifier for a revision.</p>
885    #[serde(rename = "RevisionId")]
886    #[serde(skip_serializing_if = "Option::is_none")]
887    pub revision_id: Option<String>,
888}
889
890#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
891#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
892pub struct ListJobsResponse {
893    /// <p>The jobs listed by the request.</p>
894    #[serde(rename = "Jobs")]
895    #[serde(skip_serializing_if = "Option::is_none")]
896    pub jobs: Option<Vec<JobEntry>>,
897    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
898    #[serde(rename = "NextToken")]
899    #[serde(skip_serializing_if = "Option::is_none")]
900    pub next_token: Option<String>,
901}
902
903#[derive(Clone, Debug, Default, PartialEq, Serialize)]
904#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
905pub struct ListRevisionAssetsRequest {
906    /// <p>The unique identifier for a data set.</p>
907    #[serde(rename = "DataSetId")]
908    pub data_set_id: String,
909    /// <p>The maximum number of results returned by a single call.</p>
910    #[serde(rename = "MaxResults")]
911    #[serde(skip_serializing_if = "Option::is_none")]
912    pub max_results: Option<i64>,
913    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
914    #[serde(rename = "NextToken")]
915    #[serde(skip_serializing_if = "Option::is_none")]
916    pub next_token: Option<String>,
917    /// <p>The unique identifier for a revision.</p>
918    #[serde(rename = "RevisionId")]
919    pub revision_id: String,
920}
921
922#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
923#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
924pub struct ListRevisionAssetsResponse {
925    /// <p>The asset objects listed by the request.</p>
926    #[serde(rename = "Assets")]
927    #[serde(skip_serializing_if = "Option::is_none")]
928    pub assets: Option<Vec<AssetEntry>>,
929    /// <p>The token value retrieved from a previous call to access the next page of results.</p>
930    #[serde(rename = "NextToken")]
931    #[serde(skip_serializing_if = "Option::is_none")]
932    pub next_token: Option<String>,
933}
934
935#[derive(Clone, Debug, Default, PartialEq, Serialize)]
936#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
937pub struct ListTagsForResourceRequest {
938    /// <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p>
939    #[serde(rename = "ResourceArn")]
940    pub resource_arn: String,
941}
942
943#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
944#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
945pub struct ListTagsForResourceResponse {
946    /// <p>A label that consists of a customer-defined key and an optional value.</p>
947    #[serde(rename = "Tags")]
948    #[serde(skip_serializing_if = "Option::is_none")]
949    pub tags: Option<::std::collections::HashMap<String, String>>,
950}
951
952#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
953#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
954pub struct OriginDetails {
955    #[serde(rename = "ProductId")]
956    pub product_id: String,
957}
958
959/// <p>The details for the request.</p>
960#[derive(Clone, Debug, Default, PartialEq, Serialize)]
961#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
962pub struct RequestDetails {
963    /// <p>Details about the export to signed URL request.</p>
964    #[serde(rename = "ExportAssetToSignedUrl")]
965    #[serde(skip_serializing_if = "Option::is_none")]
966    pub export_asset_to_signed_url: Option<ExportAssetToSignedUrlRequestDetails>,
967    /// <p>Details about the export to Amazon S3 request.</p>
968    #[serde(rename = "ExportAssetsToS3")]
969    #[serde(skip_serializing_if = "Option::is_none")]
970    pub export_assets_to_s3: Option<ExportAssetsToS3RequestDetails>,
971    /// <p>Details about the import from signed URL request.</p>
972    #[serde(rename = "ImportAssetFromSignedUrl")]
973    #[serde(skip_serializing_if = "Option::is_none")]
974    pub import_asset_from_signed_url: Option<ImportAssetFromSignedUrlRequestDetails>,
975    /// <p>Details about the import from Amazon S3 request.</p>
976    #[serde(rename = "ImportAssetsFromS3")]
977    #[serde(skip_serializing_if = "Option::is_none")]
978    pub import_assets_from_s3: Option<ImportAssetsFromS3RequestDetails>,
979}
980
981/// <p>Details for the response.</p>
982#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
983#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
984pub struct ResponseDetails {
985    /// <p>Details for the export to signed URL response.</p>
986    #[serde(rename = "ExportAssetToSignedUrl")]
987    #[serde(skip_serializing_if = "Option::is_none")]
988    pub export_asset_to_signed_url: Option<ExportAssetToSignedUrlResponseDetails>,
989    /// <p>Details for the export to Amazon S3 response.</p>
990    #[serde(rename = "ExportAssetsToS3")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub export_assets_to_s3: Option<ExportAssetsToS3ResponseDetails>,
993    /// <p>Details for the import from signed URL response.</p>
994    #[serde(rename = "ImportAssetFromSignedUrl")]
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub import_asset_from_signed_url: Option<ImportAssetFromSignedUrlResponseDetails>,
997    /// <p>Details for the import from Amazon S3 response.</p>
998    #[serde(rename = "ImportAssetsFromS3")]
999    #[serde(skip_serializing_if = "Option::is_none")]
1000    pub import_assets_from_s3: Option<ImportAssetsFromS3ResponseDetails>,
1001}
1002
1003/// <p>A revision is a container for one or more assets.</p>
1004#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1005#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1006pub struct RevisionEntry {
1007    /// <p>The ARN for the revision.</p>
1008    #[serde(rename = "Arn")]
1009    pub arn: String,
1010    /// <p>An optional comment about the revision.</p>
1011    #[serde(rename = "Comment")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub comment: Option<String>,
1014    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
1015    #[serde(rename = "CreatedAt")]
1016    pub created_at: f64,
1017    /// <p>The unique identifier for the data set associated with this revision.</p>
1018    #[serde(rename = "DataSetId")]
1019    pub data_set_id: String,
1020    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p> <p>Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
1021    #[serde(rename = "Finalized")]
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    pub finalized: Option<bool>,
1024    /// <p>The unique identifier for the revision.</p>
1025    #[serde(rename = "Id")]
1026    pub id: String,
1027    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
1028    #[serde(rename = "SourceId")]
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    pub source_id: Option<String>,
1031    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
1032    #[serde(rename = "UpdatedAt")]
1033    pub updated_at: f64,
1034}
1035
1036/// <p>The S3 object that is the asset.</p>
1037#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1038#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1039pub struct S3SnapshotAsset {
1040    /// <p>The size of the S3 object that is the object.</p>
1041    #[serde(rename = "Size")]
1042    pub size: f64,
1043}
1044
1045#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1046#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1047pub struct StartJobRequest {
1048    /// <p>The unique identifier for a job.</p>
1049    #[serde(rename = "JobId")]
1050    pub job_id: String,
1051}
1052
1053#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1054#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1055pub struct StartJobResponse {}
1056
1057/// <p>The request body for TagResource.</p>
1058#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1059#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1060pub struct TagResourceRequest {
1061    /// <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p>
1062    #[serde(rename = "ResourceArn")]
1063    pub resource_arn: String,
1064    /// <p>A label that consists of a customer-defined key and an optional value.</p>
1065    #[serde(rename = "Tags")]
1066    pub tags: ::std::collections::HashMap<String, String>,
1067}
1068
1069#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1070#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1071pub struct UntagResourceRequest {
1072    /// <p>An Amazon Resource Name (ARN) that uniquely identifies an AWS resource.</p>
1073    #[serde(rename = "ResourceArn")]
1074    pub resource_arn: String,
1075    /// <p>The key tags.</p>
1076    #[serde(rename = "TagKeys")]
1077    pub tag_keys: Vec<String>,
1078}
1079
1080/// <p>The request body for UpdateAsset.</p>
1081#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1082#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1083pub struct UpdateAssetRequest {
1084    /// <p>The unique identifier for an asset.</p>
1085    #[serde(rename = "AssetId")]
1086    pub asset_id: String,
1087    /// <p>The unique identifier for a data set.</p>
1088    #[serde(rename = "DataSetId")]
1089    pub data_set_id: String,
1090    /// <p>The name of the asset. When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.</p>
1091    #[serde(rename = "Name")]
1092    pub name: String,
1093    /// <p>The unique identifier for a revision.</p>
1094    #[serde(rename = "RevisionId")]
1095    pub revision_id: String,
1096}
1097
1098#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1099#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1100pub struct UpdateAssetResponse {
1101    /// <p>The ARN for the asset.</p>
1102    #[serde(rename = "Arn")]
1103    #[serde(skip_serializing_if = "Option::is_none")]
1104    pub arn: Option<String>,
1105    /// <p>Information about the asset, including its size.</p>
1106    #[serde(rename = "AssetDetails")]
1107    #[serde(skip_serializing_if = "Option::is_none")]
1108    pub asset_details: Option<AssetDetails>,
1109    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
1110    #[serde(rename = "AssetType")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    pub asset_type: Option<String>,
1113    /// <p>The date and time that the asset was created, in ISO 8601 format.</p>
1114    #[serde(rename = "CreatedAt")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub created_at: Option<f64>,
1117    /// <p>The unique identifier for the data set associated with this asset.</p>
1118    #[serde(rename = "DataSetId")]
1119    #[serde(skip_serializing_if = "Option::is_none")]
1120    pub data_set_id: Option<String>,
1121    /// <p>The unique identifier for the asset.</p>
1122    #[serde(rename = "Id")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub id: Option<String>,
1125    /// <p>The name of the asset When importing from Amazon S3, the S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target S3 object key.</p>
1126    #[serde(rename = "Name")]
1127    #[serde(skip_serializing_if = "Option::is_none")]
1128    pub name: Option<String>,
1129    /// <p>The unique identifier for the revision associated with this asset.</p>
1130    #[serde(rename = "RevisionId")]
1131    #[serde(skip_serializing_if = "Option::is_none")]
1132    pub revision_id: Option<String>,
1133    /// <p>The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset.</p>
1134    #[serde(rename = "SourceId")]
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub source_id: Option<String>,
1137    /// <p>The date and time that the asset was last updated, in ISO 8601 format.</p>
1138    #[serde(rename = "UpdatedAt")]
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    pub updated_at: Option<f64>,
1141}
1142
1143/// <p>The request body for UpdateDataSet.</p>
1144#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1145#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1146pub struct UpdateDataSetRequest {
1147    /// <p>The unique identifier for a data set.</p>
1148    #[serde(rename = "DataSetId")]
1149    pub data_set_id: String,
1150    /// <p>The description for the data set.</p>
1151    #[serde(rename = "Description")]
1152    #[serde(skip_serializing_if = "Option::is_none")]
1153    pub description: Option<String>,
1154    /// <p>The name of the data set.</p>
1155    #[serde(rename = "Name")]
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    pub name: Option<String>,
1158}
1159
1160#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1161#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1162pub struct UpdateDataSetResponse {
1163    /// <p>The ARN for the data set.</p>
1164    #[serde(rename = "Arn")]
1165    #[serde(skip_serializing_if = "Option::is_none")]
1166    pub arn: Option<String>,
1167    /// <p>The type of file your data is stored in. Currently, the supported asset type is S3_SNAPSHOT.</p>
1168    #[serde(rename = "AssetType")]
1169    #[serde(skip_serializing_if = "Option::is_none")]
1170    pub asset_type: Option<String>,
1171    /// <p>The date and time that the data set was created, in ISO 8601 format.</p>
1172    #[serde(rename = "CreatedAt")]
1173    #[serde(skip_serializing_if = "Option::is_none")]
1174    pub created_at: Option<f64>,
1175    /// <p>The description for the data set.</p>
1176    #[serde(rename = "Description")]
1177    #[serde(skip_serializing_if = "Option::is_none")]
1178    pub description: Option<String>,
1179    /// <p>The unique identifier for the data set.</p>
1180    #[serde(rename = "Id")]
1181    #[serde(skip_serializing_if = "Option::is_none")]
1182    pub id: Option<String>,
1183    /// <p>The name of the data set.</p>
1184    #[serde(rename = "Name")]
1185    #[serde(skip_serializing_if = "Option::is_none")]
1186    pub name: Option<String>,
1187    /// <p>A property that defines the data set as OWNED by the account (for providers) or ENTITLED to the account (for subscribers).</p>
1188    #[serde(rename = "Origin")]
1189    #[serde(skip_serializing_if = "Option::is_none")]
1190    pub origin: Option<String>,
1191    /// <p>If the origin of this data set is ENTITLED, includes the details for the product on AWS Marketplace.</p>
1192    #[serde(rename = "OriginDetails")]
1193    #[serde(skip_serializing_if = "Option::is_none")]
1194    pub origin_details: Option<OriginDetails>,
1195    /// <p>The data set ID of the owned data set corresponding to the entitled data set being viewed. This parameter is returned when a data set owner is viewing the entitled copy of its owned data set.</p>
1196    #[serde(rename = "SourceId")]
1197    #[serde(skip_serializing_if = "Option::is_none")]
1198    pub source_id: Option<String>,
1199    /// <p>The date and time that the data set was last updated, in ISO 8601 format.</p>
1200    #[serde(rename = "UpdatedAt")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    pub updated_at: Option<f64>,
1203}
1204
1205/// <p>The request body for UpdateRevision.</p>
1206#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1207#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1208pub struct UpdateRevisionRequest {
1209    /// <p>An optional comment about the revision.</p>
1210    #[serde(rename = "Comment")]
1211    #[serde(skip_serializing_if = "Option::is_none")]
1212    pub comment: Option<String>,
1213    /// <p>The unique identifier for a data set.</p>
1214    #[serde(rename = "DataSetId")]
1215    pub data_set_id: String,
1216    /// <p>Finalizing a revision tells AWS Data Exchange that your changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p>
1217    #[serde(rename = "Finalized")]
1218    #[serde(skip_serializing_if = "Option::is_none")]
1219    pub finalized: Option<bool>,
1220    /// <p>The unique identifier for a revision.</p>
1221    #[serde(rename = "RevisionId")]
1222    pub revision_id: String,
1223}
1224
1225#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1226#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1227pub struct UpdateRevisionResponse {
1228    /// <p>The ARN for the revision.</p>
1229    #[serde(rename = "Arn")]
1230    #[serde(skip_serializing_if = "Option::is_none")]
1231    pub arn: Option<String>,
1232    /// <p>An optional comment about the revision.</p>
1233    #[serde(rename = "Comment")]
1234    #[serde(skip_serializing_if = "Option::is_none")]
1235    pub comment: Option<String>,
1236    /// <p>The date and time that the revision was created, in ISO 8601 format.</p>
1237    #[serde(rename = "CreatedAt")]
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    pub created_at: Option<f64>,
1240    /// <p>The unique identifier for the data set associated with this revision.</p>
1241    #[serde(rename = "DataSetId")]
1242    #[serde(skip_serializing_if = "Option::is_none")]
1243    pub data_set_id: Option<String>,
1244    /// <p>To publish a revision to a data set in a product, the revision must first be finalized. Finalizing a revision tells AWS Data Exchange that changes to the assets in the revision are complete. After it's in this read-only state, you can publish the revision to your products.</p> <p>Finalized revisions can be published through the AWS Data Exchange console or the AWS Marketplace Catalog API, using the StartChangeSet AWS Marketplace Catalog API action. When using the API, revisions are uniquely identified by their ARN.</p>
1245    #[serde(rename = "Finalized")]
1246    #[serde(skip_serializing_if = "Option::is_none")]
1247    pub finalized: Option<bool>,
1248    /// <p>The unique identifier for the revision.</p>
1249    #[serde(rename = "Id")]
1250    #[serde(skip_serializing_if = "Option::is_none")]
1251    pub id: Option<String>,
1252    /// <p>The revision ID of the owned revision corresponding to the entitled revision being viewed. This parameter is returned when a revision owner is viewing the entitled copy of its owned revision.</p>
1253    #[serde(rename = "SourceId")]
1254    #[serde(skip_serializing_if = "Option::is_none")]
1255    pub source_id: Option<String>,
1256    /// <p>The date and time that the revision was last updated, in ISO 8601 format.</p>
1257    #[serde(rename = "UpdatedAt")]
1258    #[serde(skip_serializing_if = "Option::is_none")]
1259    pub updated_at: Option<f64>,
1260}
1261
1262/// Errors returned by CancelJob
1263#[derive(Debug, PartialEq)]
1264pub enum CancelJobError {
1265    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
1266    Conflict(String),
1267    /// <p>An exception occurred with the service.</p>
1268    InternalServer(String),
1269    /// <p>The resource couldn't be found.</p>
1270    ResourceNotFound(String),
1271    /// <p>The limit on the number of requests per second was exceeded.</p>
1272    Throttling(String),
1273}
1274
1275impl CancelJobError {
1276    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelJobError> {
1277        if let Some(err) = proto::json::Error::parse_rest(&res) {
1278            match err.typ.as_str() {
1279                "ConflictException" => {
1280                    return RusotoError::Service(CancelJobError::Conflict(err.msg))
1281                }
1282                "InternalServerException" => {
1283                    return RusotoError::Service(CancelJobError::InternalServer(err.msg))
1284                }
1285                "ResourceNotFoundException" => {
1286                    return RusotoError::Service(CancelJobError::ResourceNotFound(err.msg))
1287                }
1288                "ThrottlingException" => {
1289                    return RusotoError::Service(CancelJobError::Throttling(err.msg))
1290                }
1291                "ValidationException" => return RusotoError::Validation(err.msg),
1292                _ => {}
1293            }
1294        }
1295        RusotoError::Unknown(res)
1296    }
1297}
1298impl fmt::Display for CancelJobError {
1299    #[allow(unused_variables)]
1300    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1301        match *self {
1302            CancelJobError::Conflict(ref cause) => write!(f, "{}", cause),
1303            CancelJobError::InternalServer(ref cause) => write!(f, "{}", cause),
1304            CancelJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1305            CancelJobError::Throttling(ref cause) => write!(f, "{}", cause),
1306        }
1307    }
1308}
1309impl Error for CancelJobError {}
1310/// Errors returned by CreateDataSet
1311#[derive(Debug, PartialEq)]
1312pub enum CreateDataSetError {
1313    /// <p>Access to the resource is denied.</p>
1314    AccessDenied(String),
1315    /// <p>An exception occurred with the service.</p>
1316    InternalServer(String),
1317    /// <p>The request has exceeded the quotas imposed by the service.</p>
1318    ServiceLimitExceeded(String),
1319    /// <p>The limit on the number of requests per second was exceeded.</p>
1320    Throttling(String),
1321}
1322
1323impl CreateDataSetError {
1324    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDataSetError> {
1325        if let Some(err) = proto::json::Error::parse_rest(&res) {
1326            match err.typ.as_str() {
1327                "AccessDeniedException" => {
1328                    return RusotoError::Service(CreateDataSetError::AccessDenied(err.msg))
1329                }
1330                "InternalServerException" => {
1331                    return RusotoError::Service(CreateDataSetError::InternalServer(err.msg))
1332                }
1333                "ServiceLimitExceededException" => {
1334                    return RusotoError::Service(CreateDataSetError::ServiceLimitExceeded(err.msg))
1335                }
1336                "ThrottlingException" => {
1337                    return RusotoError::Service(CreateDataSetError::Throttling(err.msg))
1338                }
1339                "ValidationException" => return RusotoError::Validation(err.msg),
1340                _ => {}
1341            }
1342        }
1343        RusotoError::Unknown(res)
1344    }
1345}
1346impl fmt::Display for CreateDataSetError {
1347    #[allow(unused_variables)]
1348    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1349        match *self {
1350            CreateDataSetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1351            CreateDataSetError::InternalServer(ref cause) => write!(f, "{}", cause),
1352            CreateDataSetError::ServiceLimitExceeded(ref cause) => write!(f, "{}", cause),
1353            CreateDataSetError::Throttling(ref cause) => write!(f, "{}", cause),
1354        }
1355    }
1356}
1357impl Error for CreateDataSetError {}
1358/// Errors returned by CreateJob
1359#[derive(Debug, PartialEq)]
1360pub enum CreateJobError {
1361    /// <p>Access to the resource is denied.</p>
1362    AccessDenied(String),
1363    /// <p>An exception occurred with the service.</p>
1364    InternalServer(String),
1365    /// <p>The resource couldn't be found.</p>
1366    ResourceNotFound(String),
1367    /// <p>The limit on the number of requests per second was exceeded.</p>
1368    Throttling(String),
1369}
1370
1371impl CreateJobError {
1372    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateJobError> {
1373        if let Some(err) = proto::json::Error::parse_rest(&res) {
1374            match err.typ.as_str() {
1375                "AccessDeniedException" => {
1376                    return RusotoError::Service(CreateJobError::AccessDenied(err.msg))
1377                }
1378                "InternalServerException" => {
1379                    return RusotoError::Service(CreateJobError::InternalServer(err.msg))
1380                }
1381                "ResourceNotFoundException" => {
1382                    return RusotoError::Service(CreateJobError::ResourceNotFound(err.msg))
1383                }
1384                "ThrottlingException" => {
1385                    return RusotoError::Service(CreateJobError::Throttling(err.msg))
1386                }
1387                "ValidationException" => return RusotoError::Validation(err.msg),
1388                _ => {}
1389            }
1390        }
1391        RusotoError::Unknown(res)
1392    }
1393}
1394impl fmt::Display for CreateJobError {
1395    #[allow(unused_variables)]
1396    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1397        match *self {
1398            CreateJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
1399            CreateJobError::InternalServer(ref cause) => write!(f, "{}", cause),
1400            CreateJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1401            CreateJobError::Throttling(ref cause) => write!(f, "{}", cause),
1402        }
1403    }
1404}
1405impl Error for CreateJobError {}
1406/// Errors returned by CreateRevision
1407#[derive(Debug, PartialEq)]
1408pub enum CreateRevisionError {
1409    /// <p>Access to the resource is denied.</p>
1410    AccessDenied(String),
1411    /// <p>An exception occurred with the service.</p>
1412    InternalServer(String),
1413    /// <p>The resource couldn't be found.</p>
1414    ResourceNotFound(String),
1415    /// <p>The limit on the number of requests per second was exceeded.</p>
1416    Throttling(String),
1417}
1418
1419impl CreateRevisionError {
1420    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRevisionError> {
1421        if let Some(err) = proto::json::Error::parse_rest(&res) {
1422            match err.typ.as_str() {
1423                "AccessDeniedException" => {
1424                    return RusotoError::Service(CreateRevisionError::AccessDenied(err.msg))
1425                }
1426                "InternalServerException" => {
1427                    return RusotoError::Service(CreateRevisionError::InternalServer(err.msg))
1428                }
1429                "ResourceNotFoundException" => {
1430                    return RusotoError::Service(CreateRevisionError::ResourceNotFound(err.msg))
1431                }
1432                "ThrottlingException" => {
1433                    return RusotoError::Service(CreateRevisionError::Throttling(err.msg))
1434                }
1435                "ValidationException" => return RusotoError::Validation(err.msg),
1436                _ => {}
1437            }
1438        }
1439        RusotoError::Unknown(res)
1440    }
1441}
1442impl fmt::Display for CreateRevisionError {
1443    #[allow(unused_variables)]
1444    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1445        match *self {
1446            CreateRevisionError::AccessDenied(ref cause) => write!(f, "{}", cause),
1447            CreateRevisionError::InternalServer(ref cause) => write!(f, "{}", cause),
1448            CreateRevisionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1449            CreateRevisionError::Throttling(ref cause) => write!(f, "{}", cause),
1450        }
1451    }
1452}
1453impl Error for CreateRevisionError {}
1454/// Errors returned by DeleteAsset
1455#[derive(Debug, PartialEq)]
1456pub enum DeleteAssetError {
1457    /// <p>Access to the resource is denied.</p>
1458    AccessDenied(String),
1459    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
1460    Conflict(String),
1461    /// <p>An exception occurred with the service.</p>
1462    InternalServer(String),
1463    /// <p>The resource couldn't be found.</p>
1464    ResourceNotFound(String),
1465    /// <p>The limit on the number of requests per second was exceeded.</p>
1466    Throttling(String),
1467}
1468
1469impl DeleteAssetError {
1470    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAssetError> {
1471        if let Some(err) = proto::json::Error::parse_rest(&res) {
1472            match err.typ.as_str() {
1473                "AccessDeniedException" => {
1474                    return RusotoError::Service(DeleteAssetError::AccessDenied(err.msg))
1475                }
1476                "ConflictException" => {
1477                    return RusotoError::Service(DeleteAssetError::Conflict(err.msg))
1478                }
1479                "InternalServerException" => {
1480                    return RusotoError::Service(DeleteAssetError::InternalServer(err.msg))
1481                }
1482                "ResourceNotFoundException" => {
1483                    return RusotoError::Service(DeleteAssetError::ResourceNotFound(err.msg))
1484                }
1485                "ThrottlingException" => {
1486                    return RusotoError::Service(DeleteAssetError::Throttling(err.msg))
1487                }
1488                "ValidationException" => return RusotoError::Validation(err.msg),
1489                _ => {}
1490            }
1491        }
1492        RusotoError::Unknown(res)
1493    }
1494}
1495impl fmt::Display for DeleteAssetError {
1496    #[allow(unused_variables)]
1497    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1498        match *self {
1499            DeleteAssetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1500            DeleteAssetError::Conflict(ref cause) => write!(f, "{}", cause),
1501            DeleteAssetError::InternalServer(ref cause) => write!(f, "{}", cause),
1502            DeleteAssetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1503            DeleteAssetError::Throttling(ref cause) => write!(f, "{}", cause),
1504        }
1505    }
1506}
1507impl Error for DeleteAssetError {}
1508/// Errors returned by DeleteDataSet
1509#[derive(Debug, PartialEq)]
1510pub enum DeleteDataSetError {
1511    /// <p>Access to the resource is denied.</p>
1512    AccessDenied(String),
1513    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
1514    Conflict(String),
1515    /// <p>An exception occurred with the service.</p>
1516    InternalServer(String),
1517    /// <p>The resource couldn't be found.</p>
1518    ResourceNotFound(String),
1519    /// <p>The limit on the number of requests per second was exceeded.</p>
1520    Throttling(String),
1521}
1522
1523impl DeleteDataSetError {
1524    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDataSetError> {
1525        if let Some(err) = proto::json::Error::parse_rest(&res) {
1526            match err.typ.as_str() {
1527                "AccessDeniedException" => {
1528                    return RusotoError::Service(DeleteDataSetError::AccessDenied(err.msg))
1529                }
1530                "ConflictException" => {
1531                    return RusotoError::Service(DeleteDataSetError::Conflict(err.msg))
1532                }
1533                "InternalServerException" => {
1534                    return RusotoError::Service(DeleteDataSetError::InternalServer(err.msg))
1535                }
1536                "ResourceNotFoundException" => {
1537                    return RusotoError::Service(DeleteDataSetError::ResourceNotFound(err.msg))
1538                }
1539                "ThrottlingException" => {
1540                    return RusotoError::Service(DeleteDataSetError::Throttling(err.msg))
1541                }
1542                "ValidationException" => return RusotoError::Validation(err.msg),
1543                _ => {}
1544            }
1545        }
1546        RusotoError::Unknown(res)
1547    }
1548}
1549impl fmt::Display for DeleteDataSetError {
1550    #[allow(unused_variables)]
1551    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1552        match *self {
1553            DeleteDataSetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1554            DeleteDataSetError::Conflict(ref cause) => write!(f, "{}", cause),
1555            DeleteDataSetError::InternalServer(ref cause) => write!(f, "{}", cause),
1556            DeleteDataSetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1557            DeleteDataSetError::Throttling(ref cause) => write!(f, "{}", cause),
1558        }
1559    }
1560}
1561impl Error for DeleteDataSetError {}
1562/// Errors returned by DeleteRevision
1563#[derive(Debug, PartialEq)]
1564pub enum DeleteRevisionError {
1565    /// <p>Access to the resource is denied.</p>
1566    AccessDenied(String),
1567    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
1568    Conflict(String),
1569    /// <p>An exception occurred with the service.</p>
1570    InternalServer(String),
1571    /// <p>The resource couldn't be found.</p>
1572    ResourceNotFound(String),
1573    /// <p>The limit on the number of requests per second was exceeded.</p>
1574    Throttling(String),
1575}
1576
1577impl DeleteRevisionError {
1578    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRevisionError> {
1579        if let Some(err) = proto::json::Error::parse_rest(&res) {
1580            match err.typ.as_str() {
1581                "AccessDeniedException" => {
1582                    return RusotoError::Service(DeleteRevisionError::AccessDenied(err.msg))
1583                }
1584                "ConflictException" => {
1585                    return RusotoError::Service(DeleteRevisionError::Conflict(err.msg))
1586                }
1587                "InternalServerException" => {
1588                    return RusotoError::Service(DeleteRevisionError::InternalServer(err.msg))
1589                }
1590                "ResourceNotFoundException" => {
1591                    return RusotoError::Service(DeleteRevisionError::ResourceNotFound(err.msg))
1592                }
1593                "ThrottlingException" => {
1594                    return RusotoError::Service(DeleteRevisionError::Throttling(err.msg))
1595                }
1596                "ValidationException" => return RusotoError::Validation(err.msg),
1597                _ => {}
1598            }
1599        }
1600        RusotoError::Unknown(res)
1601    }
1602}
1603impl fmt::Display for DeleteRevisionError {
1604    #[allow(unused_variables)]
1605    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1606        match *self {
1607            DeleteRevisionError::AccessDenied(ref cause) => write!(f, "{}", cause),
1608            DeleteRevisionError::Conflict(ref cause) => write!(f, "{}", cause),
1609            DeleteRevisionError::InternalServer(ref cause) => write!(f, "{}", cause),
1610            DeleteRevisionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1611            DeleteRevisionError::Throttling(ref cause) => write!(f, "{}", cause),
1612        }
1613    }
1614}
1615impl Error for DeleteRevisionError {}
1616/// Errors returned by GetAsset
1617#[derive(Debug, PartialEq)]
1618pub enum GetAssetError {
1619    /// <p>An exception occurred with the service.</p>
1620    InternalServer(String),
1621    /// <p>The resource couldn't be found.</p>
1622    ResourceNotFound(String),
1623    /// <p>The limit on the number of requests per second was exceeded.</p>
1624    Throttling(String),
1625}
1626
1627impl GetAssetError {
1628    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAssetError> {
1629        if let Some(err) = proto::json::Error::parse_rest(&res) {
1630            match err.typ.as_str() {
1631                "InternalServerException" => {
1632                    return RusotoError::Service(GetAssetError::InternalServer(err.msg))
1633                }
1634                "ResourceNotFoundException" => {
1635                    return RusotoError::Service(GetAssetError::ResourceNotFound(err.msg))
1636                }
1637                "ThrottlingException" => {
1638                    return RusotoError::Service(GetAssetError::Throttling(err.msg))
1639                }
1640                "ValidationException" => return RusotoError::Validation(err.msg),
1641                _ => {}
1642            }
1643        }
1644        RusotoError::Unknown(res)
1645    }
1646}
1647impl fmt::Display for GetAssetError {
1648    #[allow(unused_variables)]
1649    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1650        match *self {
1651            GetAssetError::InternalServer(ref cause) => write!(f, "{}", cause),
1652            GetAssetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1653            GetAssetError::Throttling(ref cause) => write!(f, "{}", cause),
1654        }
1655    }
1656}
1657impl Error for GetAssetError {}
1658/// Errors returned by GetDataSet
1659#[derive(Debug, PartialEq)]
1660pub enum GetDataSetError {
1661    /// <p>An exception occurred with the service.</p>
1662    InternalServer(String),
1663    /// <p>The resource couldn't be found.</p>
1664    ResourceNotFound(String),
1665    /// <p>The limit on the number of requests per second was exceeded.</p>
1666    Throttling(String),
1667}
1668
1669impl GetDataSetError {
1670    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDataSetError> {
1671        if let Some(err) = proto::json::Error::parse_rest(&res) {
1672            match err.typ.as_str() {
1673                "InternalServerException" => {
1674                    return RusotoError::Service(GetDataSetError::InternalServer(err.msg))
1675                }
1676                "ResourceNotFoundException" => {
1677                    return RusotoError::Service(GetDataSetError::ResourceNotFound(err.msg))
1678                }
1679                "ThrottlingException" => {
1680                    return RusotoError::Service(GetDataSetError::Throttling(err.msg))
1681                }
1682                "ValidationException" => return RusotoError::Validation(err.msg),
1683                _ => {}
1684            }
1685        }
1686        RusotoError::Unknown(res)
1687    }
1688}
1689impl fmt::Display for GetDataSetError {
1690    #[allow(unused_variables)]
1691    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1692        match *self {
1693            GetDataSetError::InternalServer(ref cause) => write!(f, "{}", cause),
1694            GetDataSetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1695            GetDataSetError::Throttling(ref cause) => write!(f, "{}", cause),
1696        }
1697    }
1698}
1699impl Error for GetDataSetError {}
1700/// Errors returned by GetJob
1701#[derive(Debug, PartialEq)]
1702pub enum GetJobError {
1703    /// <p>An exception occurred with the service.</p>
1704    InternalServer(String),
1705    /// <p>The resource couldn't be found.</p>
1706    ResourceNotFound(String),
1707    /// <p>The limit on the number of requests per second was exceeded.</p>
1708    Throttling(String),
1709}
1710
1711impl GetJobError {
1712    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetJobError> {
1713        if let Some(err) = proto::json::Error::parse_rest(&res) {
1714            match err.typ.as_str() {
1715                "InternalServerException" => {
1716                    return RusotoError::Service(GetJobError::InternalServer(err.msg))
1717                }
1718                "ResourceNotFoundException" => {
1719                    return RusotoError::Service(GetJobError::ResourceNotFound(err.msg))
1720                }
1721                "ThrottlingException" => {
1722                    return RusotoError::Service(GetJobError::Throttling(err.msg))
1723                }
1724                "ValidationException" => return RusotoError::Validation(err.msg),
1725                _ => {}
1726            }
1727        }
1728        RusotoError::Unknown(res)
1729    }
1730}
1731impl fmt::Display for GetJobError {
1732    #[allow(unused_variables)]
1733    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1734        match *self {
1735            GetJobError::InternalServer(ref cause) => write!(f, "{}", cause),
1736            GetJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1737            GetJobError::Throttling(ref cause) => write!(f, "{}", cause),
1738        }
1739    }
1740}
1741impl Error for GetJobError {}
1742/// Errors returned by GetRevision
1743#[derive(Debug, PartialEq)]
1744pub enum GetRevisionError {
1745    /// <p>An exception occurred with the service.</p>
1746    InternalServer(String),
1747    /// <p>The resource couldn't be found.</p>
1748    ResourceNotFound(String),
1749    /// <p>The limit on the number of requests per second was exceeded.</p>
1750    Throttling(String),
1751}
1752
1753impl GetRevisionError {
1754    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRevisionError> {
1755        if let Some(err) = proto::json::Error::parse_rest(&res) {
1756            match err.typ.as_str() {
1757                "InternalServerException" => {
1758                    return RusotoError::Service(GetRevisionError::InternalServer(err.msg))
1759                }
1760                "ResourceNotFoundException" => {
1761                    return RusotoError::Service(GetRevisionError::ResourceNotFound(err.msg))
1762                }
1763                "ThrottlingException" => {
1764                    return RusotoError::Service(GetRevisionError::Throttling(err.msg))
1765                }
1766                "ValidationException" => return RusotoError::Validation(err.msg),
1767                _ => {}
1768            }
1769        }
1770        RusotoError::Unknown(res)
1771    }
1772}
1773impl fmt::Display for GetRevisionError {
1774    #[allow(unused_variables)]
1775    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1776        match *self {
1777            GetRevisionError::InternalServer(ref cause) => write!(f, "{}", cause),
1778            GetRevisionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1779            GetRevisionError::Throttling(ref cause) => write!(f, "{}", cause),
1780        }
1781    }
1782}
1783impl Error for GetRevisionError {}
1784/// Errors returned by ListDataSetRevisions
1785#[derive(Debug, PartialEq)]
1786pub enum ListDataSetRevisionsError {
1787    /// <p>An exception occurred with the service.</p>
1788    InternalServer(String),
1789    /// <p>The resource couldn't be found.</p>
1790    ResourceNotFound(String),
1791    /// <p>The limit on the number of requests per second was exceeded.</p>
1792    Throttling(String),
1793}
1794
1795impl ListDataSetRevisionsError {
1796    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDataSetRevisionsError> {
1797        if let Some(err) = proto::json::Error::parse_rest(&res) {
1798            match err.typ.as_str() {
1799                "InternalServerException" => {
1800                    return RusotoError::Service(ListDataSetRevisionsError::InternalServer(err.msg))
1801                }
1802                "ResourceNotFoundException" => {
1803                    return RusotoError::Service(ListDataSetRevisionsError::ResourceNotFound(
1804                        err.msg,
1805                    ))
1806                }
1807                "ThrottlingException" => {
1808                    return RusotoError::Service(ListDataSetRevisionsError::Throttling(err.msg))
1809                }
1810                "ValidationException" => return RusotoError::Validation(err.msg),
1811                _ => {}
1812            }
1813        }
1814        RusotoError::Unknown(res)
1815    }
1816}
1817impl fmt::Display for ListDataSetRevisionsError {
1818    #[allow(unused_variables)]
1819    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1820        match *self {
1821            ListDataSetRevisionsError::InternalServer(ref cause) => write!(f, "{}", cause),
1822            ListDataSetRevisionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1823            ListDataSetRevisionsError::Throttling(ref cause) => write!(f, "{}", cause),
1824        }
1825    }
1826}
1827impl Error for ListDataSetRevisionsError {}
1828/// Errors returned by ListDataSets
1829#[derive(Debug, PartialEq)]
1830pub enum ListDataSetsError {
1831    /// <p>An exception occurred with the service.</p>
1832    InternalServer(String),
1833    /// <p>The resource couldn't be found.</p>
1834    ResourceNotFound(String),
1835    /// <p>The limit on the number of requests per second was exceeded.</p>
1836    Throttling(String),
1837}
1838
1839impl ListDataSetsError {
1840    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDataSetsError> {
1841        if let Some(err) = proto::json::Error::parse_rest(&res) {
1842            match err.typ.as_str() {
1843                "InternalServerException" => {
1844                    return RusotoError::Service(ListDataSetsError::InternalServer(err.msg))
1845                }
1846                "ResourceNotFoundException" => {
1847                    return RusotoError::Service(ListDataSetsError::ResourceNotFound(err.msg))
1848                }
1849                "ThrottlingException" => {
1850                    return RusotoError::Service(ListDataSetsError::Throttling(err.msg))
1851                }
1852                "ValidationException" => return RusotoError::Validation(err.msg),
1853                _ => {}
1854            }
1855        }
1856        RusotoError::Unknown(res)
1857    }
1858}
1859impl fmt::Display for ListDataSetsError {
1860    #[allow(unused_variables)]
1861    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1862        match *self {
1863            ListDataSetsError::InternalServer(ref cause) => write!(f, "{}", cause),
1864            ListDataSetsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1865            ListDataSetsError::Throttling(ref cause) => write!(f, "{}", cause),
1866        }
1867    }
1868}
1869impl Error for ListDataSetsError {}
1870/// Errors returned by ListJobs
1871#[derive(Debug, PartialEq)]
1872pub enum ListJobsError {
1873    /// <p>An exception occurred with the service.</p>
1874    InternalServer(String),
1875    /// <p>The resource couldn't be found.</p>
1876    ResourceNotFound(String),
1877    /// <p>The limit on the number of requests per second was exceeded.</p>
1878    Throttling(String),
1879}
1880
1881impl ListJobsError {
1882    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsError> {
1883        if let Some(err) = proto::json::Error::parse_rest(&res) {
1884            match err.typ.as_str() {
1885                "InternalServerException" => {
1886                    return RusotoError::Service(ListJobsError::InternalServer(err.msg))
1887                }
1888                "ResourceNotFoundException" => {
1889                    return RusotoError::Service(ListJobsError::ResourceNotFound(err.msg))
1890                }
1891                "ThrottlingException" => {
1892                    return RusotoError::Service(ListJobsError::Throttling(err.msg))
1893                }
1894                "ValidationException" => return RusotoError::Validation(err.msg),
1895                _ => {}
1896            }
1897        }
1898        RusotoError::Unknown(res)
1899    }
1900}
1901impl fmt::Display for ListJobsError {
1902    #[allow(unused_variables)]
1903    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1904        match *self {
1905            ListJobsError::InternalServer(ref cause) => write!(f, "{}", cause),
1906            ListJobsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1907            ListJobsError::Throttling(ref cause) => write!(f, "{}", cause),
1908        }
1909    }
1910}
1911impl Error for ListJobsError {}
1912/// Errors returned by ListRevisionAssets
1913#[derive(Debug, PartialEq)]
1914pub enum ListRevisionAssetsError {
1915    /// <p>An exception occurred with the service.</p>
1916    InternalServer(String),
1917    /// <p>The resource couldn't be found.</p>
1918    ResourceNotFound(String),
1919    /// <p>The limit on the number of requests per second was exceeded.</p>
1920    Throttling(String),
1921}
1922
1923impl ListRevisionAssetsError {
1924    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRevisionAssetsError> {
1925        if let Some(err) = proto::json::Error::parse_rest(&res) {
1926            match err.typ.as_str() {
1927                "InternalServerException" => {
1928                    return RusotoError::Service(ListRevisionAssetsError::InternalServer(err.msg))
1929                }
1930                "ResourceNotFoundException" => {
1931                    return RusotoError::Service(ListRevisionAssetsError::ResourceNotFound(err.msg))
1932                }
1933                "ThrottlingException" => {
1934                    return RusotoError::Service(ListRevisionAssetsError::Throttling(err.msg))
1935                }
1936                "ValidationException" => return RusotoError::Validation(err.msg),
1937                _ => {}
1938            }
1939        }
1940        RusotoError::Unknown(res)
1941    }
1942}
1943impl fmt::Display for ListRevisionAssetsError {
1944    #[allow(unused_variables)]
1945    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1946        match *self {
1947            ListRevisionAssetsError::InternalServer(ref cause) => write!(f, "{}", cause),
1948            ListRevisionAssetsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1949            ListRevisionAssetsError::Throttling(ref cause) => write!(f, "{}", cause),
1950        }
1951    }
1952}
1953impl Error for ListRevisionAssetsError {}
1954/// Errors returned by ListTagsForResource
1955#[derive(Debug, PartialEq)]
1956pub enum ListTagsForResourceError {}
1957
1958impl ListTagsForResourceError {
1959    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1960        if let Some(err) = proto::json::Error::parse_rest(&res) {
1961            match err.typ.as_str() {
1962                "ValidationException" => return RusotoError::Validation(err.msg),
1963                _ => {}
1964            }
1965        }
1966        RusotoError::Unknown(res)
1967    }
1968}
1969impl fmt::Display for ListTagsForResourceError {
1970    #[allow(unused_variables)]
1971    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1972        match *self {}
1973    }
1974}
1975impl Error for ListTagsForResourceError {}
1976/// Errors returned by StartJob
1977#[derive(Debug, PartialEq)]
1978pub enum StartJobError {
1979    /// <p>Access to the resource is denied.</p>
1980    AccessDenied(String),
1981    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
1982    Conflict(String),
1983    /// <p>An exception occurred with the service.</p>
1984    InternalServer(String),
1985    /// <p>The resource couldn't be found.</p>
1986    ResourceNotFound(String),
1987    /// <p>The limit on the number of requests per second was exceeded.</p>
1988    Throttling(String),
1989}
1990
1991impl StartJobError {
1992    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartJobError> {
1993        if let Some(err) = proto::json::Error::parse_rest(&res) {
1994            match err.typ.as_str() {
1995                "AccessDeniedException" => {
1996                    return RusotoError::Service(StartJobError::AccessDenied(err.msg))
1997                }
1998                "ConflictException" => {
1999                    return RusotoError::Service(StartJobError::Conflict(err.msg))
2000                }
2001                "InternalServerException" => {
2002                    return RusotoError::Service(StartJobError::InternalServer(err.msg))
2003                }
2004                "ResourceNotFoundException" => {
2005                    return RusotoError::Service(StartJobError::ResourceNotFound(err.msg))
2006                }
2007                "ThrottlingException" => {
2008                    return RusotoError::Service(StartJobError::Throttling(err.msg))
2009                }
2010                "ValidationException" => return RusotoError::Validation(err.msg),
2011                _ => {}
2012            }
2013        }
2014        RusotoError::Unknown(res)
2015    }
2016}
2017impl fmt::Display for StartJobError {
2018    #[allow(unused_variables)]
2019    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2020        match *self {
2021            StartJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
2022            StartJobError::Conflict(ref cause) => write!(f, "{}", cause),
2023            StartJobError::InternalServer(ref cause) => write!(f, "{}", cause),
2024            StartJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2025            StartJobError::Throttling(ref cause) => write!(f, "{}", cause),
2026        }
2027    }
2028}
2029impl Error for StartJobError {}
2030/// Errors returned by TagResource
2031#[derive(Debug, PartialEq)]
2032pub enum TagResourceError {}
2033
2034impl TagResourceError {
2035    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2036        if let Some(err) = proto::json::Error::parse_rest(&res) {
2037            match err.typ.as_str() {
2038                "ValidationException" => return RusotoError::Validation(err.msg),
2039                _ => {}
2040            }
2041        }
2042        RusotoError::Unknown(res)
2043    }
2044}
2045impl fmt::Display for TagResourceError {
2046    #[allow(unused_variables)]
2047    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2048        match *self {}
2049    }
2050}
2051impl Error for TagResourceError {}
2052/// Errors returned by UntagResource
2053#[derive(Debug, PartialEq)]
2054pub enum UntagResourceError {}
2055
2056impl UntagResourceError {
2057    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2058        if let Some(err) = proto::json::Error::parse_rest(&res) {
2059            match err.typ.as_str() {
2060                "ValidationException" => return RusotoError::Validation(err.msg),
2061                _ => {}
2062            }
2063        }
2064        RusotoError::Unknown(res)
2065    }
2066}
2067impl fmt::Display for UntagResourceError {
2068    #[allow(unused_variables)]
2069    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2070        match *self {}
2071    }
2072}
2073impl Error for UntagResourceError {}
2074/// Errors returned by UpdateAsset
2075#[derive(Debug, PartialEq)]
2076pub enum UpdateAssetError {
2077    /// <p>Access to the resource is denied.</p>
2078    AccessDenied(String),
2079    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
2080    Conflict(String),
2081    /// <p>An exception occurred with the service.</p>
2082    InternalServer(String),
2083    /// <p>The resource couldn't be found.</p>
2084    ResourceNotFound(String),
2085    /// <p>The limit on the number of requests per second was exceeded.</p>
2086    Throttling(String),
2087}
2088
2089impl UpdateAssetError {
2090    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAssetError> {
2091        if let Some(err) = proto::json::Error::parse_rest(&res) {
2092            match err.typ.as_str() {
2093                "AccessDeniedException" => {
2094                    return RusotoError::Service(UpdateAssetError::AccessDenied(err.msg))
2095                }
2096                "ConflictException" => {
2097                    return RusotoError::Service(UpdateAssetError::Conflict(err.msg))
2098                }
2099                "InternalServerException" => {
2100                    return RusotoError::Service(UpdateAssetError::InternalServer(err.msg))
2101                }
2102                "ResourceNotFoundException" => {
2103                    return RusotoError::Service(UpdateAssetError::ResourceNotFound(err.msg))
2104                }
2105                "ThrottlingException" => {
2106                    return RusotoError::Service(UpdateAssetError::Throttling(err.msg))
2107                }
2108                "ValidationException" => return RusotoError::Validation(err.msg),
2109                _ => {}
2110            }
2111        }
2112        RusotoError::Unknown(res)
2113    }
2114}
2115impl fmt::Display for UpdateAssetError {
2116    #[allow(unused_variables)]
2117    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2118        match *self {
2119            UpdateAssetError::AccessDenied(ref cause) => write!(f, "{}", cause),
2120            UpdateAssetError::Conflict(ref cause) => write!(f, "{}", cause),
2121            UpdateAssetError::InternalServer(ref cause) => write!(f, "{}", cause),
2122            UpdateAssetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2123            UpdateAssetError::Throttling(ref cause) => write!(f, "{}", cause),
2124        }
2125    }
2126}
2127impl Error for UpdateAssetError {}
2128/// Errors returned by UpdateDataSet
2129#[derive(Debug, PartialEq)]
2130pub enum UpdateDataSetError {
2131    /// <p>Access to the resource is denied.</p>
2132    AccessDenied(String),
2133    /// <p>An exception occurred with the service.</p>
2134    InternalServer(String),
2135    /// <p>The resource couldn't be found.</p>
2136    ResourceNotFound(String),
2137    /// <p>The limit on the number of requests per second was exceeded.</p>
2138    Throttling(String),
2139}
2140
2141impl UpdateDataSetError {
2142    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDataSetError> {
2143        if let Some(err) = proto::json::Error::parse_rest(&res) {
2144            match err.typ.as_str() {
2145                "AccessDeniedException" => {
2146                    return RusotoError::Service(UpdateDataSetError::AccessDenied(err.msg))
2147                }
2148                "InternalServerException" => {
2149                    return RusotoError::Service(UpdateDataSetError::InternalServer(err.msg))
2150                }
2151                "ResourceNotFoundException" => {
2152                    return RusotoError::Service(UpdateDataSetError::ResourceNotFound(err.msg))
2153                }
2154                "ThrottlingException" => {
2155                    return RusotoError::Service(UpdateDataSetError::Throttling(err.msg))
2156                }
2157                "ValidationException" => return RusotoError::Validation(err.msg),
2158                _ => {}
2159            }
2160        }
2161        RusotoError::Unknown(res)
2162    }
2163}
2164impl fmt::Display for UpdateDataSetError {
2165    #[allow(unused_variables)]
2166    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2167        match *self {
2168            UpdateDataSetError::AccessDenied(ref cause) => write!(f, "{}", cause),
2169            UpdateDataSetError::InternalServer(ref cause) => write!(f, "{}", cause),
2170            UpdateDataSetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2171            UpdateDataSetError::Throttling(ref cause) => write!(f, "{}", cause),
2172        }
2173    }
2174}
2175impl Error for UpdateDataSetError {}
2176/// Errors returned by UpdateRevision
2177#[derive(Debug, PartialEq)]
2178pub enum UpdateRevisionError {
2179    /// <p>Access to the resource is denied.</p>
2180    AccessDenied(String),
2181    /// <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
2182    Conflict(String),
2183    /// <p>An exception occurred with the service.</p>
2184    InternalServer(String),
2185    /// <p>The resource couldn't be found.</p>
2186    ResourceNotFound(String),
2187    /// <p>The limit on the number of requests per second was exceeded.</p>
2188    Throttling(String),
2189}
2190
2191impl UpdateRevisionError {
2192    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRevisionError> {
2193        if let Some(err) = proto::json::Error::parse_rest(&res) {
2194            match err.typ.as_str() {
2195                "AccessDeniedException" => {
2196                    return RusotoError::Service(UpdateRevisionError::AccessDenied(err.msg))
2197                }
2198                "ConflictException" => {
2199                    return RusotoError::Service(UpdateRevisionError::Conflict(err.msg))
2200                }
2201                "InternalServerException" => {
2202                    return RusotoError::Service(UpdateRevisionError::InternalServer(err.msg))
2203                }
2204                "ResourceNotFoundException" => {
2205                    return RusotoError::Service(UpdateRevisionError::ResourceNotFound(err.msg))
2206                }
2207                "ThrottlingException" => {
2208                    return RusotoError::Service(UpdateRevisionError::Throttling(err.msg))
2209                }
2210                "ValidationException" => return RusotoError::Validation(err.msg),
2211                _ => {}
2212            }
2213        }
2214        RusotoError::Unknown(res)
2215    }
2216}
2217impl fmt::Display for UpdateRevisionError {
2218    #[allow(unused_variables)]
2219    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2220        match *self {
2221            UpdateRevisionError::AccessDenied(ref cause) => write!(f, "{}", cause),
2222            UpdateRevisionError::Conflict(ref cause) => write!(f, "{}", cause),
2223            UpdateRevisionError::InternalServer(ref cause) => write!(f, "{}", cause),
2224            UpdateRevisionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2225            UpdateRevisionError::Throttling(ref cause) => write!(f, "{}", cause),
2226        }
2227    }
2228}
2229impl Error for UpdateRevisionError {}
2230/// Trait representing the capabilities of the AWS Data Exchange API. AWS Data Exchange clients implement this trait.
2231#[async_trait]
2232pub trait DataExchange {
2233    /// <p>This operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.</p>
2234    async fn cancel_job(&self, input: CancelJobRequest) -> Result<(), RusotoError<CancelJobError>>;
2235
2236    /// <p>This operation creates a data set.</p>
2237    async fn create_data_set(
2238        &self,
2239        input: CreateDataSetRequest,
2240    ) -> Result<CreateDataSetResponse, RusotoError<CreateDataSetError>>;
2241
2242    /// <p>This operation creates a job.</p>
2243    async fn create_job(
2244        &self,
2245        input: CreateJobRequest,
2246    ) -> Result<CreateJobResponse, RusotoError<CreateJobError>>;
2247
2248    /// <p>This operation creates a revision for a data set.</p>
2249    async fn create_revision(
2250        &self,
2251        input: CreateRevisionRequest,
2252    ) -> Result<CreateRevisionResponse, RusotoError<CreateRevisionError>>;
2253
2254    /// <p>This operation deletes an asset.</p>
2255    async fn delete_asset(
2256        &self,
2257        input: DeleteAssetRequest,
2258    ) -> Result<(), RusotoError<DeleteAssetError>>;
2259
2260    /// <p>This operation deletes a data set.</p>
2261    async fn delete_data_set(
2262        &self,
2263        input: DeleteDataSetRequest,
2264    ) -> Result<(), RusotoError<DeleteDataSetError>>;
2265
2266    /// <p>This operation deletes a revision.</p>
2267    async fn delete_revision(
2268        &self,
2269        input: DeleteRevisionRequest,
2270    ) -> Result<(), RusotoError<DeleteRevisionError>>;
2271
2272    /// <p>This operation returns information about an asset.</p>
2273    async fn get_asset(
2274        &self,
2275        input: GetAssetRequest,
2276    ) -> Result<GetAssetResponse, RusotoError<GetAssetError>>;
2277
2278    /// <p>This operation returns information about a data set.</p>
2279    async fn get_data_set(
2280        &self,
2281        input: GetDataSetRequest,
2282    ) -> Result<GetDataSetResponse, RusotoError<GetDataSetError>>;
2283
2284    /// <p>This operation returns information about a job.</p>
2285    async fn get_job(
2286        &self,
2287        input: GetJobRequest,
2288    ) -> Result<GetJobResponse, RusotoError<GetJobError>>;
2289
2290    /// <p>This operation returns information about a revision.</p>
2291    async fn get_revision(
2292        &self,
2293        input: GetRevisionRequest,
2294    ) -> Result<GetRevisionResponse, RusotoError<GetRevisionError>>;
2295
2296    /// <p>This operation lists a data set's revisions sorted by CreatedAt in descending order.</p>
2297    async fn list_data_set_revisions(
2298        &self,
2299        input: ListDataSetRevisionsRequest,
2300    ) -> Result<ListDataSetRevisionsResponse, RusotoError<ListDataSetRevisionsError>>;
2301
2302    /// <p>This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order and the maxResults parameter is ignored.</p>
2303    async fn list_data_sets(
2304        &self,
2305        input: ListDataSetsRequest,
2306    ) -> Result<ListDataSetsResponse, RusotoError<ListDataSetsError>>;
2307
2308    /// <p>This operation lists your jobs sorted by CreatedAt in descending order.</p>
2309    async fn list_jobs(
2310        &self,
2311        input: ListJobsRequest,
2312    ) -> Result<ListJobsResponse, RusotoError<ListJobsError>>;
2313
2314    /// <p>This operation lists a revision's assets sorted alphabetically in descending order.</p>
2315    async fn list_revision_assets(
2316        &self,
2317        input: ListRevisionAssetsRequest,
2318    ) -> Result<ListRevisionAssetsResponse, RusotoError<ListRevisionAssetsError>>;
2319
2320    /// <p>This operation lists the tags on the resource.</p>
2321    async fn list_tags_for_resource(
2322        &self,
2323        input: ListTagsForResourceRequest,
2324    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2325
2326    /// <p>This operation starts a job.</p>
2327    async fn start_job(
2328        &self,
2329        input: StartJobRequest,
2330    ) -> Result<StartJobResponse, RusotoError<StartJobError>>;
2331
2332    /// <p>This operation tags a resource.</p>
2333    async fn tag_resource(
2334        &self,
2335        input: TagResourceRequest,
2336    ) -> Result<(), RusotoError<TagResourceError>>;
2337
2338    /// <p>This operation removes one or more tags from a resource.</p>
2339    async fn untag_resource(
2340        &self,
2341        input: UntagResourceRequest,
2342    ) -> Result<(), RusotoError<UntagResourceError>>;
2343
2344    /// <p>This operation updates an asset.</p>
2345    async fn update_asset(
2346        &self,
2347        input: UpdateAssetRequest,
2348    ) -> Result<UpdateAssetResponse, RusotoError<UpdateAssetError>>;
2349
2350    /// <p>This operation updates a data set.</p>
2351    async fn update_data_set(
2352        &self,
2353        input: UpdateDataSetRequest,
2354    ) -> Result<UpdateDataSetResponse, RusotoError<UpdateDataSetError>>;
2355
2356    /// <p>This operation updates a revision.</p>
2357    async fn update_revision(
2358        &self,
2359        input: UpdateRevisionRequest,
2360    ) -> Result<UpdateRevisionResponse, RusotoError<UpdateRevisionError>>;
2361}
2362/// A client for the AWS Data Exchange API.
2363#[derive(Clone)]
2364pub struct DataExchangeClient {
2365    client: Client,
2366    region: region::Region,
2367}
2368
2369impl DataExchangeClient {
2370    /// Creates a client backed by the default tokio event loop.
2371    ///
2372    /// The client will use the default credentials provider and tls client.
2373    pub fn new(region: region::Region) -> DataExchangeClient {
2374        DataExchangeClient {
2375            client: Client::shared(),
2376            region,
2377        }
2378    }
2379
2380    pub fn new_with<P, D>(
2381        request_dispatcher: D,
2382        credentials_provider: P,
2383        region: region::Region,
2384    ) -> DataExchangeClient
2385    where
2386        P: ProvideAwsCredentials + Send + Sync + 'static,
2387        D: DispatchSignedRequest + Send + Sync + 'static,
2388    {
2389        DataExchangeClient {
2390            client: Client::new_with(credentials_provider, request_dispatcher),
2391            region,
2392        }
2393    }
2394
2395    pub fn new_with_client(client: Client, region: region::Region) -> DataExchangeClient {
2396        DataExchangeClient { client, region }
2397    }
2398}
2399
2400#[async_trait]
2401impl DataExchange for DataExchangeClient {
2402    /// <p>This operation cancels a job. Jobs can be cancelled only when they are in the WAITING state.</p>
2403    #[allow(unused_mut)]
2404    async fn cancel_job(&self, input: CancelJobRequest) -> Result<(), RusotoError<CancelJobError>> {
2405        let request_uri = format!("/v1/jobs/{job_id}", job_id = input.job_id);
2406
2407        let mut request = SignedRequest::new("DELETE", "dataexchange", &self.region, &request_uri);
2408        request.set_content_type("application/x-amz-json-1.1".to_owned());
2409
2410        let mut response = self
2411            .client
2412            .sign_and_dispatch(request)
2413            .await
2414            .map_err(RusotoError::from)?;
2415        if response.status.as_u16() == 204 {
2416            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2417            let result = ::std::mem::drop(response);
2418
2419            Ok(result)
2420        } else {
2421            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2422            Err(CancelJobError::from_response(response))
2423        }
2424    }
2425
2426    /// <p>This operation creates a data set.</p>
2427    #[allow(unused_mut)]
2428    async fn create_data_set(
2429        &self,
2430        input: CreateDataSetRequest,
2431    ) -> Result<CreateDataSetResponse, RusotoError<CreateDataSetError>> {
2432        let request_uri = "/v1/data-sets";
2433
2434        let mut request = SignedRequest::new("POST", "dataexchange", &self.region, &request_uri);
2435        request.set_content_type("application/x-amz-json-1.1".to_owned());
2436
2437        let encoded = Some(serde_json::to_vec(&input).unwrap());
2438        request.set_payload(encoded);
2439
2440        let mut response = self
2441            .client
2442            .sign_and_dispatch(request)
2443            .await
2444            .map_err(RusotoError::from)?;
2445        if response.status.as_u16() == 201 {
2446            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2447            let result = proto::json::ResponsePayload::new(&response)
2448                .deserialize::<CreateDataSetResponse, _>()?;
2449
2450            Ok(result)
2451        } else {
2452            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2453            Err(CreateDataSetError::from_response(response))
2454        }
2455    }
2456
2457    /// <p>This operation creates a job.</p>
2458    #[allow(unused_mut)]
2459    async fn create_job(
2460        &self,
2461        input: CreateJobRequest,
2462    ) -> Result<CreateJobResponse, RusotoError<CreateJobError>> {
2463        let request_uri = "/v1/jobs";
2464
2465        let mut request = SignedRequest::new("POST", "dataexchange", &self.region, &request_uri);
2466        request.set_content_type("application/x-amz-json-1.1".to_owned());
2467
2468        let encoded = Some(serde_json::to_vec(&input).unwrap());
2469        request.set_payload(encoded);
2470
2471        let mut response = self
2472            .client
2473            .sign_and_dispatch(request)
2474            .await
2475            .map_err(RusotoError::from)?;
2476        if response.status.as_u16() == 201 {
2477            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2478            let result = proto::json::ResponsePayload::new(&response)
2479                .deserialize::<CreateJobResponse, _>()?;
2480
2481            Ok(result)
2482        } else {
2483            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2484            Err(CreateJobError::from_response(response))
2485        }
2486    }
2487
2488    /// <p>This operation creates a revision for a data set.</p>
2489    #[allow(unused_mut)]
2490    async fn create_revision(
2491        &self,
2492        input: CreateRevisionRequest,
2493    ) -> Result<CreateRevisionResponse, RusotoError<CreateRevisionError>> {
2494        let request_uri = format!(
2495            "/v1/data-sets/{data_set_id}/revisions",
2496            data_set_id = input.data_set_id
2497        );
2498
2499        let mut request = SignedRequest::new("POST", "dataexchange", &self.region, &request_uri);
2500        request.set_content_type("application/x-amz-json-1.1".to_owned());
2501
2502        let encoded = Some(serde_json::to_vec(&input).unwrap());
2503        request.set_payload(encoded);
2504
2505        let mut response = self
2506            .client
2507            .sign_and_dispatch(request)
2508            .await
2509            .map_err(RusotoError::from)?;
2510        if response.status.as_u16() == 201 {
2511            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2512            let result = proto::json::ResponsePayload::new(&response)
2513                .deserialize::<CreateRevisionResponse, _>()?;
2514
2515            Ok(result)
2516        } else {
2517            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2518            Err(CreateRevisionError::from_response(response))
2519        }
2520    }
2521
2522    /// <p>This operation deletes an asset.</p>
2523    #[allow(unused_mut)]
2524    async fn delete_asset(
2525        &self,
2526        input: DeleteAssetRequest,
2527    ) -> Result<(), RusotoError<DeleteAssetError>> {
2528        let request_uri = format!(
2529            "/v1/data-sets/{data_set_id}/revisions/{revision_id}/assets/{asset_id}",
2530            asset_id = input.asset_id,
2531            data_set_id = input.data_set_id,
2532            revision_id = input.revision_id
2533        );
2534
2535        let mut request = SignedRequest::new("DELETE", "dataexchange", &self.region, &request_uri);
2536        request.set_content_type("application/x-amz-json-1.1".to_owned());
2537
2538        let mut response = self
2539            .client
2540            .sign_and_dispatch(request)
2541            .await
2542            .map_err(RusotoError::from)?;
2543        if response.status.as_u16() == 204 {
2544            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2545            let result = ::std::mem::drop(response);
2546
2547            Ok(result)
2548        } else {
2549            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2550            Err(DeleteAssetError::from_response(response))
2551        }
2552    }
2553
2554    /// <p>This operation deletes a data set.</p>
2555    #[allow(unused_mut)]
2556    async fn delete_data_set(
2557        &self,
2558        input: DeleteDataSetRequest,
2559    ) -> Result<(), RusotoError<DeleteDataSetError>> {
2560        let request_uri = format!(
2561            "/v1/data-sets/{data_set_id}",
2562            data_set_id = input.data_set_id
2563        );
2564
2565        let mut request = SignedRequest::new("DELETE", "dataexchange", &self.region, &request_uri);
2566        request.set_content_type("application/x-amz-json-1.1".to_owned());
2567
2568        let mut response = self
2569            .client
2570            .sign_and_dispatch(request)
2571            .await
2572            .map_err(RusotoError::from)?;
2573        if response.status.as_u16() == 204 {
2574            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2575            let result = ::std::mem::drop(response);
2576
2577            Ok(result)
2578        } else {
2579            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2580            Err(DeleteDataSetError::from_response(response))
2581        }
2582    }
2583
2584    /// <p>This operation deletes a revision.</p>
2585    #[allow(unused_mut)]
2586    async fn delete_revision(
2587        &self,
2588        input: DeleteRevisionRequest,
2589    ) -> Result<(), RusotoError<DeleteRevisionError>> {
2590        let request_uri = format!(
2591            "/v1/data-sets/{data_set_id}/revisions/{revision_id}",
2592            data_set_id = input.data_set_id,
2593            revision_id = input.revision_id
2594        );
2595
2596        let mut request = SignedRequest::new("DELETE", "dataexchange", &self.region, &request_uri);
2597        request.set_content_type("application/x-amz-json-1.1".to_owned());
2598
2599        let mut response = self
2600            .client
2601            .sign_and_dispatch(request)
2602            .await
2603            .map_err(RusotoError::from)?;
2604        if response.status.as_u16() == 204 {
2605            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2606            let result = ::std::mem::drop(response);
2607
2608            Ok(result)
2609        } else {
2610            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2611            Err(DeleteRevisionError::from_response(response))
2612        }
2613    }
2614
2615    /// <p>This operation returns information about an asset.</p>
2616    #[allow(unused_mut)]
2617    async fn get_asset(
2618        &self,
2619        input: GetAssetRequest,
2620    ) -> Result<GetAssetResponse, RusotoError<GetAssetError>> {
2621        let request_uri = format!(
2622            "/v1/data-sets/{data_set_id}/revisions/{revision_id}/assets/{asset_id}",
2623            asset_id = input.asset_id,
2624            data_set_id = input.data_set_id,
2625            revision_id = input.revision_id
2626        );
2627
2628        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2629        request.set_content_type("application/x-amz-json-1.1".to_owned());
2630
2631        let mut response = self
2632            .client
2633            .sign_and_dispatch(request)
2634            .await
2635            .map_err(RusotoError::from)?;
2636        if response.status.as_u16() == 200 {
2637            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2638            let result = proto::json::ResponsePayload::new(&response)
2639                .deserialize::<GetAssetResponse, _>()?;
2640
2641            Ok(result)
2642        } else {
2643            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2644            Err(GetAssetError::from_response(response))
2645        }
2646    }
2647
2648    /// <p>This operation returns information about a data set.</p>
2649    #[allow(unused_mut)]
2650    async fn get_data_set(
2651        &self,
2652        input: GetDataSetRequest,
2653    ) -> Result<GetDataSetResponse, RusotoError<GetDataSetError>> {
2654        let request_uri = format!(
2655            "/v1/data-sets/{data_set_id}",
2656            data_set_id = input.data_set_id
2657        );
2658
2659        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2660        request.set_content_type("application/x-amz-json-1.1".to_owned());
2661
2662        let mut response = self
2663            .client
2664            .sign_and_dispatch(request)
2665            .await
2666            .map_err(RusotoError::from)?;
2667        if response.status.as_u16() == 200 {
2668            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2669            let result = proto::json::ResponsePayload::new(&response)
2670                .deserialize::<GetDataSetResponse, _>()?;
2671
2672            Ok(result)
2673        } else {
2674            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2675            Err(GetDataSetError::from_response(response))
2676        }
2677    }
2678
2679    /// <p>This operation returns information about a job.</p>
2680    #[allow(unused_mut)]
2681    async fn get_job(
2682        &self,
2683        input: GetJobRequest,
2684    ) -> Result<GetJobResponse, RusotoError<GetJobError>> {
2685        let request_uri = format!("/v1/jobs/{job_id}", job_id = input.job_id);
2686
2687        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2688        request.set_content_type("application/x-amz-json-1.1".to_owned());
2689
2690        let mut response = self
2691            .client
2692            .sign_and_dispatch(request)
2693            .await
2694            .map_err(RusotoError::from)?;
2695        if response.status.as_u16() == 200 {
2696            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2697            let result =
2698                proto::json::ResponsePayload::new(&response).deserialize::<GetJobResponse, _>()?;
2699
2700            Ok(result)
2701        } else {
2702            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2703            Err(GetJobError::from_response(response))
2704        }
2705    }
2706
2707    /// <p>This operation returns information about a revision.</p>
2708    #[allow(unused_mut)]
2709    async fn get_revision(
2710        &self,
2711        input: GetRevisionRequest,
2712    ) -> Result<GetRevisionResponse, RusotoError<GetRevisionError>> {
2713        let request_uri = format!(
2714            "/v1/data-sets/{data_set_id}/revisions/{revision_id}",
2715            data_set_id = input.data_set_id,
2716            revision_id = input.revision_id
2717        );
2718
2719        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2720        request.set_content_type("application/x-amz-json-1.1".to_owned());
2721
2722        let mut response = self
2723            .client
2724            .sign_and_dispatch(request)
2725            .await
2726            .map_err(RusotoError::from)?;
2727        if response.status.as_u16() == 200 {
2728            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2729            let result = proto::json::ResponsePayload::new(&response)
2730                .deserialize::<GetRevisionResponse, _>()?;
2731
2732            Ok(result)
2733        } else {
2734            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2735            Err(GetRevisionError::from_response(response))
2736        }
2737    }
2738
2739    /// <p>This operation lists a data set's revisions sorted by CreatedAt in descending order.</p>
2740    #[allow(unused_mut)]
2741    async fn list_data_set_revisions(
2742        &self,
2743        input: ListDataSetRevisionsRequest,
2744    ) -> Result<ListDataSetRevisionsResponse, RusotoError<ListDataSetRevisionsError>> {
2745        let request_uri = format!(
2746            "/v1/data-sets/{data_set_id}/revisions",
2747            data_set_id = input.data_set_id
2748        );
2749
2750        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2751        request.set_content_type("application/x-amz-json-1.1".to_owned());
2752
2753        let mut params = Params::new();
2754        if let Some(ref x) = input.max_results {
2755            params.put("maxResults", x);
2756        }
2757        if let Some(ref x) = input.next_token {
2758            params.put("nextToken", x);
2759        }
2760        request.set_params(params);
2761
2762        let mut response = self
2763            .client
2764            .sign_and_dispatch(request)
2765            .await
2766            .map_err(RusotoError::from)?;
2767        if response.status.as_u16() == 200 {
2768            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2769            let result = proto::json::ResponsePayload::new(&response)
2770                .deserialize::<ListDataSetRevisionsResponse, _>()?;
2771
2772            Ok(result)
2773        } else {
2774            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2775            Err(ListDataSetRevisionsError::from_response(response))
2776        }
2777    }
2778
2779    /// <p>This operation lists your data sets. When listing by origin OWNED, results are sorted by CreatedAt in descending order. When listing by origin ENTITLED, there is no order and the maxResults parameter is ignored.</p>
2780    #[allow(unused_mut)]
2781    async fn list_data_sets(
2782        &self,
2783        input: ListDataSetsRequest,
2784    ) -> Result<ListDataSetsResponse, RusotoError<ListDataSetsError>> {
2785        let request_uri = "/v1/data-sets";
2786
2787        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2788        request.set_content_type("application/x-amz-json-1.1".to_owned());
2789
2790        let mut params = Params::new();
2791        if let Some(ref x) = input.max_results {
2792            params.put("maxResults", x);
2793        }
2794        if let Some(ref x) = input.next_token {
2795            params.put("nextToken", x);
2796        }
2797        if let Some(ref x) = input.origin {
2798            params.put("origin", x);
2799        }
2800        request.set_params(params);
2801
2802        let mut response = self
2803            .client
2804            .sign_and_dispatch(request)
2805            .await
2806            .map_err(RusotoError::from)?;
2807        if response.status.as_u16() == 200 {
2808            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2809            let result = proto::json::ResponsePayload::new(&response)
2810                .deserialize::<ListDataSetsResponse, _>()?;
2811
2812            Ok(result)
2813        } else {
2814            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2815            Err(ListDataSetsError::from_response(response))
2816        }
2817    }
2818
2819    /// <p>This operation lists your jobs sorted by CreatedAt in descending order.</p>
2820    #[allow(unused_mut)]
2821    async fn list_jobs(
2822        &self,
2823        input: ListJobsRequest,
2824    ) -> Result<ListJobsResponse, RusotoError<ListJobsError>> {
2825        let request_uri = "/v1/jobs";
2826
2827        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2828        request.set_content_type("application/x-amz-json-1.1".to_owned());
2829
2830        let mut params = Params::new();
2831        if let Some(ref x) = input.data_set_id {
2832            params.put("dataSetId", x);
2833        }
2834        if let Some(ref x) = input.max_results {
2835            params.put("maxResults", x);
2836        }
2837        if let Some(ref x) = input.next_token {
2838            params.put("nextToken", x);
2839        }
2840        if let Some(ref x) = input.revision_id {
2841            params.put("revisionId", x);
2842        }
2843        request.set_params(params);
2844
2845        let mut response = self
2846            .client
2847            .sign_and_dispatch(request)
2848            .await
2849            .map_err(RusotoError::from)?;
2850        if response.status.as_u16() == 200 {
2851            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2852            let result = proto::json::ResponsePayload::new(&response)
2853                .deserialize::<ListJobsResponse, _>()?;
2854
2855            Ok(result)
2856        } else {
2857            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2858            Err(ListJobsError::from_response(response))
2859        }
2860    }
2861
2862    /// <p>This operation lists a revision's assets sorted alphabetically in descending order.</p>
2863    #[allow(unused_mut)]
2864    async fn list_revision_assets(
2865        &self,
2866        input: ListRevisionAssetsRequest,
2867    ) -> Result<ListRevisionAssetsResponse, RusotoError<ListRevisionAssetsError>> {
2868        let request_uri = format!(
2869            "/v1/data-sets/{data_set_id}/revisions/{revision_id}/assets",
2870            data_set_id = input.data_set_id,
2871            revision_id = input.revision_id
2872        );
2873
2874        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2875        request.set_content_type("application/x-amz-json-1.1".to_owned());
2876
2877        let mut params = Params::new();
2878        if let Some(ref x) = input.max_results {
2879            params.put("maxResults", x);
2880        }
2881        if let Some(ref x) = input.next_token {
2882            params.put("nextToken", x);
2883        }
2884        request.set_params(params);
2885
2886        let mut response = self
2887            .client
2888            .sign_and_dispatch(request)
2889            .await
2890            .map_err(RusotoError::from)?;
2891        if response.status.as_u16() == 200 {
2892            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2893            let result = proto::json::ResponsePayload::new(&response)
2894                .deserialize::<ListRevisionAssetsResponse, _>()?;
2895
2896            Ok(result)
2897        } else {
2898            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2899            Err(ListRevisionAssetsError::from_response(response))
2900        }
2901    }
2902
2903    /// <p>This operation lists the tags on the resource.</p>
2904    #[allow(unused_mut)]
2905    async fn list_tags_for_resource(
2906        &self,
2907        input: ListTagsForResourceRequest,
2908    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2909        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
2910
2911        let mut request = SignedRequest::new("GET", "dataexchange", &self.region, &request_uri);
2912        request.set_content_type("application/x-amz-json-1.1".to_owned());
2913
2914        let mut response = self
2915            .client
2916            .sign_and_dispatch(request)
2917            .await
2918            .map_err(RusotoError::from)?;
2919        if response.status.as_u16() == 200 {
2920            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2921            let result = proto::json::ResponsePayload::new(&response)
2922                .deserialize::<ListTagsForResourceResponse, _>()?;
2923
2924            Ok(result)
2925        } else {
2926            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2927            Err(ListTagsForResourceError::from_response(response))
2928        }
2929    }
2930
2931    /// <p>This operation starts a job.</p>
2932    #[allow(unused_mut)]
2933    async fn start_job(
2934        &self,
2935        input: StartJobRequest,
2936    ) -> Result<StartJobResponse, RusotoError<StartJobError>> {
2937        let request_uri = format!("/v1/jobs/{job_id}", job_id = input.job_id);
2938
2939        let mut request = SignedRequest::new("PATCH", "dataexchange", &self.region, &request_uri);
2940        request.set_content_type("application/x-amz-json-1.1".to_owned());
2941
2942        let mut response = self
2943            .client
2944            .sign_and_dispatch(request)
2945            .await
2946            .map_err(RusotoError::from)?;
2947        if response.status.as_u16() == 202 {
2948            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2949            let result = proto::json::ResponsePayload::new(&response)
2950                .deserialize::<StartJobResponse, _>()?;
2951
2952            Ok(result)
2953        } else {
2954            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2955            Err(StartJobError::from_response(response))
2956        }
2957    }
2958
2959    /// <p>This operation tags a resource.</p>
2960    #[allow(unused_mut)]
2961    async fn tag_resource(
2962        &self,
2963        input: TagResourceRequest,
2964    ) -> Result<(), RusotoError<TagResourceError>> {
2965        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
2966
2967        let mut request = SignedRequest::new("POST", "dataexchange", &self.region, &request_uri);
2968        request.set_content_type("application/x-amz-json-1.1".to_owned());
2969
2970        let encoded = Some(serde_json::to_vec(&input).unwrap());
2971        request.set_payload(encoded);
2972
2973        let mut response = self
2974            .client
2975            .sign_and_dispatch(request)
2976            .await
2977            .map_err(RusotoError::from)?;
2978        if response.status.as_u16() == 204 {
2979            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2980            let result = ::std::mem::drop(response);
2981
2982            Ok(result)
2983        } else {
2984            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2985            Err(TagResourceError::from_response(response))
2986        }
2987    }
2988
2989    /// <p>This operation removes one or more tags from a resource.</p>
2990    #[allow(unused_mut)]
2991    async fn untag_resource(
2992        &self,
2993        input: UntagResourceRequest,
2994    ) -> Result<(), RusotoError<UntagResourceError>> {
2995        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
2996
2997        let mut request = SignedRequest::new("DELETE", "dataexchange", &self.region, &request_uri);
2998        request.set_content_type("application/x-amz-json-1.1".to_owned());
2999
3000        let mut params = Params::new();
3001        for item in input.tag_keys.iter() {
3002            params.put("tagKeys", item);
3003        }
3004        request.set_params(params);
3005
3006        let mut response = self
3007            .client
3008            .sign_and_dispatch(request)
3009            .await
3010            .map_err(RusotoError::from)?;
3011        if response.status.as_u16() == 204 {
3012            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3013            let result = ::std::mem::drop(response);
3014
3015            Ok(result)
3016        } else {
3017            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3018            Err(UntagResourceError::from_response(response))
3019        }
3020    }
3021
3022    /// <p>This operation updates an asset.</p>
3023    #[allow(unused_mut)]
3024    async fn update_asset(
3025        &self,
3026        input: UpdateAssetRequest,
3027    ) -> Result<UpdateAssetResponse, RusotoError<UpdateAssetError>> {
3028        let request_uri = format!(
3029            "/v1/data-sets/{data_set_id}/revisions/{revision_id}/assets/{asset_id}",
3030            asset_id = input.asset_id,
3031            data_set_id = input.data_set_id,
3032            revision_id = input.revision_id
3033        );
3034
3035        let mut request = SignedRequest::new("PATCH", "dataexchange", &self.region, &request_uri);
3036        request.set_content_type("application/x-amz-json-1.1".to_owned());
3037
3038        let encoded = Some(serde_json::to_vec(&input).unwrap());
3039        request.set_payload(encoded);
3040
3041        let mut response = self
3042            .client
3043            .sign_and_dispatch(request)
3044            .await
3045            .map_err(RusotoError::from)?;
3046        if response.status.as_u16() == 200 {
3047            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3048            let result = proto::json::ResponsePayload::new(&response)
3049                .deserialize::<UpdateAssetResponse, _>()?;
3050
3051            Ok(result)
3052        } else {
3053            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3054            Err(UpdateAssetError::from_response(response))
3055        }
3056    }
3057
3058    /// <p>This operation updates a data set.</p>
3059    #[allow(unused_mut)]
3060    async fn update_data_set(
3061        &self,
3062        input: UpdateDataSetRequest,
3063    ) -> Result<UpdateDataSetResponse, RusotoError<UpdateDataSetError>> {
3064        let request_uri = format!(
3065            "/v1/data-sets/{data_set_id}",
3066            data_set_id = input.data_set_id
3067        );
3068
3069        let mut request = SignedRequest::new("PATCH", "dataexchange", &self.region, &request_uri);
3070        request.set_content_type("application/x-amz-json-1.1".to_owned());
3071
3072        let encoded = Some(serde_json::to_vec(&input).unwrap());
3073        request.set_payload(encoded);
3074
3075        let mut response = self
3076            .client
3077            .sign_and_dispatch(request)
3078            .await
3079            .map_err(RusotoError::from)?;
3080        if response.status.as_u16() == 200 {
3081            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3082            let result = proto::json::ResponsePayload::new(&response)
3083                .deserialize::<UpdateDataSetResponse, _>()?;
3084
3085            Ok(result)
3086        } else {
3087            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3088            Err(UpdateDataSetError::from_response(response))
3089        }
3090    }
3091
3092    /// <p>This operation updates a revision.</p>
3093    #[allow(unused_mut)]
3094    async fn update_revision(
3095        &self,
3096        input: UpdateRevisionRequest,
3097    ) -> Result<UpdateRevisionResponse, RusotoError<UpdateRevisionError>> {
3098        let request_uri = format!(
3099            "/v1/data-sets/{data_set_id}/revisions/{revision_id}",
3100            data_set_id = input.data_set_id,
3101            revision_id = input.revision_id
3102        );
3103
3104        let mut request = SignedRequest::new("PATCH", "dataexchange", &self.region, &request_uri);
3105        request.set_content_type("application/x-amz-json-1.1".to_owned());
3106
3107        let encoded = Some(serde_json::to_vec(&input).unwrap());
3108        request.set_payload(encoded);
3109
3110        let mut response = self
3111            .client
3112            .sign_and_dispatch(request)
3113            .await
3114            .map_err(RusotoError::from)?;
3115        if response.status.as_u16() == 200 {
3116            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3117            let result = proto::json::ResponsePayload::new(&response)
3118                .deserialize::<UpdateRevisionResponse, _>()?;
3119
3120            Ok(result)
3121        } else {
3122            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3123            Err(UpdateRevisionError::from_response(response))
3124        }
3125    }
3126}