rusoto_mgh/
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 MigrationHubClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "mgh", &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 state of an application discovered through Migration Hub import, the AWS Agentless Discovery Connector, or the AWS Application Discovery Agent.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct ApplicationState {
57    /// <p>The configurationId from the Application Discovery Service that uniquely identifies an application.</p>
58    #[serde(rename = "ApplicationId")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub application_id: Option<String>,
61    /// <p>The current status of an application.</p>
62    #[serde(rename = "ApplicationStatus")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub application_status: Option<String>,
65    /// <p>The timestamp when the application status was last updated.</p>
66    #[serde(rename = "LastUpdatedTime")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub last_updated_time: Option<f64>,
69}
70
71#[derive(Clone, Debug, Default, PartialEq, Serialize)]
72#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
73pub struct AssociateCreatedArtifactRequest {
74    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.) </p>
75    #[serde(rename = "CreatedArtifact")]
76    pub created_artifact: CreatedArtifact,
77    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
78    #[serde(rename = "DryRun")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub dry_run: Option<bool>,
81    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
82    #[serde(rename = "MigrationTaskName")]
83    pub migration_task_name: String,
84    /// <p>The name of the ProgressUpdateStream. </p>
85    #[serde(rename = "ProgressUpdateStream")]
86    pub progress_update_stream: String,
87}
88
89#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
90#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
91pub struct AssociateCreatedArtifactResult {}
92
93#[derive(Clone, Debug, Default, PartialEq, Serialize)]
94#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
95pub struct AssociateDiscoveredResourceRequest {
96    /// <p>Object representing a Resource.</p>
97    #[serde(rename = "DiscoveredResource")]
98    pub discovered_resource: DiscoveredResource,
99    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
100    #[serde(rename = "DryRun")]
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub dry_run: Option<bool>,
103    /// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
104    #[serde(rename = "MigrationTaskName")]
105    pub migration_task_name: String,
106    /// <p>The name of the ProgressUpdateStream.</p>
107    #[serde(rename = "ProgressUpdateStream")]
108    pub progress_update_stream: String,
109}
110
111#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
112#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
113pub struct AssociateDiscoveredResourceResult {}
114
115#[derive(Clone, Debug, Default, PartialEq, Serialize)]
116#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
117pub struct CreateProgressUpdateStreamRequest {
118    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
119    #[serde(rename = "DryRun")]
120    #[serde(skip_serializing_if = "Option::is_none")]
121    pub dry_run: Option<bool>,
122    /// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
123    #[serde(rename = "ProgressUpdateStreamName")]
124    pub progress_update_stream_name: String,
125}
126
127#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
128#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
129pub struct CreateProgressUpdateStreamResult {}
130
131/// <p>An ARN of the AWS cloud resource target receiving the migration (e.g., AMI, EC2 instance, RDS instance, etc.).</p>
132#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
133pub struct CreatedArtifact {
134    /// <p>A description that can be free-form text to record additional detail about the artifact for clarity or for later reference.</p>
135    #[serde(rename = "Description")]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub description: Option<String>,
138    /// <p>An ARN that uniquely identifies the result of a migration task.</p>
139    #[serde(rename = "Name")]
140    pub name: String,
141}
142
143#[derive(Clone, Debug, Default, PartialEq, Serialize)]
144#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
145pub struct DeleteProgressUpdateStreamRequest {
146    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
147    #[serde(rename = "DryRun")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub dry_run: Option<bool>,
150    /// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
151    #[serde(rename = "ProgressUpdateStreamName")]
152    pub progress_update_stream_name: String,
153}
154
155#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
156#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
157pub struct DeleteProgressUpdateStreamResult {}
158
159#[derive(Clone, Debug, Default, PartialEq, Serialize)]
160#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
161pub struct DescribeApplicationStateRequest {
162    /// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
163    #[serde(rename = "ApplicationId")]
164    pub application_id: String,
165}
166
167#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
168#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
169pub struct DescribeApplicationStateResult {
170    /// <p>Status of the application - Not Started, In-Progress, Complete.</p>
171    #[serde(rename = "ApplicationStatus")]
172    #[serde(skip_serializing_if = "Option::is_none")]
173    pub application_status: Option<String>,
174    /// <p>The timestamp when the application status was last updated.</p>
175    #[serde(rename = "LastUpdatedTime")]
176    #[serde(skip_serializing_if = "Option::is_none")]
177    pub last_updated_time: Option<f64>,
178}
179
180#[derive(Clone, Debug, Default, PartialEq, Serialize)]
181#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
182pub struct DescribeMigrationTaskRequest {
183    /// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
184    #[serde(rename = "MigrationTaskName")]
185    pub migration_task_name: String,
186    /// <p>The name of the ProgressUpdateStream. </p>
187    #[serde(rename = "ProgressUpdateStream")]
188    pub progress_update_stream: String,
189}
190
191#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
192#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
193pub struct DescribeMigrationTaskResult {
194    /// <p>Object encapsulating information about the migration task.</p>
195    #[serde(rename = "MigrationTask")]
196    #[serde(skip_serializing_if = "Option::is_none")]
197    pub migration_task: Option<MigrationTask>,
198}
199
200#[derive(Clone, Debug, Default, PartialEq, Serialize)]
201#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
202pub struct DisassociateCreatedArtifactRequest {
203    /// <p>An ARN of the AWS resource related to the migration (e.g., AMI, EC2 instance, RDS instance, etc.)</p>
204    #[serde(rename = "CreatedArtifactName")]
205    pub created_artifact_name: String,
206    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
207    #[serde(rename = "DryRun")]
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub dry_run: Option<bool>,
210    /// <p>Unique identifier that references the migration task to be disassociated with the artifact. <i>Do not store personal data in this field.</i> </p>
211    #[serde(rename = "MigrationTaskName")]
212    pub migration_task_name: String,
213    /// <p>The name of the ProgressUpdateStream. </p>
214    #[serde(rename = "ProgressUpdateStream")]
215    pub progress_update_stream: String,
216}
217
218#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
219#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
220pub struct DisassociateCreatedArtifactResult {}
221
222#[derive(Clone, Debug, Default, PartialEq, Serialize)]
223#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
224pub struct DisassociateDiscoveredResourceRequest {
225    /// <p>ConfigurationId of the Application Discovery Service resource to be disassociated.</p>
226    #[serde(rename = "ConfigurationId")]
227    pub configuration_id: String,
228    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
229    #[serde(rename = "DryRun")]
230    #[serde(skip_serializing_if = "Option::is_none")]
231    pub dry_run: Option<bool>,
232    /// <p>The identifier given to the MigrationTask. <i>Do not store personal data in this field.</i> </p>
233    #[serde(rename = "MigrationTaskName")]
234    pub migration_task_name: String,
235    /// <p>The name of the ProgressUpdateStream.</p>
236    #[serde(rename = "ProgressUpdateStream")]
237    pub progress_update_stream: String,
238}
239
240#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
241#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
242pub struct DisassociateDiscoveredResourceResult {}
243
244/// <p>Object representing the on-premises resource being migrated.</p>
245#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
246pub struct DiscoveredResource {
247    /// <p>The configurationId in Application Discovery Service that uniquely identifies the on-premise resource.</p>
248    #[serde(rename = "ConfigurationId")]
249    pub configuration_id: String,
250    /// <p>A description that can be free-form text to record additional detail about the discovered resource for clarity or later reference.</p>
251    #[serde(rename = "Description")]
252    #[serde(skip_serializing_if = "Option::is_none")]
253    pub description: Option<String>,
254}
255
256#[derive(Clone, Debug, Default, PartialEq, Serialize)]
257#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
258pub struct ImportMigrationTaskRequest {
259    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
260    #[serde(rename = "DryRun")]
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub dry_run: Option<bool>,
263    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
264    #[serde(rename = "MigrationTaskName")]
265    pub migration_task_name: String,
266    /// <p>The name of the ProgressUpdateStream. &gt;</p>
267    #[serde(rename = "ProgressUpdateStream")]
268    pub progress_update_stream: String,
269}
270
271#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
273pub struct ImportMigrationTaskResult {}
274
275#[derive(Clone, Debug, Default, PartialEq, Serialize)]
276#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
277pub struct ListApplicationStatesRequest {
278    /// <p>The configurationIds from the Application Discovery Service that uniquely identifies your applications.</p>
279    #[serde(rename = "ApplicationIds")]
280    #[serde(skip_serializing_if = "Option::is_none")]
281    pub application_ids: Option<Vec<String>>,
282    /// <p>Maximum number of results to be returned per page.</p>
283    #[serde(rename = "MaxResults")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub max_results: Option<i64>,
286    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
287    #[serde(rename = "NextToken")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub next_token: Option<String>,
290}
291
292#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
293#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
294pub struct ListApplicationStatesResult {
295    /// <p>A list of Applications that exist in Application Discovery Service.</p>
296    #[serde(rename = "ApplicationStateList")]
297    #[serde(skip_serializing_if = "Option::is_none")]
298    pub application_state_list: Option<Vec<ApplicationState>>,
299    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
300    #[serde(rename = "NextToken")]
301    #[serde(skip_serializing_if = "Option::is_none")]
302    pub next_token: Option<String>,
303}
304
305#[derive(Clone, Debug, Default, PartialEq, Serialize)]
306#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
307pub struct ListCreatedArtifactsRequest {
308    /// <p>Maximum number of results to be returned per page.</p>
309    #[serde(rename = "MaxResults")]
310    #[serde(skip_serializing_if = "Option::is_none")]
311    pub max_results: Option<i64>,
312    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
313    #[serde(rename = "MigrationTaskName")]
314    pub migration_task_name: String,
315    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
316    #[serde(rename = "NextToken")]
317    #[serde(skip_serializing_if = "Option::is_none")]
318    pub next_token: Option<String>,
319    /// <p>The name of the ProgressUpdateStream. </p>
320    #[serde(rename = "ProgressUpdateStream")]
321    pub progress_update_stream: String,
322}
323
324#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
325#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
326pub struct ListCreatedArtifactsResult {
327    /// <p>List of created artifacts up to the maximum number of results specified in the request.</p>
328    #[serde(rename = "CreatedArtifactList")]
329    #[serde(skip_serializing_if = "Option::is_none")]
330    pub created_artifact_list: Option<Vec<CreatedArtifact>>,
331    /// <p>If there are more created artifacts than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
332    #[serde(rename = "NextToken")]
333    #[serde(skip_serializing_if = "Option::is_none")]
334    pub next_token: Option<String>,
335}
336
337#[derive(Clone, Debug, Default, PartialEq, Serialize)]
338#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
339pub struct ListDiscoveredResourcesRequest {
340    /// <p>The maximum number of results returned per page.</p>
341    #[serde(rename = "MaxResults")]
342    #[serde(skip_serializing_if = "Option::is_none")]
343    pub max_results: Option<i64>,
344    /// <p>The name of the MigrationTask. <i>Do not store personal data in this field.</i> </p>
345    #[serde(rename = "MigrationTaskName")]
346    pub migration_task_name: String,
347    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
348    #[serde(rename = "NextToken")]
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub next_token: Option<String>,
351    /// <p>The name of the ProgressUpdateStream.</p>
352    #[serde(rename = "ProgressUpdateStream")]
353    pub progress_update_stream: String,
354}
355
356#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
357#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
358pub struct ListDiscoveredResourcesResult {
359    /// <p>Returned list of discovered resources associated with the given MigrationTask.</p>
360    #[serde(rename = "DiscoveredResourceList")]
361    #[serde(skip_serializing_if = "Option::is_none")]
362    pub discovered_resource_list: Option<Vec<DiscoveredResource>>,
363    /// <p>If there are more discovered resources than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
364    #[serde(rename = "NextToken")]
365    #[serde(skip_serializing_if = "Option::is_none")]
366    pub next_token: Option<String>,
367}
368
369#[derive(Clone, Debug, Default, PartialEq, Serialize)]
370#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
371pub struct ListMigrationTasksRequest {
372    /// <p>Value to specify how many results are returned per page.</p>
373    #[serde(rename = "MaxResults")]
374    #[serde(skip_serializing_if = "Option::is_none")]
375    pub max_results: Option<i64>,
376    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
377    #[serde(rename = "NextToken")]
378    #[serde(skip_serializing_if = "Option::is_none")]
379    pub next_token: Option<String>,
380    /// <p>Filter migration tasks by discovered resource name.</p>
381    #[serde(rename = "ResourceName")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub resource_name: Option<String>,
384}
385
386#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
387#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
388pub struct ListMigrationTasksResult {
389    /// <p>Lists the migration task's summary which includes: <code>MigrationTaskName</code>, <code>ProgressPercent</code>, <code>ProgressUpdateStream</code>, <code>Status</code>, and the <code>UpdateDateTime</code> for each task.</p>
390    #[serde(rename = "MigrationTaskSummaryList")]
391    #[serde(skip_serializing_if = "Option::is_none")]
392    pub migration_task_summary_list: Option<Vec<MigrationTaskSummary>>,
393    /// <p>If there are more migration tasks than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
394    #[serde(rename = "NextToken")]
395    #[serde(skip_serializing_if = "Option::is_none")]
396    pub next_token: Option<String>,
397}
398
399#[derive(Clone, Debug, Default, PartialEq, Serialize)]
400#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
401pub struct ListProgressUpdateStreamsRequest {
402    /// <p>Filter to limit the maximum number of results to list per page.</p>
403    #[serde(rename = "MaxResults")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub max_results: Option<i64>,
406    /// <p>If a <code>NextToken</code> was returned by a previous call, there are more results available. To retrieve the next page of results, make the call again using the returned token in <code>NextToken</code>.</p>
407    #[serde(rename = "NextToken")]
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub next_token: Option<String>,
410}
411
412#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
413#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
414pub struct ListProgressUpdateStreamsResult {
415    /// <p>If there are more streams created than the max result, return the next token to be passed to the next call as a bookmark of where to start from.</p>
416    #[serde(rename = "NextToken")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub next_token: Option<String>,
419    /// <p>List of progress update streams up to the max number of results passed in the input.</p>
420    #[serde(rename = "ProgressUpdateStreamSummaryList")]
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub progress_update_stream_summary_list: Option<Vec<ProgressUpdateStreamSummary>>,
423}
424
425/// <p>Represents a migration task in a migration tool.</p>
426#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
427#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
428pub struct MigrationTask {
429    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
430    #[serde(rename = "MigrationTaskName")]
431    #[serde(skip_serializing_if = "Option::is_none")]
432    pub migration_task_name: Option<String>,
433    /// <p>A name that identifies the vendor of the migration tool being used.</p>
434    #[serde(rename = "ProgressUpdateStream")]
435    #[serde(skip_serializing_if = "Option::is_none")]
436    pub progress_update_stream: Option<String>,
437    /// <p>Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.</p>
438    #[serde(rename = "ResourceAttributeList")]
439    #[serde(skip_serializing_if = "Option::is_none")]
440    pub resource_attribute_list: Option<Vec<ResourceAttribute>>,
441    /// <p>Task object encapsulating task information.</p>
442    #[serde(rename = "Task")]
443    #[serde(skip_serializing_if = "Option::is_none")]
444    pub task: Option<Task>,
445    /// <p>The timestamp when the task was gathered.</p>
446    #[serde(rename = "UpdateDateTime")]
447    #[serde(skip_serializing_if = "Option::is_none")]
448    pub update_date_time: Option<f64>,
449}
450
451/// <p>MigrationTaskSummary includes <code>MigrationTaskName</code>, <code>ProgressPercent</code>, <code>ProgressUpdateStream</code>, <code>Status</code>, and <code>UpdateDateTime</code> for each task.</p>
452#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
453#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
454pub struct MigrationTaskSummary {
455    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
456    #[serde(rename = "MigrationTaskName")]
457    #[serde(skip_serializing_if = "Option::is_none")]
458    pub migration_task_name: Option<String>,
459    /// <p>Indication of the percentage completion of the task.</p>
460    #[serde(rename = "ProgressPercent")]
461    #[serde(skip_serializing_if = "Option::is_none")]
462    pub progress_percent: Option<i64>,
463    /// <p>An AWS resource used for access control. It should uniquely identify the migration tool as it is used for all updates made by the tool.</p>
464    #[serde(rename = "ProgressUpdateStream")]
465    #[serde(skip_serializing_if = "Option::is_none")]
466    pub progress_update_stream: Option<String>,
467    /// <p>Status of the task.</p>
468    #[serde(rename = "Status")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub status: Option<String>,
471    /// <p>Detail information of what is being done within the overall status state.</p>
472    #[serde(rename = "StatusDetail")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub status_detail: Option<String>,
475    /// <p>The timestamp when the task was gathered.</p>
476    #[serde(rename = "UpdateDateTime")]
477    #[serde(skip_serializing_if = "Option::is_none")]
478    pub update_date_time: Option<f64>,
479}
480
481#[derive(Clone, Debug, Default, PartialEq, Serialize)]
482#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
483pub struct NotifyApplicationStateRequest {
484    /// <p>The configurationId in Application Discovery Service that uniquely identifies the grouped application.</p>
485    #[serde(rename = "ApplicationId")]
486    pub application_id: String,
487    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
488    #[serde(rename = "DryRun")]
489    #[serde(skip_serializing_if = "Option::is_none")]
490    pub dry_run: Option<bool>,
491    /// <p>Status of the application - Not Started, In-Progress, Complete.</p>
492    #[serde(rename = "Status")]
493    pub status: String,
494    /// <p>The timestamp when the application state changed.</p>
495    #[serde(rename = "UpdateDateTime")]
496    #[serde(skip_serializing_if = "Option::is_none")]
497    pub update_date_time: Option<f64>,
498}
499
500#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
501#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
502pub struct NotifyApplicationStateResult {}
503
504#[derive(Clone, Debug, Default, PartialEq, Serialize)]
505#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
506pub struct NotifyMigrationTaskStateRequest {
507    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
508    #[serde(rename = "DryRun")]
509    #[serde(skip_serializing_if = "Option::is_none")]
510    pub dry_run: Option<bool>,
511    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
512    #[serde(rename = "MigrationTaskName")]
513    pub migration_task_name: String,
514    /// <p>Number of seconds after the UpdateDateTime within which the Migration Hub can expect an update. If Migration Hub does not receive an update within the specified interval, then the migration task will be considered stale.</p>
515    #[serde(rename = "NextUpdateSeconds")]
516    pub next_update_seconds: i64,
517    /// <p>The name of the ProgressUpdateStream. </p>
518    #[serde(rename = "ProgressUpdateStream")]
519    pub progress_update_stream: String,
520    /// <p>Information about the task's progress and status.</p>
521    #[serde(rename = "Task")]
522    pub task: Task,
523    /// <p>The timestamp when the task was gathered.</p>
524    #[serde(rename = "UpdateDateTime")]
525    pub update_date_time: f64,
526}
527
528#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
529#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
530pub struct NotifyMigrationTaskStateResult {}
531
532/// <p>Summary of the AWS resource used for access control that is implicitly linked to your AWS account.</p>
533#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
534#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
535pub struct ProgressUpdateStreamSummary {
536    /// <p>The name of the ProgressUpdateStream. <i>Do not store personal data in this field.</i> </p>
537    #[serde(rename = "ProgressUpdateStreamName")]
538    #[serde(skip_serializing_if = "Option::is_none")]
539    pub progress_update_stream_name: Option<String>,
540}
541
542#[derive(Clone, Debug, Default, PartialEq, Serialize)]
543#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
544pub struct PutResourceAttributesRequest {
545    /// <p>Optional boolean flag to indicate whether any effect should take place. Used to test if the caller has permission to make the call.</p>
546    #[serde(rename = "DryRun")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub dry_run: Option<bool>,
549    /// <p>Unique identifier that references the migration task. <i>Do not store personal data in this field.</i> </p>
550    #[serde(rename = "MigrationTaskName")]
551    pub migration_task_name: String,
552    /// <p>The name of the ProgressUpdateStream. </p>
553    #[serde(rename = "ProgressUpdateStream")]
554    pub progress_update_stream: String,
555    /// <p><p>Information about the resource that is being migrated. This data will be used to map the task to a resource in the Application Discovery Service repository.</p> <note> <p>Takes the object array of <code>ResourceAttribute</code> where the <code>Type</code> field is reserved for the following values: <code>IPV4<em>ADDRESS | IPV6</em>ADDRESS | MAC<em>ADDRESS | FQDN | VM</em>MANAGER<em>ID | VM</em>MANAGED<em>OBJECT</em>REFERENCE | VM<em>NAME | VM</em>PATH | BIOS<em>ID | MOTHERBOARD</em>SERIAL<em>NUMBER</code> where the identifying value can be a string up to 256 characters.</p> </note> <important> <ul> <li> <p>If any &quot;VM&quot; related value is set for a <code>ResourceAttribute</code> object, it is required that <code>VM</em>MANAGER<em>ID</code>, as a minimum, is always set. If <code>VM</em>MANAGER<em>ID</code> is not set, then all &quot;VM&quot; fields will be discarded and &quot;VM&quot; fields will not be used for matching the migration task to a server in Application Discovery Service repository. See the &lt;a href=&quot;https://docs.aws.amazon.com/migrationhub/latest/ug/API</em>PutResourceAttributes.html#API<em>PutResourceAttributes</em>Examples&quot;&gt;Example</a> section below for a use case of specifying &quot;VM&quot; related values.</p> </li> <li> <p> If a server you are trying to match has multiple IP or MAC addresses, you should provide as many as you know in separate type/value pairs passed to the <code>ResourceAttributeList</code> parameter to maximize the chances of matching.</p> </li> </ul> </important></p>
556    #[serde(rename = "ResourceAttributeList")]
557    pub resource_attribute_list: Vec<ResourceAttribute>,
558}
559
560#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
561#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
562pub struct PutResourceAttributesResult {}
563
564/// <p><p>Attribute associated with a resource.</p> <p>Note the corresponding format required per type listed below:</p> <dl> <dt>IPV4</dt> <dd> <p> <code>x.x.x.x</code> </p> <p> <i>where x is an integer in the range [0,255]</i> </p> </dd> <dt>IPV6</dt> <dd> <p> <code>y : y : y : y : y : y : y : y</code> </p> <p> <i>where y is a hexadecimal between 0 and FFFF. [0, FFFF]</i> </p> </dd> <dt>MAC_ADDRESS</dt> <dd> <p> <code>^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$</code> </p> </dd> <dt>FQDN</dt> <dd> <p> <code>^[^&lt;&gt;{}\\/?,=\p{Cntrl}]{1,256}$</code> </p> </dd> </dl></p>
565#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
566pub struct ResourceAttribute {
567    /// <p>Type of resource.</p>
568    #[serde(rename = "Type")]
569    pub type_: String,
570    /// <p>Value of the resource type.</p>
571    #[serde(rename = "Value")]
572    pub value: String,
573}
574
575/// <p>Task object encapsulating task information.</p>
576#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
577pub struct Task {
578    /// <p>Indication of the percentage completion of the task.</p>
579    #[serde(rename = "ProgressPercent")]
580    #[serde(skip_serializing_if = "Option::is_none")]
581    pub progress_percent: Option<i64>,
582    /// <p>Status of the task - Not Started, In-Progress, Complete.</p>
583    #[serde(rename = "Status")]
584    pub status: String,
585    /// <p>Details of task status as notified by a migration tool. A tool might use this field to provide clarifying information about the status that is unique to that tool or that explains an error state.</p>
586    #[serde(rename = "StatusDetail")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub status_detail: Option<String>,
589}
590
591/// Errors returned by AssociateCreatedArtifact
592#[derive(Debug, PartialEq)]
593pub enum AssociateCreatedArtifactError {
594    /// <p>You do not have sufficient access to perform this action.</p>
595    AccessDenied(String),
596    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
597    DryRunOperation(String),
598    /// <p>The home region is not set. Set the home region to continue.</p>
599    HomeRegionNotSet(String),
600    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
601    InternalServerError(String),
602    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
603    InvalidInput(String),
604    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
605    ResourceNotFound(String),
606    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
607    ServiceUnavailable(String),
608    /// <p>The request was denied due to request throttling.</p>
609    Throttling(String),
610    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
611    UnauthorizedOperation(String),
612}
613
614impl AssociateCreatedArtifactError {
615    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateCreatedArtifactError> {
616        if let Some(err) = proto::json::Error::parse(&res) {
617            match err.typ.as_str() {
618                "AccessDeniedException" => {
619                    return RusotoError::Service(AssociateCreatedArtifactError::AccessDenied(
620                        err.msg,
621                    ))
622                }
623                "DryRunOperation" => {
624                    return RusotoError::Service(AssociateCreatedArtifactError::DryRunOperation(
625                        err.msg,
626                    ))
627                }
628                "HomeRegionNotSetException" => {
629                    return RusotoError::Service(AssociateCreatedArtifactError::HomeRegionNotSet(
630                        err.msg,
631                    ))
632                }
633                "InternalServerError" => {
634                    return RusotoError::Service(
635                        AssociateCreatedArtifactError::InternalServerError(err.msg),
636                    )
637                }
638                "InvalidInputException" => {
639                    return RusotoError::Service(AssociateCreatedArtifactError::InvalidInput(
640                        err.msg,
641                    ))
642                }
643                "ResourceNotFoundException" => {
644                    return RusotoError::Service(AssociateCreatedArtifactError::ResourceNotFound(
645                        err.msg,
646                    ))
647                }
648                "ServiceUnavailableException" => {
649                    return RusotoError::Service(AssociateCreatedArtifactError::ServiceUnavailable(
650                        err.msg,
651                    ))
652                }
653                "ThrottlingException" => {
654                    return RusotoError::Service(AssociateCreatedArtifactError::Throttling(err.msg))
655                }
656                "UnauthorizedOperation" => {
657                    return RusotoError::Service(
658                        AssociateCreatedArtifactError::UnauthorizedOperation(err.msg),
659                    )
660                }
661                "ValidationException" => return RusotoError::Validation(err.msg),
662                _ => {}
663            }
664        }
665        RusotoError::Unknown(res)
666    }
667}
668impl fmt::Display for AssociateCreatedArtifactError {
669    #[allow(unused_variables)]
670    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
671        match *self {
672            AssociateCreatedArtifactError::AccessDenied(ref cause) => write!(f, "{}", cause),
673            AssociateCreatedArtifactError::DryRunOperation(ref cause) => write!(f, "{}", cause),
674            AssociateCreatedArtifactError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
675            AssociateCreatedArtifactError::InternalServerError(ref cause) => write!(f, "{}", cause),
676            AssociateCreatedArtifactError::InvalidInput(ref cause) => write!(f, "{}", cause),
677            AssociateCreatedArtifactError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
678            AssociateCreatedArtifactError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
679            AssociateCreatedArtifactError::Throttling(ref cause) => write!(f, "{}", cause),
680            AssociateCreatedArtifactError::UnauthorizedOperation(ref cause) => {
681                write!(f, "{}", cause)
682            }
683        }
684    }
685}
686impl Error for AssociateCreatedArtifactError {}
687/// Errors returned by AssociateDiscoveredResource
688#[derive(Debug, PartialEq)]
689pub enum AssociateDiscoveredResourceError {
690    /// <p>You do not have sufficient access to perform this action.</p>
691    AccessDenied(String),
692    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
693    DryRunOperation(String),
694    /// <p>The home region is not set. Set the home region to continue.</p>
695    HomeRegionNotSet(String),
696    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
697    InternalServerError(String),
698    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
699    InvalidInput(String),
700    /// <p>Exception raised when there are problems accessing Application Discovery Service (Application Discovery Service); most likely due to a misconfigured policy or the <code>migrationhub-discovery</code> role is missing or not configured correctly.</p>
701    PolicyError(String),
702    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
703    ResourceNotFound(String),
704    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
705    ServiceUnavailable(String),
706    /// <p>The request was denied due to request throttling.</p>
707    Throttling(String),
708    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
709    UnauthorizedOperation(String),
710}
711
712impl AssociateDiscoveredResourceError {
713    pub fn from_response(
714        res: BufferedHttpResponse,
715    ) -> RusotoError<AssociateDiscoveredResourceError> {
716        if let Some(err) = proto::json::Error::parse(&res) {
717            match err.typ.as_str() {
718                "AccessDeniedException" => {
719                    return RusotoError::Service(AssociateDiscoveredResourceError::AccessDenied(
720                        err.msg,
721                    ))
722                }
723                "DryRunOperation" => {
724                    return RusotoError::Service(AssociateDiscoveredResourceError::DryRunOperation(
725                        err.msg,
726                    ))
727                }
728                "HomeRegionNotSetException" => {
729                    return RusotoError::Service(
730                        AssociateDiscoveredResourceError::HomeRegionNotSet(err.msg),
731                    )
732                }
733                "InternalServerError" => {
734                    return RusotoError::Service(
735                        AssociateDiscoveredResourceError::InternalServerError(err.msg),
736                    )
737                }
738                "InvalidInputException" => {
739                    return RusotoError::Service(AssociateDiscoveredResourceError::InvalidInput(
740                        err.msg,
741                    ))
742                }
743                "PolicyErrorException" => {
744                    return RusotoError::Service(AssociateDiscoveredResourceError::PolicyError(
745                        err.msg,
746                    ))
747                }
748                "ResourceNotFoundException" => {
749                    return RusotoError::Service(
750                        AssociateDiscoveredResourceError::ResourceNotFound(err.msg),
751                    )
752                }
753                "ServiceUnavailableException" => {
754                    return RusotoError::Service(
755                        AssociateDiscoveredResourceError::ServiceUnavailable(err.msg),
756                    )
757                }
758                "ThrottlingException" => {
759                    return RusotoError::Service(AssociateDiscoveredResourceError::Throttling(
760                        err.msg,
761                    ))
762                }
763                "UnauthorizedOperation" => {
764                    return RusotoError::Service(
765                        AssociateDiscoveredResourceError::UnauthorizedOperation(err.msg),
766                    )
767                }
768                "ValidationException" => return RusotoError::Validation(err.msg),
769                _ => {}
770            }
771        }
772        RusotoError::Unknown(res)
773    }
774}
775impl fmt::Display for AssociateDiscoveredResourceError {
776    #[allow(unused_variables)]
777    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
778        match *self {
779            AssociateDiscoveredResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
780            AssociateDiscoveredResourceError::DryRunOperation(ref cause) => write!(f, "{}", cause),
781            AssociateDiscoveredResourceError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
782            AssociateDiscoveredResourceError::InternalServerError(ref cause) => {
783                write!(f, "{}", cause)
784            }
785            AssociateDiscoveredResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
786            AssociateDiscoveredResourceError::PolicyError(ref cause) => write!(f, "{}", cause),
787            AssociateDiscoveredResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
788            AssociateDiscoveredResourceError::ServiceUnavailable(ref cause) => {
789                write!(f, "{}", cause)
790            }
791            AssociateDiscoveredResourceError::Throttling(ref cause) => write!(f, "{}", cause),
792            AssociateDiscoveredResourceError::UnauthorizedOperation(ref cause) => {
793                write!(f, "{}", cause)
794            }
795        }
796    }
797}
798impl Error for AssociateDiscoveredResourceError {}
799/// Errors returned by CreateProgressUpdateStream
800#[derive(Debug, PartialEq)]
801pub enum CreateProgressUpdateStreamError {
802    /// <p>You do not have sufficient access to perform this action.</p>
803    AccessDenied(String),
804    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
805    DryRunOperation(String),
806    /// <p>The home region is not set. Set the home region to continue.</p>
807    HomeRegionNotSet(String),
808    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
809    InternalServerError(String),
810    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
811    InvalidInput(String),
812    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
813    ServiceUnavailable(String),
814    /// <p>The request was denied due to request throttling.</p>
815    Throttling(String),
816    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
817    UnauthorizedOperation(String),
818}
819
820impl CreateProgressUpdateStreamError {
821    pub fn from_response(
822        res: BufferedHttpResponse,
823    ) -> RusotoError<CreateProgressUpdateStreamError> {
824        if let Some(err) = proto::json::Error::parse(&res) {
825            match err.typ.as_str() {
826                "AccessDeniedException" => {
827                    return RusotoError::Service(CreateProgressUpdateStreamError::AccessDenied(
828                        err.msg,
829                    ))
830                }
831                "DryRunOperation" => {
832                    return RusotoError::Service(CreateProgressUpdateStreamError::DryRunOperation(
833                        err.msg,
834                    ))
835                }
836                "HomeRegionNotSetException" => {
837                    return RusotoError::Service(CreateProgressUpdateStreamError::HomeRegionNotSet(
838                        err.msg,
839                    ))
840                }
841                "InternalServerError" => {
842                    return RusotoError::Service(
843                        CreateProgressUpdateStreamError::InternalServerError(err.msg),
844                    )
845                }
846                "InvalidInputException" => {
847                    return RusotoError::Service(CreateProgressUpdateStreamError::InvalidInput(
848                        err.msg,
849                    ))
850                }
851                "ServiceUnavailableException" => {
852                    return RusotoError::Service(
853                        CreateProgressUpdateStreamError::ServiceUnavailable(err.msg),
854                    )
855                }
856                "ThrottlingException" => {
857                    return RusotoError::Service(CreateProgressUpdateStreamError::Throttling(
858                        err.msg,
859                    ))
860                }
861                "UnauthorizedOperation" => {
862                    return RusotoError::Service(
863                        CreateProgressUpdateStreamError::UnauthorizedOperation(err.msg),
864                    )
865                }
866                "ValidationException" => return RusotoError::Validation(err.msg),
867                _ => {}
868            }
869        }
870        RusotoError::Unknown(res)
871    }
872}
873impl fmt::Display for CreateProgressUpdateStreamError {
874    #[allow(unused_variables)]
875    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
876        match *self {
877            CreateProgressUpdateStreamError::AccessDenied(ref cause) => write!(f, "{}", cause),
878            CreateProgressUpdateStreamError::DryRunOperation(ref cause) => write!(f, "{}", cause),
879            CreateProgressUpdateStreamError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
880            CreateProgressUpdateStreamError::InternalServerError(ref cause) => {
881                write!(f, "{}", cause)
882            }
883            CreateProgressUpdateStreamError::InvalidInput(ref cause) => write!(f, "{}", cause),
884            CreateProgressUpdateStreamError::ServiceUnavailable(ref cause) => {
885                write!(f, "{}", cause)
886            }
887            CreateProgressUpdateStreamError::Throttling(ref cause) => write!(f, "{}", cause),
888            CreateProgressUpdateStreamError::UnauthorizedOperation(ref cause) => {
889                write!(f, "{}", cause)
890            }
891        }
892    }
893}
894impl Error for CreateProgressUpdateStreamError {}
895/// Errors returned by DeleteProgressUpdateStream
896#[derive(Debug, PartialEq)]
897pub enum DeleteProgressUpdateStreamError {
898    /// <p>You do not have sufficient access to perform this action.</p>
899    AccessDenied(String),
900    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
901    DryRunOperation(String),
902    /// <p>The home region is not set. Set the home region to continue.</p>
903    HomeRegionNotSet(String),
904    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
905    InternalServerError(String),
906    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
907    InvalidInput(String),
908    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
909    ResourceNotFound(String),
910    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
911    ServiceUnavailable(String),
912    /// <p>The request was denied due to request throttling.</p>
913    Throttling(String),
914    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
915    UnauthorizedOperation(String),
916}
917
918impl DeleteProgressUpdateStreamError {
919    pub fn from_response(
920        res: BufferedHttpResponse,
921    ) -> RusotoError<DeleteProgressUpdateStreamError> {
922        if let Some(err) = proto::json::Error::parse(&res) {
923            match err.typ.as_str() {
924                "AccessDeniedException" => {
925                    return RusotoError::Service(DeleteProgressUpdateStreamError::AccessDenied(
926                        err.msg,
927                    ))
928                }
929                "DryRunOperation" => {
930                    return RusotoError::Service(DeleteProgressUpdateStreamError::DryRunOperation(
931                        err.msg,
932                    ))
933                }
934                "HomeRegionNotSetException" => {
935                    return RusotoError::Service(DeleteProgressUpdateStreamError::HomeRegionNotSet(
936                        err.msg,
937                    ))
938                }
939                "InternalServerError" => {
940                    return RusotoError::Service(
941                        DeleteProgressUpdateStreamError::InternalServerError(err.msg),
942                    )
943                }
944                "InvalidInputException" => {
945                    return RusotoError::Service(DeleteProgressUpdateStreamError::InvalidInput(
946                        err.msg,
947                    ))
948                }
949                "ResourceNotFoundException" => {
950                    return RusotoError::Service(DeleteProgressUpdateStreamError::ResourceNotFound(
951                        err.msg,
952                    ))
953                }
954                "ServiceUnavailableException" => {
955                    return RusotoError::Service(
956                        DeleteProgressUpdateStreamError::ServiceUnavailable(err.msg),
957                    )
958                }
959                "ThrottlingException" => {
960                    return RusotoError::Service(DeleteProgressUpdateStreamError::Throttling(
961                        err.msg,
962                    ))
963                }
964                "UnauthorizedOperation" => {
965                    return RusotoError::Service(
966                        DeleteProgressUpdateStreamError::UnauthorizedOperation(err.msg),
967                    )
968                }
969                "ValidationException" => return RusotoError::Validation(err.msg),
970                _ => {}
971            }
972        }
973        RusotoError::Unknown(res)
974    }
975}
976impl fmt::Display for DeleteProgressUpdateStreamError {
977    #[allow(unused_variables)]
978    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
979        match *self {
980            DeleteProgressUpdateStreamError::AccessDenied(ref cause) => write!(f, "{}", cause),
981            DeleteProgressUpdateStreamError::DryRunOperation(ref cause) => write!(f, "{}", cause),
982            DeleteProgressUpdateStreamError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
983            DeleteProgressUpdateStreamError::InternalServerError(ref cause) => {
984                write!(f, "{}", cause)
985            }
986            DeleteProgressUpdateStreamError::InvalidInput(ref cause) => write!(f, "{}", cause),
987            DeleteProgressUpdateStreamError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
988            DeleteProgressUpdateStreamError::ServiceUnavailable(ref cause) => {
989                write!(f, "{}", cause)
990            }
991            DeleteProgressUpdateStreamError::Throttling(ref cause) => write!(f, "{}", cause),
992            DeleteProgressUpdateStreamError::UnauthorizedOperation(ref cause) => {
993                write!(f, "{}", cause)
994            }
995        }
996    }
997}
998impl Error for DeleteProgressUpdateStreamError {}
999/// Errors returned by DescribeApplicationState
1000#[derive(Debug, PartialEq)]
1001pub enum DescribeApplicationStateError {
1002    /// <p>You do not have sufficient access to perform this action.</p>
1003    AccessDenied(String),
1004    /// <p>The home region is not set. Set the home region to continue.</p>
1005    HomeRegionNotSet(String),
1006    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1007    InternalServerError(String),
1008    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1009    InvalidInput(String),
1010    /// <p>Exception raised when there are problems accessing Application Discovery Service (Application Discovery Service); most likely due to a misconfigured policy or the <code>migrationhub-discovery</code> role is missing or not configured correctly.</p>
1011    PolicyError(String),
1012    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1013    ResourceNotFound(String),
1014    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1015    ServiceUnavailable(String),
1016    /// <p>The request was denied due to request throttling.</p>
1017    Throttling(String),
1018}
1019
1020impl DescribeApplicationStateError {
1021    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeApplicationStateError> {
1022        if let Some(err) = proto::json::Error::parse(&res) {
1023            match err.typ.as_str() {
1024                "AccessDeniedException" => {
1025                    return RusotoError::Service(DescribeApplicationStateError::AccessDenied(
1026                        err.msg,
1027                    ))
1028                }
1029                "HomeRegionNotSetException" => {
1030                    return RusotoError::Service(DescribeApplicationStateError::HomeRegionNotSet(
1031                        err.msg,
1032                    ))
1033                }
1034                "InternalServerError" => {
1035                    return RusotoError::Service(
1036                        DescribeApplicationStateError::InternalServerError(err.msg),
1037                    )
1038                }
1039                "InvalidInputException" => {
1040                    return RusotoError::Service(DescribeApplicationStateError::InvalidInput(
1041                        err.msg,
1042                    ))
1043                }
1044                "PolicyErrorException" => {
1045                    return RusotoError::Service(DescribeApplicationStateError::PolicyError(
1046                        err.msg,
1047                    ))
1048                }
1049                "ResourceNotFoundException" => {
1050                    return RusotoError::Service(DescribeApplicationStateError::ResourceNotFound(
1051                        err.msg,
1052                    ))
1053                }
1054                "ServiceUnavailableException" => {
1055                    return RusotoError::Service(DescribeApplicationStateError::ServiceUnavailable(
1056                        err.msg,
1057                    ))
1058                }
1059                "ThrottlingException" => {
1060                    return RusotoError::Service(DescribeApplicationStateError::Throttling(err.msg))
1061                }
1062                "ValidationException" => return RusotoError::Validation(err.msg),
1063                _ => {}
1064            }
1065        }
1066        RusotoError::Unknown(res)
1067    }
1068}
1069impl fmt::Display for DescribeApplicationStateError {
1070    #[allow(unused_variables)]
1071    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1072        match *self {
1073            DescribeApplicationStateError::AccessDenied(ref cause) => write!(f, "{}", cause),
1074            DescribeApplicationStateError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1075            DescribeApplicationStateError::InternalServerError(ref cause) => write!(f, "{}", cause),
1076            DescribeApplicationStateError::InvalidInput(ref cause) => write!(f, "{}", cause),
1077            DescribeApplicationStateError::PolicyError(ref cause) => write!(f, "{}", cause),
1078            DescribeApplicationStateError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1079            DescribeApplicationStateError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1080            DescribeApplicationStateError::Throttling(ref cause) => write!(f, "{}", cause),
1081        }
1082    }
1083}
1084impl Error for DescribeApplicationStateError {}
1085/// Errors returned by DescribeMigrationTask
1086#[derive(Debug, PartialEq)]
1087pub enum DescribeMigrationTaskError {
1088    /// <p>You do not have sufficient access to perform this action.</p>
1089    AccessDenied(String),
1090    /// <p>The home region is not set. Set the home region to continue.</p>
1091    HomeRegionNotSet(String),
1092    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1093    InternalServerError(String),
1094    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1095    InvalidInput(String),
1096    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1097    ResourceNotFound(String),
1098    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1099    ServiceUnavailable(String),
1100    /// <p>The request was denied due to request throttling.</p>
1101    Throttling(String),
1102}
1103
1104impl DescribeMigrationTaskError {
1105    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeMigrationTaskError> {
1106        if let Some(err) = proto::json::Error::parse(&res) {
1107            match err.typ.as_str() {
1108                "AccessDeniedException" => {
1109                    return RusotoError::Service(DescribeMigrationTaskError::AccessDenied(err.msg))
1110                }
1111                "HomeRegionNotSetException" => {
1112                    return RusotoError::Service(DescribeMigrationTaskError::HomeRegionNotSet(
1113                        err.msg,
1114                    ))
1115                }
1116                "InternalServerError" => {
1117                    return RusotoError::Service(DescribeMigrationTaskError::InternalServerError(
1118                        err.msg,
1119                    ))
1120                }
1121                "InvalidInputException" => {
1122                    return RusotoError::Service(DescribeMigrationTaskError::InvalidInput(err.msg))
1123                }
1124                "ResourceNotFoundException" => {
1125                    return RusotoError::Service(DescribeMigrationTaskError::ResourceNotFound(
1126                        err.msg,
1127                    ))
1128                }
1129                "ServiceUnavailableException" => {
1130                    return RusotoError::Service(DescribeMigrationTaskError::ServiceUnavailable(
1131                        err.msg,
1132                    ))
1133                }
1134                "ThrottlingException" => {
1135                    return RusotoError::Service(DescribeMigrationTaskError::Throttling(err.msg))
1136                }
1137                "ValidationException" => return RusotoError::Validation(err.msg),
1138                _ => {}
1139            }
1140        }
1141        RusotoError::Unknown(res)
1142    }
1143}
1144impl fmt::Display for DescribeMigrationTaskError {
1145    #[allow(unused_variables)]
1146    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1147        match *self {
1148            DescribeMigrationTaskError::AccessDenied(ref cause) => write!(f, "{}", cause),
1149            DescribeMigrationTaskError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1150            DescribeMigrationTaskError::InternalServerError(ref cause) => write!(f, "{}", cause),
1151            DescribeMigrationTaskError::InvalidInput(ref cause) => write!(f, "{}", cause),
1152            DescribeMigrationTaskError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1153            DescribeMigrationTaskError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1154            DescribeMigrationTaskError::Throttling(ref cause) => write!(f, "{}", cause),
1155        }
1156    }
1157}
1158impl Error for DescribeMigrationTaskError {}
1159/// Errors returned by DisassociateCreatedArtifact
1160#[derive(Debug, PartialEq)]
1161pub enum DisassociateCreatedArtifactError {
1162    /// <p>You do not have sufficient access to perform this action.</p>
1163    AccessDenied(String),
1164    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
1165    DryRunOperation(String),
1166    /// <p>The home region is not set. Set the home region to continue.</p>
1167    HomeRegionNotSet(String),
1168    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1169    InternalServerError(String),
1170    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1171    InvalidInput(String),
1172    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1173    ResourceNotFound(String),
1174    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1175    ServiceUnavailable(String),
1176    /// <p>The request was denied due to request throttling.</p>
1177    Throttling(String),
1178    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
1179    UnauthorizedOperation(String),
1180}
1181
1182impl DisassociateCreatedArtifactError {
1183    pub fn from_response(
1184        res: BufferedHttpResponse,
1185    ) -> RusotoError<DisassociateCreatedArtifactError> {
1186        if let Some(err) = proto::json::Error::parse(&res) {
1187            match err.typ.as_str() {
1188                "AccessDeniedException" => {
1189                    return RusotoError::Service(DisassociateCreatedArtifactError::AccessDenied(
1190                        err.msg,
1191                    ))
1192                }
1193                "DryRunOperation" => {
1194                    return RusotoError::Service(DisassociateCreatedArtifactError::DryRunOperation(
1195                        err.msg,
1196                    ))
1197                }
1198                "HomeRegionNotSetException" => {
1199                    return RusotoError::Service(
1200                        DisassociateCreatedArtifactError::HomeRegionNotSet(err.msg),
1201                    )
1202                }
1203                "InternalServerError" => {
1204                    return RusotoError::Service(
1205                        DisassociateCreatedArtifactError::InternalServerError(err.msg),
1206                    )
1207                }
1208                "InvalidInputException" => {
1209                    return RusotoError::Service(DisassociateCreatedArtifactError::InvalidInput(
1210                        err.msg,
1211                    ))
1212                }
1213                "ResourceNotFoundException" => {
1214                    return RusotoError::Service(
1215                        DisassociateCreatedArtifactError::ResourceNotFound(err.msg),
1216                    )
1217                }
1218                "ServiceUnavailableException" => {
1219                    return RusotoError::Service(
1220                        DisassociateCreatedArtifactError::ServiceUnavailable(err.msg),
1221                    )
1222                }
1223                "ThrottlingException" => {
1224                    return RusotoError::Service(DisassociateCreatedArtifactError::Throttling(
1225                        err.msg,
1226                    ))
1227                }
1228                "UnauthorizedOperation" => {
1229                    return RusotoError::Service(
1230                        DisassociateCreatedArtifactError::UnauthorizedOperation(err.msg),
1231                    )
1232                }
1233                "ValidationException" => return RusotoError::Validation(err.msg),
1234                _ => {}
1235            }
1236        }
1237        RusotoError::Unknown(res)
1238    }
1239}
1240impl fmt::Display for DisassociateCreatedArtifactError {
1241    #[allow(unused_variables)]
1242    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1243        match *self {
1244            DisassociateCreatedArtifactError::AccessDenied(ref cause) => write!(f, "{}", cause),
1245            DisassociateCreatedArtifactError::DryRunOperation(ref cause) => write!(f, "{}", cause),
1246            DisassociateCreatedArtifactError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1247            DisassociateCreatedArtifactError::InternalServerError(ref cause) => {
1248                write!(f, "{}", cause)
1249            }
1250            DisassociateCreatedArtifactError::InvalidInput(ref cause) => write!(f, "{}", cause),
1251            DisassociateCreatedArtifactError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1252            DisassociateCreatedArtifactError::ServiceUnavailable(ref cause) => {
1253                write!(f, "{}", cause)
1254            }
1255            DisassociateCreatedArtifactError::Throttling(ref cause) => write!(f, "{}", cause),
1256            DisassociateCreatedArtifactError::UnauthorizedOperation(ref cause) => {
1257                write!(f, "{}", cause)
1258            }
1259        }
1260    }
1261}
1262impl Error for DisassociateCreatedArtifactError {}
1263/// Errors returned by DisassociateDiscoveredResource
1264#[derive(Debug, PartialEq)]
1265pub enum DisassociateDiscoveredResourceError {
1266    /// <p>You do not have sufficient access to perform this action.</p>
1267    AccessDenied(String),
1268    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
1269    DryRunOperation(String),
1270    /// <p>The home region is not set. Set the home region to continue.</p>
1271    HomeRegionNotSet(String),
1272    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1273    InternalServerError(String),
1274    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1275    InvalidInput(String),
1276    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1277    ResourceNotFound(String),
1278    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1279    ServiceUnavailable(String),
1280    /// <p>The request was denied due to request throttling.</p>
1281    Throttling(String),
1282    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
1283    UnauthorizedOperation(String),
1284}
1285
1286impl DisassociateDiscoveredResourceError {
1287    pub fn from_response(
1288        res: BufferedHttpResponse,
1289    ) -> RusotoError<DisassociateDiscoveredResourceError> {
1290        if let Some(err) = proto::json::Error::parse(&res) {
1291            match err.typ.as_str() {
1292                "AccessDeniedException" => {
1293                    return RusotoError::Service(DisassociateDiscoveredResourceError::AccessDenied(
1294                        err.msg,
1295                    ))
1296                }
1297                "DryRunOperation" => {
1298                    return RusotoError::Service(
1299                        DisassociateDiscoveredResourceError::DryRunOperation(err.msg),
1300                    )
1301                }
1302                "HomeRegionNotSetException" => {
1303                    return RusotoError::Service(
1304                        DisassociateDiscoveredResourceError::HomeRegionNotSet(err.msg),
1305                    )
1306                }
1307                "InternalServerError" => {
1308                    return RusotoError::Service(
1309                        DisassociateDiscoveredResourceError::InternalServerError(err.msg),
1310                    )
1311                }
1312                "InvalidInputException" => {
1313                    return RusotoError::Service(DisassociateDiscoveredResourceError::InvalidInput(
1314                        err.msg,
1315                    ))
1316                }
1317                "ResourceNotFoundException" => {
1318                    return RusotoError::Service(
1319                        DisassociateDiscoveredResourceError::ResourceNotFound(err.msg),
1320                    )
1321                }
1322                "ServiceUnavailableException" => {
1323                    return RusotoError::Service(
1324                        DisassociateDiscoveredResourceError::ServiceUnavailable(err.msg),
1325                    )
1326                }
1327                "ThrottlingException" => {
1328                    return RusotoError::Service(DisassociateDiscoveredResourceError::Throttling(
1329                        err.msg,
1330                    ))
1331                }
1332                "UnauthorizedOperation" => {
1333                    return RusotoError::Service(
1334                        DisassociateDiscoveredResourceError::UnauthorizedOperation(err.msg),
1335                    )
1336                }
1337                "ValidationException" => return RusotoError::Validation(err.msg),
1338                _ => {}
1339            }
1340        }
1341        RusotoError::Unknown(res)
1342    }
1343}
1344impl fmt::Display for DisassociateDiscoveredResourceError {
1345    #[allow(unused_variables)]
1346    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1347        match *self {
1348            DisassociateDiscoveredResourceError::AccessDenied(ref cause) => write!(f, "{}", cause),
1349            DisassociateDiscoveredResourceError::DryRunOperation(ref cause) => {
1350                write!(f, "{}", cause)
1351            }
1352            DisassociateDiscoveredResourceError::HomeRegionNotSet(ref cause) => {
1353                write!(f, "{}", cause)
1354            }
1355            DisassociateDiscoveredResourceError::InternalServerError(ref cause) => {
1356                write!(f, "{}", cause)
1357            }
1358            DisassociateDiscoveredResourceError::InvalidInput(ref cause) => write!(f, "{}", cause),
1359            DisassociateDiscoveredResourceError::ResourceNotFound(ref cause) => {
1360                write!(f, "{}", cause)
1361            }
1362            DisassociateDiscoveredResourceError::ServiceUnavailable(ref cause) => {
1363                write!(f, "{}", cause)
1364            }
1365            DisassociateDiscoveredResourceError::Throttling(ref cause) => write!(f, "{}", cause),
1366            DisassociateDiscoveredResourceError::UnauthorizedOperation(ref cause) => {
1367                write!(f, "{}", cause)
1368            }
1369        }
1370    }
1371}
1372impl Error for DisassociateDiscoveredResourceError {}
1373/// Errors returned by ImportMigrationTask
1374#[derive(Debug, PartialEq)]
1375pub enum ImportMigrationTaskError {
1376    /// <p>You do not have sufficient access to perform this action.</p>
1377    AccessDenied(String),
1378    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
1379    DryRunOperation(String),
1380    /// <p>The home region is not set. Set the home region to continue.</p>
1381    HomeRegionNotSet(String),
1382    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1383    InternalServerError(String),
1384    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1385    InvalidInput(String),
1386    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1387    ResourceNotFound(String),
1388    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1389    ServiceUnavailable(String),
1390    /// <p>The request was denied due to request throttling.</p>
1391    Throttling(String),
1392    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
1393    UnauthorizedOperation(String),
1394}
1395
1396impl ImportMigrationTaskError {
1397    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportMigrationTaskError> {
1398        if let Some(err) = proto::json::Error::parse(&res) {
1399            match err.typ.as_str() {
1400                "AccessDeniedException" => {
1401                    return RusotoError::Service(ImportMigrationTaskError::AccessDenied(err.msg))
1402                }
1403                "DryRunOperation" => {
1404                    return RusotoError::Service(ImportMigrationTaskError::DryRunOperation(err.msg))
1405                }
1406                "HomeRegionNotSetException" => {
1407                    return RusotoError::Service(ImportMigrationTaskError::HomeRegionNotSet(
1408                        err.msg,
1409                    ))
1410                }
1411                "InternalServerError" => {
1412                    return RusotoError::Service(ImportMigrationTaskError::InternalServerError(
1413                        err.msg,
1414                    ))
1415                }
1416                "InvalidInputException" => {
1417                    return RusotoError::Service(ImportMigrationTaskError::InvalidInput(err.msg))
1418                }
1419                "ResourceNotFoundException" => {
1420                    return RusotoError::Service(ImportMigrationTaskError::ResourceNotFound(
1421                        err.msg,
1422                    ))
1423                }
1424                "ServiceUnavailableException" => {
1425                    return RusotoError::Service(ImportMigrationTaskError::ServiceUnavailable(
1426                        err.msg,
1427                    ))
1428                }
1429                "ThrottlingException" => {
1430                    return RusotoError::Service(ImportMigrationTaskError::Throttling(err.msg))
1431                }
1432                "UnauthorizedOperation" => {
1433                    return RusotoError::Service(ImportMigrationTaskError::UnauthorizedOperation(
1434                        err.msg,
1435                    ))
1436                }
1437                "ValidationException" => return RusotoError::Validation(err.msg),
1438                _ => {}
1439            }
1440        }
1441        RusotoError::Unknown(res)
1442    }
1443}
1444impl fmt::Display for ImportMigrationTaskError {
1445    #[allow(unused_variables)]
1446    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1447        match *self {
1448            ImportMigrationTaskError::AccessDenied(ref cause) => write!(f, "{}", cause),
1449            ImportMigrationTaskError::DryRunOperation(ref cause) => write!(f, "{}", cause),
1450            ImportMigrationTaskError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1451            ImportMigrationTaskError::InternalServerError(ref cause) => write!(f, "{}", cause),
1452            ImportMigrationTaskError::InvalidInput(ref cause) => write!(f, "{}", cause),
1453            ImportMigrationTaskError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1454            ImportMigrationTaskError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1455            ImportMigrationTaskError::Throttling(ref cause) => write!(f, "{}", cause),
1456            ImportMigrationTaskError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1457        }
1458    }
1459}
1460impl Error for ImportMigrationTaskError {}
1461/// Errors returned by ListApplicationStates
1462#[derive(Debug, PartialEq)]
1463pub enum ListApplicationStatesError {
1464    /// <p>You do not have sufficient access to perform this action.</p>
1465    AccessDenied(String),
1466    /// <p>The home region is not set. Set the home region to continue.</p>
1467    HomeRegionNotSet(String),
1468    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1469    InternalServerError(String),
1470    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1471    InvalidInput(String),
1472    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1473    ServiceUnavailable(String),
1474    /// <p>The request was denied due to request throttling.</p>
1475    Throttling(String),
1476}
1477
1478impl ListApplicationStatesError {
1479    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListApplicationStatesError> {
1480        if let Some(err) = proto::json::Error::parse(&res) {
1481            match err.typ.as_str() {
1482                "AccessDeniedException" => {
1483                    return RusotoError::Service(ListApplicationStatesError::AccessDenied(err.msg))
1484                }
1485                "HomeRegionNotSetException" => {
1486                    return RusotoError::Service(ListApplicationStatesError::HomeRegionNotSet(
1487                        err.msg,
1488                    ))
1489                }
1490                "InternalServerError" => {
1491                    return RusotoError::Service(ListApplicationStatesError::InternalServerError(
1492                        err.msg,
1493                    ))
1494                }
1495                "InvalidInputException" => {
1496                    return RusotoError::Service(ListApplicationStatesError::InvalidInput(err.msg))
1497                }
1498                "ServiceUnavailableException" => {
1499                    return RusotoError::Service(ListApplicationStatesError::ServiceUnavailable(
1500                        err.msg,
1501                    ))
1502                }
1503                "ThrottlingException" => {
1504                    return RusotoError::Service(ListApplicationStatesError::Throttling(err.msg))
1505                }
1506                "ValidationException" => return RusotoError::Validation(err.msg),
1507                _ => {}
1508            }
1509        }
1510        RusotoError::Unknown(res)
1511    }
1512}
1513impl fmt::Display for ListApplicationStatesError {
1514    #[allow(unused_variables)]
1515    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1516        match *self {
1517            ListApplicationStatesError::AccessDenied(ref cause) => write!(f, "{}", cause),
1518            ListApplicationStatesError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1519            ListApplicationStatesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1520            ListApplicationStatesError::InvalidInput(ref cause) => write!(f, "{}", cause),
1521            ListApplicationStatesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1522            ListApplicationStatesError::Throttling(ref cause) => write!(f, "{}", cause),
1523        }
1524    }
1525}
1526impl Error for ListApplicationStatesError {}
1527/// Errors returned by ListCreatedArtifacts
1528#[derive(Debug, PartialEq)]
1529pub enum ListCreatedArtifactsError {
1530    /// <p>You do not have sufficient access to perform this action.</p>
1531    AccessDenied(String),
1532    /// <p>The home region is not set. Set the home region to continue.</p>
1533    HomeRegionNotSet(String),
1534    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1535    InternalServerError(String),
1536    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1537    InvalidInput(String),
1538    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1539    ResourceNotFound(String),
1540    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1541    ServiceUnavailable(String),
1542    /// <p>The request was denied due to request throttling.</p>
1543    Throttling(String),
1544}
1545
1546impl ListCreatedArtifactsError {
1547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCreatedArtifactsError> {
1548        if let Some(err) = proto::json::Error::parse(&res) {
1549            match err.typ.as_str() {
1550                "AccessDeniedException" => {
1551                    return RusotoError::Service(ListCreatedArtifactsError::AccessDenied(err.msg))
1552                }
1553                "HomeRegionNotSetException" => {
1554                    return RusotoError::Service(ListCreatedArtifactsError::HomeRegionNotSet(
1555                        err.msg,
1556                    ))
1557                }
1558                "InternalServerError" => {
1559                    return RusotoError::Service(ListCreatedArtifactsError::InternalServerError(
1560                        err.msg,
1561                    ))
1562                }
1563                "InvalidInputException" => {
1564                    return RusotoError::Service(ListCreatedArtifactsError::InvalidInput(err.msg))
1565                }
1566                "ResourceNotFoundException" => {
1567                    return RusotoError::Service(ListCreatedArtifactsError::ResourceNotFound(
1568                        err.msg,
1569                    ))
1570                }
1571                "ServiceUnavailableException" => {
1572                    return RusotoError::Service(ListCreatedArtifactsError::ServiceUnavailable(
1573                        err.msg,
1574                    ))
1575                }
1576                "ThrottlingException" => {
1577                    return RusotoError::Service(ListCreatedArtifactsError::Throttling(err.msg))
1578                }
1579                "ValidationException" => return RusotoError::Validation(err.msg),
1580                _ => {}
1581            }
1582        }
1583        RusotoError::Unknown(res)
1584    }
1585}
1586impl fmt::Display for ListCreatedArtifactsError {
1587    #[allow(unused_variables)]
1588    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1589        match *self {
1590            ListCreatedArtifactsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1591            ListCreatedArtifactsError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1592            ListCreatedArtifactsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1593            ListCreatedArtifactsError::InvalidInput(ref cause) => write!(f, "{}", cause),
1594            ListCreatedArtifactsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1595            ListCreatedArtifactsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1596            ListCreatedArtifactsError::Throttling(ref cause) => write!(f, "{}", cause),
1597        }
1598    }
1599}
1600impl Error for ListCreatedArtifactsError {}
1601/// Errors returned by ListDiscoveredResources
1602#[derive(Debug, PartialEq)]
1603pub enum ListDiscoveredResourcesError {
1604    /// <p>You do not have sufficient access to perform this action.</p>
1605    AccessDenied(String),
1606    /// <p>The home region is not set. Set the home region to continue.</p>
1607    HomeRegionNotSet(String),
1608    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1609    InternalServerError(String),
1610    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1611    InvalidInput(String),
1612    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1613    ResourceNotFound(String),
1614    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1615    ServiceUnavailable(String),
1616    /// <p>The request was denied due to request throttling.</p>
1617    Throttling(String),
1618}
1619
1620impl ListDiscoveredResourcesError {
1621    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDiscoveredResourcesError> {
1622        if let Some(err) = proto::json::Error::parse(&res) {
1623            match err.typ.as_str() {
1624                "AccessDeniedException" => {
1625                    return RusotoError::Service(ListDiscoveredResourcesError::AccessDenied(
1626                        err.msg,
1627                    ))
1628                }
1629                "HomeRegionNotSetException" => {
1630                    return RusotoError::Service(ListDiscoveredResourcesError::HomeRegionNotSet(
1631                        err.msg,
1632                    ))
1633                }
1634                "InternalServerError" => {
1635                    return RusotoError::Service(ListDiscoveredResourcesError::InternalServerError(
1636                        err.msg,
1637                    ))
1638                }
1639                "InvalidInputException" => {
1640                    return RusotoError::Service(ListDiscoveredResourcesError::InvalidInput(
1641                        err.msg,
1642                    ))
1643                }
1644                "ResourceNotFoundException" => {
1645                    return RusotoError::Service(ListDiscoveredResourcesError::ResourceNotFound(
1646                        err.msg,
1647                    ))
1648                }
1649                "ServiceUnavailableException" => {
1650                    return RusotoError::Service(ListDiscoveredResourcesError::ServiceUnavailable(
1651                        err.msg,
1652                    ))
1653                }
1654                "ThrottlingException" => {
1655                    return RusotoError::Service(ListDiscoveredResourcesError::Throttling(err.msg))
1656                }
1657                "ValidationException" => return RusotoError::Validation(err.msg),
1658                _ => {}
1659            }
1660        }
1661        RusotoError::Unknown(res)
1662    }
1663}
1664impl fmt::Display for ListDiscoveredResourcesError {
1665    #[allow(unused_variables)]
1666    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1667        match *self {
1668            ListDiscoveredResourcesError::AccessDenied(ref cause) => write!(f, "{}", cause),
1669            ListDiscoveredResourcesError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1670            ListDiscoveredResourcesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1671            ListDiscoveredResourcesError::InvalidInput(ref cause) => write!(f, "{}", cause),
1672            ListDiscoveredResourcesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1673            ListDiscoveredResourcesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1674            ListDiscoveredResourcesError::Throttling(ref cause) => write!(f, "{}", cause),
1675        }
1676    }
1677}
1678impl Error for ListDiscoveredResourcesError {}
1679/// Errors returned by ListMigrationTasks
1680#[derive(Debug, PartialEq)]
1681pub enum ListMigrationTasksError {
1682    /// <p>You do not have sufficient access to perform this action.</p>
1683    AccessDenied(String),
1684    /// <p>The home region is not set. Set the home region to continue.</p>
1685    HomeRegionNotSet(String),
1686    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1687    InternalServerError(String),
1688    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1689    InvalidInput(String),
1690    /// <p>Exception raised when there are problems accessing Application Discovery Service (Application Discovery Service); most likely due to a misconfigured policy or the <code>migrationhub-discovery</code> role is missing or not configured correctly.</p>
1691    PolicyError(String),
1692    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1693    ResourceNotFound(String),
1694    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1695    ServiceUnavailable(String),
1696    /// <p>The request was denied due to request throttling.</p>
1697    Throttling(String),
1698}
1699
1700impl ListMigrationTasksError {
1701    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMigrationTasksError> {
1702        if let Some(err) = proto::json::Error::parse(&res) {
1703            match err.typ.as_str() {
1704                "AccessDeniedException" => {
1705                    return RusotoError::Service(ListMigrationTasksError::AccessDenied(err.msg))
1706                }
1707                "HomeRegionNotSetException" => {
1708                    return RusotoError::Service(ListMigrationTasksError::HomeRegionNotSet(err.msg))
1709                }
1710                "InternalServerError" => {
1711                    return RusotoError::Service(ListMigrationTasksError::InternalServerError(
1712                        err.msg,
1713                    ))
1714                }
1715                "InvalidInputException" => {
1716                    return RusotoError::Service(ListMigrationTasksError::InvalidInput(err.msg))
1717                }
1718                "PolicyErrorException" => {
1719                    return RusotoError::Service(ListMigrationTasksError::PolicyError(err.msg))
1720                }
1721                "ResourceNotFoundException" => {
1722                    return RusotoError::Service(ListMigrationTasksError::ResourceNotFound(err.msg))
1723                }
1724                "ServiceUnavailableException" => {
1725                    return RusotoError::Service(ListMigrationTasksError::ServiceUnavailable(
1726                        err.msg,
1727                    ))
1728                }
1729                "ThrottlingException" => {
1730                    return RusotoError::Service(ListMigrationTasksError::Throttling(err.msg))
1731                }
1732                "ValidationException" => return RusotoError::Validation(err.msg),
1733                _ => {}
1734            }
1735        }
1736        RusotoError::Unknown(res)
1737    }
1738}
1739impl fmt::Display for ListMigrationTasksError {
1740    #[allow(unused_variables)]
1741    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1742        match *self {
1743            ListMigrationTasksError::AccessDenied(ref cause) => write!(f, "{}", cause),
1744            ListMigrationTasksError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1745            ListMigrationTasksError::InternalServerError(ref cause) => write!(f, "{}", cause),
1746            ListMigrationTasksError::InvalidInput(ref cause) => write!(f, "{}", cause),
1747            ListMigrationTasksError::PolicyError(ref cause) => write!(f, "{}", cause),
1748            ListMigrationTasksError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1749            ListMigrationTasksError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1750            ListMigrationTasksError::Throttling(ref cause) => write!(f, "{}", cause),
1751        }
1752    }
1753}
1754impl Error for ListMigrationTasksError {}
1755/// Errors returned by ListProgressUpdateStreams
1756#[derive(Debug, PartialEq)]
1757pub enum ListProgressUpdateStreamsError {
1758    /// <p>You do not have sufficient access to perform this action.</p>
1759    AccessDenied(String),
1760    /// <p>The home region is not set. Set the home region to continue.</p>
1761    HomeRegionNotSet(String),
1762    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1763    InternalServerError(String),
1764    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1765    InvalidInput(String),
1766    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1767    ServiceUnavailable(String),
1768    /// <p>The request was denied due to request throttling.</p>
1769    Throttling(String),
1770}
1771
1772impl ListProgressUpdateStreamsError {
1773    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProgressUpdateStreamsError> {
1774        if let Some(err) = proto::json::Error::parse(&res) {
1775            match err.typ.as_str() {
1776                "AccessDeniedException" => {
1777                    return RusotoError::Service(ListProgressUpdateStreamsError::AccessDenied(
1778                        err.msg,
1779                    ))
1780                }
1781                "HomeRegionNotSetException" => {
1782                    return RusotoError::Service(ListProgressUpdateStreamsError::HomeRegionNotSet(
1783                        err.msg,
1784                    ))
1785                }
1786                "InternalServerError" => {
1787                    return RusotoError::Service(
1788                        ListProgressUpdateStreamsError::InternalServerError(err.msg),
1789                    )
1790                }
1791                "InvalidInputException" => {
1792                    return RusotoError::Service(ListProgressUpdateStreamsError::InvalidInput(
1793                        err.msg,
1794                    ))
1795                }
1796                "ServiceUnavailableException" => {
1797                    return RusotoError::Service(
1798                        ListProgressUpdateStreamsError::ServiceUnavailable(err.msg),
1799                    )
1800                }
1801                "ThrottlingException" => {
1802                    return RusotoError::Service(ListProgressUpdateStreamsError::Throttling(
1803                        err.msg,
1804                    ))
1805                }
1806                "ValidationException" => return RusotoError::Validation(err.msg),
1807                _ => {}
1808            }
1809        }
1810        RusotoError::Unknown(res)
1811    }
1812}
1813impl fmt::Display for ListProgressUpdateStreamsError {
1814    #[allow(unused_variables)]
1815    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1816        match *self {
1817            ListProgressUpdateStreamsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1818            ListProgressUpdateStreamsError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1819            ListProgressUpdateStreamsError::InternalServerError(ref cause) => {
1820                write!(f, "{}", cause)
1821            }
1822            ListProgressUpdateStreamsError::InvalidInput(ref cause) => write!(f, "{}", cause),
1823            ListProgressUpdateStreamsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1824            ListProgressUpdateStreamsError::Throttling(ref cause) => write!(f, "{}", cause),
1825        }
1826    }
1827}
1828impl Error for ListProgressUpdateStreamsError {}
1829/// Errors returned by NotifyApplicationState
1830#[derive(Debug, PartialEq)]
1831pub enum NotifyApplicationStateError {
1832    /// <p>You do not have sufficient access to perform this action.</p>
1833    AccessDenied(String),
1834    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
1835    DryRunOperation(String),
1836    /// <p>The home region is not set. Set the home region to continue.</p>
1837    HomeRegionNotSet(String),
1838    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1839    InternalServerError(String),
1840    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1841    InvalidInput(String),
1842    /// <p>Exception raised when there are problems accessing Application Discovery Service (Application Discovery Service); most likely due to a misconfigured policy or the <code>migrationhub-discovery</code> role is missing or not configured correctly.</p>
1843    PolicyError(String),
1844    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1845    ResourceNotFound(String),
1846    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1847    ServiceUnavailable(String),
1848    /// <p>The request was denied due to request throttling.</p>
1849    Throttling(String),
1850    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
1851    UnauthorizedOperation(String),
1852}
1853
1854impl NotifyApplicationStateError {
1855    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<NotifyApplicationStateError> {
1856        if let Some(err) = proto::json::Error::parse(&res) {
1857            match err.typ.as_str() {
1858                "AccessDeniedException" => {
1859                    return RusotoError::Service(NotifyApplicationStateError::AccessDenied(err.msg))
1860                }
1861                "DryRunOperation" => {
1862                    return RusotoError::Service(NotifyApplicationStateError::DryRunOperation(
1863                        err.msg,
1864                    ))
1865                }
1866                "HomeRegionNotSetException" => {
1867                    return RusotoError::Service(NotifyApplicationStateError::HomeRegionNotSet(
1868                        err.msg,
1869                    ))
1870                }
1871                "InternalServerError" => {
1872                    return RusotoError::Service(NotifyApplicationStateError::InternalServerError(
1873                        err.msg,
1874                    ))
1875                }
1876                "InvalidInputException" => {
1877                    return RusotoError::Service(NotifyApplicationStateError::InvalidInput(err.msg))
1878                }
1879                "PolicyErrorException" => {
1880                    return RusotoError::Service(NotifyApplicationStateError::PolicyError(err.msg))
1881                }
1882                "ResourceNotFoundException" => {
1883                    return RusotoError::Service(NotifyApplicationStateError::ResourceNotFound(
1884                        err.msg,
1885                    ))
1886                }
1887                "ServiceUnavailableException" => {
1888                    return RusotoError::Service(NotifyApplicationStateError::ServiceUnavailable(
1889                        err.msg,
1890                    ))
1891                }
1892                "ThrottlingException" => {
1893                    return RusotoError::Service(NotifyApplicationStateError::Throttling(err.msg))
1894                }
1895                "UnauthorizedOperation" => {
1896                    return RusotoError::Service(
1897                        NotifyApplicationStateError::UnauthorizedOperation(err.msg),
1898                    )
1899                }
1900                "ValidationException" => return RusotoError::Validation(err.msg),
1901                _ => {}
1902            }
1903        }
1904        RusotoError::Unknown(res)
1905    }
1906}
1907impl fmt::Display for NotifyApplicationStateError {
1908    #[allow(unused_variables)]
1909    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1910        match *self {
1911            NotifyApplicationStateError::AccessDenied(ref cause) => write!(f, "{}", cause),
1912            NotifyApplicationStateError::DryRunOperation(ref cause) => write!(f, "{}", cause),
1913            NotifyApplicationStateError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
1914            NotifyApplicationStateError::InternalServerError(ref cause) => write!(f, "{}", cause),
1915            NotifyApplicationStateError::InvalidInput(ref cause) => write!(f, "{}", cause),
1916            NotifyApplicationStateError::PolicyError(ref cause) => write!(f, "{}", cause),
1917            NotifyApplicationStateError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1918            NotifyApplicationStateError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1919            NotifyApplicationStateError::Throttling(ref cause) => write!(f, "{}", cause),
1920            NotifyApplicationStateError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1921        }
1922    }
1923}
1924impl Error for NotifyApplicationStateError {}
1925/// Errors returned by NotifyMigrationTaskState
1926#[derive(Debug, PartialEq)]
1927pub enum NotifyMigrationTaskStateError {
1928    /// <p>You do not have sufficient access to perform this action.</p>
1929    AccessDenied(String),
1930    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
1931    DryRunOperation(String),
1932    /// <p>The home region is not set. Set the home region to continue.</p>
1933    HomeRegionNotSet(String),
1934    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
1935    InternalServerError(String),
1936    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
1937    InvalidInput(String),
1938    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
1939    ResourceNotFound(String),
1940    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
1941    ServiceUnavailable(String),
1942    /// <p>The request was denied due to request throttling.</p>
1943    Throttling(String),
1944    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
1945    UnauthorizedOperation(String),
1946}
1947
1948impl NotifyMigrationTaskStateError {
1949    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<NotifyMigrationTaskStateError> {
1950        if let Some(err) = proto::json::Error::parse(&res) {
1951            match err.typ.as_str() {
1952                "AccessDeniedException" => {
1953                    return RusotoError::Service(NotifyMigrationTaskStateError::AccessDenied(
1954                        err.msg,
1955                    ))
1956                }
1957                "DryRunOperation" => {
1958                    return RusotoError::Service(NotifyMigrationTaskStateError::DryRunOperation(
1959                        err.msg,
1960                    ))
1961                }
1962                "HomeRegionNotSetException" => {
1963                    return RusotoError::Service(NotifyMigrationTaskStateError::HomeRegionNotSet(
1964                        err.msg,
1965                    ))
1966                }
1967                "InternalServerError" => {
1968                    return RusotoError::Service(
1969                        NotifyMigrationTaskStateError::InternalServerError(err.msg),
1970                    )
1971                }
1972                "InvalidInputException" => {
1973                    return RusotoError::Service(NotifyMigrationTaskStateError::InvalidInput(
1974                        err.msg,
1975                    ))
1976                }
1977                "ResourceNotFoundException" => {
1978                    return RusotoError::Service(NotifyMigrationTaskStateError::ResourceNotFound(
1979                        err.msg,
1980                    ))
1981                }
1982                "ServiceUnavailableException" => {
1983                    return RusotoError::Service(NotifyMigrationTaskStateError::ServiceUnavailable(
1984                        err.msg,
1985                    ))
1986                }
1987                "ThrottlingException" => {
1988                    return RusotoError::Service(NotifyMigrationTaskStateError::Throttling(err.msg))
1989                }
1990                "UnauthorizedOperation" => {
1991                    return RusotoError::Service(
1992                        NotifyMigrationTaskStateError::UnauthorizedOperation(err.msg),
1993                    )
1994                }
1995                "ValidationException" => return RusotoError::Validation(err.msg),
1996                _ => {}
1997            }
1998        }
1999        RusotoError::Unknown(res)
2000    }
2001}
2002impl fmt::Display for NotifyMigrationTaskStateError {
2003    #[allow(unused_variables)]
2004    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2005        match *self {
2006            NotifyMigrationTaskStateError::AccessDenied(ref cause) => write!(f, "{}", cause),
2007            NotifyMigrationTaskStateError::DryRunOperation(ref cause) => write!(f, "{}", cause),
2008            NotifyMigrationTaskStateError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
2009            NotifyMigrationTaskStateError::InternalServerError(ref cause) => write!(f, "{}", cause),
2010            NotifyMigrationTaskStateError::InvalidInput(ref cause) => write!(f, "{}", cause),
2011            NotifyMigrationTaskStateError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2012            NotifyMigrationTaskStateError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2013            NotifyMigrationTaskStateError::Throttling(ref cause) => write!(f, "{}", cause),
2014            NotifyMigrationTaskStateError::UnauthorizedOperation(ref cause) => {
2015                write!(f, "{}", cause)
2016            }
2017        }
2018    }
2019}
2020impl Error for NotifyMigrationTaskStateError {}
2021/// Errors returned by PutResourceAttributes
2022#[derive(Debug, PartialEq)]
2023pub enum PutResourceAttributesError {
2024    /// <p>You do not have sufficient access to perform this action.</p>
2025    AccessDenied(String),
2026    /// <p>Exception raised to indicate a successfully authorized action when the <code>DryRun</code> flag is set to "true".</p>
2027    DryRunOperation(String),
2028    /// <p>The home region is not set. Set the home region to continue.</p>
2029    HomeRegionNotSet(String),
2030    /// <p>Exception raised when an internal, configuration, or dependency error is encountered.</p>
2031    InternalServerError(String),
2032    /// <p>Exception raised when the provided input violates a policy constraint or is entered in the wrong format or data type.</p>
2033    InvalidInput(String),
2034    /// <p>Exception raised when the request references a resource (Application Discovery Service configuration, update stream, migration task, etc.) that does not exist in Application Discovery Service (Application Discovery Service) or in Migration Hub's repository.</p>
2035    ResourceNotFound(String),
2036    /// <p>Exception raised when there is an internal, configuration, or dependency error encountered.</p>
2037    ServiceUnavailable(String),
2038    /// <p>The request was denied due to request throttling.</p>
2039    Throttling(String),
2040    /// <p>Exception raised to indicate a request was not authorized when the <code>DryRun</code> flag is set to "true".</p>
2041    UnauthorizedOperation(String),
2042}
2043
2044impl PutResourceAttributesError {
2045    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutResourceAttributesError> {
2046        if let Some(err) = proto::json::Error::parse(&res) {
2047            match err.typ.as_str() {
2048                "AccessDeniedException" => {
2049                    return RusotoError::Service(PutResourceAttributesError::AccessDenied(err.msg))
2050                }
2051                "DryRunOperation" => {
2052                    return RusotoError::Service(PutResourceAttributesError::DryRunOperation(
2053                        err.msg,
2054                    ))
2055                }
2056                "HomeRegionNotSetException" => {
2057                    return RusotoError::Service(PutResourceAttributesError::HomeRegionNotSet(
2058                        err.msg,
2059                    ))
2060                }
2061                "InternalServerError" => {
2062                    return RusotoError::Service(PutResourceAttributesError::InternalServerError(
2063                        err.msg,
2064                    ))
2065                }
2066                "InvalidInputException" => {
2067                    return RusotoError::Service(PutResourceAttributesError::InvalidInput(err.msg))
2068                }
2069                "ResourceNotFoundException" => {
2070                    return RusotoError::Service(PutResourceAttributesError::ResourceNotFound(
2071                        err.msg,
2072                    ))
2073                }
2074                "ServiceUnavailableException" => {
2075                    return RusotoError::Service(PutResourceAttributesError::ServiceUnavailable(
2076                        err.msg,
2077                    ))
2078                }
2079                "ThrottlingException" => {
2080                    return RusotoError::Service(PutResourceAttributesError::Throttling(err.msg))
2081                }
2082                "UnauthorizedOperation" => {
2083                    return RusotoError::Service(PutResourceAttributesError::UnauthorizedOperation(
2084                        err.msg,
2085                    ))
2086                }
2087                "ValidationException" => return RusotoError::Validation(err.msg),
2088                _ => {}
2089            }
2090        }
2091        RusotoError::Unknown(res)
2092    }
2093}
2094impl fmt::Display for PutResourceAttributesError {
2095    #[allow(unused_variables)]
2096    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2097        match *self {
2098            PutResourceAttributesError::AccessDenied(ref cause) => write!(f, "{}", cause),
2099            PutResourceAttributesError::DryRunOperation(ref cause) => write!(f, "{}", cause),
2100            PutResourceAttributesError::HomeRegionNotSet(ref cause) => write!(f, "{}", cause),
2101            PutResourceAttributesError::InternalServerError(ref cause) => write!(f, "{}", cause),
2102            PutResourceAttributesError::InvalidInput(ref cause) => write!(f, "{}", cause),
2103            PutResourceAttributesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2104            PutResourceAttributesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2105            PutResourceAttributesError::Throttling(ref cause) => write!(f, "{}", cause),
2106            PutResourceAttributesError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2107        }
2108    }
2109}
2110impl Error for PutResourceAttributesError {}
2111/// Trait representing the capabilities of the AWS Migration Hub API. AWS Migration Hub clients implement this trait.
2112#[async_trait]
2113pub trait MigrationHub {
2114    /// <p><p>Associates a created artifact of an AWS cloud resource, the target receiving the migration, with the migration task performed by a migration tool. This API has the following traits:</p> <ul> <li> <p>Migration tools can call the <code>AssociateCreatedArtifact</code> operation to indicate which AWS artifact is associated with a migration task.</p> </li> <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li> <li> <p>Examples of the AWS resource behind the created artifact are, AMI&#39;s, EC2 instance, or DMS endpoint, etc.</p> </li> </ul></p>
2115    async fn associate_created_artifact(
2116        &self,
2117        input: AssociateCreatedArtifactRequest,
2118    ) -> Result<AssociateCreatedArtifactResult, RusotoError<AssociateCreatedArtifactError>>;
2119
2120    /// <p>Associates a discovered resource ID from Application Discovery Service with a migration task.</p>
2121    async fn associate_discovered_resource(
2122        &self,
2123        input: AssociateDiscoveredResourceRequest,
2124    ) -> Result<AssociateDiscoveredResourceResult, RusotoError<AssociateDiscoveredResourceError>>;
2125
2126    /// <p>Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It must uniquely identify the migration tool as it is used for all updates made by the tool; however, it does not need to be unique for each AWS account because it is scoped to the AWS account.</p>
2127    async fn create_progress_update_stream(
2128        &self,
2129        input: CreateProgressUpdateStreamRequest,
2130    ) -> Result<CreateProgressUpdateStreamResult, RusotoError<CreateProgressUpdateStreamError>>;
2131
2132    /// <p><p>Deletes a progress update stream, including all of its tasks, which was previously created as an AWS resource used for access control. This API has the following traits:</p> <ul> <li> <p>The only parameter needed for <code>DeleteProgressUpdateStream</code> is the stream name (same as a <code>CreateProgressUpdateStream</code> call).</p> </li> <li> <p>The call will return, and a background process will asynchronously delete the stream and all of its resources (tasks, associated resources, resource attributes, created artifacts).</p> </li> <li> <p>If the stream takes time to be deleted, it might still show up on a <code>ListProgressUpdateStreams</code> call.</p> </li> <li> <p> <code>CreateProgressUpdateStream</code>, <code>ImportMigrationTask</code>, <code>NotifyMigrationTaskState</code>, and all Associate[*] APIs related to the tasks belonging to the stream will throw &quot;InvalidInputException&quot; if the stream of the same name is in the process of being deleted.</p> </li> <li> <p>Once the stream and all of its resources are deleted, <code>CreateProgressUpdateStream</code> for a stream of the same name will succeed, and that stream will be an entirely new logical resource (without any resources associated with the old stream).</p> </li> </ul></p>
2133    async fn delete_progress_update_stream(
2134        &self,
2135        input: DeleteProgressUpdateStreamRequest,
2136    ) -> Result<DeleteProgressUpdateStreamResult, RusotoError<DeleteProgressUpdateStreamError>>;
2137
2138    /// <p>Gets the migration status of an application.</p>
2139    async fn describe_application_state(
2140        &self,
2141        input: DescribeApplicationStateRequest,
2142    ) -> Result<DescribeApplicationStateResult, RusotoError<DescribeApplicationStateError>>;
2143
2144    /// <p>Retrieves a list of all attributes associated with a specific migration task.</p>
2145    async fn describe_migration_task(
2146        &self,
2147        input: DescribeMigrationTaskRequest,
2148    ) -> Result<DescribeMigrationTaskResult, RusotoError<DescribeMigrationTaskError>>;
2149
2150    /// <p><p>Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:</p> <ul> <li> <p>A migration user can call the <code>DisassociateCreatedArtifacts</code> operation to disassociate a created AWS Artifact from a migration task.</p> </li> <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li> <li> <p>Examples of the AWS resource behind the created artifact are, AMI&#39;s, EC2 instance, or RDS instance, etc.</p> </li> </ul></p>
2151    async fn disassociate_created_artifact(
2152        &self,
2153        input: DisassociateCreatedArtifactRequest,
2154    ) -> Result<DisassociateCreatedArtifactResult, RusotoError<DisassociateCreatedArtifactError>>;
2155
2156    /// <p>Disassociate an Application Discovery Service discovered resource from a migration task.</p>
2157    async fn disassociate_discovered_resource(
2158        &self,
2159        input: DisassociateDiscoveredResourceRequest,
2160    ) -> Result<
2161        DisassociateDiscoveredResourceResult,
2162        RusotoError<DisassociateDiscoveredResourceError>,
2163    >;
2164
2165    /// <p>Registers a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool.</p> <p>This API is a prerequisite to calling the <code>NotifyMigrationTaskState</code> API as the migration tool must first register the migration task with Migration Hub.</p>
2166    async fn import_migration_task(
2167        &self,
2168        input: ImportMigrationTaskRequest,
2169    ) -> Result<ImportMigrationTaskResult, RusotoError<ImportMigrationTaskError>>;
2170
2171    /// <p>Lists all the migration statuses for your applications. If you use the optional <code>ApplicationIds</code> parameter, only the migration statuses for those applications will be returned.</p>
2172    async fn list_application_states(
2173        &self,
2174        input: ListApplicationStatesRequest,
2175    ) -> Result<ListApplicationStatesResult, RusotoError<ListApplicationStatesError>>;
2176
2177    /// <p><p>Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits:</p> <ul> <li> <p>Gets the list of the created artifacts while migration is taking place.</p> </li> <li> <p>Shows the artifacts created by the migration tool that was associated by the <code>AssociateCreatedArtifact</code> API. </p> </li> <li> <p>Lists created artifacts in a paginated interface. </p> </li> </ul></p>
2178    async fn list_created_artifacts(
2179        &self,
2180        input: ListCreatedArtifactsRequest,
2181    ) -> Result<ListCreatedArtifactsResult, RusotoError<ListCreatedArtifactsError>>;
2182
2183    /// <p>Lists discovered resources associated with the given <code>MigrationTask</code>.</p>
2184    async fn list_discovered_resources(
2185        &self,
2186        input: ListDiscoveredResourcesRequest,
2187    ) -> Result<ListDiscoveredResourcesResult, RusotoError<ListDiscoveredResourcesError>>;
2188
2189    /// <p><p>Lists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits:</p> <ul> <li> <p>Can show a summary list of the most recent migration tasks.</p> </li> <li> <p>Can show a summary list of migration tasks associated with a given discovered resource.</p> </li> <li> <p>Lists migration tasks in a paginated interface.</p> </li> </ul></p>
2190    async fn list_migration_tasks(
2191        &self,
2192        input: ListMigrationTasksRequest,
2193    ) -> Result<ListMigrationTasksResult, RusotoError<ListMigrationTasksError>>;
2194
2195    /// <p>Lists progress update streams associated with the user account making this call.</p>
2196    async fn list_progress_update_streams(
2197        &self,
2198        input: ListProgressUpdateStreamsRequest,
2199    ) -> Result<ListProgressUpdateStreamsResult, RusotoError<ListProgressUpdateStreamsError>>;
2200
2201    /// <p>Sets the migration state of an application. For a given application identified by the value passed to <code>ApplicationId</code>, its status is set or updated by passing one of three values to <code>Status</code>: <code>NOT_STARTED | IN_PROGRESS | COMPLETED</code>.</p>
2202    async fn notify_application_state(
2203        &self,
2204        input: NotifyApplicationStateRequest,
2205    ) -> Result<NotifyApplicationStateResult, RusotoError<NotifyApplicationStateError>>;
2206
2207    /// <p><p>Notifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits:</p> <ul> <li> <p>Migration tools will call the <code>NotifyMigrationTaskState</code> API to share the latest progress and status.</p> </li> <li> <p> <code>MigrationTaskName</code> is used for addressing updates to the correct target.</p> </li> <li> <p> <code>ProgressUpdateStream</code> is used for access control and to provide a namespace for each migration tool.</p> </li> </ul></p>
2208    async fn notify_migration_task_state(
2209        &self,
2210        input: NotifyMigrationTaskStateRequest,
2211    ) -> Result<NotifyMigrationTaskStateResult, RusotoError<NotifyMigrationTaskStateError>>;
2212
2213    /// <p><p>Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service repository. This association occurs asynchronously after <code>PutResourceAttributes</code> returns.</p> <important> <ul> <li> <p>Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to <i>add</i> an IP address, it will then be required to call it with <i>both</i> the IP and MAC addresses to prevent overriding the MAC address.</p> </li> <li> <p>Note the instructions regarding the special use case of the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#migrationhub-PutResourceAttributes-request-ResourceAttributeList"> <code>ResourceAttributeList</code> </a> parameter when specifying any &quot;VM&quot; related value.</p> </li> </ul> </important> <note> <p>Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call <code>ListDiscoveredResources</code>.</p> </note></p>
2214    async fn put_resource_attributes(
2215        &self,
2216        input: PutResourceAttributesRequest,
2217    ) -> Result<PutResourceAttributesResult, RusotoError<PutResourceAttributesError>>;
2218}
2219/// A client for the AWS Migration Hub API.
2220#[derive(Clone)]
2221pub struct MigrationHubClient {
2222    client: Client,
2223    region: region::Region,
2224}
2225
2226impl MigrationHubClient {
2227    /// Creates a client backed by the default tokio event loop.
2228    ///
2229    /// The client will use the default credentials provider and tls client.
2230    pub fn new(region: region::Region) -> MigrationHubClient {
2231        MigrationHubClient {
2232            client: Client::shared(),
2233            region,
2234        }
2235    }
2236
2237    pub fn new_with<P, D>(
2238        request_dispatcher: D,
2239        credentials_provider: P,
2240        region: region::Region,
2241    ) -> MigrationHubClient
2242    where
2243        P: ProvideAwsCredentials + Send + Sync + 'static,
2244        D: DispatchSignedRequest + Send + Sync + 'static,
2245    {
2246        MigrationHubClient {
2247            client: Client::new_with(credentials_provider, request_dispatcher),
2248            region,
2249        }
2250    }
2251
2252    pub fn new_with_client(client: Client, region: region::Region) -> MigrationHubClient {
2253        MigrationHubClient { client, region }
2254    }
2255}
2256
2257#[async_trait]
2258impl MigrationHub for MigrationHubClient {
2259    /// <p><p>Associates a created artifact of an AWS cloud resource, the target receiving the migration, with the migration task performed by a migration tool. This API has the following traits:</p> <ul> <li> <p>Migration tools can call the <code>AssociateCreatedArtifact</code> operation to indicate which AWS artifact is associated with a migration task.</p> </li> <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li> <li> <p>Examples of the AWS resource behind the created artifact are, AMI&#39;s, EC2 instance, or DMS endpoint, etc.</p> </li> </ul></p>
2260    async fn associate_created_artifact(
2261        &self,
2262        input: AssociateCreatedArtifactRequest,
2263    ) -> Result<AssociateCreatedArtifactResult, RusotoError<AssociateCreatedArtifactError>> {
2264        let mut request = self.new_signed_request("POST", "/");
2265        request.add_header("x-amz-target", "AWSMigrationHub.AssociateCreatedArtifact");
2266        let encoded = serde_json::to_string(&input).unwrap();
2267        request.set_payload(Some(encoded));
2268
2269        let response = self
2270            .sign_and_dispatch(request, AssociateCreatedArtifactError::from_response)
2271            .await?;
2272        let mut response = response;
2273        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2274        proto::json::ResponsePayload::new(&response)
2275            .deserialize::<AssociateCreatedArtifactResult, _>()
2276    }
2277
2278    /// <p>Associates a discovered resource ID from Application Discovery Service with a migration task.</p>
2279    async fn associate_discovered_resource(
2280        &self,
2281        input: AssociateDiscoveredResourceRequest,
2282    ) -> Result<AssociateDiscoveredResourceResult, RusotoError<AssociateDiscoveredResourceError>>
2283    {
2284        let mut request = self.new_signed_request("POST", "/");
2285        request.add_header(
2286            "x-amz-target",
2287            "AWSMigrationHub.AssociateDiscoveredResource",
2288        );
2289        let encoded = serde_json::to_string(&input).unwrap();
2290        request.set_payload(Some(encoded));
2291
2292        let response = self
2293            .sign_and_dispatch(request, AssociateDiscoveredResourceError::from_response)
2294            .await?;
2295        let mut response = response;
2296        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2297        proto::json::ResponsePayload::new(&response)
2298            .deserialize::<AssociateDiscoveredResourceResult, _>()
2299    }
2300
2301    /// <p>Creates a progress update stream which is an AWS resource used for access control as well as a namespace for migration task names that is implicitly linked to your AWS account. It must uniquely identify the migration tool as it is used for all updates made by the tool; however, it does not need to be unique for each AWS account because it is scoped to the AWS account.</p>
2302    async fn create_progress_update_stream(
2303        &self,
2304        input: CreateProgressUpdateStreamRequest,
2305    ) -> Result<CreateProgressUpdateStreamResult, RusotoError<CreateProgressUpdateStreamError>>
2306    {
2307        let mut request = self.new_signed_request("POST", "/");
2308        request.add_header("x-amz-target", "AWSMigrationHub.CreateProgressUpdateStream");
2309        let encoded = serde_json::to_string(&input).unwrap();
2310        request.set_payload(Some(encoded));
2311
2312        let response = self
2313            .sign_and_dispatch(request, CreateProgressUpdateStreamError::from_response)
2314            .await?;
2315        let mut response = response;
2316        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2317        proto::json::ResponsePayload::new(&response)
2318            .deserialize::<CreateProgressUpdateStreamResult, _>()
2319    }
2320
2321    /// <p><p>Deletes a progress update stream, including all of its tasks, which was previously created as an AWS resource used for access control. This API has the following traits:</p> <ul> <li> <p>The only parameter needed for <code>DeleteProgressUpdateStream</code> is the stream name (same as a <code>CreateProgressUpdateStream</code> call).</p> </li> <li> <p>The call will return, and a background process will asynchronously delete the stream and all of its resources (tasks, associated resources, resource attributes, created artifacts).</p> </li> <li> <p>If the stream takes time to be deleted, it might still show up on a <code>ListProgressUpdateStreams</code> call.</p> </li> <li> <p> <code>CreateProgressUpdateStream</code>, <code>ImportMigrationTask</code>, <code>NotifyMigrationTaskState</code>, and all Associate[*] APIs related to the tasks belonging to the stream will throw &quot;InvalidInputException&quot; if the stream of the same name is in the process of being deleted.</p> </li> <li> <p>Once the stream and all of its resources are deleted, <code>CreateProgressUpdateStream</code> for a stream of the same name will succeed, and that stream will be an entirely new logical resource (without any resources associated with the old stream).</p> </li> </ul></p>
2322    async fn delete_progress_update_stream(
2323        &self,
2324        input: DeleteProgressUpdateStreamRequest,
2325    ) -> Result<DeleteProgressUpdateStreamResult, RusotoError<DeleteProgressUpdateStreamError>>
2326    {
2327        let mut request = self.new_signed_request("POST", "/");
2328        request.add_header("x-amz-target", "AWSMigrationHub.DeleteProgressUpdateStream");
2329        let encoded = serde_json::to_string(&input).unwrap();
2330        request.set_payload(Some(encoded));
2331
2332        let response = self
2333            .sign_and_dispatch(request, DeleteProgressUpdateStreamError::from_response)
2334            .await?;
2335        let mut response = response;
2336        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2337        proto::json::ResponsePayload::new(&response)
2338            .deserialize::<DeleteProgressUpdateStreamResult, _>()
2339    }
2340
2341    /// <p>Gets the migration status of an application.</p>
2342    async fn describe_application_state(
2343        &self,
2344        input: DescribeApplicationStateRequest,
2345    ) -> Result<DescribeApplicationStateResult, RusotoError<DescribeApplicationStateError>> {
2346        let mut request = self.new_signed_request("POST", "/");
2347        request.add_header("x-amz-target", "AWSMigrationHub.DescribeApplicationState");
2348        let encoded = serde_json::to_string(&input).unwrap();
2349        request.set_payload(Some(encoded));
2350
2351        let response = self
2352            .sign_and_dispatch(request, DescribeApplicationStateError::from_response)
2353            .await?;
2354        let mut response = response;
2355        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2356        proto::json::ResponsePayload::new(&response)
2357            .deserialize::<DescribeApplicationStateResult, _>()
2358    }
2359
2360    /// <p>Retrieves a list of all attributes associated with a specific migration task.</p>
2361    async fn describe_migration_task(
2362        &self,
2363        input: DescribeMigrationTaskRequest,
2364    ) -> Result<DescribeMigrationTaskResult, RusotoError<DescribeMigrationTaskError>> {
2365        let mut request = self.new_signed_request("POST", "/");
2366        request.add_header("x-amz-target", "AWSMigrationHub.DescribeMigrationTask");
2367        let encoded = serde_json::to_string(&input).unwrap();
2368        request.set_payload(Some(encoded));
2369
2370        let response = self
2371            .sign_and_dispatch(request, DescribeMigrationTaskError::from_response)
2372            .await?;
2373        let mut response = response;
2374        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2375        proto::json::ResponsePayload::new(&response).deserialize::<DescribeMigrationTaskResult, _>()
2376    }
2377
2378    /// <p><p>Disassociates a created artifact of an AWS resource with a migration task performed by a migration tool that was previously associated. This API has the following traits:</p> <ul> <li> <p>A migration user can call the <code>DisassociateCreatedArtifacts</code> operation to disassociate a created AWS Artifact from a migration task.</p> </li> <li> <p>The created artifact name must be provided in ARN (Amazon Resource Name) format which will contain information about type and region; for example: <code>arn:aws:ec2:us-east-1:488216288981:image/ami-6d0ba87b</code>.</p> </li> <li> <p>Examples of the AWS resource behind the created artifact are, AMI&#39;s, EC2 instance, or RDS instance, etc.</p> </li> </ul></p>
2379    async fn disassociate_created_artifact(
2380        &self,
2381        input: DisassociateCreatedArtifactRequest,
2382    ) -> Result<DisassociateCreatedArtifactResult, RusotoError<DisassociateCreatedArtifactError>>
2383    {
2384        let mut request = self.new_signed_request("POST", "/");
2385        request.add_header(
2386            "x-amz-target",
2387            "AWSMigrationHub.DisassociateCreatedArtifact",
2388        );
2389        let encoded = serde_json::to_string(&input).unwrap();
2390        request.set_payload(Some(encoded));
2391
2392        let response = self
2393            .sign_and_dispatch(request, DisassociateCreatedArtifactError::from_response)
2394            .await?;
2395        let mut response = response;
2396        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2397        proto::json::ResponsePayload::new(&response)
2398            .deserialize::<DisassociateCreatedArtifactResult, _>()
2399    }
2400
2401    /// <p>Disassociate an Application Discovery Service discovered resource from a migration task.</p>
2402    async fn disassociate_discovered_resource(
2403        &self,
2404        input: DisassociateDiscoveredResourceRequest,
2405    ) -> Result<
2406        DisassociateDiscoveredResourceResult,
2407        RusotoError<DisassociateDiscoveredResourceError>,
2408    > {
2409        let mut request = self.new_signed_request("POST", "/");
2410        request.add_header(
2411            "x-amz-target",
2412            "AWSMigrationHub.DisassociateDiscoveredResource",
2413        );
2414        let encoded = serde_json::to_string(&input).unwrap();
2415        request.set_payload(Some(encoded));
2416
2417        let response = self
2418            .sign_and_dispatch(request, DisassociateDiscoveredResourceError::from_response)
2419            .await?;
2420        let mut response = response;
2421        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2422        proto::json::ResponsePayload::new(&response)
2423            .deserialize::<DisassociateDiscoveredResourceResult, _>()
2424    }
2425
2426    /// <p>Registers a new migration task which represents a server, database, etc., being migrated to AWS by a migration tool.</p> <p>This API is a prerequisite to calling the <code>NotifyMigrationTaskState</code> API as the migration tool must first register the migration task with Migration Hub.</p>
2427    async fn import_migration_task(
2428        &self,
2429        input: ImportMigrationTaskRequest,
2430    ) -> Result<ImportMigrationTaskResult, RusotoError<ImportMigrationTaskError>> {
2431        let mut request = self.new_signed_request("POST", "/");
2432        request.add_header("x-amz-target", "AWSMigrationHub.ImportMigrationTask");
2433        let encoded = serde_json::to_string(&input).unwrap();
2434        request.set_payload(Some(encoded));
2435
2436        let response = self
2437            .sign_and_dispatch(request, ImportMigrationTaskError::from_response)
2438            .await?;
2439        let mut response = response;
2440        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2441        proto::json::ResponsePayload::new(&response).deserialize::<ImportMigrationTaskResult, _>()
2442    }
2443
2444    /// <p>Lists all the migration statuses for your applications. If you use the optional <code>ApplicationIds</code> parameter, only the migration statuses for those applications will be returned.</p>
2445    async fn list_application_states(
2446        &self,
2447        input: ListApplicationStatesRequest,
2448    ) -> Result<ListApplicationStatesResult, RusotoError<ListApplicationStatesError>> {
2449        let mut request = self.new_signed_request("POST", "/");
2450        request.add_header("x-amz-target", "AWSMigrationHub.ListApplicationStates");
2451        let encoded = serde_json::to_string(&input).unwrap();
2452        request.set_payload(Some(encoded));
2453
2454        let response = self
2455            .sign_and_dispatch(request, ListApplicationStatesError::from_response)
2456            .await?;
2457        let mut response = response;
2458        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2459        proto::json::ResponsePayload::new(&response).deserialize::<ListApplicationStatesResult, _>()
2460    }
2461
2462    /// <p><p>Lists the created artifacts attached to a given migration task in an update stream. This API has the following traits:</p> <ul> <li> <p>Gets the list of the created artifacts while migration is taking place.</p> </li> <li> <p>Shows the artifacts created by the migration tool that was associated by the <code>AssociateCreatedArtifact</code> API. </p> </li> <li> <p>Lists created artifacts in a paginated interface. </p> </li> </ul></p>
2463    async fn list_created_artifacts(
2464        &self,
2465        input: ListCreatedArtifactsRequest,
2466    ) -> Result<ListCreatedArtifactsResult, RusotoError<ListCreatedArtifactsError>> {
2467        let mut request = self.new_signed_request("POST", "/");
2468        request.add_header("x-amz-target", "AWSMigrationHub.ListCreatedArtifacts");
2469        let encoded = serde_json::to_string(&input).unwrap();
2470        request.set_payload(Some(encoded));
2471
2472        let response = self
2473            .sign_and_dispatch(request, ListCreatedArtifactsError::from_response)
2474            .await?;
2475        let mut response = response;
2476        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2477        proto::json::ResponsePayload::new(&response).deserialize::<ListCreatedArtifactsResult, _>()
2478    }
2479
2480    /// <p>Lists discovered resources associated with the given <code>MigrationTask</code>.</p>
2481    async fn list_discovered_resources(
2482        &self,
2483        input: ListDiscoveredResourcesRequest,
2484    ) -> Result<ListDiscoveredResourcesResult, RusotoError<ListDiscoveredResourcesError>> {
2485        let mut request = self.new_signed_request("POST", "/");
2486        request.add_header("x-amz-target", "AWSMigrationHub.ListDiscoveredResources");
2487        let encoded = serde_json::to_string(&input).unwrap();
2488        request.set_payload(Some(encoded));
2489
2490        let response = self
2491            .sign_and_dispatch(request, ListDiscoveredResourcesError::from_response)
2492            .await?;
2493        let mut response = response;
2494        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2495        proto::json::ResponsePayload::new(&response)
2496            .deserialize::<ListDiscoveredResourcesResult, _>()
2497    }
2498
2499    /// <p><p>Lists all, or filtered by resource name, migration tasks associated with the user account making this call. This API has the following traits:</p> <ul> <li> <p>Can show a summary list of the most recent migration tasks.</p> </li> <li> <p>Can show a summary list of migration tasks associated with a given discovered resource.</p> </li> <li> <p>Lists migration tasks in a paginated interface.</p> </li> </ul></p>
2500    async fn list_migration_tasks(
2501        &self,
2502        input: ListMigrationTasksRequest,
2503    ) -> Result<ListMigrationTasksResult, RusotoError<ListMigrationTasksError>> {
2504        let mut request = self.new_signed_request("POST", "/");
2505        request.add_header("x-amz-target", "AWSMigrationHub.ListMigrationTasks");
2506        let encoded = serde_json::to_string(&input).unwrap();
2507        request.set_payload(Some(encoded));
2508
2509        let response = self
2510            .sign_and_dispatch(request, ListMigrationTasksError::from_response)
2511            .await?;
2512        let mut response = response;
2513        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2514        proto::json::ResponsePayload::new(&response).deserialize::<ListMigrationTasksResult, _>()
2515    }
2516
2517    /// <p>Lists progress update streams associated with the user account making this call.</p>
2518    async fn list_progress_update_streams(
2519        &self,
2520        input: ListProgressUpdateStreamsRequest,
2521    ) -> Result<ListProgressUpdateStreamsResult, RusotoError<ListProgressUpdateStreamsError>> {
2522        let mut request = self.new_signed_request("POST", "/");
2523        request.add_header("x-amz-target", "AWSMigrationHub.ListProgressUpdateStreams");
2524        let encoded = serde_json::to_string(&input).unwrap();
2525        request.set_payload(Some(encoded));
2526
2527        let response = self
2528            .sign_and_dispatch(request, ListProgressUpdateStreamsError::from_response)
2529            .await?;
2530        let mut response = response;
2531        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2532        proto::json::ResponsePayload::new(&response)
2533            .deserialize::<ListProgressUpdateStreamsResult, _>()
2534    }
2535
2536    /// <p>Sets the migration state of an application. For a given application identified by the value passed to <code>ApplicationId</code>, its status is set or updated by passing one of three values to <code>Status</code>: <code>NOT_STARTED | IN_PROGRESS | COMPLETED</code>.</p>
2537    async fn notify_application_state(
2538        &self,
2539        input: NotifyApplicationStateRequest,
2540    ) -> Result<NotifyApplicationStateResult, RusotoError<NotifyApplicationStateError>> {
2541        let mut request = self.new_signed_request("POST", "/");
2542        request.add_header("x-amz-target", "AWSMigrationHub.NotifyApplicationState");
2543        let encoded = serde_json::to_string(&input).unwrap();
2544        request.set_payload(Some(encoded));
2545
2546        let response = self
2547            .sign_and_dispatch(request, NotifyApplicationStateError::from_response)
2548            .await?;
2549        let mut response = response;
2550        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2551        proto::json::ResponsePayload::new(&response)
2552            .deserialize::<NotifyApplicationStateResult, _>()
2553    }
2554
2555    /// <p><p>Notifies Migration Hub of the current status, progress, or other detail regarding a migration task. This API has the following traits:</p> <ul> <li> <p>Migration tools will call the <code>NotifyMigrationTaskState</code> API to share the latest progress and status.</p> </li> <li> <p> <code>MigrationTaskName</code> is used for addressing updates to the correct target.</p> </li> <li> <p> <code>ProgressUpdateStream</code> is used for access control and to provide a namespace for each migration tool.</p> </li> </ul></p>
2556    async fn notify_migration_task_state(
2557        &self,
2558        input: NotifyMigrationTaskStateRequest,
2559    ) -> Result<NotifyMigrationTaskStateResult, RusotoError<NotifyMigrationTaskStateError>> {
2560        let mut request = self.new_signed_request("POST", "/");
2561        request.add_header("x-amz-target", "AWSMigrationHub.NotifyMigrationTaskState");
2562        let encoded = serde_json::to_string(&input).unwrap();
2563        request.set_payload(Some(encoded));
2564
2565        let response = self
2566            .sign_and_dispatch(request, NotifyMigrationTaskStateError::from_response)
2567            .await?;
2568        let mut response = response;
2569        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2570        proto::json::ResponsePayload::new(&response)
2571            .deserialize::<NotifyMigrationTaskStateResult, _>()
2572    }
2573
2574    /// <p><p>Provides identifying details of the resource being migrated so that it can be associated in the Application Discovery Service repository. This association occurs asynchronously after <code>PutResourceAttributes</code> returns.</p> <important> <ul> <li> <p>Keep in mind that subsequent calls to PutResourceAttributes will override previously stored attributes. For example, if it is first called with a MAC address, but later, it is desired to <i>add</i> an IP address, it will then be required to call it with <i>both</i> the IP and MAC addresses to prevent overriding the MAC address.</p> </li> <li> <p>Note the instructions regarding the special use case of the <a href="https://docs.aws.amazon.com/migrationhub/latest/ug/API_PutResourceAttributes.html#migrationhub-PutResourceAttributes-request-ResourceAttributeList"> <code>ResourceAttributeList</code> </a> parameter when specifying any &quot;VM&quot; related value.</p> </li> </ul> </important> <note> <p>Because this is an asynchronous call, it will always return 200, whether an association occurs or not. To confirm if an association was found based on the provided details, call <code>ListDiscoveredResources</code>.</p> </note></p>
2575    async fn put_resource_attributes(
2576        &self,
2577        input: PutResourceAttributesRequest,
2578    ) -> Result<PutResourceAttributesResult, RusotoError<PutResourceAttributesError>> {
2579        let mut request = self.new_signed_request("POST", "/");
2580        request.add_header("x-amz-target", "AWSMigrationHub.PutResourceAttributes");
2581        let encoded = serde_json::to_string(&input).unwrap();
2582        request.set_payload(Some(encoded));
2583
2584        let response = self
2585            .sign_and_dispatch(request, PutResourceAttributesError::from_response)
2586            .await?;
2587        let mut response = response;
2588        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2589        proto::json::ResponsePayload::new(&response).deserialize::<PutResourceAttributesResult, _>()
2590    }
2591}