rusoto_snowball/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl SnowballClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "snowball", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53/// <p>The address that you want the Snowball or Snowballs associated with a specific job to be shipped to. Addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. Although no individual elements of the <code>Address</code> are required, if the address is invalid or unsupported, then an exception is thrown.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
55pub struct Address {
56    /// <p>The unique ID for an address.</p>
57    #[serde(rename = "AddressId")]
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub address_id: Option<String>,
60    /// <p>The city in an address that a Snowball is to be delivered to.</p>
61    #[serde(rename = "City")]
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub city: Option<String>,
64    /// <p>The name of the company to receive a Snowball at an address.</p>
65    #[serde(rename = "Company")]
66    #[serde(skip_serializing_if = "Option::is_none")]
67    pub company: Option<String>,
68    /// <p>The country in an address that a Snowball is to be delivered to.</p>
69    #[serde(rename = "Country")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub country: Option<String>,
72    /// <p>If the address you are creating is a primary address, then set this option to true. This field is not supported in most regions.</p>
73    #[serde(rename = "IsRestricted")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub is_restricted: Option<bool>,
76    /// <p>This field is no longer used and the value is ignored.</p>
77    #[serde(rename = "Landmark")]
78    #[serde(skip_serializing_if = "Option::is_none")]
79    pub landmark: Option<String>,
80    /// <p>The name of a person to receive a Snowball at an address.</p>
81    #[serde(rename = "Name")]
82    #[serde(skip_serializing_if = "Option::is_none")]
83    pub name: Option<String>,
84    /// <p>The phone number associated with an address that a Snowball is to be delivered to.</p>
85    #[serde(rename = "PhoneNumber")]
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub phone_number: Option<String>,
88    /// <p>The postal code in an address that a Snowball is to be delivered to.</p>
89    #[serde(rename = "PostalCode")]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    pub postal_code: Option<String>,
92    /// <p>This field is no longer used and the value is ignored.</p>
93    #[serde(rename = "PrefectureOrDistrict")]
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub prefecture_or_district: Option<String>,
96    /// <p>The state or province in an address that a Snowball is to be delivered to.</p>
97    #[serde(rename = "StateOrProvince")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub state_or_province: Option<String>,
100    /// <p>The first line in a street address that a Snowball is to be delivered to.</p>
101    #[serde(rename = "Street1")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub street_1: Option<String>,
104    /// <p>The second line in a street address that a Snowball is to be delivered to.</p>
105    #[serde(rename = "Street2")]
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub street_2: Option<String>,
108    /// <p>The third line in a street address that a Snowball is to be delivered to.</p>
109    #[serde(rename = "Street3")]
110    #[serde(skip_serializing_if = "Option::is_none")]
111    pub street_3: Option<String>,
112}
113
114#[derive(Clone, Debug, Default, PartialEq, Serialize)]
115#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
116pub struct CancelClusterRequest {
117    /// <p>The 39-character ID for the cluster that you want to cancel, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
118    #[serde(rename = "ClusterId")]
119    pub cluster_id: String,
120}
121
122#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
123#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
124pub struct CancelClusterResult {}
125
126#[derive(Clone, Debug, Default, PartialEq, Serialize)]
127#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
128pub struct CancelJobRequest {
129    /// <p>The 39-character job ID for the job that you want to cancel, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
130    #[serde(rename = "JobId")]
131    pub job_id: String,
132}
133
134#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
135#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
136pub struct CancelJobResult {}
137
138/// <p>Contains a cluster's state, a cluster's ID, and other important information.</p>
139#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
140#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
141pub struct ClusterListEntry {
142    /// <p>The 39-character ID for the cluster that you want to list, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
143    #[serde(rename = "ClusterId")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub cluster_id: Option<String>,
146    /// <p>The current state of this cluster. For information about the state of a specific node, see <a>JobListEntry$JobState</a>.</p>
147    #[serde(rename = "ClusterState")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub cluster_state: Option<String>,
150    /// <p>The creation date for this cluster.</p>
151    #[serde(rename = "CreationDate")]
152    #[serde(skip_serializing_if = "Option::is_none")]
153    pub creation_date: Option<f64>,
154    /// <p>Defines an optional description of the cluster, for example <code>Environmental Data Cluster-01</code>.</p>
155    #[serde(rename = "Description")]
156    #[serde(skip_serializing_if = "Option::is_none")]
157    pub description: Option<String>,
158}
159
160/// <p>Contains metadata about a specific cluster.</p>
161#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
162#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
163pub struct ClusterMetadata {
164    /// <p>The automatically generated ID for a specific address.</p>
165    #[serde(rename = "AddressId")]
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub address_id: Option<String>,
168    /// <p>The automatically generated ID for a cluster.</p>
169    #[serde(rename = "ClusterId")]
170    #[serde(skip_serializing_if = "Option::is_none")]
171    pub cluster_id: Option<String>,
172    /// <p>The current status of the cluster.</p>
173    #[serde(rename = "ClusterState")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub cluster_state: Option<String>,
176    /// <p>The creation date for this cluster.</p>
177    #[serde(rename = "CreationDate")]
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub creation_date: Option<f64>,
180    /// <p>The optional description of the cluster.</p>
181    #[serde(rename = "Description")]
182    #[serde(skip_serializing_if = "Option::is_none")]
183    pub description: Option<String>,
184    /// <p>The ID of the address that you want a cluster shipped to, after it will be shipped to its primary address. This field is not supported in most regions.</p>
185    #[serde(rename = "ForwardingAddressId")]
186    #[serde(skip_serializing_if = "Option::is_none")]
187    pub forwarding_address_id: Option<String>,
188    /// <p>The type of job for this cluster. Currently, the only job type supported for clusters is <code>LOCAL_USE</code>.</p>
189    #[serde(rename = "JobType")]
190    #[serde(skip_serializing_if = "Option::is_none")]
191    pub job_type: Option<String>,
192    /// <p>The <code>KmsKeyARN</code> Amazon Resource Name (ARN) associated with this cluster. This ARN was created using the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html">CreateKey</a> API action in AWS Key Management Service (AWS KMS).</p>
193    #[serde(rename = "KmsKeyARN")]
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub kms_key_arn: Option<String>,
196    /// <p>The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.</p>
197    #[serde(rename = "Notification")]
198    #[serde(skip_serializing_if = "Option::is_none")]
199    pub notification: Option<Notification>,
200    /// <p>The arrays of <a>JobResource</a> objects that can include updated <a>S3Resource</a> objects or <a>LambdaResource</a> objects.</p>
201    #[serde(rename = "Resources")]
202    #[serde(skip_serializing_if = "Option::is_none")]
203    pub resources: Option<JobResource>,
204    /// <p>The role ARN associated with this cluster. This ARN was created using the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in AWS Identity and Access Management (IAM).</p>
205    #[serde(rename = "RoleARN")]
206    #[serde(skip_serializing_if = "Option::is_none")]
207    pub role_arn: Option<String>,
208    /// <p><p>The shipping speed for each node in this cluster. This speed doesn&#39;t dictate how soon you&#39;ll get each Snowball Edge device, rather it represents how quickly each device moves to its destination while in transit. Regional shipping speeds are as follows:</p> <ul> <li> <p>In Australia, you have access to express shipping. Typically, devices shipped express are delivered in about a day.</p> </li> <li> <p>In the European Union (EU), you have access to express shipping. Typically, Snowball Edges shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.</p> </li> <li> <p>In India, Snowball Edges are delivered in one to seven days.</p> </li> <li> <p>In the US, you have access to one-day shipping and two-day shipping.</p> </li> </ul></p>
209    #[serde(rename = "ShippingOption")]
210    #[serde(skip_serializing_if = "Option::is_none")]
211    pub shipping_option: Option<String>,
212    /// <p><p>The type of AWS Snowball device to use for this cluster. </p> <note> <p>For cluster jobs, AWS Snowball currently supports only the <code>EDGE</code> device type.</p> </note></p>
213    #[serde(rename = "SnowballType")]
214    #[serde(skip_serializing_if = "Option::is_none")]
215    pub snowball_type: Option<String>,
216    /// <p>The tax documents required in your AWS Region.</p>
217    #[serde(rename = "TaxDocuments")]
218    #[serde(skip_serializing_if = "Option::is_none")]
219    pub tax_documents: Option<TaxDocuments>,
220}
221
222/// <p>A JSON-formatted object that describes a compatible Amazon Machine Image (AMI), including the ID and name for a Snowball Edge AMI. This AMI is compatible with the device's physical hardware requirements, and it should be able to be run in an SBE1 instance on the device.</p>
223#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
224#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
225pub struct CompatibleImage {
226    /// <p>The unique identifier for an individual Snowball Edge AMI.</p>
227    #[serde(rename = "AmiId")]
228    #[serde(skip_serializing_if = "Option::is_none")]
229    pub ami_id: Option<String>,
230    /// <p>The optional name of a compatible image.</p>
231    #[serde(rename = "Name")]
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub name: Option<String>,
234}
235
236#[derive(Clone, Debug, Default, PartialEq, Serialize)]
237#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
238pub struct CreateAddressRequest {
239    /// <p>The address that you want the Snowball shipped to.</p>
240    #[serde(rename = "Address")]
241    pub address: Address,
242}
243
244#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
245#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
246pub struct CreateAddressResult {
247    /// <p>The automatically generated ID for a specific address. You'll use this ID when you create a job to specify which address you want the Snowball for that job shipped to.</p>
248    #[serde(rename = "AddressId")]
249    #[serde(skip_serializing_if = "Option::is_none")]
250    pub address_id: Option<String>,
251}
252
253#[derive(Clone, Debug, Default, PartialEq, Serialize)]
254#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
255pub struct CreateClusterRequest {
256    /// <p>The ID for the address that you want the cluster shipped to.</p>
257    #[serde(rename = "AddressId")]
258    pub address_id: String,
259    /// <p>An optional description of this specific cluster, for example <code>Environmental Data Cluster-01</code>.</p>
260    #[serde(rename = "Description")]
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub description: Option<String>,
263    /// <p>The forwarding address ID for a cluster. This field is not supported in most regions.</p>
264    #[serde(rename = "ForwardingAddressId")]
265    #[serde(skip_serializing_if = "Option::is_none")]
266    pub forwarding_address_id: Option<String>,
267    /// <p>The type of job for this cluster. Currently, the only job type supported for clusters is <code>LOCAL_USE</code>.</p>
268    #[serde(rename = "JobType")]
269    pub job_type: String,
270    /// <p>The <code>KmsKeyARN</code> value that you want to associate with this cluster. <code>KmsKeyARN</code> values are created by using the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html">CreateKey</a> API action in AWS Key Management Service (AWS KMS). </p>
271    #[serde(rename = "KmsKeyARN")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub kms_key_arn: Option<String>,
274    /// <p>The Amazon Simple Notification Service (Amazon SNS) notification settings for this cluster.</p>
275    #[serde(rename = "Notification")]
276    #[serde(skip_serializing_if = "Option::is_none")]
277    pub notification: Option<Notification>,
278    /// <p>The resources associated with the cluster job. These resources include Amazon S3 buckets and optional AWS Lambda functions written in the Python language. </p>
279    #[serde(rename = "Resources")]
280    pub resources: JobResource,
281    /// <p>The <code>RoleARN</code> that you want to associate with this cluster. <code>RoleArn</code> values are created by using the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in AWS Identity and Access Management (IAM).</p>
282    #[serde(rename = "RoleARN")]
283    pub role_arn: String,
284    /// <p><p>The shipping speed for each node in this cluster. This speed doesn&#39;t dictate how soon you&#39;ll get each Snowball Edge device, rather it represents how quickly each device moves to its destination while in transit. Regional shipping speeds are as follows: </p> <ul> <li> <p>In Australia, you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day.</p> </li> <li> <p>In the European Union (EU), you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.</p> </li> <li> <p>In India, Snowballs are delivered in one to seven days.</p> </li> <li> <p>In the United States of America (US), you have access to one-day shipping and two-day shipping.</p> </li> </ul> <ul> <li> <p>In Australia, you have access to express shipping. Typically, devices shipped express are delivered in about a day.</p> </li> <li> <p>In the European Union (EU), you have access to express shipping. Typically, Snowball Edges shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.</p> </li> <li> <p>In India, Snowball Edges are delivered in one to seven days.</p> </li> <li> <p>In the US, you have access to one-day shipping and two-day shipping.</p> </li> </ul></p>
285    #[serde(rename = "ShippingOption")]
286    pub shipping_option: String,
287    /// <p><p>The type of AWS Snowball device to use for this cluster. </p> <note> <p>For cluster jobs, AWS Snowball currently supports only the <code>EDGE</code> device type.</p> </note></p>
288    #[serde(rename = "SnowballType")]
289    #[serde(skip_serializing_if = "Option::is_none")]
290    pub snowball_type: Option<String>,
291    /// <p>The tax documents required in your AWS Region.</p>
292    #[serde(rename = "TaxDocuments")]
293    #[serde(skip_serializing_if = "Option::is_none")]
294    pub tax_documents: Option<TaxDocuments>,
295}
296
297#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
298#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
299pub struct CreateClusterResult {
300    /// <p>The automatically generated ID for a cluster.</p>
301    #[serde(rename = "ClusterId")]
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub cluster_id: Option<String>,
304}
305
306#[derive(Clone, Debug, Default, PartialEq, Serialize)]
307#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
308pub struct CreateJobRequest {
309    /// <p>The ID for the address that you want the Snowball shipped to.</p>
310    #[serde(rename = "AddressId")]
311    #[serde(skip_serializing_if = "Option::is_none")]
312    pub address_id: Option<String>,
313    /// <p>The ID of a cluster. If you're creating a job for a node in a cluster, you need to provide only this <code>clusterId</code> value. The other job attributes are inherited from the cluster.</p>
314    #[serde(rename = "ClusterId")]
315    #[serde(skip_serializing_if = "Option::is_none")]
316    pub cluster_id: Option<String>,
317    /// <p>Defines an optional description of this specific job, for example <code>Important Photos 2016-08-11</code>.</p>
318    #[serde(rename = "Description")]
319    #[serde(skip_serializing_if = "Option::is_none")]
320    pub description: Option<String>,
321    /// <p>Defines the device configuration for an AWS Snowcone job.</p>
322    #[serde(rename = "DeviceConfiguration")]
323    #[serde(skip_serializing_if = "Option::is_none")]
324    pub device_configuration: Option<DeviceConfiguration>,
325    /// <p>The forwarding address ID for a job. This field is not supported in most regions.</p>
326    #[serde(rename = "ForwardingAddressId")]
327    #[serde(skip_serializing_if = "Option::is_none")]
328    pub forwarding_address_id: Option<String>,
329    /// <p>Defines the type of job that you're creating. </p>
330    #[serde(rename = "JobType")]
331    #[serde(skip_serializing_if = "Option::is_none")]
332    pub job_type: Option<String>,
333    /// <p>The <code>KmsKeyARN</code> that you want to associate with this job. <code>KmsKeyARN</code>s are created using the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html">CreateKey</a> AWS Key Management Service (KMS) API action.</p>
334    #[serde(rename = "KmsKeyARN")]
335    #[serde(skip_serializing_if = "Option::is_none")]
336    pub kms_key_arn: Option<String>,
337    /// <p>Defines the Amazon Simple Notification Service (Amazon SNS) notification settings for this job.</p>
338    #[serde(rename = "Notification")]
339    #[serde(skip_serializing_if = "Option::is_none")]
340    pub notification: Option<Notification>,
341    /// <p>Defines the Amazon S3 buckets associated with this job.</p> <p>With <code>IMPORT</code> jobs, you specify the bucket or buckets that your transferred data will be imported into.</p> <p>With <code>EXPORT</code> jobs, you specify the bucket or buckets that your transferred data will be exported from. Optionally, you can also specify a <code>KeyRange</code> value. If you choose to export a range, you define the length of the range by providing either an inclusive <code>BeginMarker</code> value, an inclusive <code>EndMarker</code> value, or both. Ranges are UTF-8 binary sorted.</p>
342    #[serde(rename = "Resources")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub resources: Option<JobResource>,
345    /// <p>The <code>RoleARN</code> that you want to associate with this job. <code>RoleArn</code>s are created using the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> AWS Identity and Access Management (IAM) API action.</p>
346    #[serde(rename = "RoleARN")]
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub role_arn: Option<String>,
349    /// <p><p>The shipping speed for this job. This speed doesn&#39;t dictate how soon you&#39;ll get the Snowball, rather it represents how quickly the Snowball moves to its destination while in transit. Regional shipping speeds are as follows:</p> <ul> <li> <p>In Australia, you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day.</p> </li> <li> <p>In the European Union (EU), you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.</p> </li> <li> <p>In India, Snowballs are delivered in one to seven days.</p> </li> <li> <p>In the US, you have access to one-day shipping and two-day shipping.</p> </li> </ul></p>
350    #[serde(rename = "ShippingOption")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub shipping_option: Option<String>,
353    /// <p>If your job is being created in one of the US regions, you have the option of specifying what size Snowball you'd like for this job. In all other regions, Snowballs come with 80 TB in storage capacity.</p>
354    #[serde(rename = "SnowballCapacityPreference")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub snowball_capacity_preference: Option<String>,
357    /// <p>The type of AWS Snowball device to use for this job. </p> <note> <p>For cluster jobs, AWS Snowball currently supports only the <code>EDGE</code> device type.</p> </note> <p>The type of AWS Snowball device to use for this job. Currently, the only supported device type for cluster jobs is <code>EDGE</code>.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/snowball/latest/developer-guide/device-differences.html">Snowball Edge Device Options</a> in the Snowball Edge Developer Guide.</p>
358    #[serde(rename = "SnowballType")]
359    #[serde(skip_serializing_if = "Option::is_none")]
360    pub snowball_type: Option<String>,
361    /// <p>The tax documents required in your AWS Region.</p>
362    #[serde(rename = "TaxDocuments")]
363    #[serde(skip_serializing_if = "Option::is_none")]
364    pub tax_documents: Option<TaxDocuments>,
365}
366
367#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
368#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
369pub struct CreateJobResult {
370    /// <p>The automatically generated ID for a job, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
371    #[serde(rename = "JobId")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub job_id: Option<String>,
374}
375
376/// <p>Defines the real-time status of a Snowball's data transfer while the device is at AWS. This data is only available while a job has a <code>JobState</code> value of <code>InProgress</code>, for both import and export jobs.</p>
377#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
378#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
379pub struct DataTransfer {
380    /// <p>The number of bytes transferred between a Snowball and Amazon S3.</p>
381    #[serde(rename = "BytesTransferred")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub bytes_transferred: Option<i64>,
384    /// <p>The number of objects transferred between a Snowball and Amazon S3.</p>
385    #[serde(rename = "ObjectsTransferred")]
386    #[serde(skip_serializing_if = "Option::is_none")]
387    pub objects_transferred: Option<i64>,
388    /// <p>The total bytes of data for a transfer between a Snowball and Amazon S3. This value is set to 0 (zero) until all the keys that will be transferred have been listed.</p>
389    #[serde(rename = "TotalBytes")]
390    #[serde(skip_serializing_if = "Option::is_none")]
391    pub total_bytes: Option<i64>,
392    /// <p>The total number of objects for a transfer between a Snowball and Amazon S3. This value is set to 0 (zero) until all the keys that will be transferred have been listed.</p>
393    #[serde(rename = "TotalObjects")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub total_objects: Option<i64>,
396}
397
398#[derive(Clone, Debug, Default, PartialEq, Serialize)]
399#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
400pub struct DescribeAddressRequest {
401    /// <p>The automatically generated ID for a specific address.</p>
402    #[serde(rename = "AddressId")]
403    pub address_id: String,
404}
405
406#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
407#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
408pub struct DescribeAddressResult {
409    /// <p>The address that you want the Snowball or Snowballs associated with a specific job to be shipped to.</p>
410    #[serde(rename = "Address")]
411    #[serde(skip_serializing_if = "Option::is_none")]
412    pub address: Option<Address>,
413}
414
415#[derive(Clone, Debug, Default, PartialEq, Serialize)]
416#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
417pub struct DescribeAddressesRequest {
418    /// <p>The number of <code>ADDRESS</code> objects to return.</p>
419    #[serde(rename = "MaxResults")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub max_results: Option<i64>,
422    /// <p>HTTP requests are stateless. To identify what object comes "next" in the list of <code>ADDRESS</code> objects, you have the option of specifying a value for <code>NextToken</code> as the starting point for your list of returned addresses.</p>
423    #[serde(rename = "NextToken")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub next_token: Option<String>,
426}
427
428#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
429#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
430pub struct DescribeAddressesResult {
431    /// <p>The Snowball shipping addresses that were created for this account.</p>
432    #[serde(rename = "Addresses")]
433    #[serde(skip_serializing_if = "Option::is_none")]
434    pub addresses: Option<Vec<Address>>,
435    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>DescribeAddresses</code> call, your list of returned addresses will start from this point in the array.</p>
436    #[serde(rename = "NextToken")]
437    #[serde(skip_serializing_if = "Option::is_none")]
438    pub next_token: Option<String>,
439}
440
441#[derive(Clone, Debug, Default, PartialEq, Serialize)]
442#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
443pub struct DescribeClusterRequest {
444    /// <p>The automatically generated ID for a cluster.</p>
445    #[serde(rename = "ClusterId")]
446    pub cluster_id: String,
447}
448
449#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
450#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
451pub struct DescribeClusterResult {
452    /// <p>Information about a specific cluster, including shipping information, cluster status, and other important metadata.</p>
453    #[serde(rename = "ClusterMetadata")]
454    #[serde(skip_serializing_if = "Option::is_none")]
455    pub cluster_metadata: Option<ClusterMetadata>,
456}
457
458#[derive(Clone, Debug, Default, PartialEq, Serialize)]
459#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
460pub struct DescribeJobRequest {
461    /// <p>The automatically generated ID for a job, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
462    #[serde(rename = "JobId")]
463    pub job_id: String,
464}
465
466#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
467#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
468pub struct DescribeJobResult {
469    /// <p>Information about a specific job, including shipping information, job status, and other important metadata.</p>
470    #[serde(rename = "JobMetadata")]
471    #[serde(skip_serializing_if = "Option::is_none")]
472    pub job_metadata: Option<JobMetadata>,
473    /// <p>Information about a specific job part (in the case of an export job), including shipping information, job status, and other important metadata.</p>
474    #[serde(rename = "SubJobMetadata")]
475    #[serde(skip_serializing_if = "Option::is_none")]
476    pub sub_job_metadata: Option<Vec<JobMetadata>>,
477}
478
479/// <p>The container for <code>SnowconeDeviceConfiguration</code>. </p>
480#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
481pub struct DeviceConfiguration {
482    /// <p>Returns information about the device configuration for an AWS Snowcone job.</p>
483    #[serde(rename = "SnowconeDeviceConfiguration")]
484    #[serde(skip_serializing_if = "Option::is_none")]
485    pub snowcone_device_configuration: Option<SnowconeDeviceConfiguration>,
486}
487
488/// <p>A JSON-formatted object that contains the IDs for an Amazon Machine Image (AMI), including the Amazon EC2 AMI ID and the Snowball Edge AMI ID. Each AMI has these two IDs to simplify identifying the AMI in both the AWS Cloud and on the device.</p>
489#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
490pub struct Ec2AmiResource {
491    /// <p>The ID of the AMI in Amazon EC2.</p>
492    #[serde(rename = "AmiId")]
493    pub ami_id: String,
494    /// <p>The ID of the AMI on the Snowball Edge device.</p>
495    #[serde(rename = "SnowballAmiId")]
496    #[serde(skip_serializing_if = "Option::is_none")]
497    pub snowball_ami_id: Option<String>,
498}
499
500/// <p>The container for the <a>EventTriggerDefinition$EventResourceARN</a>.</p>
501#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
502pub struct EventTriggerDefinition {
503    /// <p>The Amazon Resource Name (ARN) for any local Amazon S3 resource that is an AWS Lambda function's event trigger associated with this job.</p>
504    #[serde(rename = "EventResourceARN")]
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub event_resource_arn: Option<String>,
507}
508
509#[derive(Clone, Debug, Default, PartialEq, Serialize)]
510#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
511pub struct GetJobManifestRequest {
512    /// <p>The ID for a job that you want to get the manifest file for, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
513    #[serde(rename = "JobId")]
514    pub job_id: String,
515}
516
517#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
518#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
519pub struct GetJobManifestResult {
520    /// <p>The Amazon S3 presigned URL for the manifest file associated with the specified <code>JobId</code> value.</p>
521    #[serde(rename = "ManifestURI")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub manifest_uri: Option<String>,
524}
525
526#[derive(Clone, Debug, Default, PartialEq, Serialize)]
527#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
528pub struct GetJobUnlockCodeRequest {
529    /// <p>The ID for the job that you want to get the <code>UnlockCode</code> value for, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
530    #[serde(rename = "JobId")]
531    pub job_id: String,
532}
533
534#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
535#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
536pub struct GetJobUnlockCodeResult {
537    /// <p>The <code>UnlockCode</code> value for the specified job. The <code>UnlockCode</code> value can be accessed for up to 90 days after the job has been created.</p>
538    #[serde(rename = "UnlockCode")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub unlock_code: Option<String>,
541}
542
543#[derive(Clone, Debug, Default, PartialEq, Serialize)]
544#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
545pub struct GetSnowballUsageRequest {}
546
547#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
548#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
549pub struct GetSnowballUsageResult {
550    /// <p>The service limit for number of Snowballs this account can have at once. The default service limit is 1 (one).</p>
551    #[serde(rename = "SnowballLimit")]
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub snowball_limit: Option<i64>,
554    /// <p>The number of Snowballs that this account is currently using.</p>
555    #[serde(rename = "SnowballsInUse")]
556    #[serde(skip_serializing_if = "Option::is_none")]
557    pub snowballs_in_use: Option<i64>,
558}
559
560#[derive(Clone, Debug, Default, PartialEq, Serialize)]
561#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
562pub struct GetSoftwareUpdatesRequest {
563    /// <p>The ID for a job that you want to get the software update file for, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
564    #[serde(rename = "JobId")]
565    pub job_id: String,
566}
567
568#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
569#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
570pub struct GetSoftwareUpdatesResult {
571    /// <p>The Amazon S3 presigned URL for the update file associated with the specified <code>JobId</code> value. The software update will be available for 2 days after this request is made. To access an update after the 2 days have passed, you'll have to make another call to <code>GetSoftwareUpdates</code>.</p>
572    #[serde(rename = "UpdatesURI")]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub updates_uri: Option<String>,
575}
576
577/// <p>The tax documents required in AWS Regions in India.</p>
578#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
579pub struct INDTaxDocuments {
580    /// <p>The Goods and Services Tax (GST) documents required in AWS Regions in India.</p>
581    #[serde(rename = "GSTIN")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub gstin: Option<String>,
584}
585
586/// <p>Each <code>JobListEntry</code> object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of an export job.</p>
587#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
588#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
589pub struct JobListEntry {
590    /// <p>The creation date for this job.</p>
591    #[serde(rename = "CreationDate")]
592    #[serde(skip_serializing_if = "Option::is_none")]
593    pub creation_date: Option<f64>,
594    /// <p>The optional description of this specific job, for example <code>Important Photos 2016-08-11</code>.</p>
595    #[serde(rename = "Description")]
596    #[serde(skip_serializing_if = "Option::is_none")]
597    pub description: Option<String>,
598    /// <p>A value that indicates that this job is a master job. A master job represents a successful request to create an export job. Master jobs aren't associated with any Snowballs. Instead, each master job will have at least one job part, and each job part is associated with a Snowball. It might take some time before the job parts associated with a particular master job are listed, because they are created after the master job is created.</p>
599    #[serde(rename = "IsMaster")]
600    #[serde(skip_serializing_if = "Option::is_none")]
601    pub is_master: Option<bool>,
602    /// <p>The automatically generated ID for a job, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
603    #[serde(rename = "JobId")]
604    #[serde(skip_serializing_if = "Option::is_none")]
605    pub job_id: Option<String>,
606    /// <p>The current state of this job.</p>
607    #[serde(rename = "JobState")]
608    #[serde(skip_serializing_if = "Option::is_none")]
609    pub job_state: Option<String>,
610    /// <p>The type of job.</p>
611    #[serde(rename = "JobType")]
612    #[serde(skip_serializing_if = "Option::is_none")]
613    pub job_type: Option<String>,
614    /// <p>The type of device used with this job.</p>
615    #[serde(rename = "SnowballType")]
616    #[serde(skip_serializing_if = "Option::is_none")]
617    pub snowball_type: Option<String>,
618}
619
620/// <p>Contains job logs. Whenever Snowball is used to import data into or export data out of Amazon S3, you'll have the option of downloading a PDF job report. Job logs are returned as a part of the response syntax of the <code>DescribeJob</code> action in the <code>JobMetadata</code> data type. The job logs can be accessed for up to 60 minutes after this request has been made. To access any of the job logs after 60 minutes have passed, you'll have to make another call to the <code>DescribeJob</code> action.</p> <p>For import jobs, the PDF job report becomes available at the end of the import process. For export jobs, your job report typically becomes available while the Snowball for your job part is being delivered to you.</p> <p>The job report provides you insight into the state of your Amazon S3 data transfer. The report includes details about your job or job part for your records.</p> <p>For deeper visibility into the status of your transferred objects, you can look at the two associated logs: a success log and a failure log. The logs are saved in comma-separated value (CSV) format, and the name of each log includes the ID of the job or job part that the log describes.</p>
621#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
622#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
623pub struct JobLogs {
624    /// <p>A link to an Amazon S3 presigned URL where the job completion report is located.</p>
625    #[serde(rename = "JobCompletionReportURI")]
626    #[serde(skip_serializing_if = "Option::is_none")]
627    pub job_completion_report_uri: Option<String>,
628    /// <p>A link to an Amazon S3 presigned URL where the job failure log is located.</p>
629    #[serde(rename = "JobFailureLogURI")]
630    #[serde(skip_serializing_if = "Option::is_none")]
631    pub job_failure_log_uri: Option<String>,
632    /// <p>A link to an Amazon S3 presigned URL where the job success log is located.</p>
633    #[serde(rename = "JobSuccessLogURI")]
634    #[serde(skip_serializing_if = "Option::is_none")]
635    pub job_success_log_uri: Option<String>,
636}
637
638/// <p>Contains information about a specific job including shipping information, job status, and other important metadata. This information is returned as a part of the response syntax of the <code>DescribeJob</code> action.</p>
639#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
640#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
641pub struct JobMetadata {
642    /// <p>The ID for the address that you want the Snowball shipped to.</p>
643    #[serde(rename = "AddressId")]
644    #[serde(skip_serializing_if = "Option::is_none")]
645    pub address_id: Option<String>,
646    /// <p>The 39-character ID for the cluster, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
647    #[serde(rename = "ClusterId")]
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub cluster_id: Option<String>,
650    /// <p>The creation date for this job.</p>
651    #[serde(rename = "CreationDate")]
652    #[serde(skip_serializing_if = "Option::is_none")]
653    pub creation_date: Option<f64>,
654    /// <p>A value that defines the real-time status of a Snowball's data transfer while the device is at AWS. This data is only available while a job has a <code>JobState</code> value of <code>InProgress</code>, for both import and export jobs.</p>
655    #[serde(rename = "DataTransferProgress")]
656    #[serde(skip_serializing_if = "Option::is_none")]
657    pub data_transfer_progress: Option<DataTransfer>,
658    /// <p>The description of the job, provided at job creation.</p>
659    #[serde(rename = "Description")]
660    #[serde(skip_serializing_if = "Option::is_none")]
661    pub description: Option<String>,
662    #[serde(rename = "DeviceConfiguration")]
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub device_configuration: Option<DeviceConfiguration>,
665    /// <p>The ID of the address that you want a job shipped to, after it will be shipped to its primary address. This field is not supported in most regions.</p>
666    #[serde(rename = "ForwardingAddressId")]
667    #[serde(skip_serializing_if = "Option::is_none")]
668    pub forwarding_address_id: Option<String>,
669    /// <p>The automatically generated ID for a job, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
670    #[serde(rename = "JobId")]
671    #[serde(skip_serializing_if = "Option::is_none")]
672    pub job_id: Option<String>,
673    /// <p>Links to Amazon S3 presigned URLs for the job report and logs. For import jobs, the PDF job report becomes available at the end of the import process. For export jobs, your job report typically becomes available while the Snowball for your job part is being delivered to you.</p>
674    #[serde(rename = "JobLogInfo")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub job_log_info: Option<JobLogs>,
677    /// <p>The current status of the jobs.</p>
678    #[serde(rename = "JobState")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub job_state: Option<String>,
681    /// <p>The type of job.</p>
682    #[serde(rename = "JobType")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub job_type: Option<String>,
685    /// <p>The Amazon Resource Name (ARN) for the AWS Key Management Service (AWS KMS) key associated with this job. This ARN was created using the <a href="https://docs.aws.amazon.com/kms/latest/APIReference/API_CreateKey.html">CreateKey</a> API action in AWS KMS.</p>
686    #[serde(rename = "KmsKeyARN")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub kms_key_arn: Option<String>,
689    /// <p>The Amazon Simple Notification Service (Amazon SNS) notification settings associated with a specific job. The <code>Notification</code> object is returned as a part of the response syntax of the <code>DescribeJob</code> action in the <code>JobMetadata</code> data type.</p>
690    #[serde(rename = "Notification")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub notification: Option<Notification>,
693    /// <p>An array of <code>S3Resource</code> objects. Each <code>S3Resource</code> object represents an Amazon S3 bucket that your transferred data will be exported from or imported into.</p>
694    #[serde(rename = "Resources")]
695    #[serde(skip_serializing_if = "Option::is_none")]
696    pub resources: Option<JobResource>,
697    /// <p>The role ARN associated with this job. This ARN was created using the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in AWS Identity and Access Management (IAM).</p>
698    #[serde(rename = "RoleARN")]
699    #[serde(skip_serializing_if = "Option::is_none")]
700    pub role_arn: Option<String>,
701    /// <p>A job's shipping information, including inbound and outbound tracking numbers and shipping speed options.</p>
702    #[serde(rename = "ShippingDetails")]
703    #[serde(skip_serializing_if = "Option::is_none")]
704    pub shipping_details: Option<ShippingDetails>,
705    /// <p>The Snowball capacity preference for this job, specified at job creation. In US regions, you can choose between 50 TB and 80 TB Snowballs. All other regions use 80 TB capacity Snowballs.</p>
706    #[serde(rename = "SnowballCapacityPreference")]
707    #[serde(skip_serializing_if = "Option::is_none")]
708    pub snowball_capacity_preference: Option<String>,
709    /// <p>The type of device used with this job.</p>
710    #[serde(rename = "SnowballType")]
711    #[serde(skip_serializing_if = "Option::is_none")]
712    pub snowball_type: Option<String>,
713    /// <p>The metadata associated with the tax documents required in your AWS Region.</p>
714    #[serde(rename = "TaxDocuments")]
715    #[serde(skip_serializing_if = "Option::is_none")]
716    pub tax_documents: Option<TaxDocuments>,
717}
718
719/// <p>Contains an array of AWS resource objects. Each object represents an Amazon S3 bucket, an AWS Lambda function, or an Amazon Machine Image (AMI) based on Amazon EC2 that is associated with a particular job.</p>
720#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
721pub struct JobResource {
722    /// <p>The Amazon Machine Images (AMIs) associated with this job.</p>
723    #[serde(rename = "Ec2AmiResources")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub ec_2_ami_resources: Option<Vec<Ec2AmiResource>>,
726    /// <p>The Python-language Lambda functions for this job.</p>
727    #[serde(rename = "LambdaResources")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub lambda_resources: Option<Vec<LambdaResource>>,
730    /// <p>An array of <code>S3Resource</code> objects.</p>
731    #[serde(rename = "S3Resources")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub s3_resources: Option<Vec<S3Resource>>,
734}
735
736/// <p>Contains a key range. For export jobs, a <code>S3Resource</code> object can have an optional <code>KeyRange</code> value. The length of the range is defined at job creation, and has either an inclusive <code>BeginMarker</code>, an inclusive <code>EndMarker</code>, or both. Ranges are UTF-8 binary sorted.</p>
737#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
738pub struct KeyRange {
739    /// <p>The key that starts an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.</p>
740    #[serde(rename = "BeginMarker")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    pub begin_marker: Option<String>,
743    /// <p>The key that ends an optional key range for an export job. Ranges are inclusive and UTF-8 binary sorted.</p>
744    #[serde(rename = "EndMarker")]
745    #[serde(skip_serializing_if = "Option::is_none")]
746    pub end_marker: Option<String>,
747}
748
749/// <p>Identifies </p>
750#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
751pub struct LambdaResource {
752    /// <p>The array of ARNs for <a>S3Resource</a> objects to trigger the <a>LambdaResource</a> objects associated with this job.</p>
753    #[serde(rename = "EventTriggers")]
754    #[serde(skip_serializing_if = "Option::is_none")]
755    pub event_triggers: Option<Vec<EventTriggerDefinition>>,
756    /// <p>An Amazon Resource Name (ARN) that represents an AWS Lambda function to be triggered by PUT object actions on the associated local Amazon S3 resource.</p>
757    #[serde(rename = "LambdaArn")]
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub lambda_arn: Option<String>,
760}
761
762#[derive(Clone, Debug, Default, PartialEq, Serialize)]
763#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
764pub struct ListClusterJobsRequest {
765    /// <p>The 39-character ID for the cluster that you want to list, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
766    #[serde(rename = "ClusterId")]
767    pub cluster_id: String,
768    /// <p>The number of <code>JobListEntry</code> objects to return.</p>
769    #[serde(rename = "MaxResults")]
770    #[serde(skip_serializing_if = "Option::is_none")]
771    pub max_results: Option<i64>,
772    /// <p>HTTP requests are stateless. To identify what object comes "next" in the list of <code>JobListEntry</code> objects, you have the option of specifying <code>NextToken</code> as the starting point for your returned list.</p>
773    #[serde(rename = "NextToken")]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub next_token: Option<String>,
776}
777
778#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
779#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
780pub struct ListClusterJobsResult {
781    /// <p>Each <code>JobListEntry</code> object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. </p>
782    #[serde(rename = "JobListEntries")]
783    #[serde(skip_serializing_if = "Option::is_none")]
784    pub job_list_entries: Option<Vec<JobListEntry>>,
785    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ListClusterJobsResult</code> call, your list of returned jobs will start from this point in the array.</p>
786    #[serde(rename = "NextToken")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub next_token: Option<String>,
789}
790
791#[derive(Clone, Debug, Default, PartialEq, Serialize)]
792#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
793pub struct ListClustersRequest {
794    /// <p>The number of <code>ClusterListEntry</code> objects to return.</p>
795    #[serde(rename = "MaxResults")]
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub max_results: Option<i64>,
798    /// <p>HTTP requests are stateless. To identify what object comes "next" in the list of <code>ClusterListEntry</code> objects, you have the option of specifying <code>NextToken</code> as the starting point for your returned list.</p>
799    #[serde(rename = "NextToken")]
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub next_token: Option<String>,
802}
803
804#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
805#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
806pub struct ListClustersResult {
807    /// <p>Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
808    #[serde(rename = "ClusterListEntries")]
809    #[serde(skip_serializing_if = "Option::is_none")]
810    pub cluster_list_entries: Option<Vec<ClusterListEntry>>,
811    /// <p>HTTP requests are stateless. If you use the automatically generated <code>NextToken</code> value in your next <code>ClusterListEntry</code> call, your list of returned clusters will start from this point in the array.</p>
812    #[serde(rename = "NextToken")]
813    #[serde(skip_serializing_if = "Option::is_none")]
814    pub next_token: Option<String>,
815}
816
817#[derive(Clone, Debug, Default, PartialEq, Serialize)]
818#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
819pub struct ListCompatibleImagesRequest {
820    /// <p>The maximum number of results for the list of compatible images. Currently, a Snowball Edge device can store 10 AMIs.</p>
821    #[serde(rename = "MaxResults")]
822    #[serde(skip_serializing_if = "Option::is_none")]
823    pub max_results: Option<i64>,
824    /// <p>HTTP requests are stateless. To identify what object comes "next" in the list of compatible images, you can specify a value for <code>NextToken</code> as the starting point for your list of returned images.</p>
825    #[serde(rename = "NextToken")]
826    #[serde(skip_serializing_if = "Option::is_none")]
827    pub next_token: Option<String>,
828}
829
830#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
831#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
832pub struct ListCompatibleImagesResult {
833    /// <p>A JSON-formatted object that describes a compatible AMI, including the ID and name for a Snowball Edge AMI.</p>
834    #[serde(rename = "CompatibleImages")]
835    #[serde(skip_serializing_if = "Option::is_none")]
836    pub compatible_images: Option<Vec<CompatibleImage>>,
837    /// <p>Because HTTP requests are stateless, this is the starting point for your next list of returned images.</p>
838    #[serde(rename = "NextToken")]
839    #[serde(skip_serializing_if = "Option::is_none")]
840    pub next_token: Option<String>,
841}
842
843#[derive(Clone, Debug, Default, PartialEq, Serialize)]
844#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
845pub struct ListJobsRequest {
846    /// <p>The number of <code>JobListEntry</code> objects to return.</p>
847    #[serde(rename = "MaxResults")]
848    #[serde(skip_serializing_if = "Option::is_none")]
849    pub max_results: Option<i64>,
850    /// <p>HTTP requests are stateless. To identify what object comes "next" in the list of <code>JobListEntry</code> objects, you have the option of specifying <code>NextToken</code> as the starting point for your returned list.</p>
851    #[serde(rename = "NextToken")]
852    #[serde(skip_serializing_if = "Option::is_none")]
853    pub next_token: Option<String>,
854}
855
856#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
857#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
858pub struct ListJobsResult {
859    /// <p>Each <code>JobListEntry</code> object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. </p>
860    #[serde(rename = "JobListEntries")]
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub job_list_entries: Option<Vec<JobListEntry>>,
863    /// <p>HTTP requests are stateless. If you use this automatically generated <code>NextToken</code> value in your next <code>ListJobs</code> call, your returned <code>JobListEntry</code> objects will start from this point in the array.</p>
864    #[serde(rename = "NextToken")]
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub next_token: Option<String>,
867}
868
869/// <p>The Amazon Simple Notification Service (Amazon SNS) notification settings associated with a specific job. The <code>Notification</code> object is returned as a part of the response syntax of the <code>DescribeJob</code> action in the <code>JobMetadata</code> data type.</p> <p>When the notification settings are defined during job creation, you can choose to notify based on a specific set of job states using the <code>JobStatesToNotify</code> array of strings, or you can specify that you want to have Amazon SNS notifications sent out for all job states with <code>NotifyAll</code> set to true.</p>
870#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
871pub struct Notification {
872    /// <p>The list of job states that will trigger a notification for this job.</p>
873    #[serde(rename = "JobStatesToNotify")]
874    #[serde(skip_serializing_if = "Option::is_none")]
875    pub job_states_to_notify: Option<Vec<String>>,
876    /// <p>Any change in job state will trigger a notification for this job.</p>
877    #[serde(rename = "NotifyAll")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub notify_all: Option<bool>,
880    /// <p>The new SNS <code>TopicArn</code> that you want to associate with this job. You can create Amazon Resource Names (ARNs) for topics by using the <a href="https://docs.aws.amazon.com/sns/latest/api/API_CreateTopic.html">CreateTopic</a> Amazon SNS API action.</p> <p>You can subscribe email addresses to an Amazon SNS topic through the AWS Management Console, or by using the <a href="https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html">Subscribe</a> AWS Simple Notification Service (SNS) API action.</p>
881    #[serde(rename = "SnsTopicARN")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub sns_topic_arn: Option<String>,
884}
885
886/// <p>Each <code>S3Resource</code> object represents an Amazon S3 bucket that your transferred data will be exported from or imported into. For export jobs, this object can have an optional <code>KeyRange</code> value. The length of the range is defined at job creation, and has either an inclusive <code>BeginMarker</code>, an inclusive <code>EndMarker</code>, or both. Ranges are UTF-8 binary sorted.</p>
887#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
888pub struct S3Resource {
889    /// <p>The Amazon Resource Name (ARN) of an Amazon S3 bucket.</p>
890    #[serde(rename = "BucketArn")]
891    #[serde(skip_serializing_if = "Option::is_none")]
892    pub bucket_arn: Option<String>,
893    /// <p>For export jobs, you can provide an optional <code>KeyRange</code> within a specific Amazon S3 bucket. The length of the range is defined at job creation, and has either an inclusive <code>BeginMarker</code>, an inclusive <code>EndMarker</code>, or both. Ranges are UTF-8 binary sorted.</p>
894    #[serde(rename = "KeyRange")]
895    #[serde(skip_serializing_if = "Option::is_none")]
896    pub key_range: Option<KeyRange>,
897}
898
899/// <p>The <code>Status</code> and <code>TrackingNumber</code> information for an inbound or outbound shipment.</p>
900#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
901#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
902pub struct Shipment {
903    /// <p>Status information for a shipment.</p>
904    #[serde(rename = "Status")]
905    #[serde(skip_serializing_if = "Option::is_none")]
906    pub status: Option<String>,
907    /// <p>The tracking number for this job. Using this tracking number with your region's carrier's website, you can track a Snowball as the carrier transports it.</p> <p>For India, the carrier is Amazon Logistics. For all other regions, UPS is the carrier.</p>
908    #[serde(rename = "TrackingNumber")]
909    #[serde(skip_serializing_if = "Option::is_none")]
910    pub tracking_number: Option<String>,
911}
912
913/// <p>A job's shipping information, including inbound and outbound tracking numbers and shipping speed options.</p>
914#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
915#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
916pub struct ShippingDetails {
917    /// <p>The <code>Status</code> and <code>TrackingNumber</code> values for a Snowball being returned to AWS for a particular job.</p>
918    #[serde(rename = "InboundShipment")]
919    #[serde(skip_serializing_if = "Option::is_none")]
920    pub inbound_shipment: Option<Shipment>,
921    /// <p>The <code>Status</code> and <code>TrackingNumber</code> values for a Snowball being delivered to the address that you specified for a particular job.</p>
922    #[serde(rename = "OutboundShipment")]
923    #[serde(skip_serializing_if = "Option::is_none")]
924    pub outbound_shipment: Option<Shipment>,
925    /// <p><p>The shipping speed for a particular job. This speed doesn&#39;t dictate how soon you&#39;ll get the Snowball from the job&#39;s creation date. This speed represents how quickly it moves to its destination while in transit. Regional shipping speeds are as follows:</p> <ul> <li> <p>In Australia, you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day.</p> </li> <li> <p>In the European Union (EU), you have access to express shipping. Typically, Snowballs shipped express are delivered in about a day. In addition, most countries in the EU have access to standard shipping, which typically takes less than a week, one way.</p> </li> <li> <p>In India, Snowballs are delivered in one to seven days.</p> </li> <li> <p>In the United States of America (US), you have access to one-day shipping and two-day shipping.</p> </li> </ul></p>
926    #[serde(rename = "ShippingOption")]
927    #[serde(skip_serializing_if = "Option::is_none")]
928    pub shipping_option: Option<String>,
929}
930
931/// <p>Specifies the device configuration for an AWS Snowcone job. </p>
932#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
933pub struct SnowconeDeviceConfiguration {
934    /// <p>Configures the wireless connection for the AWS Snowcone device.</p>
935    #[serde(rename = "WirelessConnection")]
936    #[serde(skip_serializing_if = "Option::is_none")]
937    pub wireless_connection: Option<WirelessConnection>,
938}
939
940/// <p>The tax documents required in your AWS Region.</p>
941#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
942pub struct TaxDocuments {
943    #[serde(rename = "IND")]
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub ind: Option<INDTaxDocuments>,
946}
947
948#[derive(Clone, Debug, Default, PartialEq, Serialize)]
949#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
950pub struct UpdateClusterRequest {
951    /// <p>The ID of the updated <a>Address</a> object.</p>
952    #[serde(rename = "AddressId")]
953    #[serde(skip_serializing_if = "Option::is_none")]
954    pub address_id: Option<String>,
955    /// <p>The cluster ID of the cluster that you want to update, for example <code>CID123e4567-e89b-12d3-a456-426655440000</code>.</p>
956    #[serde(rename = "ClusterId")]
957    pub cluster_id: String,
958    /// <p>The updated description of this cluster.</p>
959    #[serde(rename = "Description")]
960    #[serde(skip_serializing_if = "Option::is_none")]
961    pub description: Option<String>,
962    /// <p>The updated ID for the forwarding address for a cluster. This field is not supported in most regions.</p>
963    #[serde(rename = "ForwardingAddressId")]
964    #[serde(skip_serializing_if = "Option::is_none")]
965    pub forwarding_address_id: Option<String>,
966    /// <p>The new or updated <a>Notification</a> object.</p>
967    #[serde(rename = "Notification")]
968    #[serde(skip_serializing_if = "Option::is_none")]
969    pub notification: Option<Notification>,
970    /// <p>The updated arrays of <a>JobResource</a> objects that can include updated <a>S3Resource</a> objects or <a>LambdaResource</a> objects.</p>
971    #[serde(rename = "Resources")]
972    #[serde(skip_serializing_if = "Option::is_none")]
973    pub resources: Option<JobResource>,
974    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this cluster. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a> API action in AWS Identity and Access Management (IAM).</p>
975    #[serde(rename = "RoleARN")]
976    #[serde(skip_serializing_if = "Option::is_none")]
977    pub role_arn: Option<String>,
978    /// <p>The updated shipping option value of this cluster's <a>ShippingDetails</a> object.</p>
979    #[serde(rename = "ShippingOption")]
980    #[serde(skip_serializing_if = "Option::is_none")]
981    pub shipping_option: Option<String>,
982}
983
984#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
985#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
986pub struct UpdateClusterResult {}
987
988#[derive(Clone, Debug, Default, PartialEq, Serialize)]
989#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
990pub struct UpdateJobRequest {
991    /// <p>The ID of the updated <a>Address</a> object.</p>
992    #[serde(rename = "AddressId")]
993    #[serde(skip_serializing_if = "Option::is_none")]
994    pub address_id: Option<String>,
995    /// <p>The updated description of this job's <a>JobMetadata</a> object.</p>
996    #[serde(rename = "Description")]
997    #[serde(skip_serializing_if = "Option::is_none")]
998    pub description: Option<String>,
999    /// <p>The updated ID for the forwarding address for a job. This field is not supported in most regions.</p>
1000    #[serde(rename = "ForwardingAddressId")]
1001    #[serde(skip_serializing_if = "Option::is_none")]
1002    pub forwarding_address_id: Option<String>,
1003    /// <p>The job ID of the job that you want to update, for example <code>JID123e4567-e89b-12d3-a456-426655440000</code>.</p>
1004    #[serde(rename = "JobId")]
1005    pub job_id: String,
1006    /// <p>The new or updated <a>Notification</a> object.</p>
1007    #[serde(rename = "Notification")]
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    pub notification: Option<Notification>,
1010    /// <p>The updated <code>JobResource</code> object, or the updated <a>JobResource</a> object. </p>
1011    #[serde(rename = "Resources")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub resources: Option<JobResource>,
1014    /// <p>The new role Amazon Resource Name (ARN) that you want to associate with this job. To create a role ARN, use the <a href="https://docs.aws.amazon.com/IAM/latest/APIReference/API_CreateRole.html">CreateRole</a>AWS Identity and Access Management (IAM) API action.</p>
1015    #[serde(rename = "RoleARN")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub role_arn: Option<String>,
1018    /// <p>The updated shipping option value of this job's <a>ShippingDetails</a> object.</p>
1019    #[serde(rename = "ShippingOption")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub shipping_option: Option<String>,
1022    /// <p>The updated <code>SnowballCapacityPreference</code> of this job's <a>JobMetadata</a> object. The 50 TB Snowballs are only available in the US regions.</p>
1023    #[serde(rename = "SnowballCapacityPreference")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub snowball_capacity_preference: Option<String>,
1026}
1027
1028#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1029#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1030pub struct UpdateJobResult {}
1031
1032/// <p>Configures the wireless connection on an AWS Snowcone device.</p>
1033#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1034pub struct WirelessConnection {
1035    /// <p>Enables the Wi-Fi adapter on an AWS Snowcone device.</p>
1036    #[serde(rename = "IsWifiEnabled")]
1037    #[serde(skip_serializing_if = "Option::is_none")]
1038    pub is_wifi_enabled: Option<bool>,
1039}
1040
1041/// Errors returned by CancelCluster
1042#[derive(Debug, PartialEq)]
1043pub enum CancelClusterError {
1044    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1045    InvalidJobState(String),
1046    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1047    InvalidResource(String),
1048    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1049    KMSRequestFailed(String),
1050}
1051
1052impl CancelClusterError {
1053    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelClusterError> {
1054        if let Some(err) = proto::json::Error::parse(&res) {
1055            match err.typ.as_str() {
1056                "InvalidJobStateException" => {
1057                    return RusotoError::Service(CancelClusterError::InvalidJobState(err.msg))
1058                }
1059                "InvalidResourceException" => {
1060                    return RusotoError::Service(CancelClusterError::InvalidResource(err.msg))
1061                }
1062                "KMSRequestFailedException" => {
1063                    return RusotoError::Service(CancelClusterError::KMSRequestFailed(err.msg))
1064                }
1065                "ValidationException" => return RusotoError::Validation(err.msg),
1066                _ => {}
1067            }
1068        }
1069        RusotoError::Unknown(res)
1070    }
1071}
1072impl fmt::Display for CancelClusterError {
1073    #[allow(unused_variables)]
1074    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1075        match *self {
1076            CancelClusterError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1077            CancelClusterError::InvalidResource(ref cause) => write!(f, "{}", cause),
1078            CancelClusterError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1079        }
1080    }
1081}
1082impl Error for CancelClusterError {}
1083/// Errors returned by CancelJob
1084#[derive(Debug, PartialEq)]
1085pub enum CancelJobError {
1086    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1087    InvalidJobState(String),
1088    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1089    InvalidResource(String),
1090    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1091    KMSRequestFailed(String),
1092}
1093
1094impl CancelJobError {
1095    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelJobError> {
1096        if let Some(err) = proto::json::Error::parse(&res) {
1097            match err.typ.as_str() {
1098                "InvalidJobStateException" => {
1099                    return RusotoError::Service(CancelJobError::InvalidJobState(err.msg))
1100                }
1101                "InvalidResourceException" => {
1102                    return RusotoError::Service(CancelJobError::InvalidResource(err.msg))
1103                }
1104                "KMSRequestFailedException" => {
1105                    return RusotoError::Service(CancelJobError::KMSRequestFailed(err.msg))
1106                }
1107                "ValidationException" => return RusotoError::Validation(err.msg),
1108                _ => {}
1109            }
1110        }
1111        RusotoError::Unknown(res)
1112    }
1113}
1114impl fmt::Display for CancelJobError {
1115    #[allow(unused_variables)]
1116    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1117        match *self {
1118            CancelJobError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1119            CancelJobError::InvalidResource(ref cause) => write!(f, "{}", cause),
1120            CancelJobError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1121        }
1122    }
1123}
1124impl Error for CancelJobError {}
1125/// Errors returned by CreateAddress
1126#[derive(Debug, PartialEq)]
1127pub enum CreateAddressError {
1128    /// <p>The address provided was invalid. Check the address with your region's carrier, and try again.</p>
1129    InvalidAddress(String),
1130    /// <p>The address is either outside the serviceable area for your region, or an error occurred. Check the address with your region's carrier and try again. If the issue persists, contact AWS Support.</p>
1131    UnsupportedAddress(String),
1132}
1133
1134impl CreateAddressError {
1135    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAddressError> {
1136        if let Some(err) = proto::json::Error::parse(&res) {
1137            match err.typ.as_str() {
1138                "InvalidAddressException" => {
1139                    return RusotoError::Service(CreateAddressError::InvalidAddress(err.msg))
1140                }
1141                "UnsupportedAddressException" => {
1142                    return RusotoError::Service(CreateAddressError::UnsupportedAddress(err.msg))
1143                }
1144                "ValidationException" => return RusotoError::Validation(err.msg),
1145                _ => {}
1146            }
1147        }
1148        RusotoError::Unknown(res)
1149    }
1150}
1151impl fmt::Display for CreateAddressError {
1152    #[allow(unused_variables)]
1153    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1154        match *self {
1155            CreateAddressError::InvalidAddress(ref cause) => write!(f, "{}", cause),
1156            CreateAddressError::UnsupportedAddress(ref cause) => write!(f, "{}", cause),
1157        }
1158    }
1159}
1160impl Error for CreateAddressError {}
1161/// Errors returned by CreateCluster
1162#[derive(Debug, PartialEq)]
1163pub enum CreateClusterError {
1164    /// <p>Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
1165    Ec2RequestFailed(String),
1166    /// <p>Job or cluster creation failed. One or more inputs were invalid. Confirm that the <a>CreateClusterRequest$SnowballType</a> value supports your <a>CreateJobRequest$JobType</a>, and try again.</p>
1167    InvalidInputCombination(String),
1168    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1169    InvalidResource(String),
1170    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1171    KMSRequestFailed(String),
1172}
1173
1174impl CreateClusterError {
1175    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateClusterError> {
1176        if let Some(err) = proto::json::Error::parse(&res) {
1177            match err.typ.as_str() {
1178                "Ec2RequestFailedException" => {
1179                    return RusotoError::Service(CreateClusterError::Ec2RequestFailed(err.msg))
1180                }
1181                "InvalidInputCombinationException" => {
1182                    return RusotoError::Service(CreateClusterError::InvalidInputCombination(
1183                        err.msg,
1184                    ))
1185                }
1186                "InvalidResourceException" => {
1187                    return RusotoError::Service(CreateClusterError::InvalidResource(err.msg))
1188                }
1189                "KMSRequestFailedException" => {
1190                    return RusotoError::Service(CreateClusterError::KMSRequestFailed(err.msg))
1191                }
1192                "ValidationException" => return RusotoError::Validation(err.msg),
1193                _ => {}
1194            }
1195        }
1196        RusotoError::Unknown(res)
1197    }
1198}
1199impl fmt::Display for CreateClusterError {
1200    #[allow(unused_variables)]
1201    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1202        match *self {
1203            CreateClusterError::Ec2RequestFailed(ref cause) => write!(f, "{}", cause),
1204            CreateClusterError::InvalidInputCombination(ref cause) => write!(f, "{}", cause),
1205            CreateClusterError::InvalidResource(ref cause) => write!(f, "{}", cause),
1206            CreateClusterError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1207        }
1208    }
1209}
1210impl Error for CreateClusterError {}
1211/// Errors returned by CreateJob
1212#[derive(Debug, PartialEq)]
1213pub enum CreateJobError {
1214    /// <p>Job creation failed. Currently, clusters support five nodes. If you have less than five nodes for your cluster and you have more nodes to create for this cluster, try again and create jobs until your cluster has exactly five notes.</p>
1215    ClusterLimitExceeded(String),
1216    /// <p>Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
1217    Ec2RequestFailed(String),
1218    /// <p>Job or cluster creation failed. One or more inputs were invalid. Confirm that the <a>CreateClusterRequest$SnowballType</a> value supports your <a>CreateJobRequest$JobType</a>, and try again.</p>
1219    InvalidInputCombination(String),
1220    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1221    InvalidResource(String),
1222    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1223    KMSRequestFailed(String),
1224}
1225
1226impl CreateJobError {
1227    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateJobError> {
1228        if let Some(err) = proto::json::Error::parse(&res) {
1229            match err.typ.as_str() {
1230                "ClusterLimitExceededException" => {
1231                    return RusotoError::Service(CreateJobError::ClusterLimitExceeded(err.msg))
1232                }
1233                "Ec2RequestFailedException" => {
1234                    return RusotoError::Service(CreateJobError::Ec2RequestFailed(err.msg))
1235                }
1236                "InvalidInputCombinationException" => {
1237                    return RusotoError::Service(CreateJobError::InvalidInputCombination(err.msg))
1238                }
1239                "InvalidResourceException" => {
1240                    return RusotoError::Service(CreateJobError::InvalidResource(err.msg))
1241                }
1242                "KMSRequestFailedException" => {
1243                    return RusotoError::Service(CreateJobError::KMSRequestFailed(err.msg))
1244                }
1245                "ValidationException" => return RusotoError::Validation(err.msg),
1246                _ => {}
1247            }
1248        }
1249        RusotoError::Unknown(res)
1250    }
1251}
1252impl fmt::Display for CreateJobError {
1253    #[allow(unused_variables)]
1254    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1255        match *self {
1256            CreateJobError::ClusterLimitExceeded(ref cause) => write!(f, "{}", cause),
1257            CreateJobError::Ec2RequestFailed(ref cause) => write!(f, "{}", cause),
1258            CreateJobError::InvalidInputCombination(ref cause) => write!(f, "{}", cause),
1259            CreateJobError::InvalidResource(ref cause) => write!(f, "{}", cause),
1260            CreateJobError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1261        }
1262    }
1263}
1264impl Error for CreateJobError {}
1265/// Errors returned by DescribeAddress
1266#[derive(Debug, PartialEq)]
1267pub enum DescribeAddressError {
1268    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1269    InvalidResource(String),
1270}
1271
1272impl DescribeAddressError {
1273    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAddressError> {
1274        if let Some(err) = proto::json::Error::parse(&res) {
1275            match err.typ.as_str() {
1276                "InvalidResourceException" => {
1277                    return RusotoError::Service(DescribeAddressError::InvalidResource(err.msg))
1278                }
1279                "ValidationException" => return RusotoError::Validation(err.msg),
1280                _ => {}
1281            }
1282        }
1283        RusotoError::Unknown(res)
1284    }
1285}
1286impl fmt::Display for DescribeAddressError {
1287    #[allow(unused_variables)]
1288    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1289        match *self {
1290            DescribeAddressError::InvalidResource(ref cause) => write!(f, "{}", cause),
1291        }
1292    }
1293}
1294impl Error for DescribeAddressError {}
1295/// Errors returned by DescribeAddresses
1296#[derive(Debug, PartialEq)]
1297pub enum DescribeAddressesError {
1298    /// <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
1299    InvalidNextToken(String),
1300    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1301    InvalidResource(String),
1302}
1303
1304impl DescribeAddressesError {
1305    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAddressesError> {
1306        if let Some(err) = proto::json::Error::parse(&res) {
1307            match err.typ.as_str() {
1308                "InvalidNextTokenException" => {
1309                    return RusotoError::Service(DescribeAddressesError::InvalidNextToken(err.msg))
1310                }
1311                "InvalidResourceException" => {
1312                    return RusotoError::Service(DescribeAddressesError::InvalidResource(err.msg))
1313                }
1314                "ValidationException" => return RusotoError::Validation(err.msg),
1315                _ => {}
1316            }
1317        }
1318        RusotoError::Unknown(res)
1319    }
1320}
1321impl fmt::Display for DescribeAddressesError {
1322    #[allow(unused_variables)]
1323    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1324        match *self {
1325            DescribeAddressesError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1326            DescribeAddressesError::InvalidResource(ref cause) => write!(f, "{}", cause),
1327        }
1328    }
1329}
1330impl Error for DescribeAddressesError {}
1331/// Errors returned by DescribeCluster
1332#[derive(Debug, PartialEq)]
1333pub enum DescribeClusterError {
1334    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1335    InvalidResource(String),
1336}
1337
1338impl DescribeClusterError {
1339    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClusterError> {
1340        if let Some(err) = proto::json::Error::parse(&res) {
1341            match err.typ.as_str() {
1342                "InvalidResourceException" => {
1343                    return RusotoError::Service(DescribeClusterError::InvalidResource(err.msg))
1344                }
1345                "ValidationException" => return RusotoError::Validation(err.msg),
1346                _ => {}
1347            }
1348        }
1349        RusotoError::Unknown(res)
1350    }
1351}
1352impl fmt::Display for DescribeClusterError {
1353    #[allow(unused_variables)]
1354    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1355        match *self {
1356            DescribeClusterError::InvalidResource(ref cause) => write!(f, "{}", cause),
1357        }
1358    }
1359}
1360impl Error for DescribeClusterError {}
1361/// Errors returned by DescribeJob
1362#[derive(Debug, PartialEq)]
1363pub enum DescribeJobError {
1364    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1365    InvalidResource(String),
1366}
1367
1368impl DescribeJobError {
1369    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeJobError> {
1370        if let Some(err) = proto::json::Error::parse(&res) {
1371            match err.typ.as_str() {
1372                "InvalidResourceException" => {
1373                    return RusotoError::Service(DescribeJobError::InvalidResource(err.msg))
1374                }
1375                "ValidationException" => return RusotoError::Validation(err.msg),
1376                _ => {}
1377            }
1378        }
1379        RusotoError::Unknown(res)
1380    }
1381}
1382impl fmt::Display for DescribeJobError {
1383    #[allow(unused_variables)]
1384    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1385        match *self {
1386            DescribeJobError::InvalidResource(ref cause) => write!(f, "{}", cause),
1387        }
1388    }
1389}
1390impl Error for DescribeJobError {}
1391/// Errors returned by GetJobManifest
1392#[derive(Debug, PartialEq)]
1393pub enum GetJobManifestError {
1394    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1395    InvalidJobState(String),
1396    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1397    InvalidResource(String),
1398}
1399
1400impl GetJobManifestError {
1401    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetJobManifestError> {
1402        if let Some(err) = proto::json::Error::parse(&res) {
1403            match err.typ.as_str() {
1404                "InvalidJobStateException" => {
1405                    return RusotoError::Service(GetJobManifestError::InvalidJobState(err.msg))
1406                }
1407                "InvalidResourceException" => {
1408                    return RusotoError::Service(GetJobManifestError::InvalidResource(err.msg))
1409                }
1410                "ValidationException" => return RusotoError::Validation(err.msg),
1411                _ => {}
1412            }
1413        }
1414        RusotoError::Unknown(res)
1415    }
1416}
1417impl fmt::Display for GetJobManifestError {
1418    #[allow(unused_variables)]
1419    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1420        match *self {
1421            GetJobManifestError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1422            GetJobManifestError::InvalidResource(ref cause) => write!(f, "{}", cause),
1423        }
1424    }
1425}
1426impl Error for GetJobManifestError {}
1427/// Errors returned by GetJobUnlockCode
1428#[derive(Debug, PartialEq)]
1429pub enum GetJobUnlockCodeError {
1430    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1431    InvalidJobState(String),
1432    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1433    InvalidResource(String),
1434}
1435
1436impl GetJobUnlockCodeError {
1437    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetJobUnlockCodeError> {
1438        if let Some(err) = proto::json::Error::parse(&res) {
1439            match err.typ.as_str() {
1440                "InvalidJobStateException" => {
1441                    return RusotoError::Service(GetJobUnlockCodeError::InvalidJobState(err.msg))
1442                }
1443                "InvalidResourceException" => {
1444                    return RusotoError::Service(GetJobUnlockCodeError::InvalidResource(err.msg))
1445                }
1446                "ValidationException" => return RusotoError::Validation(err.msg),
1447                _ => {}
1448            }
1449        }
1450        RusotoError::Unknown(res)
1451    }
1452}
1453impl fmt::Display for GetJobUnlockCodeError {
1454    #[allow(unused_variables)]
1455    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1456        match *self {
1457            GetJobUnlockCodeError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1458            GetJobUnlockCodeError::InvalidResource(ref cause) => write!(f, "{}", cause),
1459        }
1460    }
1461}
1462impl Error for GetJobUnlockCodeError {}
1463/// Errors returned by GetSnowballUsage
1464#[derive(Debug, PartialEq)]
1465pub enum GetSnowballUsageError {}
1466
1467impl GetSnowballUsageError {
1468    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSnowballUsageError> {
1469        if let Some(err) = proto::json::Error::parse(&res) {
1470            match err.typ.as_str() {
1471                "ValidationException" => return RusotoError::Validation(err.msg),
1472                _ => {}
1473            }
1474        }
1475        RusotoError::Unknown(res)
1476    }
1477}
1478impl fmt::Display for GetSnowballUsageError {
1479    #[allow(unused_variables)]
1480    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1481        match *self {}
1482    }
1483}
1484impl Error for GetSnowballUsageError {}
1485/// Errors returned by GetSoftwareUpdates
1486#[derive(Debug, PartialEq)]
1487pub enum GetSoftwareUpdatesError {
1488    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1489    InvalidJobState(String),
1490    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1491    InvalidResource(String),
1492}
1493
1494impl GetSoftwareUpdatesError {
1495    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSoftwareUpdatesError> {
1496        if let Some(err) = proto::json::Error::parse(&res) {
1497            match err.typ.as_str() {
1498                "InvalidJobStateException" => {
1499                    return RusotoError::Service(GetSoftwareUpdatesError::InvalidJobState(err.msg))
1500                }
1501                "InvalidResourceException" => {
1502                    return RusotoError::Service(GetSoftwareUpdatesError::InvalidResource(err.msg))
1503                }
1504                "ValidationException" => return RusotoError::Validation(err.msg),
1505                _ => {}
1506            }
1507        }
1508        RusotoError::Unknown(res)
1509    }
1510}
1511impl fmt::Display for GetSoftwareUpdatesError {
1512    #[allow(unused_variables)]
1513    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1514        match *self {
1515            GetSoftwareUpdatesError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1516            GetSoftwareUpdatesError::InvalidResource(ref cause) => write!(f, "{}", cause),
1517        }
1518    }
1519}
1520impl Error for GetSoftwareUpdatesError {}
1521/// Errors returned by ListClusterJobs
1522#[derive(Debug, PartialEq)]
1523pub enum ListClusterJobsError {
1524    /// <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
1525    InvalidNextToken(String),
1526    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1527    InvalidResource(String),
1528}
1529
1530impl ListClusterJobsError {
1531    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListClusterJobsError> {
1532        if let Some(err) = proto::json::Error::parse(&res) {
1533            match err.typ.as_str() {
1534                "InvalidNextTokenException" => {
1535                    return RusotoError::Service(ListClusterJobsError::InvalidNextToken(err.msg))
1536                }
1537                "InvalidResourceException" => {
1538                    return RusotoError::Service(ListClusterJobsError::InvalidResource(err.msg))
1539                }
1540                "ValidationException" => return RusotoError::Validation(err.msg),
1541                _ => {}
1542            }
1543        }
1544        RusotoError::Unknown(res)
1545    }
1546}
1547impl fmt::Display for ListClusterJobsError {
1548    #[allow(unused_variables)]
1549    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1550        match *self {
1551            ListClusterJobsError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1552            ListClusterJobsError::InvalidResource(ref cause) => write!(f, "{}", cause),
1553        }
1554    }
1555}
1556impl Error for ListClusterJobsError {}
1557/// Errors returned by ListClusters
1558#[derive(Debug, PartialEq)]
1559pub enum ListClustersError {
1560    /// <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
1561    InvalidNextToken(String),
1562}
1563
1564impl ListClustersError {
1565    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListClustersError> {
1566        if let Some(err) = proto::json::Error::parse(&res) {
1567            match err.typ.as_str() {
1568                "InvalidNextTokenException" => {
1569                    return RusotoError::Service(ListClustersError::InvalidNextToken(err.msg))
1570                }
1571                "ValidationException" => return RusotoError::Validation(err.msg),
1572                _ => {}
1573            }
1574        }
1575        RusotoError::Unknown(res)
1576    }
1577}
1578impl fmt::Display for ListClustersError {
1579    #[allow(unused_variables)]
1580    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1581        match *self {
1582            ListClustersError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1583        }
1584    }
1585}
1586impl Error for ListClustersError {}
1587/// Errors returned by ListCompatibleImages
1588#[derive(Debug, PartialEq)]
1589pub enum ListCompatibleImagesError {
1590    /// <p>Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
1591    Ec2RequestFailed(String),
1592    /// <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
1593    InvalidNextToken(String),
1594}
1595
1596impl ListCompatibleImagesError {
1597    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCompatibleImagesError> {
1598        if let Some(err) = proto::json::Error::parse(&res) {
1599            match err.typ.as_str() {
1600                "Ec2RequestFailedException" => {
1601                    return RusotoError::Service(ListCompatibleImagesError::Ec2RequestFailed(
1602                        err.msg,
1603                    ))
1604                }
1605                "InvalidNextTokenException" => {
1606                    return RusotoError::Service(ListCompatibleImagesError::InvalidNextToken(
1607                        err.msg,
1608                    ))
1609                }
1610                "ValidationException" => return RusotoError::Validation(err.msg),
1611                _ => {}
1612            }
1613        }
1614        RusotoError::Unknown(res)
1615    }
1616}
1617impl fmt::Display for ListCompatibleImagesError {
1618    #[allow(unused_variables)]
1619    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1620        match *self {
1621            ListCompatibleImagesError::Ec2RequestFailed(ref cause) => write!(f, "{}", cause),
1622            ListCompatibleImagesError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1623        }
1624    }
1625}
1626impl Error for ListCompatibleImagesError {}
1627/// Errors returned by ListJobs
1628#[derive(Debug, PartialEq)]
1629pub enum ListJobsError {
1630    /// <p>The <code>NextToken</code> string was altered unexpectedly, and the operation has stopped. Run the operation without changing the <code>NextToken</code> string, and try again.</p>
1631    InvalidNextToken(String),
1632}
1633
1634impl ListJobsError {
1635    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsError> {
1636        if let Some(err) = proto::json::Error::parse(&res) {
1637            match err.typ.as_str() {
1638                "InvalidNextTokenException" => {
1639                    return RusotoError::Service(ListJobsError::InvalidNextToken(err.msg))
1640                }
1641                "ValidationException" => return RusotoError::Validation(err.msg),
1642                _ => {}
1643            }
1644        }
1645        RusotoError::Unknown(res)
1646    }
1647}
1648impl fmt::Display for ListJobsError {
1649    #[allow(unused_variables)]
1650    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1651        match *self {
1652            ListJobsError::InvalidNextToken(ref cause) => write!(f, "{}", cause),
1653        }
1654    }
1655}
1656impl Error for ListJobsError {}
1657/// Errors returned by UpdateCluster
1658#[derive(Debug, PartialEq)]
1659pub enum UpdateClusterError {
1660    /// <p>Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
1661    Ec2RequestFailed(String),
1662    /// <p>Job or cluster creation failed. One or more inputs were invalid. Confirm that the <a>CreateClusterRequest$SnowballType</a> value supports your <a>CreateJobRequest$JobType</a>, and try again.</p>
1663    InvalidInputCombination(String),
1664    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1665    InvalidJobState(String),
1666    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1667    InvalidResource(String),
1668    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1669    KMSRequestFailed(String),
1670}
1671
1672impl UpdateClusterError {
1673    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateClusterError> {
1674        if let Some(err) = proto::json::Error::parse(&res) {
1675            match err.typ.as_str() {
1676                "Ec2RequestFailedException" => {
1677                    return RusotoError::Service(UpdateClusterError::Ec2RequestFailed(err.msg))
1678                }
1679                "InvalidInputCombinationException" => {
1680                    return RusotoError::Service(UpdateClusterError::InvalidInputCombination(
1681                        err.msg,
1682                    ))
1683                }
1684                "InvalidJobStateException" => {
1685                    return RusotoError::Service(UpdateClusterError::InvalidJobState(err.msg))
1686                }
1687                "InvalidResourceException" => {
1688                    return RusotoError::Service(UpdateClusterError::InvalidResource(err.msg))
1689                }
1690                "KMSRequestFailedException" => {
1691                    return RusotoError::Service(UpdateClusterError::KMSRequestFailed(err.msg))
1692                }
1693                "ValidationException" => return RusotoError::Validation(err.msg),
1694                _ => {}
1695            }
1696        }
1697        RusotoError::Unknown(res)
1698    }
1699}
1700impl fmt::Display for UpdateClusterError {
1701    #[allow(unused_variables)]
1702    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1703        match *self {
1704            UpdateClusterError::Ec2RequestFailed(ref cause) => write!(f, "{}", cause),
1705            UpdateClusterError::InvalidInputCombination(ref cause) => write!(f, "{}", cause),
1706            UpdateClusterError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1707            UpdateClusterError::InvalidResource(ref cause) => write!(f, "{}", cause),
1708            UpdateClusterError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1709        }
1710    }
1711}
1712impl Error for UpdateClusterError {}
1713/// Errors returned by UpdateJob
1714#[derive(Debug, PartialEq)]
1715pub enum UpdateJobError {
1716    /// <p>Job creation failed. Currently, clusters support five nodes. If you have less than five nodes for your cluster and you have more nodes to create for this cluster, try again and create jobs until your cluster has exactly five notes.</p>
1717    ClusterLimitExceeded(String),
1718    /// <p>Your IAM user lacks the necessary Amazon EC2 permissions to perform the attempted action.</p>
1719    Ec2RequestFailed(String),
1720    /// <p>Job or cluster creation failed. One or more inputs were invalid. Confirm that the <a>CreateClusterRequest$SnowballType</a> value supports your <a>CreateJobRequest$JobType</a>, and try again.</p>
1721    InvalidInputCombination(String),
1722    /// <p>The action can't be performed because the job's current state doesn't allow that action to be performed.</p>
1723    InvalidJobState(String),
1724    /// <p>The specified resource can't be found. Check the information you provided in your last request, and try again.</p>
1725    InvalidResource(String),
1726    /// <p>The provided AWS Key Management Service key lacks the permissions to perform the specified <a>CreateJob</a> or <a>UpdateJob</a> action.</p>
1727    KMSRequestFailed(String),
1728}
1729
1730impl UpdateJobError {
1731    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateJobError> {
1732        if let Some(err) = proto::json::Error::parse(&res) {
1733            match err.typ.as_str() {
1734                "ClusterLimitExceededException" => {
1735                    return RusotoError::Service(UpdateJobError::ClusterLimitExceeded(err.msg))
1736                }
1737                "Ec2RequestFailedException" => {
1738                    return RusotoError::Service(UpdateJobError::Ec2RequestFailed(err.msg))
1739                }
1740                "InvalidInputCombinationException" => {
1741                    return RusotoError::Service(UpdateJobError::InvalidInputCombination(err.msg))
1742                }
1743                "InvalidJobStateException" => {
1744                    return RusotoError::Service(UpdateJobError::InvalidJobState(err.msg))
1745                }
1746                "InvalidResourceException" => {
1747                    return RusotoError::Service(UpdateJobError::InvalidResource(err.msg))
1748                }
1749                "KMSRequestFailedException" => {
1750                    return RusotoError::Service(UpdateJobError::KMSRequestFailed(err.msg))
1751                }
1752                "ValidationException" => return RusotoError::Validation(err.msg),
1753                _ => {}
1754            }
1755        }
1756        RusotoError::Unknown(res)
1757    }
1758}
1759impl fmt::Display for UpdateJobError {
1760    #[allow(unused_variables)]
1761    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1762        match *self {
1763            UpdateJobError::ClusterLimitExceeded(ref cause) => write!(f, "{}", cause),
1764            UpdateJobError::Ec2RequestFailed(ref cause) => write!(f, "{}", cause),
1765            UpdateJobError::InvalidInputCombination(ref cause) => write!(f, "{}", cause),
1766            UpdateJobError::InvalidJobState(ref cause) => write!(f, "{}", cause),
1767            UpdateJobError::InvalidResource(ref cause) => write!(f, "{}", cause),
1768            UpdateJobError::KMSRequestFailed(ref cause) => write!(f, "{}", cause),
1769        }
1770    }
1771}
1772impl Error for UpdateJobError {}
1773/// Trait representing the capabilities of the Amazon Snowball API. Amazon Snowball clients implement this trait.
1774#[async_trait]
1775pub trait Snowball {
1776    /// <p>Cancels a cluster job. You can only cancel a cluster job while it's in the <code>AwaitingQuorum</code> status. You'll have at least an hour after creating a cluster job to cancel it.</p>
1777    async fn cancel_cluster(
1778        &self,
1779        input: CancelClusterRequest,
1780    ) -> Result<CancelClusterResult, RusotoError<CancelClusterError>>;
1781
1782    /// <p>Cancels the specified job. You can only cancel a job before its <code>JobState</code> value changes to <code>PreparingAppliance</code>. Requesting the <code>ListJobs</code> or <code>DescribeJob</code> action returns a job's <code>JobState</code> as part of the response element data returned.</p>
1783    async fn cancel_job(
1784        &self,
1785        input: CancelJobRequest,
1786    ) -> Result<CancelJobResult, RusotoError<CancelJobError>>;
1787
1788    /// <p>Creates an address for a Snowball to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.</p>
1789    async fn create_address(
1790        &self,
1791        input: CreateAddressRequest,
1792    ) -> Result<CreateAddressResult, RusotoError<CreateAddressError>>;
1793
1794    /// <p>Creates an empty cluster. Each cluster supports five nodes. You use the <a>CreateJob</a> action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.</p>
1795    async fn create_cluster(
1796        &self,
1797        input: CreateClusterRequest,
1798    ) -> Result<CreateClusterResult, RusotoError<CreateClusterError>>;
1799
1800    /// <p>Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the <code>clusterId</code> value; the other job attributes are inherited from the cluster. </p>
1801    async fn create_job(
1802        &self,
1803        input: CreateJobRequest,
1804    ) -> Result<CreateJobResult, RusotoError<CreateJobError>>;
1805
1806    /// <p>Takes an <code>AddressId</code> and returns specific details about that address in the form of an <code>Address</code> object.</p>
1807    async fn describe_address(
1808        &self,
1809        input: DescribeAddressRequest,
1810    ) -> Result<DescribeAddressResult, RusotoError<DescribeAddressError>>;
1811
1812    /// <p>Returns a specified number of <code>ADDRESS</code> objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.</p>
1813    async fn describe_addresses(
1814        &self,
1815        input: DescribeAddressesRequest,
1816    ) -> Result<DescribeAddressesResult, RusotoError<DescribeAddressesError>>;
1817
1818    /// <p>Returns information about a specific cluster including shipping information, cluster status, and other important metadata.</p>
1819    async fn describe_cluster(
1820        &self,
1821        input: DescribeClusterRequest,
1822    ) -> Result<DescribeClusterResult, RusotoError<DescribeClusterError>>;
1823
1824    /// <p>Returns information about a specific job including shipping information, job status, and other important metadata. </p>
1825    async fn describe_job(
1826        &self,
1827        input: DescribeJobRequest,
1828    ) -> Result<DescribeJobResult, RusotoError<DescribeJobError>>;
1829
1830    /// <p>Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified <code>JobId</code> value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you'll have to make another call to the <code>GetJobManifest</code> action.</p> <p>The manifest is an encrypted file that you can download after your job enters the <code>WithCustomer</code> status. The manifest is decrypted by using the <code>UnlockCode</code> code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.</p> <p>As a best practice, we recommend that you don't save a copy of an <code>UnlockCode</code> value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.</p> <p>The credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.</p>
1831    async fn get_job_manifest(
1832        &self,
1833        input: GetJobManifestRequest,
1834    ) -> Result<GetJobManifestResult, RusotoError<GetJobManifestError>>;
1835
1836    /// <p>Returns the <code>UnlockCode</code> code value for the specified job. A particular <code>UnlockCode</code> value can be accessed for up to 90 days after the associated job has been created.</p> <p>The <code>UnlockCode</code> value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.</p> <p>As a best practice, we recommend that you don't save a copy of the <code>UnlockCode</code> in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.</p>
1837    async fn get_job_unlock_code(
1838        &self,
1839        input: GetJobUnlockCodeRequest,
1840    ) -> Result<GetJobUnlockCodeResult, RusotoError<GetJobUnlockCodeError>>;
1841
1842    /// <p>Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.</p> <p>The default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.</p>
1843    async fn get_snowball_usage(
1844        &self,
1845    ) -> Result<GetSnowballUsageResult, RusotoError<GetSnowballUsageError>>;
1846
1847    /// <p>Returns an Amazon S3 presigned URL for an update file associated with a specified <code>JobId</code>.</p>
1848    async fn get_software_updates(
1849        &self,
1850        input: GetSoftwareUpdatesRequest,
1851    ) -> Result<GetSoftwareUpdatesResult, RusotoError<GetSoftwareUpdatesError>>;
1852
1853    /// <p>Returns an array of <code>JobListEntry</code> objects of the specified length. Each <code>JobListEntry</code> object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.</p>
1854    async fn list_cluster_jobs(
1855        &self,
1856        input: ListClusterJobsRequest,
1857    ) -> Result<ListClusterJobsResult, RusotoError<ListClusterJobsError>>;
1858
1859    /// <p>Returns an array of <code>ClusterListEntry</code> objects of the specified length. Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
1860    async fn list_clusters(
1861        &self,
1862        input: ListClustersRequest,
1863    ) -> Result<ListClustersResult, RusotoError<ListClustersError>>;
1864
1865    /// <p>This action returns a list of the different Amazon EC2 Amazon Machine Images (AMIs) that are owned by your AWS account that would be supported for use on a Snowball Edge device. Currently, supported AMIs are based on the CentOS 7 (x86_64) - with Updates HVM, Ubuntu Server 14.04 LTS (HVM), and Ubuntu 16.04 LTS - Xenial (HVM) images, available on the AWS Marketplace.</p>
1866    async fn list_compatible_images(
1867        &self,
1868        input: ListCompatibleImagesRequest,
1869    ) -> Result<ListCompatibleImagesResult, RusotoError<ListCompatibleImagesError>>;
1870
1871    /// <p>Returns an array of <code>JobListEntry</code> objects of the specified length. Each <code>JobListEntry</code> object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.</p>
1872    async fn list_jobs(
1873        &self,
1874        input: ListJobsRequest,
1875    ) -> Result<ListJobsResult, RusotoError<ListJobsError>>;
1876
1877    /// <p>While a cluster's <code>ClusterState</code> value is in the <code>AwaitingQuorum</code> state, you can update some of the information associated with a cluster. Once the cluster changes to a different job state, usually 60 minutes after the cluster being created, this action is no longer available.</p>
1878    async fn update_cluster(
1879        &self,
1880        input: UpdateClusterRequest,
1881    ) -> Result<UpdateClusterResult, RusotoError<UpdateClusterError>>;
1882
1883    /// <p>While a job's <code>JobState</code> value is <code>New</code>, you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.</p>
1884    async fn update_job(
1885        &self,
1886        input: UpdateJobRequest,
1887    ) -> Result<UpdateJobResult, RusotoError<UpdateJobError>>;
1888}
1889/// A client for the Amazon Snowball API.
1890#[derive(Clone)]
1891pub struct SnowballClient {
1892    client: Client,
1893    region: region::Region,
1894}
1895
1896impl SnowballClient {
1897    /// Creates a client backed by the default tokio event loop.
1898    ///
1899    /// The client will use the default credentials provider and tls client.
1900    pub fn new(region: region::Region) -> SnowballClient {
1901        SnowballClient {
1902            client: Client::shared(),
1903            region,
1904        }
1905    }
1906
1907    pub fn new_with<P, D>(
1908        request_dispatcher: D,
1909        credentials_provider: P,
1910        region: region::Region,
1911    ) -> SnowballClient
1912    where
1913        P: ProvideAwsCredentials + Send + Sync + 'static,
1914        D: DispatchSignedRequest + Send + Sync + 'static,
1915    {
1916        SnowballClient {
1917            client: Client::new_with(credentials_provider, request_dispatcher),
1918            region,
1919        }
1920    }
1921
1922    pub fn new_with_client(client: Client, region: region::Region) -> SnowballClient {
1923        SnowballClient { client, region }
1924    }
1925}
1926
1927#[async_trait]
1928impl Snowball for SnowballClient {
1929    /// <p>Cancels a cluster job. You can only cancel a cluster job while it's in the <code>AwaitingQuorum</code> status. You'll have at least an hour after creating a cluster job to cancel it.</p>
1930    async fn cancel_cluster(
1931        &self,
1932        input: CancelClusterRequest,
1933    ) -> Result<CancelClusterResult, RusotoError<CancelClusterError>> {
1934        let mut request = self.new_signed_request("POST", "/");
1935        request.add_header(
1936            "x-amz-target",
1937            "AWSIESnowballJobManagementService.CancelCluster",
1938        );
1939        let encoded = serde_json::to_string(&input).unwrap();
1940        request.set_payload(Some(encoded));
1941
1942        let response = self
1943            .sign_and_dispatch(request, CancelClusterError::from_response)
1944            .await?;
1945        let mut response = response;
1946        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1947        proto::json::ResponsePayload::new(&response).deserialize::<CancelClusterResult, _>()
1948    }
1949
1950    /// <p>Cancels the specified job. You can only cancel a job before its <code>JobState</code> value changes to <code>PreparingAppliance</code>. Requesting the <code>ListJobs</code> or <code>DescribeJob</code> action returns a job's <code>JobState</code> as part of the response element data returned.</p>
1951    async fn cancel_job(
1952        &self,
1953        input: CancelJobRequest,
1954    ) -> Result<CancelJobResult, RusotoError<CancelJobError>> {
1955        let mut request = self.new_signed_request("POST", "/");
1956        request.add_header(
1957            "x-amz-target",
1958            "AWSIESnowballJobManagementService.CancelJob",
1959        );
1960        let encoded = serde_json::to_string(&input).unwrap();
1961        request.set_payload(Some(encoded));
1962
1963        let response = self
1964            .sign_and_dispatch(request, CancelJobError::from_response)
1965            .await?;
1966        let mut response = response;
1967        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1968        proto::json::ResponsePayload::new(&response).deserialize::<CancelJobResult, _>()
1969    }
1970
1971    /// <p>Creates an address for a Snowball to be shipped to. In most regions, addresses are validated at the time of creation. The address you provide must be located within the serviceable area of your region. If the address is invalid or unsupported, then an exception is thrown.</p>
1972    async fn create_address(
1973        &self,
1974        input: CreateAddressRequest,
1975    ) -> Result<CreateAddressResult, RusotoError<CreateAddressError>> {
1976        let mut request = self.new_signed_request("POST", "/");
1977        request.add_header(
1978            "x-amz-target",
1979            "AWSIESnowballJobManagementService.CreateAddress",
1980        );
1981        let encoded = serde_json::to_string(&input).unwrap();
1982        request.set_payload(Some(encoded));
1983
1984        let response = self
1985            .sign_and_dispatch(request, CreateAddressError::from_response)
1986            .await?;
1987        let mut response = response;
1988        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
1989        proto::json::ResponsePayload::new(&response).deserialize::<CreateAddressResult, _>()
1990    }
1991
1992    /// <p>Creates an empty cluster. Each cluster supports five nodes. You use the <a>CreateJob</a> action separately to create the jobs for each of these nodes. The cluster does not ship until these five node jobs have been created.</p>
1993    async fn create_cluster(
1994        &self,
1995        input: CreateClusterRequest,
1996    ) -> Result<CreateClusterResult, RusotoError<CreateClusterError>> {
1997        let mut request = self.new_signed_request("POST", "/");
1998        request.add_header(
1999            "x-amz-target",
2000            "AWSIESnowballJobManagementService.CreateCluster",
2001        );
2002        let encoded = serde_json::to_string(&input).unwrap();
2003        request.set_payload(Some(encoded));
2004
2005        let response = self
2006            .sign_and_dispatch(request, CreateClusterError::from_response)
2007            .await?;
2008        let mut response = response;
2009        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2010        proto::json::ResponsePayload::new(&response).deserialize::<CreateClusterResult, _>()
2011    }
2012
2013    /// <p>Creates a job to import or export data between Amazon S3 and your on-premises data center. Your AWS account must have the right trust policies and permissions in place to create a job for Snowball. If you're creating a job for a node in a cluster, you only need to provide the <code>clusterId</code> value; the other job attributes are inherited from the cluster. </p>
2014    async fn create_job(
2015        &self,
2016        input: CreateJobRequest,
2017    ) -> Result<CreateJobResult, RusotoError<CreateJobError>> {
2018        let mut request = self.new_signed_request("POST", "/");
2019        request.add_header(
2020            "x-amz-target",
2021            "AWSIESnowballJobManagementService.CreateJob",
2022        );
2023        let encoded = serde_json::to_string(&input).unwrap();
2024        request.set_payload(Some(encoded));
2025
2026        let response = self
2027            .sign_and_dispatch(request, CreateJobError::from_response)
2028            .await?;
2029        let mut response = response;
2030        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2031        proto::json::ResponsePayload::new(&response).deserialize::<CreateJobResult, _>()
2032    }
2033
2034    /// <p>Takes an <code>AddressId</code> and returns specific details about that address in the form of an <code>Address</code> object.</p>
2035    async fn describe_address(
2036        &self,
2037        input: DescribeAddressRequest,
2038    ) -> Result<DescribeAddressResult, RusotoError<DescribeAddressError>> {
2039        let mut request = self.new_signed_request("POST", "/");
2040        request.add_header(
2041            "x-amz-target",
2042            "AWSIESnowballJobManagementService.DescribeAddress",
2043        );
2044        let encoded = serde_json::to_string(&input).unwrap();
2045        request.set_payload(Some(encoded));
2046
2047        let response = self
2048            .sign_and_dispatch(request, DescribeAddressError::from_response)
2049            .await?;
2050        let mut response = response;
2051        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2052        proto::json::ResponsePayload::new(&response).deserialize::<DescribeAddressResult, _>()
2053    }
2054
2055    /// <p>Returns a specified number of <code>ADDRESS</code> objects. Calling this API in one of the US regions will return addresses from the list of all addresses associated with this account in all US regions.</p>
2056    async fn describe_addresses(
2057        &self,
2058        input: DescribeAddressesRequest,
2059    ) -> Result<DescribeAddressesResult, RusotoError<DescribeAddressesError>> {
2060        let mut request = self.new_signed_request("POST", "/");
2061        request.add_header(
2062            "x-amz-target",
2063            "AWSIESnowballJobManagementService.DescribeAddresses",
2064        );
2065        let encoded = serde_json::to_string(&input).unwrap();
2066        request.set_payload(Some(encoded));
2067
2068        let response = self
2069            .sign_and_dispatch(request, DescribeAddressesError::from_response)
2070            .await?;
2071        let mut response = response;
2072        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2073        proto::json::ResponsePayload::new(&response).deserialize::<DescribeAddressesResult, _>()
2074    }
2075
2076    /// <p>Returns information about a specific cluster including shipping information, cluster status, and other important metadata.</p>
2077    async fn describe_cluster(
2078        &self,
2079        input: DescribeClusterRequest,
2080    ) -> Result<DescribeClusterResult, RusotoError<DescribeClusterError>> {
2081        let mut request = self.new_signed_request("POST", "/");
2082        request.add_header(
2083            "x-amz-target",
2084            "AWSIESnowballJobManagementService.DescribeCluster",
2085        );
2086        let encoded = serde_json::to_string(&input).unwrap();
2087        request.set_payload(Some(encoded));
2088
2089        let response = self
2090            .sign_and_dispatch(request, DescribeClusterError::from_response)
2091            .await?;
2092        let mut response = response;
2093        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2094        proto::json::ResponsePayload::new(&response).deserialize::<DescribeClusterResult, _>()
2095    }
2096
2097    /// <p>Returns information about a specific job including shipping information, job status, and other important metadata. </p>
2098    async fn describe_job(
2099        &self,
2100        input: DescribeJobRequest,
2101    ) -> Result<DescribeJobResult, RusotoError<DescribeJobError>> {
2102        let mut request = self.new_signed_request("POST", "/");
2103        request.add_header(
2104            "x-amz-target",
2105            "AWSIESnowballJobManagementService.DescribeJob",
2106        );
2107        let encoded = serde_json::to_string(&input).unwrap();
2108        request.set_payload(Some(encoded));
2109
2110        let response = self
2111            .sign_and_dispatch(request, DescribeJobError::from_response)
2112            .await?;
2113        let mut response = response;
2114        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2115        proto::json::ResponsePayload::new(&response).deserialize::<DescribeJobResult, _>()
2116    }
2117
2118    /// <p>Returns a link to an Amazon S3 presigned URL for the manifest file associated with the specified <code>JobId</code> value. You can access the manifest file for up to 60 minutes after this request has been made. To access the manifest file after 60 minutes have passed, you'll have to make another call to the <code>GetJobManifest</code> action.</p> <p>The manifest is an encrypted file that you can download after your job enters the <code>WithCustomer</code> status. The manifest is decrypted by using the <code>UnlockCode</code> code value, when you pass both values to the Snowball through the Snowball client when the client is started for the first time.</p> <p>As a best practice, we recommend that you don't save a copy of an <code>UnlockCode</code> value in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.</p> <p>The credentials of a given job, including its manifest file and unlock code, expire 90 days after the job is created.</p>
2119    async fn get_job_manifest(
2120        &self,
2121        input: GetJobManifestRequest,
2122    ) -> Result<GetJobManifestResult, RusotoError<GetJobManifestError>> {
2123        let mut request = self.new_signed_request("POST", "/");
2124        request.add_header(
2125            "x-amz-target",
2126            "AWSIESnowballJobManagementService.GetJobManifest",
2127        );
2128        let encoded = serde_json::to_string(&input).unwrap();
2129        request.set_payload(Some(encoded));
2130
2131        let response = self
2132            .sign_and_dispatch(request, GetJobManifestError::from_response)
2133            .await?;
2134        let mut response = response;
2135        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2136        proto::json::ResponsePayload::new(&response).deserialize::<GetJobManifestResult, _>()
2137    }
2138
2139    /// <p>Returns the <code>UnlockCode</code> code value for the specified job. A particular <code>UnlockCode</code> value can be accessed for up to 90 days after the associated job has been created.</p> <p>The <code>UnlockCode</code> value is a 29-character code with 25 alphanumeric characters and 4 hyphens. This code is used to decrypt the manifest file when it is passed along with the manifest to the Snowball through the Snowball client when the client is started for the first time.</p> <p>As a best practice, we recommend that you don't save a copy of the <code>UnlockCode</code> in the same location as the manifest file for that job. Saving these separately helps prevent unauthorized parties from gaining access to the Snowball associated with that job.</p>
2140    async fn get_job_unlock_code(
2141        &self,
2142        input: GetJobUnlockCodeRequest,
2143    ) -> Result<GetJobUnlockCodeResult, RusotoError<GetJobUnlockCodeError>> {
2144        let mut request = self.new_signed_request("POST", "/");
2145        request.add_header(
2146            "x-amz-target",
2147            "AWSIESnowballJobManagementService.GetJobUnlockCode",
2148        );
2149        let encoded = serde_json::to_string(&input).unwrap();
2150        request.set_payload(Some(encoded));
2151
2152        let response = self
2153            .sign_and_dispatch(request, GetJobUnlockCodeError::from_response)
2154            .await?;
2155        let mut response = response;
2156        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2157        proto::json::ResponsePayload::new(&response).deserialize::<GetJobUnlockCodeResult, _>()
2158    }
2159
2160    /// <p>Returns information about the Snowball service limit for your account, and also the number of Snowballs your account has in use.</p> <p>The default service limit for the number of Snowballs that you can have at one time is 1. If you want to increase your service limit, contact AWS Support.</p>
2161    async fn get_snowball_usage(
2162        &self,
2163    ) -> Result<GetSnowballUsageResult, RusotoError<GetSnowballUsageError>> {
2164        let mut request = self.new_signed_request("POST", "/");
2165        request.add_header(
2166            "x-amz-target",
2167            "AWSIESnowballJobManagementService.GetSnowballUsage",
2168        );
2169        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
2170
2171        let response = self
2172            .sign_and_dispatch(request, GetSnowballUsageError::from_response)
2173            .await?;
2174        let mut response = response;
2175        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2176        proto::json::ResponsePayload::new(&response).deserialize::<GetSnowballUsageResult, _>()
2177    }
2178
2179    /// <p>Returns an Amazon S3 presigned URL for an update file associated with a specified <code>JobId</code>.</p>
2180    async fn get_software_updates(
2181        &self,
2182        input: GetSoftwareUpdatesRequest,
2183    ) -> Result<GetSoftwareUpdatesResult, RusotoError<GetSoftwareUpdatesError>> {
2184        let mut request = self.new_signed_request("POST", "/");
2185        request.add_header(
2186            "x-amz-target",
2187            "AWSIESnowballJobManagementService.GetSoftwareUpdates",
2188        );
2189        let encoded = serde_json::to_string(&input).unwrap();
2190        request.set_payload(Some(encoded));
2191
2192        let response = self
2193            .sign_and_dispatch(request, GetSoftwareUpdatesError::from_response)
2194            .await?;
2195        let mut response = response;
2196        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2197        proto::json::ResponsePayload::new(&response).deserialize::<GetSoftwareUpdatesResult, _>()
2198    }
2199
2200    /// <p>Returns an array of <code>JobListEntry</code> objects of the specified length. Each <code>JobListEntry</code> object is for a job in the specified cluster and contains a job's state, a job's ID, and other information.</p>
2201    async fn list_cluster_jobs(
2202        &self,
2203        input: ListClusterJobsRequest,
2204    ) -> Result<ListClusterJobsResult, RusotoError<ListClusterJobsError>> {
2205        let mut request = self.new_signed_request("POST", "/");
2206        request.add_header(
2207            "x-amz-target",
2208            "AWSIESnowballJobManagementService.ListClusterJobs",
2209        );
2210        let encoded = serde_json::to_string(&input).unwrap();
2211        request.set_payload(Some(encoded));
2212
2213        let response = self
2214            .sign_and_dispatch(request, ListClusterJobsError::from_response)
2215            .await?;
2216        let mut response = response;
2217        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2218        proto::json::ResponsePayload::new(&response).deserialize::<ListClusterJobsResult, _>()
2219    }
2220
2221    /// <p>Returns an array of <code>ClusterListEntry</code> objects of the specified length. Each <code>ClusterListEntry</code> object contains a cluster's state, a cluster's ID, and other important status information.</p>
2222    async fn list_clusters(
2223        &self,
2224        input: ListClustersRequest,
2225    ) -> Result<ListClustersResult, RusotoError<ListClustersError>> {
2226        let mut request = self.new_signed_request("POST", "/");
2227        request.add_header(
2228            "x-amz-target",
2229            "AWSIESnowballJobManagementService.ListClusters",
2230        );
2231        let encoded = serde_json::to_string(&input).unwrap();
2232        request.set_payload(Some(encoded));
2233
2234        let response = self
2235            .sign_and_dispatch(request, ListClustersError::from_response)
2236            .await?;
2237        let mut response = response;
2238        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2239        proto::json::ResponsePayload::new(&response).deserialize::<ListClustersResult, _>()
2240    }
2241
2242    /// <p>This action returns a list of the different Amazon EC2 Amazon Machine Images (AMIs) that are owned by your AWS account that would be supported for use on a Snowball Edge device. Currently, supported AMIs are based on the CentOS 7 (x86_64) - with Updates HVM, Ubuntu Server 14.04 LTS (HVM), and Ubuntu 16.04 LTS - Xenial (HVM) images, available on the AWS Marketplace.</p>
2243    async fn list_compatible_images(
2244        &self,
2245        input: ListCompatibleImagesRequest,
2246    ) -> Result<ListCompatibleImagesResult, RusotoError<ListCompatibleImagesError>> {
2247        let mut request = self.new_signed_request("POST", "/");
2248        request.add_header(
2249            "x-amz-target",
2250            "AWSIESnowballJobManagementService.ListCompatibleImages",
2251        );
2252        let encoded = serde_json::to_string(&input).unwrap();
2253        request.set_payload(Some(encoded));
2254
2255        let response = self
2256            .sign_and_dispatch(request, ListCompatibleImagesError::from_response)
2257            .await?;
2258        let mut response = response;
2259        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2260        proto::json::ResponsePayload::new(&response).deserialize::<ListCompatibleImagesResult, _>()
2261    }
2262
2263    /// <p>Returns an array of <code>JobListEntry</code> objects of the specified length. Each <code>JobListEntry</code> object contains a job's state, a job's ID, and a value that indicates whether the job is a job part, in the case of export jobs. Calling this API action in one of the US regions will return jobs from the list of all jobs associated with this account in all US regions.</p>
2264    async fn list_jobs(
2265        &self,
2266        input: ListJobsRequest,
2267    ) -> Result<ListJobsResult, RusotoError<ListJobsError>> {
2268        let mut request = self.new_signed_request("POST", "/");
2269        request.add_header("x-amz-target", "AWSIESnowballJobManagementService.ListJobs");
2270        let encoded = serde_json::to_string(&input).unwrap();
2271        request.set_payload(Some(encoded));
2272
2273        let response = self
2274            .sign_and_dispatch(request, ListJobsError::from_response)
2275            .await?;
2276        let mut response = response;
2277        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2278        proto::json::ResponsePayload::new(&response).deserialize::<ListJobsResult, _>()
2279    }
2280
2281    /// <p>While a cluster's <code>ClusterState</code> value is in the <code>AwaitingQuorum</code> state, you can update some of the information associated with a cluster. Once the cluster changes to a different job state, usually 60 minutes after the cluster being created, this action is no longer available.</p>
2282    async fn update_cluster(
2283        &self,
2284        input: UpdateClusterRequest,
2285    ) -> Result<UpdateClusterResult, RusotoError<UpdateClusterError>> {
2286        let mut request = self.new_signed_request("POST", "/");
2287        request.add_header(
2288            "x-amz-target",
2289            "AWSIESnowballJobManagementService.UpdateCluster",
2290        );
2291        let encoded = serde_json::to_string(&input).unwrap();
2292        request.set_payload(Some(encoded));
2293
2294        let response = self
2295            .sign_and_dispatch(request, UpdateClusterError::from_response)
2296            .await?;
2297        let mut response = response;
2298        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2299        proto::json::ResponsePayload::new(&response).deserialize::<UpdateClusterResult, _>()
2300    }
2301
2302    /// <p>While a job's <code>JobState</code> value is <code>New</code>, you can update some of the information associated with a job. Once the job changes to a different job state, usually within 60 minutes of the job being created, this action is no longer available.</p>
2303    async fn update_job(
2304        &self,
2305        input: UpdateJobRequest,
2306    ) -> Result<UpdateJobResult, RusotoError<UpdateJobError>> {
2307        let mut request = self.new_signed_request("POST", "/");
2308        request.add_header(
2309            "x-amz-target",
2310            "AWSIESnowballJobManagementService.UpdateJob",
2311        );
2312        let encoded = serde_json::to_string(&input).unwrap();
2313        request.set_payload(Some(encoded));
2314
2315        let response = self
2316            .sign_and_dispatch(request, UpdateJobError::from_response)
2317            .await?;
2318        let mut response = response;
2319        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2320        proto::json::ResponsePayload::new(&response).deserialize::<UpdateJobResult, _>()
2321    }
2322}