rusoto_sms/
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 ServerMigrationServiceClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "sms", &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>Information about the application.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct AppSummary {
57    /// <p>Unique ID of the application.</p>
58    #[serde(rename = "appId")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub app_id: Option<String>,
61    /// <p>Time of creation of this application.</p>
62    #[serde(rename = "creationTime")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub creation_time: Option<f64>,
65    /// <p>Description of the application.</p>
66    #[serde(rename = "description")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub description: Option<String>,
69    /// <p>Timestamp of the application's creation.</p>
70    #[serde(rename = "lastModified")]
71    #[serde(skip_serializing_if = "Option::is_none")]
72    pub last_modified: Option<f64>,
73    /// <p>Timestamp of the application's most recent successful replication.</p>
74    #[serde(rename = "latestReplicationTime")]
75    #[serde(skip_serializing_if = "Option::is_none")]
76    pub latest_replication_time: Option<f64>,
77    /// <p>Details about the latest launch of the application.</p>
78    #[serde(rename = "launchDetails")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub launch_details: Option<LaunchDetails>,
81    /// <p>Launch status of the application.</p>
82    #[serde(rename = "launchStatus")]
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub launch_status: Option<String>,
85    /// <p>A message related to the launch status of the application.</p>
86    #[serde(rename = "launchStatusMessage")]
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub launch_status_message: Option<String>,
89    /// <p>Name of the application.</p>
90    #[serde(rename = "name")]
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub name: Option<String>,
93    /// <p>Replication status of the application.</p>
94    #[serde(rename = "replicationStatus")]
95    #[serde(skip_serializing_if = "Option::is_none")]
96    pub replication_status: Option<String>,
97    /// <p>A message related to the replication status of the application.</p>
98    #[serde(rename = "replicationStatusMessage")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub replication_status_message: Option<String>,
101    /// <p>Name of the service role in the customer's account used by AWS SMS.</p>
102    #[serde(rename = "roleName")]
103    #[serde(skip_serializing_if = "Option::is_none")]
104    pub role_name: Option<String>,
105    /// <p>Status of the application.</p>
106    #[serde(rename = "status")]
107    #[serde(skip_serializing_if = "Option::is_none")]
108    pub status: Option<String>,
109    /// <p>A message related to the status of the application</p>
110    #[serde(rename = "statusMessage")]
111    #[serde(skip_serializing_if = "Option::is_none")]
112    pub status_message: Option<String>,
113    /// <p>Number of server groups present in the application.</p>
114    #[serde(rename = "totalServerGroups")]
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub total_server_groups: Option<i64>,
117    /// <p>Number of servers present in the application.</p>
118    #[serde(rename = "totalServers")]
119    #[serde(skip_serializing_if = "Option::is_none")]
120    pub total_servers: Option<i64>,
121}
122
123/// <p>Represents a connector.</p>
124#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
125#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
126pub struct Connector {
127    /// <p>The time the connector was associated.</p>
128    #[serde(rename = "associatedOn")]
129    #[serde(skip_serializing_if = "Option::is_none")]
130    pub associated_on: Option<f64>,
131    /// <p>The capabilities of the connector.</p>
132    #[serde(rename = "capabilityList")]
133    #[serde(skip_serializing_if = "Option::is_none")]
134    pub capability_list: Option<Vec<String>>,
135    /// <p>The identifier of the connector.</p>
136    #[serde(rename = "connectorId")]
137    #[serde(skip_serializing_if = "Option::is_none")]
138    pub connector_id: Option<String>,
139    /// <p>The IP address of the connector.</p>
140    #[serde(rename = "ipAddress")]
141    #[serde(skip_serializing_if = "Option::is_none")]
142    pub ip_address: Option<String>,
143    /// <p>The MAC address of the connector.</p>
144    #[serde(rename = "macAddress")]
145    #[serde(skip_serializing_if = "Option::is_none")]
146    pub mac_address: Option<String>,
147    /// <p>The status of the connector.</p>
148    #[serde(rename = "status")]
149    #[serde(skip_serializing_if = "Option::is_none")]
150    pub status: Option<String>,
151    /// <p>The connector version.</p>
152    #[serde(rename = "version")]
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub version: Option<String>,
155    /// <p>The identifier of the VM manager.</p>
156    #[serde(rename = "vmManagerId")]
157    #[serde(skip_serializing_if = "Option::is_none")]
158    pub vm_manager_id: Option<String>,
159    /// <p>The name of the VM manager.</p>
160    #[serde(rename = "vmManagerName")]
161    #[serde(skip_serializing_if = "Option::is_none")]
162    pub vm_manager_name: Option<String>,
163    /// <p>The VM management product.</p>
164    #[serde(rename = "vmManagerType")]
165    #[serde(skip_serializing_if = "Option::is_none")]
166    pub vm_manager_type: Option<String>,
167}
168
169#[derive(Clone, Debug, Default, PartialEq, Serialize)]
170#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
171pub struct CreateAppRequest {
172    /// <p>A unique, case-sensitive identifier you provide to ensure idempotency of application creation.</p>
173    #[serde(rename = "clientToken")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub client_token: Option<String>,
176    /// <p>Description of the new application</p>
177    #[serde(rename = "description")]
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub description: Option<String>,
180    /// <p>Name of the new application.</p>
181    #[serde(rename = "name")]
182    #[serde(skip_serializing_if = "Option::is_none")]
183    pub name: Option<String>,
184    /// <p>Name of service role in customer's account to be used by AWS SMS.</p>
185    #[serde(rename = "roleName")]
186    #[serde(skip_serializing_if = "Option::is_none")]
187    pub role_name: Option<String>,
188    /// <p>List of server groups to include in the application.</p>
189    #[serde(rename = "serverGroups")]
190    #[serde(skip_serializing_if = "Option::is_none")]
191    pub server_groups: Option<Vec<ServerGroup>>,
192    /// <p>List of tags to be associated with the application.</p>
193    #[serde(rename = "tags")]
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub tags: Option<Vec<Tag>>,
196}
197
198#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
199#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
200pub struct CreateAppResponse {
201    /// <p>Summary description of the application.</p>
202    #[serde(rename = "appSummary")]
203    #[serde(skip_serializing_if = "Option::is_none")]
204    pub app_summary: Option<AppSummary>,
205    /// <p>List of server groups included in the application.</p>
206    #[serde(rename = "serverGroups")]
207    #[serde(skip_serializing_if = "Option::is_none")]
208    pub server_groups: Option<Vec<ServerGroup>>,
209    /// <p>List of taags associated with the application.</p>
210    #[serde(rename = "tags")]
211    #[serde(skip_serializing_if = "Option::is_none")]
212    pub tags: Option<Vec<Tag>>,
213}
214
215#[derive(Clone, Debug, Default, PartialEq, Serialize)]
216#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
217pub struct CreateReplicationJobRequest {
218    /// <p>The description of the replication job.</p>
219    #[serde(rename = "description")]
220    #[serde(skip_serializing_if = "Option::is_none")]
221    pub description: Option<String>,
222    /// <p>When <i>true</i>, the replication job produces encrypted AMIs. See also <code>KmsKeyId</code> below.</p>
223    #[serde(rename = "encrypted")]
224    #[serde(skip_serializing_if = "Option::is_none")]
225    pub encrypted: Option<bool>,
226    /// <p>The time between consecutive replication runs, in hours.</p>
227    #[serde(rename = "frequency")]
228    #[serde(skip_serializing_if = "Option::is_none")]
229    pub frequency: Option<i64>,
230    /// <p>KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following: </p> <ul> <li> <p>KMS key ID</p> </li> <li> <p>KMS key alias</p> </li> <li> <p>ARN referring to KMS key ID</p> </li> <li> <p>ARN referring to KMS key alias</p> </li> </ul> <p> If encrypted is <i>true</i> but a KMS key id is not specified, the customer's default KMS key for EBS is used. </p>
231    #[serde(rename = "kmsKeyId")]
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub kms_key_id: Option<String>,
234    /// <p>The license type to be used for the AMI created by a successful replication run.</p>
235    #[serde(rename = "licenseType")]
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub license_type: Option<String>,
238    /// <p>The maximum number of SMS-created AMIs to retain. The oldest will be deleted once the maximum number is reached and a new AMI is created.</p>
239    #[serde(rename = "numberOfRecentAmisToKeep")]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    pub number_of_recent_amis_to_keep: Option<i64>,
242    /// <p>The name of the IAM role to be used by the AWS SMS.</p>
243    #[serde(rename = "roleName")]
244    #[serde(skip_serializing_if = "Option::is_none")]
245    pub role_name: Option<String>,
246    /// <p><p/></p>
247    #[serde(rename = "runOnce")]
248    #[serde(skip_serializing_if = "Option::is_none")]
249    pub run_once: Option<bool>,
250    /// <p>The seed replication time.</p>
251    #[serde(rename = "seedReplicationTime")]
252    pub seed_replication_time: f64,
253    /// <p>The identifier of the server.</p>
254    #[serde(rename = "serverId")]
255    pub server_id: String,
256}
257
258#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
259#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
260pub struct CreateReplicationJobResponse {
261    /// <p>The unique identifier of the replication job.</p>
262    #[serde(rename = "replicationJobId")]
263    #[serde(skip_serializing_if = "Option::is_none")]
264    pub replication_job_id: Option<String>,
265}
266
267#[derive(Clone, Debug, Default, PartialEq, Serialize)]
268#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
269pub struct DeleteAppLaunchConfigurationRequest {
270    /// <p>ID of the application associated with the launch configuration.</p>
271    #[serde(rename = "appId")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub app_id: Option<String>,
274}
275
276#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
277#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
278pub struct DeleteAppLaunchConfigurationResponse {}
279
280#[derive(Clone, Debug, Default, PartialEq, Serialize)]
281#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
282pub struct DeleteAppReplicationConfigurationRequest {
283    /// <p>ID of the application associated with the replication configuration.</p>
284    #[serde(rename = "appId")]
285    #[serde(skip_serializing_if = "Option::is_none")]
286    pub app_id: Option<String>,
287}
288
289#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
290#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
291pub struct DeleteAppReplicationConfigurationResponse {}
292
293#[derive(Clone, Debug, Default, PartialEq, Serialize)]
294#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
295pub struct DeleteAppRequest {
296    /// <p>ID of the application to delete.</p>
297    #[serde(rename = "appId")]
298    #[serde(skip_serializing_if = "Option::is_none")]
299    pub app_id: Option<String>,
300    /// <p>While deleting the application, stop all replication jobs corresponding to the servers in the application.</p>
301    #[serde(rename = "forceStopAppReplication")]
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub force_stop_app_replication: Option<bool>,
304    /// <p>While deleting the application, terminate the stack corresponding to the application.</p>
305    #[serde(rename = "forceTerminateApp")]
306    #[serde(skip_serializing_if = "Option::is_none")]
307    pub force_terminate_app: Option<bool>,
308}
309
310#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
311#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
312pub struct DeleteAppResponse {}
313
314#[derive(Clone, Debug, Default, PartialEq, Serialize)]
315#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
316pub struct DeleteReplicationJobRequest {
317    /// <p>The identifier of the replication job.</p>
318    #[serde(rename = "replicationJobId")]
319    pub replication_job_id: String,
320}
321
322#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
323#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
324pub struct DeleteReplicationJobResponse {}
325
326#[derive(Clone, Debug, Default, PartialEq, Serialize)]
327#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
328pub struct DeleteServerCatalogRequest {}
329
330#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
331#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
332pub struct DeleteServerCatalogResponse {}
333
334#[derive(Clone, Debug, Default, PartialEq, Serialize)]
335#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
336pub struct DisassociateConnectorRequest {
337    /// <p>The identifier of the connector.</p>
338    #[serde(rename = "connectorId")]
339    pub connector_id: String,
340}
341
342#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
343#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
344pub struct DisassociateConnectorResponse {}
345
346#[derive(Clone, Debug, Default, PartialEq, Serialize)]
347#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
348pub struct GenerateChangeSetRequest {
349    /// <p>ID of the application associated with the change set.</p>
350    #[serde(rename = "appId")]
351    #[serde(skip_serializing_if = "Option::is_none")]
352    pub app_id: Option<String>,
353    /// <p>Format for the change set.</p>
354    #[serde(rename = "changesetFormat")]
355    #[serde(skip_serializing_if = "Option::is_none")]
356    pub changeset_format: Option<String>,
357}
358
359#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
360#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
361pub struct GenerateChangeSetResponse {
362    /// <p>Location of the Amazon S3 object.</p>
363    #[serde(rename = "s3Location")]
364    #[serde(skip_serializing_if = "Option::is_none")]
365    pub s_3_location: Option<S3Location>,
366}
367
368#[derive(Clone, Debug, Default, PartialEq, Serialize)]
369#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
370pub struct GenerateTemplateRequest {
371    /// <p>ID of the application associated with the Amazon CloudFormation template.</p>
372    #[serde(rename = "appId")]
373    #[serde(skip_serializing_if = "Option::is_none")]
374    pub app_id: Option<String>,
375    /// <p>Format for generating the Amazon CloudFormation template.</p>
376    #[serde(rename = "templateFormat")]
377    #[serde(skip_serializing_if = "Option::is_none")]
378    pub template_format: Option<String>,
379}
380
381#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
382#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
383pub struct GenerateTemplateResponse {
384    /// <p>Location of the Amazon S3 object.</p>
385    #[serde(rename = "s3Location")]
386    #[serde(skip_serializing_if = "Option::is_none")]
387    pub s_3_location: Option<S3Location>,
388}
389
390#[derive(Clone, Debug, Default, PartialEq, Serialize)]
391#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
392pub struct GetAppLaunchConfigurationRequest {
393    /// <p>ID of the application launch configuration.</p>
394    #[serde(rename = "appId")]
395    #[serde(skip_serializing_if = "Option::is_none")]
396    pub app_id: Option<String>,
397}
398
399#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
400#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
401pub struct GetAppLaunchConfigurationResponse {
402    /// <p>ID of the application associated with the launch configuration.</p>
403    #[serde(rename = "appId")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub app_id: Option<String>,
406    /// <p>Name of the service role in the customer's account that Amazon CloudFormation uses to launch the application.</p>
407    #[serde(rename = "roleName")]
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub role_name: Option<String>,
410    /// <p>List of launch configurations for server groups in this application.</p>
411    #[serde(rename = "serverGroupLaunchConfigurations")]
412    #[serde(skip_serializing_if = "Option::is_none")]
413    pub server_group_launch_configurations: Option<Vec<ServerGroupLaunchConfiguration>>,
414}
415
416#[derive(Clone, Debug, Default, PartialEq, Serialize)]
417#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
418pub struct GetAppReplicationConfigurationRequest {
419    /// <p>ID of the application associated with the replication configuration.</p>
420    #[serde(rename = "appId")]
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub app_id: Option<String>,
423}
424
425#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
426#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
427pub struct GetAppReplicationConfigurationResponse {
428    /// <p>Replication configurations associated with server groups in this application.</p>
429    #[serde(rename = "serverGroupReplicationConfigurations")]
430    #[serde(skip_serializing_if = "Option::is_none")]
431    pub server_group_replication_configurations: Option<Vec<ServerGroupReplicationConfiguration>>,
432}
433
434#[derive(Clone, Debug, Default, PartialEq, Serialize)]
435#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
436pub struct GetAppRequest {
437    /// <p>ID of the application whose information is being retrieved.</p>
438    #[serde(rename = "appId")]
439    #[serde(skip_serializing_if = "Option::is_none")]
440    pub app_id: Option<String>,
441}
442
443#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
444#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
445pub struct GetAppResponse {
446    /// <p>Information about the application.</p>
447    #[serde(rename = "appSummary")]
448    #[serde(skip_serializing_if = "Option::is_none")]
449    pub app_summary: Option<AppSummary>,
450    /// <p>List of server groups belonging to the application.</p>
451    #[serde(rename = "serverGroups")]
452    #[serde(skip_serializing_if = "Option::is_none")]
453    pub server_groups: Option<Vec<ServerGroup>>,
454    /// <p>List of tags associated with the application.</p>
455    #[serde(rename = "tags")]
456    #[serde(skip_serializing_if = "Option::is_none")]
457    pub tags: Option<Vec<Tag>>,
458}
459
460#[derive(Clone, Debug, Default, PartialEq, Serialize)]
461#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
462pub struct GetConnectorsRequest {
463    /// <p>The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
464    #[serde(rename = "maxResults")]
465    #[serde(skip_serializing_if = "Option::is_none")]
466    pub max_results: Option<i64>,
467    /// <p>The token for the next set of results.</p>
468    #[serde(rename = "nextToken")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub next_token: Option<String>,
471}
472
473#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
474#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
475pub struct GetConnectorsResponse {
476    /// <p>Information about the registered connectors.</p>
477    #[serde(rename = "connectorList")]
478    #[serde(skip_serializing_if = "Option::is_none")]
479    pub connector_list: Option<Vec<Connector>>,
480    /// <p>The token required to retrieve the next set of results. This value is null when there are no more results to return.</p>
481    #[serde(rename = "nextToken")]
482    #[serde(skip_serializing_if = "Option::is_none")]
483    pub next_token: Option<String>,
484}
485
486#[derive(Clone, Debug, Default, PartialEq, Serialize)]
487#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
488pub struct GetReplicationJobsRequest {
489    /// <p>The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
490    #[serde(rename = "maxResults")]
491    #[serde(skip_serializing_if = "Option::is_none")]
492    pub max_results: Option<i64>,
493    /// <p>The token for the next set of results.</p>
494    #[serde(rename = "nextToken")]
495    #[serde(skip_serializing_if = "Option::is_none")]
496    pub next_token: Option<String>,
497    /// <p>The identifier of the replication job.</p>
498    #[serde(rename = "replicationJobId")]
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub replication_job_id: Option<String>,
501}
502
503#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
504#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
505pub struct GetReplicationJobsResponse {
506    /// <p>The token required to retrieve the next set of results. This value is null when there are no more results to return.</p>
507    #[serde(rename = "nextToken")]
508    #[serde(skip_serializing_if = "Option::is_none")]
509    pub next_token: Option<String>,
510    /// <p>Information about the replication jobs.</p>
511    #[serde(rename = "replicationJobList")]
512    #[serde(skip_serializing_if = "Option::is_none")]
513    pub replication_job_list: Option<Vec<ReplicationJob>>,
514}
515
516#[derive(Clone, Debug, Default, PartialEq, Serialize)]
517#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
518pub struct GetReplicationRunsRequest {
519    /// <p>The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
520    #[serde(rename = "maxResults")]
521    #[serde(skip_serializing_if = "Option::is_none")]
522    pub max_results: Option<i64>,
523    /// <p>The token for the next set of results.</p>
524    #[serde(rename = "nextToken")]
525    #[serde(skip_serializing_if = "Option::is_none")]
526    pub next_token: Option<String>,
527    /// <p>The identifier of the replication job.</p>
528    #[serde(rename = "replicationJobId")]
529    pub replication_job_id: String,
530}
531
532#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
533#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
534pub struct GetReplicationRunsResponse {
535    /// <p>The token required to retrieve the next set of results. This value is null when there are no more results to return.</p>
536    #[serde(rename = "nextToken")]
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub next_token: Option<String>,
539    /// <p>Information about the replication job.</p>
540    #[serde(rename = "replicationJob")]
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub replication_job: Option<ReplicationJob>,
543    /// <p>Information about the replication runs.</p>
544    #[serde(rename = "replicationRunList")]
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub replication_run_list: Option<Vec<ReplicationRun>>,
547}
548
549#[derive(Clone, Debug, Default, PartialEq, Serialize)]
550#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
551pub struct GetServersRequest {
552    /// <p>The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value.</p>
553    #[serde(rename = "maxResults")]
554    #[serde(skip_serializing_if = "Option::is_none")]
555    pub max_results: Option<i64>,
556    /// <p>The token for the next set of results.</p>
557    #[serde(rename = "nextToken")]
558    #[serde(skip_serializing_if = "Option::is_none")]
559    pub next_token: Option<String>,
560    /// <p>List of <code>VmServerAddress</code> objects</p>
561    #[serde(rename = "vmServerAddressList")]
562    #[serde(skip_serializing_if = "Option::is_none")]
563    pub vm_server_address_list: Option<Vec<VmServerAddress>>,
564}
565
566#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
567#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
568pub struct GetServersResponse {
569    /// <p>The time when the server was last modified.</p>
570    #[serde(rename = "lastModifiedOn")]
571    #[serde(skip_serializing_if = "Option::is_none")]
572    pub last_modified_on: Option<f64>,
573    /// <p>The token required to retrieve the next set of results. This value is null when there are no more results to return.</p>
574    #[serde(rename = "nextToken")]
575    #[serde(skip_serializing_if = "Option::is_none")]
576    pub next_token: Option<String>,
577    /// <p>The status of the server catalog.</p>
578    #[serde(rename = "serverCatalogStatus")]
579    #[serde(skip_serializing_if = "Option::is_none")]
580    pub server_catalog_status: Option<String>,
581    /// <p>Information about the servers.</p>
582    #[serde(rename = "serverList")]
583    #[serde(skip_serializing_if = "Option::is_none")]
584    pub server_list: Option<Vec<Server>>,
585}
586
587#[derive(Clone, Debug, Default, PartialEq, Serialize)]
588#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
589pub struct ImportServerCatalogRequest {}
590
591#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
592#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
593pub struct ImportServerCatalogResponse {}
594
595#[derive(Clone, Debug, Default, PartialEq, Serialize)]
596#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
597pub struct LaunchAppRequest {
598    /// <p>ID of the application to launch.</p>
599    #[serde(rename = "appId")]
600    #[serde(skip_serializing_if = "Option::is_none")]
601    pub app_id: Option<String>,
602}
603
604#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
605#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
606pub struct LaunchAppResponse {}
607
608/// <p>Details about the latest launch of an application.</p>
609#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
610#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
611pub struct LaunchDetails {
612    /// <p>Latest time this application was launched successfully.</p>
613    #[serde(rename = "latestLaunchTime")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub latest_launch_time: Option<f64>,
616    /// <p>Identifier of the latest stack launched for this application.</p>
617    #[serde(rename = "stackId")]
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub stack_id: Option<String>,
620    /// <p>Name of the latest stack launched for this application.</p>
621    #[serde(rename = "stackName")]
622    #[serde(skip_serializing_if = "Option::is_none")]
623    pub stack_name: Option<String>,
624}
625
626#[derive(Clone, Debug, Default, PartialEq, Serialize)]
627#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
628pub struct ListAppsRequest {
629    /// <p><p/></p>
630    #[serde(rename = "appIds")]
631    #[serde(skip_serializing_if = "Option::is_none")]
632    pub app_ids: Option<Vec<String>>,
633    /// <p>The maximum number of results to return in a single call. The default value is 50. To retrieve the remaining results, make another call with the returned <code>NextToken</code> value. </p>
634    #[serde(rename = "maxResults")]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    pub max_results: Option<i64>,
637    /// <p>The token for the next set of results.</p>
638    #[serde(rename = "nextToken")]
639    #[serde(skip_serializing_if = "Option::is_none")]
640    pub next_token: Option<String>,
641}
642
643#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
644#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
645pub struct ListAppsResponse {
646    /// <p>A list of application summaries.</p>
647    #[serde(rename = "apps")]
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub apps: Option<Vec<AppSummary>>,
650    /// <p>The token required to retrieve the next set of results. This value is null when there are no more results to return.</p>
651    #[serde(rename = "nextToken")]
652    #[serde(skip_serializing_if = "Option::is_none")]
653    pub next_token: Option<String>,
654}
655
656#[derive(Clone, Debug, Default, PartialEq, Serialize)]
657#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
658pub struct PutAppLaunchConfigurationRequest {
659    /// <p>ID of the application associated with the launch configuration.</p>
660    #[serde(rename = "appId")]
661    #[serde(skip_serializing_if = "Option::is_none")]
662    pub app_id: Option<String>,
663    /// <p>Name of service role in the customer's account that Amazon CloudFormation uses to launch the application.</p>
664    #[serde(rename = "roleName")]
665    #[serde(skip_serializing_if = "Option::is_none")]
666    pub role_name: Option<String>,
667    /// <p>Launch configurations for server groups in the application.</p>
668    #[serde(rename = "serverGroupLaunchConfigurations")]
669    #[serde(skip_serializing_if = "Option::is_none")]
670    pub server_group_launch_configurations: Option<Vec<ServerGroupLaunchConfiguration>>,
671}
672
673#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
674#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
675pub struct PutAppLaunchConfigurationResponse {}
676
677#[derive(Clone, Debug, Default, PartialEq, Serialize)]
678#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
679pub struct PutAppReplicationConfigurationRequest {
680    /// <p>ID of the application tassociated with the replication configuration.</p>
681    #[serde(rename = "appId")]
682    #[serde(skip_serializing_if = "Option::is_none")]
683    pub app_id: Option<String>,
684    /// <p>Replication configurations for server groups in the application.</p>
685    #[serde(rename = "serverGroupReplicationConfigurations")]
686    #[serde(skip_serializing_if = "Option::is_none")]
687    pub server_group_replication_configurations: Option<Vec<ServerGroupReplicationConfiguration>>,
688}
689
690#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
691#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
692pub struct PutAppReplicationConfigurationResponse {}
693
694/// <p>Represents a replication job.</p>
695#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
696#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
697pub struct ReplicationJob {
698    /// <p>The description of the replication job.</p>
699    #[serde(rename = "description")]
700    #[serde(skip_serializing_if = "Option::is_none")]
701    pub description: Option<String>,
702    /// <p>Whether the replication job should produce encrypted AMIs or not. See also <code>KmsKeyId</code> below.</p>
703    #[serde(rename = "encrypted")]
704    #[serde(skip_serializing_if = "Option::is_none")]
705    pub encrypted: Option<bool>,
706    /// <p>The time between consecutive replication runs, in hours.</p>
707    #[serde(rename = "frequency")]
708    #[serde(skip_serializing_if = "Option::is_none")]
709    pub frequency: Option<i64>,
710    /// <p>KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following: </p> <ul> <li> <p>KMS key ID</p> </li> <li> <p>KMS key alias</p> </li> <li> <p>ARN referring to KMS key ID</p> </li> <li> <p>ARN referring to KMS key alias</p> </li> </ul> <p> If encrypted is <i>true</i> but a KMS key id is not specified, the customer's default KMS key for EBS is used. </p>
711    #[serde(rename = "kmsKeyId")]
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub kms_key_id: Option<String>,
714    /// <p>The ID of the latest Amazon Machine Image (AMI).</p>
715    #[serde(rename = "latestAmiId")]
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub latest_ami_id: Option<String>,
718    /// <p>The license type to be used for the AMI created by a successful replication run.</p>
719    #[serde(rename = "licenseType")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub license_type: Option<String>,
722    /// <p>The start time of the next replication run.</p>
723    #[serde(rename = "nextReplicationRunStartTime")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub next_replication_run_start_time: Option<f64>,
726    /// <p>Number of recent AMIs to keep in the customer's account for a replication job. By default the value is set to zero, meaning that all AMIs are kept.</p>
727    #[serde(rename = "numberOfRecentAmisToKeep")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub number_of_recent_amis_to_keep: Option<i64>,
730    /// <p>The identifier of the replication job.</p>
731    #[serde(rename = "replicationJobId")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub replication_job_id: Option<String>,
734    /// <p>Information about the replication runs.</p>
735    #[serde(rename = "replicationRunList")]
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub replication_run_list: Option<Vec<ReplicationRun>>,
738    /// <p>The name of the IAM role to be used by the Server Migration Service.</p>
739    #[serde(rename = "roleName")]
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub role_name: Option<String>,
742    /// <p><p/></p>
743    #[serde(rename = "runOnce")]
744    #[serde(skip_serializing_if = "Option::is_none")]
745    pub run_once: Option<bool>,
746    /// <p>The seed replication time.</p>
747    #[serde(rename = "seedReplicationTime")]
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub seed_replication_time: Option<f64>,
750    /// <p>The identifier of the server.</p>
751    #[serde(rename = "serverId")]
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub server_id: Option<String>,
754    /// <p>The type of server.</p>
755    #[serde(rename = "serverType")]
756    #[serde(skip_serializing_if = "Option::is_none")]
757    pub server_type: Option<String>,
758    /// <p>The state of the replication job.</p>
759    #[serde(rename = "state")]
760    #[serde(skip_serializing_if = "Option::is_none")]
761    pub state: Option<String>,
762    /// <p>The description of the current status of the replication job.</p>
763    #[serde(rename = "statusMessage")]
764    #[serde(skip_serializing_if = "Option::is_none")]
765    pub status_message: Option<String>,
766    /// <p>Information about the VM server.</p>
767    #[serde(rename = "vmServer")]
768    #[serde(skip_serializing_if = "Option::is_none")]
769    pub vm_server: Option<VmServer>,
770}
771
772/// <p>Represents a replication run.</p>
773#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
774#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
775pub struct ReplicationRun {
776    /// <p>The identifier of the Amazon Machine Image (AMI) from the replication run.</p>
777    #[serde(rename = "amiId")]
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub ami_id: Option<String>,
780    /// <p>The completion time of the last replication run.</p>
781    #[serde(rename = "completedTime")]
782    #[serde(skip_serializing_if = "Option::is_none")]
783    pub completed_time: Option<f64>,
784    /// <p>The description of the replication run.</p>
785    #[serde(rename = "description")]
786    #[serde(skip_serializing_if = "Option::is_none")]
787    pub description: Option<String>,
788    /// <p>Whether the replication run should produce encrypted AMI or not. See also <code>KmsKeyId</code> below.</p>
789    #[serde(rename = "encrypted")]
790    #[serde(skip_serializing_if = "Option::is_none")]
791    pub encrypted: Option<bool>,
792    /// <p>KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following: </p> <ul> <li> <p>KMS key ID</p> </li> <li> <p>KMS key alias</p> </li> <li> <p>ARN referring to KMS key ID</p> </li> <li> <p>ARN referring to KMS key alias</p> </li> </ul> <p> If encrypted is <i>true</i> but a KMS key id is not specified, the customer's default KMS key for EBS is used. </p>
793    #[serde(rename = "kmsKeyId")]
794    #[serde(skip_serializing_if = "Option::is_none")]
795    pub kms_key_id: Option<String>,
796    /// <p>The identifier of the replication run.</p>
797    #[serde(rename = "replicationRunId")]
798    #[serde(skip_serializing_if = "Option::is_none")]
799    pub replication_run_id: Option<String>,
800    /// <p>The start time of the next replication run.</p>
801    #[serde(rename = "scheduledStartTime")]
802    #[serde(skip_serializing_if = "Option::is_none")]
803    pub scheduled_start_time: Option<f64>,
804    /// <p>Details of the current stage of the replication run.</p>
805    #[serde(rename = "stageDetails")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    pub stage_details: Option<ReplicationRunStageDetails>,
808    /// <p>The state of the replication run.</p>
809    #[serde(rename = "state")]
810    #[serde(skip_serializing_if = "Option::is_none")]
811    pub state: Option<String>,
812    /// <p>The description of the current status of the replication job.</p>
813    #[serde(rename = "statusMessage")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub status_message: Option<String>,
816    /// <p>The type of replication run.</p>
817    #[serde(rename = "type")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub type_: Option<String>,
820}
821
822/// <p>Details of the current stage of a replication run.</p>
823#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
824#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
825pub struct ReplicationRunStageDetails {
826    /// <p>String describing the current stage of a replication run.</p>
827    #[serde(rename = "stage")]
828    #[serde(skip_serializing_if = "Option::is_none")]
829    pub stage: Option<String>,
830    /// <p>String describing the progress of the current stage of a replication run.</p>
831    #[serde(rename = "stageProgress")]
832    #[serde(skip_serializing_if = "Option::is_none")]
833    pub stage_progress: Option<String>,
834}
835
836/// <p>Location of the Amazon S3 object in the customer's account.</p>
837#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
838pub struct S3Location {
839    /// <p>Amazon S3 bucket name.</p>
840    #[serde(rename = "bucket")]
841    #[serde(skip_serializing_if = "Option::is_none")]
842    pub bucket: Option<String>,
843    /// <p>Amazon S3 bucket key.</p>
844    #[serde(rename = "key")]
845    #[serde(skip_serializing_if = "Option::is_none")]
846    pub key: Option<String>,
847}
848
849/// <p>Represents a server.</p>
850#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
851pub struct Server {
852    /// <p>The identifier of the replication job.</p>
853    #[serde(rename = "replicationJobId")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    pub replication_job_id: Option<String>,
856    /// <p>Indicates whether the replication job is deleted or failed.</p>
857    #[serde(rename = "replicationJobTerminated")]
858    #[serde(skip_serializing_if = "Option::is_none")]
859    pub replication_job_terminated: Option<bool>,
860    /// <p>The identifier of the server.</p>
861    #[serde(rename = "serverId")]
862    #[serde(skip_serializing_if = "Option::is_none")]
863    pub server_id: Option<String>,
864    /// <p>The type of server.</p>
865    #[serde(rename = "serverType")]
866    #[serde(skip_serializing_if = "Option::is_none")]
867    pub server_type: Option<String>,
868    /// <p>Information about the VM server.</p>
869    #[serde(rename = "vmServer")]
870    #[serde(skip_serializing_if = "Option::is_none")]
871    pub vm_server: Option<VmServer>,
872}
873
874/// <p>A logical grouping of servers.</p>
875#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
876pub struct ServerGroup {
877    /// <p>Name of a server group.</p>
878    #[serde(rename = "name")]
879    #[serde(skip_serializing_if = "Option::is_none")]
880    pub name: Option<String>,
881    /// <p>Identifier of a server group.</p>
882    #[serde(rename = "serverGroupId")]
883    #[serde(skip_serializing_if = "Option::is_none")]
884    pub server_group_id: Option<String>,
885    /// <p>List of servers belonging to a server group.</p>
886    #[serde(rename = "serverList")]
887    #[serde(skip_serializing_if = "Option::is_none")]
888    pub server_list: Option<Vec<Server>>,
889}
890
891/// <p>Launch configuration for a server group.</p>
892#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
893pub struct ServerGroupLaunchConfiguration {
894    /// <p>Launch order of servers in the server group.</p>
895    #[serde(rename = "launchOrder")]
896    #[serde(skip_serializing_if = "Option::is_none")]
897    pub launch_order: Option<i64>,
898    /// <p>Identifier of the server group the launch configuration is associated with.</p>
899    #[serde(rename = "serverGroupId")]
900    #[serde(skip_serializing_if = "Option::is_none")]
901    pub server_group_id: Option<String>,
902    /// <p>Launch configuration for servers in the server group.</p>
903    #[serde(rename = "serverLaunchConfigurations")]
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub server_launch_configurations: Option<Vec<ServerLaunchConfiguration>>,
906}
907
908/// <p>Replication configuration for a server group.</p>
909#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
910pub struct ServerGroupReplicationConfiguration {
911    /// <p>Identifier of the server group this replication configuration is associated with.</p>
912    #[serde(rename = "serverGroupId")]
913    #[serde(skip_serializing_if = "Option::is_none")]
914    pub server_group_id: Option<String>,
915    /// <p>Replication configuration for servers in the server group.</p>
916    #[serde(rename = "serverReplicationConfigurations")]
917    #[serde(skip_serializing_if = "Option::is_none")]
918    pub server_replication_configurations: Option<Vec<ServerReplicationConfiguration>>,
919}
920
921/// <p>Launch configuration for a server.</p>
922#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
923pub struct ServerLaunchConfiguration {
924    /// <p>If true, a publicly accessible IP address is created when launching the server.</p>
925    #[serde(rename = "associatePublicIpAddress")]
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub associate_public_ip_address: Option<bool>,
928    /// <p>Name of the EC2 SSH Key to be used for connecting to the launched server.</p>
929    #[serde(rename = "ec2KeyName")]
930    #[serde(skip_serializing_if = "Option::is_none")]
931    pub ec_2_key_name: Option<String>,
932    /// <p>Instance type to be used for launching the server.</p>
933    #[serde(rename = "instanceType")]
934    #[serde(skip_serializing_if = "Option::is_none")]
935    pub instance_type: Option<String>,
936    /// <p>Logical ID of the server in the Amazon CloudFormation template.</p>
937    #[serde(rename = "logicalId")]
938    #[serde(skip_serializing_if = "Option::is_none")]
939    pub logical_id: Option<String>,
940    /// <p>Identifier of the security group that applies to the launched server.</p>
941    #[serde(rename = "securityGroup")]
942    #[serde(skip_serializing_if = "Option::is_none")]
943    pub security_group: Option<String>,
944    /// <p>Identifier of the server the launch configuration is associated with.</p>
945    #[serde(rename = "server")]
946    #[serde(skip_serializing_if = "Option::is_none")]
947    pub server: Option<Server>,
948    /// <p>Identifier of the subnet the server should be launched into.</p>
949    #[serde(rename = "subnet")]
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub subnet: Option<String>,
952    /// <p>Location of the user-data script to be executed when launching the server.</p>
953    #[serde(rename = "userData")]
954    #[serde(skip_serializing_if = "Option::is_none")]
955    pub user_data: Option<UserData>,
956    /// <p>Identifier of the VPC the server should be launched into.</p>
957    #[serde(rename = "vpc")]
958    #[serde(skip_serializing_if = "Option::is_none")]
959    pub vpc: Option<String>,
960}
961
962/// <p>Replication configuration of a server.</p>
963#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
964pub struct ServerReplicationConfiguration {
965    /// <p>Identifier of the server this replication configuration is associated with.</p>
966    #[serde(rename = "server")]
967    #[serde(skip_serializing_if = "Option::is_none")]
968    pub server: Option<Server>,
969    /// <p>Parameters for replicating the server.</p>
970    #[serde(rename = "serverReplicationParameters")]
971    #[serde(skip_serializing_if = "Option::is_none")]
972    pub server_replication_parameters: Option<ServerReplicationParameters>,
973}
974
975/// <p>Replication parameters for replicating a server.</p>
976#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
977pub struct ServerReplicationParameters {
978    /// <p>When true, the replication job produces encrypted AMIs. See also <code>KmsKeyId</code> below.</p>
979    #[serde(rename = "encrypted")]
980    #[serde(skip_serializing_if = "Option::is_none")]
981    pub encrypted: Option<bool>,
982    /// <p>Frequency of creating replication jobs for the server.</p>
983    #[serde(rename = "frequency")]
984    #[serde(skip_serializing_if = "Option::is_none")]
985    pub frequency: Option<i64>,
986    /// <p><p/> <p>KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following: </p> <ul> <li> <p>KMS key ID</p> </li> <li> <p>KMS key alias</p> </li> <li> <p>ARN referring to KMS key ID</p> </li> <li> <p>ARN referring to KMS key alias</p> </li> </ul> <p> If encrypted is <i>true</i> but a KMS key id is not specified, the customer&#39;s default KMS key for EBS is used. </p></p>
987    #[serde(rename = "kmsKeyId")]
988    #[serde(skip_serializing_if = "Option::is_none")]
989    pub kms_key_id: Option<String>,
990    /// <p>License type for creating a replication job for the server.</p>
991    #[serde(rename = "licenseType")]
992    #[serde(skip_serializing_if = "Option::is_none")]
993    pub license_type: Option<String>,
994    /// <p>Number of recent AMIs to keep when creating a replication job for this server.</p>
995    #[serde(rename = "numberOfRecentAmisToKeep")]
996    #[serde(skip_serializing_if = "Option::is_none")]
997    pub number_of_recent_amis_to_keep: Option<i64>,
998    /// <p><p/></p>
999    #[serde(rename = "runOnce")]
1000    #[serde(skip_serializing_if = "Option::is_none")]
1001    pub run_once: Option<bool>,
1002    /// <p>Seed time for creating a replication job for the server.</p>
1003    #[serde(rename = "seedTime")]
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub seed_time: Option<f64>,
1006}
1007
1008#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1009#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1010pub struct StartAppReplicationRequest {
1011    /// <p>ID of the application to replicate.</p>
1012    #[serde(rename = "appId")]
1013    #[serde(skip_serializing_if = "Option::is_none")]
1014    pub app_id: Option<String>,
1015}
1016
1017#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1018#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1019pub struct StartAppReplicationResponse {}
1020
1021#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1022#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1023pub struct StartOnDemandReplicationRunRequest {
1024    /// <p>The description of the replication run.</p>
1025    #[serde(rename = "description")]
1026    #[serde(skip_serializing_if = "Option::is_none")]
1027    pub description: Option<String>,
1028    /// <p>The identifier of the replication job.</p>
1029    #[serde(rename = "replicationJobId")]
1030    pub replication_job_id: String,
1031}
1032
1033#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1034#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1035pub struct StartOnDemandReplicationRunResponse {
1036    /// <p>The identifier of the replication run.</p>
1037    #[serde(rename = "replicationRunId")]
1038    #[serde(skip_serializing_if = "Option::is_none")]
1039    pub replication_run_id: Option<String>,
1040}
1041
1042#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1043#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1044pub struct StopAppReplicationRequest {
1045    /// <p>ID of the application to stop replicating.</p>
1046    #[serde(rename = "appId")]
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub app_id: Option<String>,
1049}
1050
1051#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1052#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1053pub struct StopAppReplicationResponse {}
1054
1055/// <p>A label that can be assigned to an application.</p>
1056#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1057pub struct Tag {
1058    /// <p>Tag key.</p>
1059    #[serde(rename = "key")]
1060    #[serde(skip_serializing_if = "Option::is_none")]
1061    pub key: Option<String>,
1062    /// <p>Tag value.</p>
1063    #[serde(rename = "value")]
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub value: Option<String>,
1066}
1067
1068#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1069#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1070pub struct TerminateAppRequest {
1071    /// <p>ID of the application to terminate.</p>
1072    #[serde(rename = "appId")]
1073    #[serde(skip_serializing_if = "Option::is_none")]
1074    pub app_id: Option<String>,
1075}
1076
1077#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1078#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1079pub struct TerminateAppResponse {}
1080
1081#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1082#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1083pub struct UpdateAppRequest {
1084    /// <p>ID of the application to update.</p>
1085    #[serde(rename = "appId")]
1086    #[serde(skip_serializing_if = "Option::is_none")]
1087    pub app_id: Option<String>,
1088    /// <p>New description of the application.</p>
1089    #[serde(rename = "description")]
1090    #[serde(skip_serializing_if = "Option::is_none")]
1091    pub description: Option<String>,
1092    /// <p>New name of the application.</p>
1093    #[serde(rename = "name")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub name: Option<String>,
1096    /// <p>Name of the service role in the customer's account used by AWS SMS.</p>
1097    #[serde(rename = "roleName")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub role_name: Option<String>,
1100    /// <p>List of server groups in the application to update.</p>
1101    #[serde(rename = "serverGroups")]
1102    #[serde(skip_serializing_if = "Option::is_none")]
1103    pub server_groups: Option<Vec<ServerGroup>>,
1104    /// <p>List of tags to associate with the application.</p>
1105    #[serde(rename = "tags")]
1106    #[serde(skip_serializing_if = "Option::is_none")]
1107    pub tags: Option<Vec<Tag>>,
1108}
1109
1110#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1111#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1112pub struct UpdateAppResponse {
1113    /// <p>Summary description of the application.</p>
1114    #[serde(rename = "appSummary")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub app_summary: Option<AppSummary>,
1117    /// <p>List of updated server groups in the application.</p>
1118    #[serde(rename = "serverGroups")]
1119    #[serde(skip_serializing_if = "Option::is_none")]
1120    pub server_groups: Option<Vec<ServerGroup>>,
1121    /// <p>List of tags associated with the application.</p>
1122    #[serde(rename = "tags")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub tags: Option<Vec<Tag>>,
1125}
1126
1127#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1128#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1129pub struct UpdateReplicationJobRequest {
1130    /// <p>The description of the replication job.</p>
1131    #[serde(rename = "description")]
1132    #[serde(skip_serializing_if = "Option::is_none")]
1133    pub description: Option<String>,
1134    /// <p>When true, the replication job produces encrypted AMIs . See also <code>KmsKeyId</code> below.</p>
1135    #[serde(rename = "encrypted")]
1136    #[serde(skip_serializing_if = "Option::is_none")]
1137    pub encrypted: Option<bool>,
1138    /// <p>The time between consecutive replication runs, in hours.</p>
1139    #[serde(rename = "frequency")]
1140    #[serde(skip_serializing_if = "Option::is_none")]
1141    pub frequency: Option<i64>,
1142    /// <p><p/> <p>KMS key ID for replication jobs that produce encrypted AMIs. Can be any of the following: </p> <ul> <li> <p>KMS key ID</p> </li> <li> <p>KMS key alias</p> </li> <li> <p>ARN referring to KMS key ID</p> </li> <li> <p>ARN referring to KMS key alias</p> </li> </ul> <p> If encrypted is <i>true</i> but a KMS key id is not specified, the customer&#39;s default KMS key for EBS is used. </p></p>
1143    #[serde(rename = "kmsKeyId")]
1144    #[serde(skip_serializing_if = "Option::is_none")]
1145    pub kms_key_id: Option<String>,
1146    /// <p>The license type to be used for the AMI created by a successful replication run.</p>
1147    #[serde(rename = "licenseType")]
1148    #[serde(skip_serializing_if = "Option::is_none")]
1149    pub license_type: Option<String>,
1150    /// <p>The start time of the next replication run.</p>
1151    #[serde(rename = "nextReplicationRunStartTime")]
1152    #[serde(skip_serializing_if = "Option::is_none")]
1153    pub next_replication_run_start_time: Option<f64>,
1154    /// <p>The maximum number of SMS-created AMIs to retain. The oldest will be deleted once the maximum number is reached and a new AMI is created.</p>
1155    #[serde(rename = "numberOfRecentAmisToKeep")]
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    pub number_of_recent_amis_to_keep: Option<i64>,
1158    /// <p>The identifier of the replication job.</p>
1159    #[serde(rename = "replicationJobId")]
1160    pub replication_job_id: String,
1161    /// <p>The name of the IAM role to be used by AWS SMS.</p>
1162    #[serde(rename = "roleName")]
1163    #[serde(skip_serializing_if = "Option::is_none")]
1164    pub role_name: Option<String>,
1165}
1166
1167#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1168#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1169pub struct UpdateReplicationJobResponse {}
1170
1171/// <p>A script that runs on first launch of an Amazon EC2 instance. Used for configuring the server during launch.</p>
1172#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1173pub struct UserData {
1174    /// <p>Amazon S3 location of the user-data script.</p>
1175    #[serde(rename = "s3Location")]
1176    #[serde(skip_serializing_if = "Option::is_none")]
1177    pub s_3_location: Option<S3Location>,
1178}
1179
1180/// <p>Represents a VM server.</p>
1181#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1182pub struct VmServer {
1183    /// <p>The name of the VM manager.</p>
1184    #[serde(rename = "vmManagerName")]
1185    #[serde(skip_serializing_if = "Option::is_none")]
1186    pub vm_manager_name: Option<String>,
1187    /// <p>The type of VM management product.</p>
1188    #[serde(rename = "vmManagerType")]
1189    #[serde(skip_serializing_if = "Option::is_none")]
1190    pub vm_manager_type: Option<String>,
1191    /// <p>The name of the VM.</p>
1192    #[serde(rename = "vmName")]
1193    #[serde(skip_serializing_if = "Option::is_none")]
1194    pub vm_name: Option<String>,
1195    /// <p>The VM folder path in the vCenter Server virtual machine inventory tree.</p>
1196    #[serde(rename = "vmPath")]
1197    #[serde(skip_serializing_if = "Option::is_none")]
1198    pub vm_path: Option<String>,
1199    /// <p>Information about the VM server location.</p>
1200    #[serde(rename = "vmServerAddress")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    pub vm_server_address: Option<VmServerAddress>,
1203}
1204
1205/// <p>Represents a VM server location.</p>
1206#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1207pub struct VmServerAddress {
1208    /// <p>The identifier of the VM.</p>
1209    #[serde(rename = "vmId")]
1210    #[serde(skip_serializing_if = "Option::is_none")]
1211    pub vm_id: Option<String>,
1212    /// <p>The identifier of the VM manager.</p>
1213    #[serde(rename = "vmManagerId")]
1214    #[serde(skip_serializing_if = "Option::is_none")]
1215    pub vm_manager_id: Option<String>,
1216}
1217
1218/// Errors returned by CreateApp
1219#[derive(Debug, PartialEq)]
1220pub enum CreateAppError {
1221    /// <p>An internal error occurred.</p>
1222    InternalError(String),
1223    /// <p>A specified parameter is not valid.</p>
1224    InvalidParameter(String),
1225    /// <p>A required parameter is missing.</p>
1226    MissingRequiredParameter(String),
1227    /// <p>This operation is not allowed.</p>
1228    OperationNotPermitted(String),
1229    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1230    UnauthorizedOperation(String),
1231}
1232
1233impl CreateAppError {
1234    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAppError> {
1235        if let Some(err) = proto::json::Error::parse(&res) {
1236            match err.typ.as_str() {
1237                "InternalError" => {
1238                    return RusotoError::Service(CreateAppError::InternalError(err.msg))
1239                }
1240                "InvalidParameterException" => {
1241                    return RusotoError::Service(CreateAppError::InvalidParameter(err.msg))
1242                }
1243                "MissingRequiredParameterException" => {
1244                    return RusotoError::Service(CreateAppError::MissingRequiredParameter(err.msg))
1245                }
1246                "OperationNotPermittedException" => {
1247                    return RusotoError::Service(CreateAppError::OperationNotPermitted(err.msg))
1248                }
1249                "UnauthorizedOperationException" => {
1250                    return RusotoError::Service(CreateAppError::UnauthorizedOperation(err.msg))
1251                }
1252                "ValidationException" => return RusotoError::Validation(err.msg),
1253                _ => {}
1254            }
1255        }
1256        RusotoError::Unknown(res)
1257    }
1258}
1259impl fmt::Display for CreateAppError {
1260    #[allow(unused_variables)]
1261    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1262        match *self {
1263            CreateAppError::InternalError(ref cause) => write!(f, "{}", cause),
1264            CreateAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1265            CreateAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1266            CreateAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1267            CreateAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1268        }
1269    }
1270}
1271impl Error for CreateAppError {}
1272/// Errors returned by CreateReplicationJob
1273#[derive(Debug, PartialEq)]
1274pub enum CreateReplicationJobError {
1275    /// <p>An internal error occurred.</p>
1276    InternalError(String),
1277    /// <p>A specified parameter is not valid.</p>
1278    InvalidParameter(String),
1279    /// <p>A required parameter is missing.</p>
1280    MissingRequiredParameter(String),
1281    /// <p>There are no connectors available.</p>
1282    NoConnectorsAvailable(String),
1283    /// <p>This operation is not allowed.</p>
1284    OperationNotPermitted(String),
1285    /// <p>The specified replication job already exists.</p>
1286    ReplicationJobAlreadyExists(String),
1287    /// <p>The specified server cannot be replicated.</p>
1288    ServerCannotBeReplicated(String),
1289    /// <p>The service is temporarily unavailable.</p>
1290    TemporarilyUnavailable(String),
1291    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1292    UnauthorizedOperation(String),
1293}
1294
1295impl CreateReplicationJobError {
1296    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReplicationJobError> {
1297        if let Some(err) = proto::json::Error::parse(&res) {
1298            match err.typ.as_str() {
1299                "InternalError" => {
1300                    return RusotoError::Service(CreateReplicationJobError::InternalError(err.msg))
1301                }
1302                "InvalidParameterException" => {
1303                    return RusotoError::Service(CreateReplicationJobError::InvalidParameter(
1304                        err.msg,
1305                    ))
1306                }
1307                "MissingRequiredParameterException" => {
1308                    return RusotoError::Service(
1309                        CreateReplicationJobError::MissingRequiredParameter(err.msg),
1310                    )
1311                }
1312                "NoConnectorsAvailableException" => {
1313                    return RusotoError::Service(CreateReplicationJobError::NoConnectorsAvailable(
1314                        err.msg,
1315                    ))
1316                }
1317                "OperationNotPermittedException" => {
1318                    return RusotoError::Service(CreateReplicationJobError::OperationNotPermitted(
1319                        err.msg,
1320                    ))
1321                }
1322                "ReplicationJobAlreadyExistsException" => {
1323                    return RusotoError::Service(
1324                        CreateReplicationJobError::ReplicationJobAlreadyExists(err.msg),
1325                    )
1326                }
1327                "ServerCannotBeReplicatedException" => {
1328                    return RusotoError::Service(
1329                        CreateReplicationJobError::ServerCannotBeReplicated(err.msg),
1330                    )
1331                }
1332                "TemporarilyUnavailableException" => {
1333                    return RusotoError::Service(CreateReplicationJobError::TemporarilyUnavailable(
1334                        err.msg,
1335                    ))
1336                }
1337                "UnauthorizedOperationException" => {
1338                    return RusotoError::Service(CreateReplicationJobError::UnauthorizedOperation(
1339                        err.msg,
1340                    ))
1341                }
1342                "ValidationException" => return RusotoError::Validation(err.msg),
1343                _ => {}
1344            }
1345        }
1346        RusotoError::Unknown(res)
1347    }
1348}
1349impl fmt::Display for CreateReplicationJobError {
1350    #[allow(unused_variables)]
1351    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1352        match *self {
1353            CreateReplicationJobError::InternalError(ref cause) => write!(f, "{}", cause),
1354            CreateReplicationJobError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1355            CreateReplicationJobError::MissingRequiredParameter(ref cause) => {
1356                write!(f, "{}", cause)
1357            }
1358            CreateReplicationJobError::NoConnectorsAvailable(ref cause) => write!(f, "{}", cause),
1359            CreateReplicationJobError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1360            CreateReplicationJobError::ReplicationJobAlreadyExists(ref cause) => {
1361                write!(f, "{}", cause)
1362            }
1363            CreateReplicationJobError::ServerCannotBeReplicated(ref cause) => {
1364                write!(f, "{}", cause)
1365            }
1366            CreateReplicationJobError::TemporarilyUnavailable(ref cause) => write!(f, "{}", cause),
1367            CreateReplicationJobError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1368        }
1369    }
1370}
1371impl Error for CreateReplicationJobError {}
1372/// Errors returned by DeleteApp
1373#[derive(Debug, PartialEq)]
1374pub enum DeleteAppError {
1375    /// <p>An internal error occurred.</p>
1376    InternalError(String),
1377    /// <p>A specified parameter is not valid.</p>
1378    InvalidParameter(String),
1379    /// <p>A required parameter is missing.</p>
1380    MissingRequiredParameter(String),
1381    /// <p>This operation is not allowed.</p>
1382    OperationNotPermitted(String),
1383    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1384    UnauthorizedOperation(String),
1385}
1386
1387impl DeleteAppError {
1388    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAppError> {
1389        if let Some(err) = proto::json::Error::parse(&res) {
1390            match err.typ.as_str() {
1391                "InternalError" => {
1392                    return RusotoError::Service(DeleteAppError::InternalError(err.msg))
1393                }
1394                "InvalidParameterException" => {
1395                    return RusotoError::Service(DeleteAppError::InvalidParameter(err.msg))
1396                }
1397                "MissingRequiredParameterException" => {
1398                    return RusotoError::Service(DeleteAppError::MissingRequiredParameter(err.msg))
1399                }
1400                "OperationNotPermittedException" => {
1401                    return RusotoError::Service(DeleteAppError::OperationNotPermitted(err.msg))
1402                }
1403                "UnauthorizedOperationException" => {
1404                    return RusotoError::Service(DeleteAppError::UnauthorizedOperation(err.msg))
1405                }
1406                "ValidationException" => return RusotoError::Validation(err.msg),
1407                _ => {}
1408            }
1409        }
1410        RusotoError::Unknown(res)
1411    }
1412}
1413impl fmt::Display for DeleteAppError {
1414    #[allow(unused_variables)]
1415    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1416        match *self {
1417            DeleteAppError::InternalError(ref cause) => write!(f, "{}", cause),
1418            DeleteAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1419            DeleteAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1420            DeleteAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1421            DeleteAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1422        }
1423    }
1424}
1425impl Error for DeleteAppError {}
1426/// Errors returned by DeleteAppLaunchConfiguration
1427#[derive(Debug, PartialEq)]
1428pub enum DeleteAppLaunchConfigurationError {
1429    /// <p>An internal error occurred.</p>
1430    InternalError(String),
1431    /// <p>A specified parameter is not valid.</p>
1432    InvalidParameter(String),
1433    /// <p>A required parameter is missing.</p>
1434    MissingRequiredParameter(String),
1435    /// <p>This operation is not allowed.</p>
1436    OperationNotPermitted(String),
1437    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1438    UnauthorizedOperation(String),
1439}
1440
1441impl DeleteAppLaunchConfigurationError {
1442    pub fn from_response(
1443        res: BufferedHttpResponse,
1444    ) -> RusotoError<DeleteAppLaunchConfigurationError> {
1445        if let Some(err) = proto::json::Error::parse(&res) {
1446            match err.typ.as_str() {
1447                "InternalError" => {
1448                    return RusotoError::Service(DeleteAppLaunchConfigurationError::InternalError(
1449                        err.msg,
1450                    ))
1451                }
1452                "InvalidParameterException" => {
1453                    return RusotoError::Service(
1454                        DeleteAppLaunchConfigurationError::InvalidParameter(err.msg),
1455                    )
1456                }
1457                "MissingRequiredParameterException" => {
1458                    return RusotoError::Service(
1459                        DeleteAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
1460                    )
1461                }
1462                "OperationNotPermittedException" => {
1463                    return RusotoError::Service(
1464                        DeleteAppLaunchConfigurationError::OperationNotPermitted(err.msg),
1465                    )
1466                }
1467                "UnauthorizedOperationException" => {
1468                    return RusotoError::Service(
1469                        DeleteAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
1470                    )
1471                }
1472                "ValidationException" => return RusotoError::Validation(err.msg),
1473                _ => {}
1474            }
1475        }
1476        RusotoError::Unknown(res)
1477    }
1478}
1479impl fmt::Display for DeleteAppLaunchConfigurationError {
1480    #[allow(unused_variables)]
1481    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1482        match *self {
1483            DeleteAppLaunchConfigurationError::InternalError(ref cause) => write!(f, "{}", cause),
1484            DeleteAppLaunchConfigurationError::InvalidParameter(ref cause) => {
1485                write!(f, "{}", cause)
1486            }
1487            DeleteAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => {
1488                write!(f, "{}", cause)
1489            }
1490            DeleteAppLaunchConfigurationError::OperationNotPermitted(ref cause) => {
1491                write!(f, "{}", cause)
1492            }
1493            DeleteAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => {
1494                write!(f, "{}", cause)
1495            }
1496        }
1497    }
1498}
1499impl Error for DeleteAppLaunchConfigurationError {}
1500/// Errors returned by DeleteAppReplicationConfiguration
1501#[derive(Debug, PartialEq)]
1502pub enum DeleteAppReplicationConfigurationError {
1503    /// <p>An internal error occurred.</p>
1504    InternalError(String),
1505    /// <p>A specified parameter is not valid.</p>
1506    InvalidParameter(String),
1507    /// <p>A required parameter is missing.</p>
1508    MissingRequiredParameter(String),
1509    /// <p>This operation is not allowed.</p>
1510    OperationNotPermitted(String),
1511    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1512    UnauthorizedOperation(String),
1513}
1514
1515impl DeleteAppReplicationConfigurationError {
1516    pub fn from_response(
1517        res: BufferedHttpResponse,
1518    ) -> RusotoError<DeleteAppReplicationConfigurationError> {
1519        if let Some(err) = proto::json::Error::parse(&res) {
1520            match err.typ.as_str() {
1521                "InternalError" => {
1522                    return RusotoError::Service(
1523                        DeleteAppReplicationConfigurationError::InternalError(err.msg),
1524                    )
1525                }
1526                "InvalidParameterException" => {
1527                    return RusotoError::Service(
1528                        DeleteAppReplicationConfigurationError::InvalidParameter(err.msg),
1529                    )
1530                }
1531                "MissingRequiredParameterException" => {
1532                    return RusotoError::Service(
1533                        DeleteAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
1534                    )
1535                }
1536                "OperationNotPermittedException" => {
1537                    return RusotoError::Service(
1538                        DeleteAppReplicationConfigurationError::OperationNotPermitted(err.msg),
1539                    )
1540                }
1541                "UnauthorizedOperationException" => {
1542                    return RusotoError::Service(
1543                        DeleteAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
1544                    )
1545                }
1546                "ValidationException" => return RusotoError::Validation(err.msg),
1547                _ => {}
1548            }
1549        }
1550        RusotoError::Unknown(res)
1551    }
1552}
1553impl fmt::Display for DeleteAppReplicationConfigurationError {
1554    #[allow(unused_variables)]
1555    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1556        match *self {
1557            DeleteAppReplicationConfigurationError::InternalError(ref cause) => {
1558                write!(f, "{}", cause)
1559            }
1560            DeleteAppReplicationConfigurationError::InvalidParameter(ref cause) => {
1561                write!(f, "{}", cause)
1562            }
1563            DeleteAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => {
1564                write!(f, "{}", cause)
1565            }
1566            DeleteAppReplicationConfigurationError::OperationNotPermitted(ref cause) => {
1567                write!(f, "{}", cause)
1568            }
1569            DeleteAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => {
1570                write!(f, "{}", cause)
1571            }
1572        }
1573    }
1574}
1575impl Error for DeleteAppReplicationConfigurationError {}
1576/// Errors returned by DeleteReplicationJob
1577#[derive(Debug, PartialEq)]
1578pub enum DeleteReplicationJobError {
1579    /// <p>A specified parameter is not valid.</p>
1580    InvalidParameter(String),
1581    /// <p>A required parameter is missing.</p>
1582    MissingRequiredParameter(String),
1583    /// <p>This operation is not allowed.</p>
1584    OperationNotPermitted(String),
1585    /// <p>The specified replication job does not exist.</p>
1586    ReplicationJobNotFound(String),
1587    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1588    UnauthorizedOperation(String),
1589}
1590
1591impl DeleteReplicationJobError {
1592    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReplicationJobError> {
1593        if let Some(err) = proto::json::Error::parse(&res) {
1594            match err.typ.as_str() {
1595                "InvalidParameterException" => {
1596                    return RusotoError::Service(DeleteReplicationJobError::InvalidParameter(
1597                        err.msg,
1598                    ))
1599                }
1600                "MissingRequiredParameterException" => {
1601                    return RusotoError::Service(
1602                        DeleteReplicationJobError::MissingRequiredParameter(err.msg),
1603                    )
1604                }
1605                "OperationNotPermittedException" => {
1606                    return RusotoError::Service(DeleteReplicationJobError::OperationNotPermitted(
1607                        err.msg,
1608                    ))
1609                }
1610                "ReplicationJobNotFoundException" => {
1611                    return RusotoError::Service(DeleteReplicationJobError::ReplicationJobNotFound(
1612                        err.msg,
1613                    ))
1614                }
1615                "UnauthorizedOperationException" => {
1616                    return RusotoError::Service(DeleteReplicationJobError::UnauthorizedOperation(
1617                        err.msg,
1618                    ))
1619                }
1620                "ValidationException" => return RusotoError::Validation(err.msg),
1621                _ => {}
1622            }
1623        }
1624        RusotoError::Unknown(res)
1625    }
1626}
1627impl fmt::Display for DeleteReplicationJobError {
1628    #[allow(unused_variables)]
1629    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1630        match *self {
1631            DeleteReplicationJobError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1632            DeleteReplicationJobError::MissingRequiredParameter(ref cause) => {
1633                write!(f, "{}", cause)
1634            }
1635            DeleteReplicationJobError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1636            DeleteReplicationJobError::ReplicationJobNotFound(ref cause) => write!(f, "{}", cause),
1637            DeleteReplicationJobError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1638        }
1639    }
1640}
1641impl Error for DeleteReplicationJobError {}
1642/// Errors returned by DeleteServerCatalog
1643#[derive(Debug, PartialEq)]
1644pub enum DeleteServerCatalogError {
1645    /// <p>A specified parameter is not valid.</p>
1646    InvalidParameter(String),
1647    /// <p>A required parameter is missing.</p>
1648    MissingRequiredParameter(String),
1649    /// <p>This operation is not allowed.</p>
1650    OperationNotPermitted(String),
1651    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1652    UnauthorizedOperation(String),
1653}
1654
1655impl DeleteServerCatalogError {
1656    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteServerCatalogError> {
1657        if let Some(err) = proto::json::Error::parse(&res) {
1658            match err.typ.as_str() {
1659                "InvalidParameterException" => {
1660                    return RusotoError::Service(DeleteServerCatalogError::InvalidParameter(
1661                        err.msg,
1662                    ))
1663                }
1664                "MissingRequiredParameterException" => {
1665                    return RusotoError::Service(
1666                        DeleteServerCatalogError::MissingRequiredParameter(err.msg),
1667                    )
1668                }
1669                "OperationNotPermittedException" => {
1670                    return RusotoError::Service(DeleteServerCatalogError::OperationNotPermitted(
1671                        err.msg,
1672                    ))
1673                }
1674                "UnauthorizedOperationException" => {
1675                    return RusotoError::Service(DeleteServerCatalogError::UnauthorizedOperation(
1676                        err.msg,
1677                    ))
1678                }
1679                "ValidationException" => return RusotoError::Validation(err.msg),
1680                _ => {}
1681            }
1682        }
1683        RusotoError::Unknown(res)
1684    }
1685}
1686impl fmt::Display for DeleteServerCatalogError {
1687    #[allow(unused_variables)]
1688    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1689        match *self {
1690            DeleteServerCatalogError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1691            DeleteServerCatalogError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1692            DeleteServerCatalogError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1693            DeleteServerCatalogError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1694        }
1695    }
1696}
1697impl Error for DeleteServerCatalogError {}
1698/// Errors returned by DisassociateConnector
1699#[derive(Debug, PartialEq)]
1700pub enum DisassociateConnectorError {
1701    /// <p>A specified parameter is not valid.</p>
1702    InvalidParameter(String),
1703    /// <p>A required parameter is missing.</p>
1704    MissingRequiredParameter(String),
1705    /// <p>This operation is not allowed.</p>
1706    OperationNotPermitted(String),
1707    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1708    UnauthorizedOperation(String),
1709}
1710
1711impl DisassociateConnectorError {
1712    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateConnectorError> {
1713        if let Some(err) = proto::json::Error::parse(&res) {
1714            match err.typ.as_str() {
1715                "InvalidParameterException" => {
1716                    return RusotoError::Service(DisassociateConnectorError::InvalidParameter(
1717                        err.msg,
1718                    ))
1719                }
1720                "MissingRequiredParameterException" => {
1721                    return RusotoError::Service(
1722                        DisassociateConnectorError::MissingRequiredParameter(err.msg),
1723                    )
1724                }
1725                "OperationNotPermittedException" => {
1726                    return RusotoError::Service(DisassociateConnectorError::OperationNotPermitted(
1727                        err.msg,
1728                    ))
1729                }
1730                "UnauthorizedOperationException" => {
1731                    return RusotoError::Service(DisassociateConnectorError::UnauthorizedOperation(
1732                        err.msg,
1733                    ))
1734                }
1735                "ValidationException" => return RusotoError::Validation(err.msg),
1736                _ => {}
1737            }
1738        }
1739        RusotoError::Unknown(res)
1740    }
1741}
1742impl fmt::Display for DisassociateConnectorError {
1743    #[allow(unused_variables)]
1744    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1745        match *self {
1746            DisassociateConnectorError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1747            DisassociateConnectorError::MissingRequiredParameter(ref cause) => {
1748                write!(f, "{}", cause)
1749            }
1750            DisassociateConnectorError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1751            DisassociateConnectorError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1752        }
1753    }
1754}
1755impl Error for DisassociateConnectorError {}
1756/// Errors returned by GenerateChangeSet
1757#[derive(Debug, PartialEq)]
1758pub enum GenerateChangeSetError {
1759    /// <p>An internal error occurred.</p>
1760    InternalError(String),
1761    /// <p>A specified parameter is not valid.</p>
1762    InvalidParameter(String),
1763    /// <p>A required parameter is missing.</p>
1764    MissingRequiredParameter(String),
1765    /// <p>This operation is not allowed.</p>
1766    OperationNotPermitted(String),
1767    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1768    UnauthorizedOperation(String),
1769}
1770
1771impl GenerateChangeSetError {
1772    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateChangeSetError> {
1773        if let Some(err) = proto::json::Error::parse(&res) {
1774            match err.typ.as_str() {
1775                "InternalError" => {
1776                    return RusotoError::Service(GenerateChangeSetError::InternalError(err.msg))
1777                }
1778                "InvalidParameterException" => {
1779                    return RusotoError::Service(GenerateChangeSetError::InvalidParameter(err.msg))
1780                }
1781                "MissingRequiredParameterException" => {
1782                    return RusotoError::Service(GenerateChangeSetError::MissingRequiredParameter(
1783                        err.msg,
1784                    ))
1785                }
1786                "OperationNotPermittedException" => {
1787                    return RusotoError::Service(GenerateChangeSetError::OperationNotPermitted(
1788                        err.msg,
1789                    ))
1790                }
1791                "UnauthorizedOperationException" => {
1792                    return RusotoError::Service(GenerateChangeSetError::UnauthorizedOperation(
1793                        err.msg,
1794                    ))
1795                }
1796                "ValidationException" => return RusotoError::Validation(err.msg),
1797                _ => {}
1798            }
1799        }
1800        RusotoError::Unknown(res)
1801    }
1802}
1803impl fmt::Display for GenerateChangeSetError {
1804    #[allow(unused_variables)]
1805    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1806        match *self {
1807            GenerateChangeSetError::InternalError(ref cause) => write!(f, "{}", cause),
1808            GenerateChangeSetError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1809            GenerateChangeSetError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1810            GenerateChangeSetError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1811            GenerateChangeSetError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1812        }
1813    }
1814}
1815impl Error for GenerateChangeSetError {}
1816/// Errors returned by GenerateTemplate
1817#[derive(Debug, PartialEq)]
1818pub enum GenerateTemplateError {
1819    /// <p>An internal error occurred.</p>
1820    InternalError(String),
1821    /// <p>A specified parameter is not valid.</p>
1822    InvalidParameter(String),
1823    /// <p>A required parameter is missing.</p>
1824    MissingRequiredParameter(String),
1825    /// <p>This operation is not allowed.</p>
1826    OperationNotPermitted(String),
1827    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1828    UnauthorizedOperation(String),
1829}
1830
1831impl GenerateTemplateError {
1832    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateTemplateError> {
1833        if let Some(err) = proto::json::Error::parse(&res) {
1834            match err.typ.as_str() {
1835                "InternalError" => {
1836                    return RusotoError::Service(GenerateTemplateError::InternalError(err.msg))
1837                }
1838                "InvalidParameterException" => {
1839                    return RusotoError::Service(GenerateTemplateError::InvalidParameter(err.msg))
1840                }
1841                "MissingRequiredParameterException" => {
1842                    return RusotoError::Service(GenerateTemplateError::MissingRequiredParameter(
1843                        err.msg,
1844                    ))
1845                }
1846                "OperationNotPermittedException" => {
1847                    return RusotoError::Service(GenerateTemplateError::OperationNotPermitted(
1848                        err.msg,
1849                    ))
1850                }
1851                "UnauthorizedOperationException" => {
1852                    return RusotoError::Service(GenerateTemplateError::UnauthorizedOperation(
1853                        err.msg,
1854                    ))
1855                }
1856                "ValidationException" => return RusotoError::Validation(err.msg),
1857                _ => {}
1858            }
1859        }
1860        RusotoError::Unknown(res)
1861    }
1862}
1863impl fmt::Display for GenerateTemplateError {
1864    #[allow(unused_variables)]
1865    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1866        match *self {
1867            GenerateTemplateError::InternalError(ref cause) => write!(f, "{}", cause),
1868            GenerateTemplateError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1869            GenerateTemplateError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1870            GenerateTemplateError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1871            GenerateTemplateError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1872        }
1873    }
1874}
1875impl Error for GenerateTemplateError {}
1876/// Errors returned by GetApp
1877#[derive(Debug, PartialEq)]
1878pub enum GetAppError {
1879    /// <p>An internal error occurred.</p>
1880    InternalError(String),
1881    /// <p>A specified parameter is not valid.</p>
1882    InvalidParameter(String),
1883    /// <p>A required parameter is missing.</p>
1884    MissingRequiredParameter(String),
1885    /// <p>This operation is not allowed.</p>
1886    OperationNotPermitted(String),
1887    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1888    UnauthorizedOperation(String),
1889}
1890
1891impl GetAppError {
1892    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAppError> {
1893        if let Some(err) = proto::json::Error::parse(&res) {
1894            match err.typ.as_str() {
1895                "InternalError" => {
1896                    return RusotoError::Service(GetAppError::InternalError(err.msg))
1897                }
1898                "InvalidParameterException" => {
1899                    return RusotoError::Service(GetAppError::InvalidParameter(err.msg))
1900                }
1901                "MissingRequiredParameterException" => {
1902                    return RusotoError::Service(GetAppError::MissingRequiredParameter(err.msg))
1903                }
1904                "OperationNotPermittedException" => {
1905                    return RusotoError::Service(GetAppError::OperationNotPermitted(err.msg))
1906                }
1907                "UnauthorizedOperationException" => {
1908                    return RusotoError::Service(GetAppError::UnauthorizedOperation(err.msg))
1909                }
1910                "ValidationException" => return RusotoError::Validation(err.msg),
1911                _ => {}
1912            }
1913        }
1914        RusotoError::Unknown(res)
1915    }
1916}
1917impl fmt::Display for GetAppError {
1918    #[allow(unused_variables)]
1919    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1920        match *self {
1921            GetAppError::InternalError(ref cause) => write!(f, "{}", cause),
1922            GetAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1923            GetAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
1924            GetAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
1925            GetAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1926        }
1927    }
1928}
1929impl Error for GetAppError {}
1930/// Errors returned by GetAppLaunchConfiguration
1931#[derive(Debug, PartialEq)]
1932pub enum GetAppLaunchConfigurationError {
1933    /// <p>An internal error occurred.</p>
1934    InternalError(String),
1935    /// <p>A specified parameter is not valid.</p>
1936    InvalidParameter(String),
1937    /// <p>A required parameter is missing.</p>
1938    MissingRequiredParameter(String),
1939    /// <p>This operation is not allowed.</p>
1940    OperationNotPermitted(String),
1941    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
1942    UnauthorizedOperation(String),
1943}
1944
1945impl GetAppLaunchConfigurationError {
1946    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAppLaunchConfigurationError> {
1947        if let Some(err) = proto::json::Error::parse(&res) {
1948            match err.typ.as_str() {
1949                "InternalError" => {
1950                    return RusotoError::Service(GetAppLaunchConfigurationError::InternalError(
1951                        err.msg,
1952                    ))
1953                }
1954                "InvalidParameterException" => {
1955                    return RusotoError::Service(GetAppLaunchConfigurationError::InvalidParameter(
1956                        err.msg,
1957                    ))
1958                }
1959                "MissingRequiredParameterException" => {
1960                    return RusotoError::Service(
1961                        GetAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
1962                    )
1963                }
1964                "OperationNotPermittedException" => {
1965                    return RusotoError::Service(
1966                        GetAppLaunchConfigurationError::OperationNotPermitted(err.msg),
1967                    )
1968                }
1969                "UnauthorizedOperationException" => {
1970                    return RusotoError::Service(
1971                        GetAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
1972                    )
1973                }
1974                "ValidationException" => return RusotoError::Validation(err.msg),
1975                _ => {}
1976            }
1977        }
1978        RusotoError::Unknown(res)
1979    }
1980}
1981impl fmt::Display for GetAppLaunchConfigurationError {
1982    #[allow(unused_variables)]
1983    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1984        match *self {
1985            GetAppLaunchConfigurationError::InternalError(ref cause) => write!(f, "{}", cause),
1986            GetAppLaunchConfigurationError::InvalidParameter(ref cause) => write!(f, "{}", cause),
1987            GetAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => {
1988                write!(f, "{}", cause)
1989            }
1990            GetAppLaunchConfigurationError::OperationNotPermitted(ref cause) => {
1991                write!(f, "{}", cause)
1992            }
1993            GetAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => {
1994                write!(f, "{}", cause)
1995            }
1996        }
1997    }
1998}
1999impl Error for GetAppLaunchConfigurationError {}
2000/// Errors returned by GetAppReplicationConfiguration
2001#[derive(Debug, PartialEq)]
2002pub enum GetAppReplicationConfigurationError {
2003    /// <p>An internal error occurred.</p>
2004    InternalError(String),
2005    /// <p>A specified parameter is not valid.</p>
2006    InvalidParameter(String),
2007    /// <p>A required parameter is missing.</p>
2008    MissingRequiredParameter(String),
2009    /// <p>This operation is not allowed.</p>
2010    OperationNotPermitted(String),
2011    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2012    UnauthorizedOperation(String),
2013}
2014
2015impl GetAppReplicationConfigurationError {
2016    pub fn from_response(
2017        res: BufferedHttpResponse,
2018    ) -> RusotoError<GetAppReplicationConfigurationError> {
2019        if let Some(err) = proto::json::Error::parse(&res) {
2020            match err.typ.as_str() {
2021                "InternalError" => {
2022                    return RusotoError::Service(
2023                        GetAppReplicationConfigurationError::InternalError(err.msg),
2024                    )
2025                }
2026                "InvalidParameterException" => {
2027                    return RusotoError::Service(
2028                        GetAppReplicationConfigurationError::InvalidParameter(err.msg),
2029                    )
2030                }
2031                "MissingRequiredParameterException" => {
2032                    return RusotoError::Service(
2033                        GetAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
2034                    )
2035                }
2036                "OperationNotPermittedException" => {
2037                    return RusotoError::Service(
2038                        GetAppReplicationConfigurationError::OperationNotPermitted(err.msg),
2039                    )
2040                }
2041                "UnauthorizedOperationException" => {
2042                    return RusotoError::Service(
2043                        GetAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
2044                    )
2045                }
2046                "ValidationException" => return RusotoError::Validation(err.msg),
2047                _ => {}
2048            }
2049        }
2050        RusotoError::Unknown(res)
2051    }
2052}
2053impl fmt::Display for GetAppReplicationConfigurationError {
2054    #[allow(unused_variables)]
2055    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2056        match *self {
2057            GetAppReplicationConfigurationError::InternalError(ref cause) => write!(f, "{}", cause),
2058            GetAppReplicationConfigurationError::InvalidParameter(ref cause) => {
2059                write!(f, "{}", cause)
2060            }
2061            GetAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => {
2062                write!(f, "{}", cause)
2063            }
2064            GetAppReplicationConfigurationError::OperationNotPermitted(ref cause) => {
2065                write!(f, "{}", cause)
2066            }
2067            GetAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => {
2068                write!(f, "{}", cause)
2069            }
2070        }
2071    }
2072}
2073impl Error for GetAppReplicationConfigurationError {}
2074/// Errors returned by GetConnectors
2075#[derive(Debug, PartialEq)]
2076pub enum GetConnectorsError {
2077    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2078    UnauthorizedOperation(String),
2079}
2080
2081impl GetConnectorsError {
2082    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConnectorsError> {
2083        if let Some(err) = proto::json::Error::parse(&res) {
2084            match err.typ.as_str() {
2085                "UnauthorizedOperationException" => {
2086                    return RusotoError::Service(GetConnectorsError::UnauthorizedOperation(err.msg))
2087                }
2088                "ValidationException" => return RusotoError::Validation(err.msg),
2089                _ => {}
2090            }
2091        }
2092        RusotoError::Unknown(res)
2093    }
2094}
2095impl fmt::Display for GetConnectorsError {
2096    #[allow(unused_variables)]
2097    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2098        match *self {
2099            GetConnectorsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2100        }
2101    }
2102}
2103impl Error for GetConnectorsError {}
2104/// Errors returned by GetReplicationJobs
2105#[derive(Debug, PartialEq)]
2106pub enum GetReplicationJobsError {
2107    /// <p>A specified parameter is not valid.</p>
2108    InvalidParameter(String),
2109    /// <p>A required parameter is missing.</p>
2110    MissingRequiredParameter(String),
2111    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2112    UnauthorizedOperation(String),
2113}
2114
2115impl GetReplicationJobsError {
2116    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetReplicationJobsError> {
2117        if let Some(err) = proto::json::Error::parse(&res) {
2118            match err.typ.as_str() {
2119                "InvalidParameterException" => {
2120                    return RusotoError::Service(GetReplicationJobsError::InvalidParameter(err.msg))
2121                }
2122                "MissingRequiredParameterException" => {
2123                    return RusotoError::Service(GetReplicationJobsError::MissingRequiredParameter(
2124                        err.msg,
2125                    ))
2126                }
2127                "UnauthorizedOperationException" => {
2128                    return RusotoError::Service(GetReplicationJobsError::UnauthorizedOperation(
2129                        err.msg,
2130                    ))
2131                }
2132                "ValidationException" => return RusotoError::Validation(err.msg),
2133                _ => {}
2134            }
2135        }
2136        RusotoError::Unknown(res)
2137    }
2138}
2139impl fmt::Display for GetReplicationJobsError {
2140    #[allow(unused_variables)]
2141    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2142        match *self {
2143            GetReplicationJobsError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2144            GetReplicationJobsError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2145            GetReplicationJobsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2146        }
2147    }
2148}
2149impl Error for GetReplicationJobsError {}
2150/// Errors returned by GetReplicationRuns
2151#[derive(Debug, PartialEq)]
2152pub enum GetReplicationRunsError {
2153    /// <p>A specified parameter is not valid.</p>
2154    InvalidParameter(String),
2155    /// <p>A required parameter is missing.</p>
2156    MissingRequiredParameter(String),
2157    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2158    UnauthorizedOperation(String),
2159}
2160
2161impl GetReplicationRunsError {
2162    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetReplicationRunsError> {
2163        if let Some(err) = proto::json::Error::parse(&res) {
2164            match err.typ.as_str() {
2165                "InvalidParameterException" => {
2166                    return RusotoError::Service(GetReplicationRunsError::InvalidParameter(err.msg))
2167                }
2168                "MissingRequiredParameterException" => {
2169                    return RusotoError::Service(GetReplicationRunsError::MissingRequiredParameter(
2170                        err.msg,
2171                    ))
2172                }
2173                "UnauthorizedOperationException" => {
2174                    return RusotoError::Service(GetReplicationRunsError::UnauthorizedOperation(
2175                        err.msg,
2176                    ))
2177                }
2178                "ValidationException" => return RusotoError::Validation(err.msg),
2179                _ => {}
2180            }
2181        }
2182        RusotoError::Unknown(res)
2183    }
2184}
2185impl fmt::Display for GetReplicationRunsError {
2186    #[allow(unused_variables)]
2187    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2188        match *self {
2189            GetReplicationRunsError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2190            GetReplicationRunsError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2191            GetReplicationRunsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2192        }
2193    }
2194}
2195impl Error for GetReplicationRunsError {}
2196/// Errors returned by GetServers
2197#[derive(Debug, PartialEq)]
2198pub enum GetServersError {
2199    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2200    UnauthorizedOperation(String),
2201}
2202
2203impl GetServersError {
2204    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServersError> {
2205        if let Some(err) = proto::json::Error::parse(&res) {
2206            match err.typ.as_str() {
2207                "UnauthorizedOperationException" => {
2208                    return RusotoError::Service(GetServersError::UnauthorizedOperation(err.msg))
2209                }
2210                "ValidationException" => return RusotoError::Validation(err.msg),
2211                _ => {}
2212            }
2213        }
2214        RusotoError::Unknown(res)
2215    }
2216}
2217impl fmt::Display for GetServersError {
2218    #[allow(unused_variables)]
2219    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2220        match *self {
2221            GetServersError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2222        }
2223    }
2224}
2225impl Error for GetServersError {}
2226/// Errors returned by ImportServerCatalog
2227#[derive(Debug, PartialEq)]
2228pub enum ImportServerCatalogError {
2229    /// <p>A specified parameter is not valid.</p>
2230    InvalidParameter(String),
2231    /// <p>A required parameter is missing.</p>
2232    MissingRequiredParameter(String),
2233    /// <p>There are no connectors available.</p>
2234    NoConnectorsAvailable(String),
2235    /// <p>This operation is not allowed.</p>
2236    OperationNotPermitted(String),
2237    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2238    UnauthorizedOperation(String),
2239}
2240
2241impl ImportServerCatalogError {
2242    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportServerCatalogError> {
2243        if let Some(err) = proto::json::Error::parse(&res) {
2244            match err.typ.as_str() {
2245                "InvalidParameterException" => {
2246                    return RusotoError::Service(ImportServerCatalogError::InvalidParameter(
2247                        err.msg,
2248                    ))
2249                }
2250                "MissingRequiredParameterException" => {
2251                    return RusotoError::Service(
2252                        ImportServerCatalogError::MissingRequiredParameter(err.msg),
2253                    )
2254                }
2255                "NoConnectorsAvailableException" => {
2256                    return RusotoError::Service(ImportServerCatalogError::NoConnectorsAvailable(
2257                        err.msg,
2258                    ))
2259                }
2260                "OperationNotPermittedException" => {
2261                    return RusotoError::Service(ImportServerCatalogError::OperationNotPermitted(
2262                        err.msg,
2263                    ))
2264                }
2265                "UnauthorizedOperationException" => {
2266                    return RusotoError::Service(ImportServerCatalogError::UnauthorizedOperation(
2267                        err.msg,
2268                    ))
2269                }
2270                "ValidationException" => return RusotoError::Validation(err.msg),
2271                _ => {}
2272            }
2273        }
2274        RusotoError::Unknown(res)
2275    }
2276}
2277impl fmt::Display for ImportServerCatalogError {
2278    #[allow(unused_variables)]
2279    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2280        match *self {
2281            ImportServerCatalogError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2282            ImportServerCatalogError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2283            ImportServerCatalogError::NoConnectorsAvailable(ref cause) => write!(f, "{}", cause),
2284            ImportServerCatalogError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2285            ImportServerCatalogError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2286        }
2287    }
2288}
2289impl Error for ImportServerCatalogError {}
2290/// Errors returned by LaunchApp
2291#[derive(Debug, PartialEq)]
2292pub enum LaunchAppError {
2293    /// <p>An internal error occurred.</p>
2294    InternalError(String),
2295    /// <p>A specified parameter is not valid.</p>
2296    InvalidParameter(String),
2297    /// <p>A required parameter is missing.</p>
2298    MissingRequiredParameter(String),
2299    /// <p>This operation is not allowed.</p>
2300    OperationNotPermitted(String),
2301    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2302    UnauthorizedOperation(String),
2303}
2304
2305impl LaunchAppError {
2306    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<LaunchAppError> {
2307        if let Some(err) = proto::json::Error::parse(&res) {
2308            match err.typ.as_str() {
2309                "InternalError" => {
2310                    return RusotoError::Service(LaunchAppError::InternalError(err.msg))
2311                }
2312                "InvalidParameterException" => {
2313                    return RusotoError::Service(LaunchAppError::InvalidParameter(err.msg))
2314                }
2315                "MissingRequiredParameterException" => {
2316                    return RusotoError::Service(LaunchAppError::MissingRequiredParameter(err.msg))
2317                }
2318                "OperationNotPermittedException" => {
2319                    return RusotoError::Service(LaunchAppError::OperationNotPermitted(err.msg))
2320                }
2321                "UnauthorizedOperationException" => {
2322                    return RusotoError::Service(LaunchAppError::UnauthorizedOperation(err.msg))
2323                }
2324                "ValidationException" => return RusotoError::Validation(err.msg),
2325                _ => {}
2326            }
2327        }
2328        RusotoError::Unknown(res)
2329    }
2330}
2331impl fmt::Display for LaunchAppError {
2332    #[allow(unused_variables)]
2333    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2334        match *self {
2335            LaunchAppError::InternalError(ref cause) => write!(f, "{}", cause),
2336            LaunchAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2337            LaunchAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2338            LaunchAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2339            LaunchAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2340        }
2341    }
2342}
2343impl Error for LaunchAppError {}
2344/// Errors returned by ListApps
2345#[derive(Debug, PartialEq)]
2346pub enum ListAppsError {
2347    /// <p>An internal error occurred.</p>
2348    InternalError(String),
2349    /// <p>A specified parameter is not valid.</p>
2350    InvalidParameter(String),
2351    /// <p>A required parameter is missing.</p>
2352    MissingRequiredParameter(String),
2353    /// <p>This operation is not allowed.</p>
2354    OperationNotPermitted(String),
2355    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2356    UnauthorizedOperation(String),
2357}
2358
2359impl ListAppsError {
2360    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAppsError> {
2361        if let Some(err) = proto::json::Error::parse(&res) {
2362            match err.typ.as_str() {
2363                "InternalError" => {
2364                    return RusotoError::Service(ListAppsError::InternalError(err.msg))
2365                }
2366                "InvalidParameterException" => {
2367                    return RusotoError::Service(ListAppsError::InvalidParameter(err.msg))
2368                }
2369                "MissingRequiredParameterException" => {
2370                    return RusotoError::Service(ListAppsError::MissingRequiredParameter(err.msg))
2371                }
2372                "OperationNotPermittedException" => {
2373                    return RusotoError::Service(ListAppsError::OperationNotPermitted(err.msg))
2374                }
2375                "UnauthorizedOperationException" => {
2376                    return RusotoError::Service(ListAppsError::UnauthorizedOperation(err.msg))
2377                }
2378                "ValidationException" => return RusotoError::Validation(err.msg),
2379                _ => {}
2380            }
2381        }
2382        RusotoError::Unknown(res)
2383    }
2384}
2385impl fmt::Display for ListAppsError {
2386    #[allow(unused_variables)]
2387    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2388        match *self {
2389            ListAppsError::InternalError(ref cause) => write!(f, "{}", cause),
2390            ListAppsError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2391            ListAppsError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2392            ListAppsError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2393            ListAppsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2394        }
2395    }
2396}
2397impl Error for ListAppsError {}
2398/// Errors returned by PutAppLaunchConfiguration
2399#[derive(Debug, PartialEq)]
2400pub enum PutAppLaunchConfigurationError {
2401    /// <p>An internal error occurred.</p>
2402    InternalError(String),
2403    /// <p>A specified parameter is not valid.</p>
2404    InvalidParameter(String),
2405    /// <p>A required parameter is missing.</p>
2406    MissingRequiredParameter(String),
2407    /// <p>This operation is not allowed.</p>
2408    OperationNotPermitted(String),
2409    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2410    UnauthorizedOperation(String),
2411}
2412
2413impl PutAppLaunchConfigurationError {
2414    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAppLaunchConfigurationError> {
2415        if let Some(err) = proto::json::Error::parse(&res) {
2416            match err.typ.as_str() {
2417                "InternalError" => {
2418                    return RusotoError::Service(PutAppLaunchConfigurationError::InternalError(
2419                        err.msg,
2420                    ))
2421                }
2422                "InvalidParameterException" => {
2423                    return RusotoError::Service(PutAppLaunchConfigurationError::InvalidParameter(
2424                        err.msg,
2425                    ))
2426                }
2427                "MissingRequiredParameterException" => {
2428                    return RusotoError::Service(
2429                        PutAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
2430                    )
2431                }
2432                "OperationNotPermittedException" => {
2433                    return RusotoError::Service(
2434                        PutAppLaunchConfigurationError::OperationNotPermitted(err.msg),
2435                    )
2436                }
2437                "UnauthorizedOperationException" => {
2438                    return RusotoError::Service(
2439                        PutAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
2440                    )
2441                }
2442                "ValidationException" => return RusotoError::Validation(err.msg),
2443                _ => {}
2444            }
2445        }
2446        RusotoError::Unknown(res)
2447    }
2448}
2449impl fmt::Display for PutAppLaunchConfigurationError {
2450    #[allow(unused_variables)]
2451    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2452        match *self {
2453            PutAppLaunchConfigurationError::InternalError(ref cause) => write!(f, "{}", cause),
2454            PutAppLaunchConfigurationError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2455            PutAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => {
2456                write!(f, "{}", cause)
2457            }
2458            PutAppLaunchConfigurationError::OperationNotPermitted(ref cause) => {
2459                write!(f, "{}", cause)
2460            }
2461            PutAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => {
2462                write!(f, "{}", cause)
2463            }
2464        }
2465    }
2466}
2467impl Error for PutAppLaunchConfigurationError {}
2468/// Errors returned by PutAppReplicationConfiguration
2469#[derive(Debug, PartialEq)]
2470pub enum PutAppReplicationConfigurationError {
2471    /// <p>An internal error occurred.</p>
2472    InternalError(String),
2473    /// <p>A specified parameter is not valid.</p>
2474    InvalidParameter(String),
2475    /// <p>A required parameter is missing.</p>
2476    MissingRequiredParameter(String),
2477    /// <p>This operation is not allowed.</p>
2478    OperationNotPermitted(String),
2479    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2480    UnauthorizedOperation(String),
2481}
2482
2483impl PutAppReplicationConfigurationError {
2484    pub fn from_response(
2485        res: BufferedHttpResponse,
2486    ) -> RusotoError<PutAppReplicationConfigurationError> {
2487        if let Some(err) = proto::json::Error::parse(&res) {
2488            match err.typ.as_str() {
2489                "InternalError" => {
2490                    return RusotoError::Service(
2491                        PutAppReplicationConfigurationError::InternalError(err.msg),
2492                    )
2493                }
2494                "InvalidParameterException" => {
2495                    return RusotoError::Service(
2496                        PutAppReplicationConfigurationError::InvalidParameter(err.msg),
2497                    )
2498                }
2499                "MissingRequiredParameterException" => {
2500                    return RusotoError::Service(
2501                        PutAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
2502                    )
2503                }
2504                "OperationNotPermittedException" => {
2505                    return RusotoError::Service(
2506                        PutAppReplicationConfigurationError::OperationNotPermitted(err.msg),
2507                    )
2508                }
2509                "UnauthorizedOperationException" => {
2510                    return RusotoError::Service(
2511                        PutAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
2512                    )
2513                }
2514                "ValidationException" => return RusotoError::Validation(err.msg),
2515                _ => {}
2516            }
2517        }
2518        RusotoError::Unknown(res)
2519    }
2520}
2521impl fmt::Display for PutAppReplicationConfigurationError {
2522    #[allow(unused_variables)]
2523    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2524        match *self {
2525            PutAppReplicationConfigurationError::InternalError(ref cause) => write!(f, "{}", cause),
2526            PutAppReplicationConfigurationError::InvalidParameter(ref cause) => {
2527                write!(f, "{}", cause)
2528            }
2529            PutAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => {
2530                write!(f, "{}", cause)
2531            }
2532            PutAppReplicationConfigurationError::OperationNotPermitted(ref cause) => {
2533                write!(f, "{}", cause)
2534            }
2535            PutAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => {
2536                write!(f, "{}", cause)
2537            }
2538        }
2539    }
2540}
2541impl Error for PutAppReplicationConfigurationError {}
2542/// Errors returned by StartAppReplication
2543#[derive(Debug, PartialEq)]
2544pub enum StartAppReplicationError {
2545    /// <p>An internal error occurred.</p>
2546    InternalError(String),
2547    /// <p>A specified parameter is not valid.</p>
2548    InvalidParameter(String),
2549    /// <p>A required parameter is missing.</p>
2550    MissingRequiredParameter(String),
2551    /// <p>This operation is not allowed.</p>
2552    OperationNotPermitted(String),
2553    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2554    UnauthorizedOperation(String),
2555}
2556
2557impl StartAppReplicationError {
2558    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartAppReplicationError> {
2559        if let Some(err) = proto::json::Error::parse(&res) {
2560            match err.typ.as_str() {
2561                "InternalError" => {
2562                    return RusotoError::Service(StartAppReplicationError::InternalError(err.msg))
2563                }
2564                "InvalidParameterException" => {
2565                    return RusotoError::Service(StartAppReplicationError::InvalidParameter(
2566                        err.msg,
2567                    ))
2568                }
2569                "MissingRequiredParameterException" => {
2570                    return RusotoError::Service(
2571                        StartAppReplicationError::MissingRequiredParameter(err.msg),
2572                    )
2573                }
2574                "OperationNotPermittedException" => {
2575                    return RusotoError::Service(StartAppReplicationError::OperationNotPermitted(
2576                        err.msg,
2577                    ))
2578                }
2579                "UnauthorizedOperationException" => {
2580                    return RusotoError::Service(StartAppReplicationError::UnauthorizedOperation(
2581                        err.msg,
2582                    ))
2583                }
2584                "ValidationException" => return RusotoError::Validation(err.msg),
2585                _ => {}
2586            }
2587        }
2588        RusotoError::Unknown(res)
2589    }
2590}
2591impl fmt::Display for StartAppReplicationError {
2592    #[allow(unused_variables)]
2593    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2594        match *self {
2595            StartAppReplicationError::InternalError(ref cause) => write!(f, "{}", cause),
2596            StartAppReplicationError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2597            StartAppReplicationError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2598            StartAppReplicationError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2599            StartAppReplicationError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2600        }
2601    }
2602}
2603impl Error for StartAppReplicationError {}
2604/// Errors returned by StartOnDemandReplicationRun
2605#[derive(Debug, PartialEq)]
2606pub enum StartOnDemandReplicationRunError {
2607    /// <p>A specified parameter is not valid.</p>
2608    InvalidParameter(String),
2609    /// <p>A required parameter is missing.</p>
2610    MissingRequiredParameter(String),
2611    /// <p>This operation is not allowed.</p>
2612    OperationNotPermitted(String),
2613    /// <p>You have exceeded the number of on-demand replication runs you can request in a 24-hour period.</p>
2614    ReplicationRunLimitExceeded(String),
2615    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2616    UnauthorizedOperation(String),
2617}
2618
2619impl StartOnDemandReplicationRunError {
2620    pub fn from_response(
2621        res: BufferedHttpResponse,
2622    ) -> RusotoError<StartOnDemandReplicationRunError> {
2623        if let Some(err) = proto::json::Error::parse(&res) {
2624            match err.typ.as_str() {
2625                "InvalidParameterException" => {
2626                    return RusotoError::Service(
2627                        StartOnDemandReplicationRunError::InvalidParameter(err.msg),
2628                    )
2629                }
2630                "MissingRequiredParameterException" => {
2631                    return RusotoError::Service(
2632                        StartOnDemandReplicationRunError::MissingRequiredParameter(err.msg),
2633                    )
2634                }
2635                "OperationNotPermittedException" => {
2636                    return RusotoError::Service(
2637                        StartOnDemandReplicationRunError::OperationNotPermitted(err.msg),
2638                    )
2639                }
2640                "ReplicationRunLimitExceededException" => {
2641                    return RusotoError::Service(
2642                        StartOnDemandReplicationRunError::ReplicationRunLimitExceeded(err.msg),
2643                    )
2644                }
2645                "UnauthorizedOperationException" => {
2646                    return RusotoError::Service(
2647                        StartOnDemandReplicationRunError::UnauthorizedOperation(err.msg),
2648                    )
2649                }
2650                "ValidationException" => return RusotoError::Validation(err.msg),
2651                _ => {}
2652            }
2653        }
2654        RusotoError::Unknown(res)
2655    }
2656}
2657impl fmt::Display for StartOnDemandReplicationRunError {
2658    #[allow(unused_variables)]
2659    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2660        match *self {
2661            StartOnDemandReplicationRunError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2662            StartOnDemandReplicationRunError::MissingRequiredParameter(ref cause) => {
2663                write!(f, "{}", cause)
2664            }
2665            StartOnDemandReplicationRunError::OperationNotPermitted(ref cause) => {
2666                write!(f, "{}", cause)
2667            }
2668            StartOnDemandReplicationRunError::ReplicationRunLimitExceeded(ref cause) => {
2669                write!(f, "{}", cause)
2670            }
2671            StartOnDemandReplicationRunError::UnauthorizedOperation(ref cause) => {
2672                write!(f, "{}", cause)
2673            }
2674        }
2675    }
2676}
2677impl Error for StartOnDemandReplicationRunError {}
2678/// Errors returned by StopAppReplication
2679#[derive(Debug, PartialEq)]
2680pub enum StopAppReplicationError {
2681    /// <p>An internal error occurred.</p>
2682    InternalError(String),
2683    /// <p>A specified parameter is not valid.</p>
2684    InvalidParameter(String),
2685    /// <p>A required parameter is missing.</p>
2686    MissingRequiredParameter(String),
2687    /// <p>This operation is not allowed.</p>
2688    OperationNotPermitted(String),
2689    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2690    UnauthorizedOperation(String),
2691}
2692
2693impl StopAppReplicationError {
2694    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopAppReplicationError> {
2695        if let Some(err) = proto::json::Error::parse(&res) {
2696            match err.typ.as_str() {
2697                "InternalError" => {
2698                    return RusotoError::Service(StopAppReplicationError::InternalError(err.msg))
2699                }
2700                "InvalidParameterException" => {
2701                    return RusotoError::Service(StopAppReplicationError::InvalidParameter(err.msg))
2702                }
2703                "MissingRequiredParameterException" => {
2704                    return RusotoError::Service(StopAppReplicationError::MissingRequiredParameter(
2705                        err.msg,
2706                    ))
2707                }
2708                "OperationNotPermittedException" => {
2709                    return RusotoError::Service(StopAppReplicationError::OperationNotPermitted(
2710                        err.msg,
2711                    ))
2712                }
2713                "UnauthorizedOperationException" => {
2714                    return RusotoError::Service(StopAppReplicationError::UnauthorizedOperation(
2715                        err.msg,
2716                    ))
2717                }
2718                "ValidationException" => return RusotoError::Validation(err.msg),
2719                _ => {}
2720            }
2721        }
2722        RusotoError::Unknown(res)
2723    }
2724}
2725impl fmt::Display for StopAppReplicationError {
2726    #[allow(unused_variables)]
2727    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2728        match *self {
2729            StopAppReplicationError::InternalError(ref cause) => write!(f, "{}", cause),
2730            StopAppReplicationError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2731            StopAppReplicationError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2732            StopAppReplicationError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2733            StopAppReplicationError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2734        }
2735    }
2736}
2737impl Error for StopAppReplicationError {}
2738/// Errors returned by TerminateApp
2739#[derive(Debug, PartialEq)]
2740pub enum TerminateAppError {
2741    /// <p>An internal error occurred.</p>
2742    InternalError(String),
2743    /// <p>A specified parameter is not valid.</p>
2744    InvalidParameter(String),
2745    /// <p>A required parameter is missing.</p>
2746    MissingRequiredParameter(String),
2747    /// <p>This operation is not allowed.</p>
2748    OperationNotPermitted(String),
2749    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2750    UnauthorizedOperation(String),
2751}
2752
2753impl TerminateAppError {
2754    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TerminateAppError> {
2755        if let Some(err) = proto::json::Error::parse(&res) {
2756            match err.typ.as_str() {
2757                "InternalError" => {
2758                    return RusotoError::Service(TerminateAppError::InternalError(err.msg))
2759                }
2760                "InvalidParameterException" => {
2761                    return RusotoError::Service(TerminateAppError::InvalidParameter(err.msg))
2762                }
2763                "MissingRequiredParameterException" => {
2764                    return RusotoError::Service(TerminateAppError::MissingRequiredParameter(
2765                        err.msg,
2766                    ))
2767                }
2768                "OperationNotPermittedException" => {
2769                    return RusotoError::Service(TerminateAppError::OperationNotPermitted(err.msg))
2770                }
2771                "UnauthorizedOperationException" => {
2772                    return RusotoError::Service(TerminateAppError::UnauthorizedOperation(err.msg))
2773                }
2774                "ValidationException" => return RusotoError::Validation(err.msg),
2775                _ => {}
2776            }
2777        }
2778        RusotoError::Unknown(res)
2779    }
2780}
2781impl fmt::Display for TerminateAppError {
2782    #[allow(unused_variables)]
2783    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2784        match *self {
2785            TerminateAppError::InternalError(ref cause) => write!(f, "{}", cause),
2786            TerminateAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2787            TerminateAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2788            TerminateAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2789            TerminateAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2790        }
2791    }
2792}
2793impl Error for TerminateAppError {}
2794/// Errors returned by UpdateApp
2795#[derive(Debug, PartialEq)]
2796pub enum UpdateAppError {
2797    /// <p>An internal error occurred.</p>
2798    InternalError(String),
2799    /// <p>A specified parameter is not valid.</p>
2800    InvalidParameter(String),
2801    /// <p>A required parameter is missing.</p>
2802    MissingRequiredParameter(String),
2803    /// <p>This operation is not allowed.</p>
2804    OperationNotPermitted(String),
2805    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2806    UnauthorizedOperation(String),
2807}
2808
2809impl UpdateAppError {
2810    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAppError> {
2811        if let Some(err) = proto::json::Error::parse(&res) {
2812            match err.typ.as_str() {
2813                "InternalError" => {
2814                    return RusotoError::Service(UpdateAppError::InternalError(err.msg))
2815                }
2816                "InvalidParameterException" => {
2817                    return RusotoError::Service(UpdateAppError::InvalidParameter(err.msg))
2818                }
2819                "MissingRequiredParameterException" => {
2820                    return RusotoError::Service(UpdateAppError::MissingRequiredParameter(err.msg))
2821                }
2822                "OperationNotPermittedException" => {
2823                    return RusotoError::Service(UpdateAppError::OperationNotPermitted(err.msg))
2824                }
2825                "UnauthorizedOperationException" => {
2826                    return RusotoError::Service(UpdateAppError::UnauthorizedOperation(err.msg))
2827                }
2828                "ValidationException" => return RusotoError::Validation(err.msg),
2829                _ => {}
2830            }
2831        }
2832        RusotoError::Unknown(res)
2833    }
2834}
2835impl fmt::Display for UpdateAppError {
2836    #[allow(unused_variables)]
2837    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2838        match *self {
2839            UpdateAppError::InternalError(ref cause) => write!(f, "{}", cause),
2840            UpdateAppError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2841            UpdateAppError::MissingRequiredParameter(ref cause) => write!(f, "{}", cause),
2842            UpdateAppError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2843            UpdateAppError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2844        }
2845    }
2846}
2847impl Error for UpdateAppError {}
2848/// Errors returned by UpdateReplicationJob
2849#[derive(Debug, PartialEq)]
2850pub enum UpdateReplicationJobError {
2851    /// <p>An internal error occurred.</p>
2852    InternalError(String),
2853    /// <p>A specified parameter is not valid.</p>
2854    InvalidParameter(String),
2855    /// <p>A required parameter is missing.</p>
2856    MissingRequiredParameter(String),
2857    /// <p>This operation is not allowed.</p>
2858    OperationNotPermitted(String),
2859    /// <p>The specified replication job does not exist.</p>
2860    ReplicationJobNotFound(String),
2861    /// <p>The specified server cannot be replicated.</p>
2862    ServerCannotBeReplicated(String),
2863    /// <p>The service is temporarily unavailable.</p>
2864    TemporarilyUnavailable(String),
2865    /// <p>You lack permissions needed to perform this operation. Check your IAM policies, and ensure that you are using the correct access keys.</p>
2866    UnauthorizedOperation(String),
2867}
2868
2869impl UpdateReplicationJobError {
2870    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateReplicationJobError> {
2871        if let Some(err) = proto::json::Error::parse(&res) {
2872            match err.typ.as_str() {
2873                "InternalError" => {
2874                    return RusotoError::Service(UpdateReplicationJobError::InternalError(err.msg))
2875                }
2876                "InvalidParameterException" => {
2877                    return RusotoError::Service(UpdateReplicationJobError::InvalidParameter(
2878                        err.msg,
2879                    ))
2880                }
2881                "MissingRequiredParameterException" => {
2882                    return RusotoError::Service(
2883                        UpdateReplicationJobError::MissingRequiredParameter(err.msg),
2884                    )
2885                }
2886                "OperationNotPermittedException" => {
2887                    return RusotoError::Service(UpdateReplicationJobError::OperationNotPermitted(
2888                        err.msg,
2889                    ))
2890                }
2891                "ReplicationJobNotFoundException" => {
2892                    return RusotoError::Service(UpdateReplicationJobError::ReplicationJobNotFound(
2893                        err.msg,
2894                    ))
2895                }
2896                "ServerCannotBeReplicatedException" => {
2897                    return RusotoError::Service(
2898                        UpdateReplicationJobError::ServerCannotBeReplicated(err.msg),
2899                    )
2900                }
2901                "TemporarilyUnavailableException" => {
2902                    return RusotoError::Service(UpdateReplicationJobError::TemporarilyUnavailable(
2903                        err.msg,
2904                    ))
2905                }
2906                "UnauthorizedOperationException" => {
2907                    return RusotoError::Service(UpdateReplicationJobError::UnauthorizedOperation(
2908                        err.msg,
2909                    ))
2910                }
2911                "ValidationException" => return RusotoError::Validation(err.msg),
2912                _ => {}
2913            }
2914        }
2915        RusotoError::Unknown(res)
2916    }
2917}
2918impl fmt::Display for UpdateReplicationJobError {
2919    #[allow(unused_variables)]
2920    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2921        match *self {
2922            UpdateReplicationJobError::InternalError(ref cause) => write!(f, "{}", cause),
2923            UpdateReplicationJobError::InvalidParameter(ref cause) => write!(f, "{}", cause),
2924            UpdateReplicationJobError::MissingRequiredParameter(ref cause) => {
2925                write!(f, "{}", cause)
2926            }
2927            UpdateReplicationJobError::OperationNotPermitted(ref cause) => write!(f, "{}", cause),
2928            UpdateReplicationJobError::ReplicationJobNotFound(ref cause) => write!(f, "{}", cause),
2929            UpdateReplicationJobError::ServerCannotBeReplicated(ref cause) => {
2930                write!(f, "{}", cause)
2931            }
2932            UpdateReplicationJobError::TemporarilyUnavailable(ref cause) => write!(f, "{}", cause),
2933            UpdateReplicationJobError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2934        }
2935    }
2936}
2937impl Error for UpdateReplicationJobError {}
2938/// Trait representing the capabilities of the SMS API. SMS clients implement this trait.
2939#[async_trait]
2940pub trait ServerMigrationService {
2941    /// <p>Creates an application. An application consists of one or more server groups. Each server group contain one or more servers.</p>
2942    async fn create_app(
2943        &self,
2944        input: CreateAppRequest,
2945    ) -> Result<CreateAppResponse, RusotoError<CreateAppError>>;
2946
2947    /// <p>Creates a replication job. The replication job schedules periodic replication runs to replicate your server to AWS. Each replication run creates an Amazon Machine Image (AMI).</p>
2948    async fn create_replication_job(
2949        &self,
2950        input: CreateReplicationJobRequest,
2951    ) -> Result<CreateReplicationJobResponse, RusotoError<CreateReplicationJobError>>;
2952
2953    /// <p>Deletes an existing application. Optionally deletes the launched stack associated with the application and all AWS SMS replication jobs for servers in the application.</p>
2954    async fn delete_app(
2955        &self,
2956        input: DeleteAppRequest,
2957    ) -> Result<DeleteAppResponse, RusotoError<DeleteAppError>>;
2958
2959    /// <p>Deletes existing launch configuration for an application.</p>
2960    async fn delete_app_launch_configuration(
2961        &self,
2962        input: DeleteAppLaunchConfigurationRequest,
2963    ) -> Result<DeleteAppLaunchConfigurationResponse, RusotoError<DeleteAppLaunchConfigurationError>>;
2964
2965    /// <p>Deletes existing replication configuration for an application.</p>
2966    async fn delete_app_replication_configuration(
2967        &self,
2968        input: DeleteAppReplicationConfigurationRequest,
2969    ) -> Result<
2970        DeleteAppReplicationConfigurationResponse,
2971        RusotoError<DeleteAppReplicationConfigurationError>,
2972    >;
2973
2974    /// <p>Deletes the specified replication job.</p> <p>After you delete a replication job, there are no further replication runs. AWS deletes the contents of the Amazon S3 bucket used to store AWS SMS artifacts. The AMIs created by the replication runs are not deleted.</p>
2975    async fn delete_replication_job(
2976        &self,
2977        input: DeleteReplicationJobRequest,
2978    ) -> Result<DeleteReplicationJobResponse, RusotoError<DeleteReplicationJobError>>;
2979
2980    /// <p>Deletes all servers from your server catalog.</p>
2981    async fn delete_server_catalog(
2982        &self,
2983    ) -> Result<DeleteServerCatalogResponse, RusotoError<DeleteServerCatalogError>>;
2984
2985    /// <p>Disassociates the specified connector from AWS SMS.</p> <p>After you disassociate a connector, it is no longer available to support replication jobs.</p>
2986    async fn disassociate_connector(
2987        &self,
2988        input: DisassociateConnectorRequest,
2989    ) -> Result<DisassociateConnectorResponse, RusotoError<DisassociateConnectorError>>;
2990
2991    /// <p>Generates a target change set for a currently launched stack and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.</p>
2992    async fn generate_change_set(
2993        &self,
2994        input: GenerateChangeSetRequest,
2995    ) -> Result<GenerateChangeSetResponse, RusotoError<GenerateChangeSetError>>;
2996
2997    /// <p>Generates an Amazon CloudFormation template based on the current launch configuration and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.</p>
2998    async fn generate_template(
2999        &self,
3000        input: GenerateTemplateRequest,
3001    ) -> Result<GenerateTemplateResponse, RusotoError<GenerateTemplateError>>;
3002
3003    /// <p>Retrieve information about an application.</p>
3004    async fn get_app(
3005        &self,
3006        input: GetAppRequest,
3007    ) -> Result<GetAppResponse, RusotoError<GetAppError>>;
3008
3009    /// <p>Retrieves the application launch configuration associated with an application.</p>
3010    async fn get_app_launch_configuration(
3011        &self,
3012        input: GetAppLaunchConfigurationRequest,
3013    ) -> Result<GetAppLaunchConfigurationResponse, RusotoError<GetAppLaunchConfigurationError>>;
3014
3015    /// <p>Retrieves an application replication configuration associatd with an application.</p>
3016    async fn get_app_replication_configuration(
3017        &self,
3018        input: GetAppReplicationConfigurationRequest,
3019    ) -> Result<
3020        GetAppReplicationConfigurationResponse,
3021        RusotoError<GetAppReplicationConfigurationError>,
3022    >;
3023
3024    /// <p>Describes the connectors registered with the AWS SMS.</p>
3025    async fn get_connectors(
3026        &self,
3027        input: GetConnectorsRequest,
3028    ) -> Result<GetConnectorsResponse, RusotoError<GetConnectorsError>>;
3029
3030    /// <p>Describes the specified replication job or all of your replication jobs.</p>
3031    async fn get_replication_jobs(
3032        &self,
3033        input: GetReplicationJobsRequest,
3034    ) -> Result<GetReplicationJobsResponse, RusotoError<GetReplicationJobsError>>;
3035
3036    /// <p>Describes the replication runs for the specified replication job.</p>
3037    async fn get_replication_runs(
3038        &self,
3039        input: GetReplicationRunsRequest,
3040    ) -> Result<GetReplicationRunsResponse, RusotoError<GetReplicationRunsError>>;
3041
3042    /// <p>Describes the servers in your server catalog.</p> <p>Before you can describe your servers, you must import them using <a>ImportServerCatalog</a>.</p>
3043    async fn get_servers(
3044        &self,
3045        input: GetServersRequest,
3046    ) -> Result<GetServersResponse, RusotoError<GetServersError>>;
3047
3048    /// <p>Gathers a complete list of on-premises servers. Connectors must be installed and monitoring all servers that you want to import.</p> <p>This call returns immediately, but might take additional time to retrieve all the servers.</p>
3049    async fn import_server_catalog(
3050        &self,
3051    ) -> Result<ImportServerCatalogResponse, RusotoError<ImportServerCatalogError>>;
3052
3053    /// <p>Launches an application stack.</p>
3054    async fn launch_app(
3055        &self,
3056        input: LaunchAppRequest,
3057    ) -> Result<LaunchAppResponse, RusotoError<LaunchAppError>>;
3058
3059    /// <p>Returns a list of summaries for all applications.</p>
3060    async fn list_apps(
3061        &self,
3062        input: ListAppsRequest,
3063    ) -> Result<ListAppsResponse, RusotoError<ListAppsError>>;
3064
3065    /// <p>Creates a launch configuration for an application.</p>
3066    async fn put_app_launch_configuration(
3067        &self,
3068        input: PutAppLaunchConfigurationRequest,
3069    ) -> Result<PutAppLaunchConfigurationResponse, RusotoError<PutAppLaunchConfigurationError>>;
3070
3071    /// <p>Creates or updates a replication configuration for an application.</p>
3072    async fn put_app_replication_configuration(
3073        &self,
3074        input: PutAppReplicationConfigurationRequest,
3075    ) -> Result<
3076        PutAppReplicationConfigurationResponse,
3077        RusotoError<PutAppReplicationConfigurationError>,
3078    >;
3079
3080    /// <p>Starts replicating an application.</p>
3081    async fn start_app_replication(
3082        &self,
3083        input: StartAppReplicationRequest,
3084    ) -> Result<StartAppReplicationResponse, RusotoError<StartAppReplicationError>>;
3085
3086    /// <p>Starts an on-demand replication run for the specified replication job. This replication run starts immediately. This replication run is in addition to the ones already scheduled.</p> <p>There is a limit on the number of on-demand replications runs you can request in a 24-hour period.</p>
3087    async fn start_on_demand_replication_run(
3088        &self,
3089        input: StartOnDemandReplicationRunRequest,
3090    ) -> Result<StartOnDemandReplicationRunResponse, RusotoError<StartOnDemandReplicationRunError>>;
3091
3092    /// <p>Stops replicating an application.</p>
3093    async fn stop_app_replication(
3094        &self,
3095        input: StopAppReplicationRequest,
3096    ) -> Result<StopAppReplicationResponse, RusotoError<StopAppReplicationError>>;
3097
3098    /// <p>Terminates the stack for an application.</p>
3099    async fn terminate_app(
3100        &self,
3101        input: TerminateAppRequest,
3102    ) -> Result<TerminateAppResponse, RusotoError<TerminateAppError>>;
3103
3104    /// <p>Updates an application.</p>
3105    async fn update_app(
3106        &self,
3107        input: UpdateAppRequest,
3108    ) -> Result<UpdateAppResponse, RusotoError<UpdateAppError>>;
3109
3110    /// <p>Updates the specified settings for the specified replication job.</p>
3111    async fn update_replication_job(
3112        &self,
3113        input: UpdateReplicationJobRequest,
3114    ) -> Result<UpdateReplicationJobResponse, RusotoError<UpdateReplicationJobError>>;
3115}
3116/// A client for the SMS API.
3117#[derive(Clone)]
3118pub struct ServerMigrationServiceClient {
3119    client: Client,
3120    region: region::Region,
3121}
3122
3123impl ServerMigrationServiceClient {
3124    /// Creates a client backed by the default tokio event loop.
3125    ///
3126    /// The client will use the default credentials provider and tls client.
3127    pub fn new(region: region::Region) -> ServerMigrationServiceClient {
3128        ServerMigrationServiceClient {
3129            client: Client::shared(),
3130            region,
3131        }
3132    }
3133
3134    pub fn new_with<P, D>(
3135        request_dispatcher: D,
3136        credentials_provider: P,
3137        region: region::Region,
3138    ) -> ServerMigrationServiceClient
3139    where
3140        P: ProvideAwsCredentials + Send + Sync + 'static,
3141        D: DispatchSignedRequest + Send + Sync + 'static,
3142    {
3143        ServerMigrationServiceClient {
3144            client: Client::new_with(credentials_provider, request_dispatcher),
3145            region,
3146        }
3147    }
3148
3149    pub fn new_with_client(client: Client, region: region::Region) -> ServerMigrationServiceClient {
3150        ServerMigrationServiceClient { client, region }
3151    }
3152}
3153
3154#[async_trait]
3155impl ServerMigrationService for ServerMigrationServiceClient {
3156    /// <p>Creates an application. An application consists of one or more server groups. Each server group contain one or more servers.</p>
3157    async fn create_app(
3158        &self,
3159        input: CreateAppRequest,
3160    ) -> Result<CreateAppResponse, RusotoError<CreateAppError>> {
3161        let mut request = self.new_signed_request("POST", "/");
3162        request.add_header(
3163            "x-amz-target",
3164            "AWSServerMigrationService_V2016_10_24.CreateApp",
3165        );
3166        let encoded = serde_json::to_string(&input).unwrap();
3167        request.set_payload(Some(encoded));
3168
3169        let response = self
3170            .sign_and_dispatch(request, CreateAppError::from_response)
3171            .await?;
3172        let mut response = response;
3173        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3174        proto::json::ResponsePayload::new(&response).deserialize::<CreateAppResponse, _>()
3175    }
3176
3177    /// <p>Creates a replication job. The replication job schedules periodic replication runs to replicate your server to AWS. Each replication run creates an Amazon Machine Image (AMI).</p>
3178    async fn create_replication_job(
3179        &self,
3180        input: CreateReplicationJobRequest,
3181    ) -> Result<CreateReplicationJobResponse, RusotoError<CreateReplicationJobError>> {
3182        let mut request = self.new_signed_request("POST", "/");
3183        request.add_header(
3184            "x-amz-target",
3185            "AWSServerMigrationService_V2016_10_24.CreateReplicationJob",
3186        );
3187        let encoded = serde_json::to_string(&input).unwrap();
3188        request.set_payload(Some(encoded));
3189
3190        let response = self
3191            .sign_and_dispatch(request, CreateReplicationJobError::from_response)
3192            .await?;
3193        let mut response = response;
3194        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3195        proto::json::ResponsePayload::new(&response)
3196            .deserialize::<CreateReplicationJobResponse, _>()
3197    }
3198
3199    /// <p>Deletes an existing application. Optionally deletes the launched stack associated with the application and all AWS SMS replication jobs for servers in the application.</p>
3200    async fn delete_app(
3201        &self,
3202        input: DeleteAppRequest,
3203    ) -> Result<DeleteAppResponse, RusotoError<DeleteAppError>> {
3204        let mut request = self.new_signed_request("POST", "/");
3205        request.add_header(
3206            "x-amz-target",
3207            "AWSServerMigrationService_V2016_10_24.DeleteApp",
3208        );
3209        let encoded = serde_json::to_string(&input).unwrap();
3210        request.set_payload(Some(encoded));
3211
3212        let response = self
3213            .sign_and_dispatch(request, DeleteAppError::from_response)
3214            .await?;
3215        let mut response = response;
3216        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3217        proto::json::ResponsePayload::new(&response).deserialize::<DeleteAppResponse, _>()
3218    }
3219
3220    /// <p>Deletes existing launch configuration for an application.</p>
3221    async fn delete_app_launch_configuration(
3222        &self,
3223        input: DeleteAppLaunchConfigurationRequest,
3224    ) -> Result<DeleteAppLaunchConfigurationResponse, RusotoError<DeleteAppLaunchConfigurationError>>
3225    {
3226        let mut request = self.new_signed_request("POST", "/");
3227        request.add_header(
3228            "x-amz-target",
3229            "AWSServerMigrationService_V2016_10_24.DeleteAppLaunchConfiguration",
3230        );
3231        let encoded = serde_json::to_string(&input).unwrap();
3232        request.set_payload(Some(encoded));
3233
3234        let response = self
3235            .sign_and_dispatch(request, DeleteAppLaunchConfigurationError::from_response)
3236            .await?;
3237        let mut response = response;
3238        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3239        proto::json::ResponsePayload::new(&response)
3240            .deserialize::<DeleteAppLaunchConfigurationResponse, _>()
3241    }
3242
3243    /// <p>Deletes existing replication configuration for an application.</p>
3244    async fn delete_app_replication_configuration(
3245        &self,
3246        input: DeleteAppReplicationConfigurationRequest,
3247    ) -> Result<
3248        DeleteAppReplicationConfigurationResponse,
3249        RusotoError<DeleteAppReplicationConfigurationError>,
3250    > {
3251        let mut request = self.new_signed_request("POST", "/");
3252        request.add_header(
3253            "x-amz-target",
3254            "AWSServerMigrationService_V2016_10_24.DeleteAppReplicationConfiguration",
3255        );
3256        let encoded = serde_json::to_string(&input).unwrap();
3257        request.set_payload(Some(encoded));
3258
3259        let response = self
3260            .sign_and_dispatch(
3261                request,
3262                DeleteAppReplicationConfigurationError::from_response,
3263            )
3264            .await?;
3265        let mut response = response;
3266        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3267        proto::json::ResponsePayload::new(&response)
3268            .deserialize::<DeleteAppReplicationConfigurationResponse, _>()
3269    }
3270
3271    /// <p>Deletes the specified replication job.</p> <p>After you delete a replication job, there are no further replication runs. AWS deletes the contents of the Amazon S3 bucket used to store AWS SMS artifacts. The AMIs created by the replication runs are not deleted.</p>
3272    async fn delete_replication_job(
3273        &self,
3274        input: DeleteReplicationJobRequest,
3275    ) -> Result<DeleteReplicationJobResponse, RusotoError<DeleteReplicationJobError>> {
3276        let mut request = self.new_signed_request("POST", "/");
3277        request.add_header(
3278            "x-amz-target",
3279            "AWSServerMigrationService_V2016_10_24.DeleteReplicationJob",
3280        );
3281        let encoded = serde_json::to_string(&input).unwrap();
3282        request.set_payload(Some(encoded));
3283
3284        let response = self
3285            .sign_and_dispatch(request, DeleteReplicationJobError::from_response)
3286            .await?;
3287        let mut response = response;
3288        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3289        proto::json::ResponsePayload::new(&response)
3290            .deserialize::<DeleteReplicationJobResponse, _>()
3291    }
3292
3293    /// <p>Deletes all servers from your server catalog.</p>
3294    async fn delete_server_catalog(
3295        &self,
3296    ) -> Result<DeleteServerCatalogResponse, RusotoError<DeleteServerCatalogError>> {
3297        let mut request = self.new_signed_request("POST", "/");
3298        request.add_header(
3299            "x-amz-target",
3300            "AWSServerMigrationService_V2016_10_24.DeleteServerCatalog",
3301        );
3302        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
3303
3304        let response = self
3305            .sign_and_dispatch(request, DeleteServerCatalogError::from_response)
3306            .await?;
3307        let mut response = response;
3308        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3309        proto::json::ResponsePayload::new(&response).deserialize::<DeleteServerCatalogResponse, _>()
3310    }
3311
3312    /// <p>Disassociates the specified connector from AWS SMS.</p> <p>After you disassociate a connector, it is no longer available to support replication jobs.</p>
3313    async fn disassociate_connector(
3314        &self,
3315        input: DisassociateConnectorRequest,
3316    ) -> Result<DisassociateConnectorResponse, RusotoError<DisassociateConnectorError>> {
3317        let mut request = self.new_signed_request("POST", "/");
3318        request.add_header(
3319            "x-amz-target",
3320            "AWSServerMigrationService_V2016_10_24.DisassociateConnector",
3321        );
3322        let encoded = serde_json::to_string(&input).unwrap();
3323        request.set_payload(Some(encoded));
3324
3325        let response = self
3326            .sign_and_dispatch(request, DisassociateConnectorError::from_response)
3327            .await?;
3328        let mut response = response;
3329        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3330        proto::json::ResponsePayload::new(&response)
3331            .deserialize::<DisassociateConnectorResponse, _>()
3332    }
3333
3334    /// <p>Generates a target change set for a currently launched stack and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.</p>
3335    async fn generate_change_set(
3336        &self,
3337        input: GenerateChangeSetRequest,
3338    ) -> Result<GenerateChangeSetResponse, RusotoError<GenerateChangeSetError>> {
3339        let mut request = self.new_signed_request("POST", "/");
3340        request.add_header(
3341            "x-amz-target",
3342            "AWSServerMigrationService_V2016_10_24.GenerateChangeSet",
3343        );
3344        let encoded = serde_json::to_string(&input).unwrap();
3345        request.set_payload(Some(encoded));
3346
3347        let response = self
3348            .sign_and_dispatch(request, GenerateChangeSetError::from_response)
3349            .await?;
3350        let mut response = response;
3351        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3352        proto::json::ResponsePayload::new(&response).deserialize::<GenerateChangeSetResponse, _>()
3353    }
3354
3355    /// <p>Generates an Amazon CloudFormation template based on the current launch configuration and writes it to an Amazon S3 object in the customer’s Amazon S3 bucket.</p>
3356    async fn generate_template(
3357        &self,
3358        input: GenerateTemplateRequest,
3359    ) -> Result<GenerateTemplateResponse, RusotoError<GenerateTemplateError>> {
3360        let mut request = self.new_signed_request("POST", "/");
3361        request.add_header(
3362            "x-amz-target",
3363            "AWSServerMigrationService_V2016_10_24.GenerateTemplate",
3364        );
3365        let encoded = serde_json::to_string(&input).unwrap();
3366        request.set_payload(Some(encoded));
3367
3368        let response = self
3369            .sign_and_dispatch(request, GenerateTemplateError::from_response)
3370            .await?;
3371        let mut response = response;
3372        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3373        proto::json::ResponsePayload::new(&response).deserialize::<GenerateTemplateResponse, _>()
3374    }
3375
3376    /// <p>Retrieve information about an application.</p>
3377    async fn get_app(
3378        &self,
3379        input: GetAppRequest,
3380    ) -> Result<GetAppResponse, RusotoError<GetAppError>> {
3381        let mut request = self.new_signed_request("POST", "/");
3382        request.add_header(
3383            "x-amz-target",
3384            "AWSServerMigrationService_V2016_10_24.GetApp",
3385        );
3386        let encoded = serde_json::to_string(&input).unwrap();
3387        request.set_payload(Some(encoded));
3388
3389        let response = self
3390            .sign_and_dispatch(request, GetAppError::from_response)
3391            .await?;
3392        let mut response = response;
3393        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3394        proto::json::ResponsePayload::new(&response).deserialize::<GetAppResponse, _>()
3395    }
3396
3397    /// <p>Retrieves the application launch configuration associated with an application.</p>
3398    async fn get_app_launch_configuration(
3399        &self,
3400        input: GetAppLaunchConfigurationRequest,
3401    ) -> Result<GetAppLaunchConfigurationResponse, RusotoError<GetAppLaunchConfigurationError>>
3402    {
3403        let mut request = self.new_signed_request("POST", "/");
3404        request.add_header(
3405            "x-amz-target",
3406            "AWSServerMigrationService_V2016_10_24.GetAppLaunchConfiguration",
3407        );
3408        let encoded = serde_json::to_string(&input).unwrap();
3409        request.set_payload(Some(encoded));
3410
3411        let response = self
3412            .sign_and_dispatch(request, GetAppLaunchConfigurationError::from_response)
3413            .await?;
3414        let mut response = response;
3415        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3416        proto::json::ResponsePayload::new(&response)
3417            .deserialize::<GetAppLaunchConfigurationResponse, _>()
3418    }
3419
3420    /// <p>Retrieves an application replication configuration associatd with an application.</p>
3421    async fn get_app_replication_configuration(
3422        &self,
3423        input: GetAppReplicationConfigurationRequest,
3424    ) -> Result<
3425        GetAppReplicationConfigurationResponse,
3426        RusotoError<GetAppReplicationConfigurationError>,
3427    > {
3428        let mut request = self.new_signed_request("POST", "/");
3429        request.add_header(
3430            "x-amz-target",
3431            "AWSServerMigrationService_V2016_10_24.GetAppReplicationConfiguration",
3432        );
3433        let encoded = serde_json::to_string(&input).unwrap();
3434        request.set_payload(Some(encoded));
3435
3436        let response = self
3437            .sign_and_dispatch(request, GetAppReplicationConfigurationError::from_response)
3438            .await?;
3439        let mut response = response;
3440        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3441        proto::json::ResponsePayload::new(&response)
3442            .deserialize::<GetAppReplicationConfigurationResponse, _>()
3443    }
3444
3445    /// <p>Describes the connectors registered with the AWS SMS.</p>
3446    async fn get_connectors(
3447        &self,
3448        input: GetConnectorsRequest,
3449    ) -> Result<GetConnectorsResponse, RusotoError<GetConnectorsError>> {
3450        let mut request = self.new_signed_request("POST", "/");
3451        request.add_header(
3452            "x-amz-target",
3453            "AWSServerMigrationService_V2016_10_24.GetConnectors",
3454        );
3455        let encoded = serde_json::to_string(&input).unwrap();
3456        request.set_payload(Some(encoded));
3457
3458        let response = self
3459            .sign_and_dispatch(request, GetConnectorsError::from_response)
3460            .await?;
3461        let mut response = response;
3462        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3463        proto::json::ResponsePayload::new(&response).deserialize::<GetConnectorsResponse, _>()
3464    }
3465
3466    /// <p>Describes the specified replication job or all of your replication jobs.</p>
3467    async fn get_replication_jobs(
3468        &self,
3469        input: GetReplicationJobsRequest,
3470    ) -> Result<GetReplicationJobsResponse, RusotoError<GetReplicationJobsError>> {
3471        let mut request = self.new_signed_request("POST", "/");
3472        request.add_header(
3473            "x-amz-target",
3474            "AWSServerMigrationService_V2016_10_24.GetReplicationJobs",
3475        );
3476        let encoded = serde_json::to_string(&input).unwrap();
3477        request.set_payload(Some(encoded));
3478
3479        let response = self
3480            .sign_and_dispatch(request, GetReplicationJobsError::from_response)
3481            .await?;
3482        let mut response = response;
3483        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3484        proto::json::ResponsePayload::new(&response).deserialize::<GetReplicationJobsResponse, _>()
3485    }
3486
3487    /// <p>Describes the replication runs for the specified replication job.</p>
3488    async fn get_replication_runs(
3489        &self,
3490        input: GetReplicationRunsRequest,
3491    ) -> Result<GetReplicationRunsResponse, RusotoError<GetReplicationRunsError>> {
3492        let mut request = self.new_signed_request("POST", "/");
3493        request.add_header(
3494            "x-amz-target",
3495            "AWSServerMigrationService_V2016_10_24.GetReplicationRuns",
3496        );
3497        let encoded = serde_json::to_string(&input).unwrap();
3498        request.set_payload(Some(encoded));
3499
3500        let response = self
3501            .sign_and_dispatch(request, GetReplicationRunsError::from_response)
3502            .await?;
3503        let mut response = response;
3504        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3505        proto::json::ResponsePayload::new(&response).deserialize::<GetReplicationRunsResponse, _>()
3506    }
3507
3508    /// <p>Describes the servers in your server catalog.</p> <p>Before you can describe your servers, you must import them using <a>ImportServerCatalog</a>.</p>
3509    async fn get_servers(
3510        &self,
3511        input: GetServersRequest,
3512    ) -> Result<GetServersResponse, RusotoError<GetServersError>> {
3513        let mut request = self.new_signed_request("POST", "/");
3514        request.add_header(
3515            "x-amz-target",
3516            "AWSServerMigrationService_V2016_10_24.GetServers",
3517        );
3518        let encoded = serde_json::to_string(&input).unwrap();
3519        request.set_payload(Some(encoded));
3520
3521        let response = self
3522            .sign_and_dispatch(request, GetServersError::from_response)
3523            .await?;
3524        let mut response = response;
3525        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3526        proto::json::ResponsePayload::new(&response).deserialize::<GetServersResponse, _>()
3527    }
3528
3529    /// <p>Gathers a complete list of on-premises servers. Connectors must be installed and monitoring all servers that you want to import.</p> <p>This call returns immediately, but might take additional time to retrieve all the servers.</p>
3530    async fn import_server_catalog(
3531        &self,
3532    ) -> Result<ImportServerCatalogResponse, RusotoError<ImportServerCatalogError>> {
3533        let mut request = self.new_signed_request("POST", "/");
3534        request.add_header(
3535            "x-amz-target",
3536            "AWSServerMigrationService_V2016_10_24.ImportServerCatalog",
3537        );
3538        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
3539
3540        let response = self
3541            .sign_and_dispatch(request, ImportServerCatalogError::from_response)
3542            .await?;
3543        let mut response = response;
3544        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3545        proto::json::ResponsePayload::new(&response).deserialize::<ImportServerCatalogResponse, _>()
3546    }
3547
3548    /// <p>Launches an application stack.</p>
3549    async fn launch_app(
3550        &self,
3551        input: LaunchAppRequest,
3552    ) -> Result<LaunchAppResponse, RusotoError<LaunchAppError>> {
3553        let mut request = self.new_signed_request("POST", "/");
3554        request.add_header(
3555            "x-amz-target",
3556            "AWSServerMigrationService_V2016_10_24.LaunchApp",
3557        );
3558        let encoded = serde_json::to_string(&input).unwrap();
3559        request.set_payload(Some(encoded));
3560
3561        let response = self
3562            .sign_and_dispatch(request, LaunchAppError::from_response)
3563            .await?;
3564        let mut response = response;
3565        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3566        proto::json::ResponsePayload::new(&response).deserialize::<LaunchAppResponse, _>()
3567    }
3568
3569    /// <p>Returns a list of summaries for all applications.</p>
3570    async fn list_apps(
3571        &self,
3572        input: ListAppsRequest,
3573    ) -> Result<ListAppsResponse, RusotoError<ListAppsError>> {
3574        let mut request = self.new_signed_request("POST", "/");
3575        request.add_header(
3576            "x-amz-target",
3577            "AWSServerMigrationService_V2016_10_24.ListApps",
3578        );
3579        let encoded = serde_json::to_string(&input).unwrap();
3580        request.set_payload(Some(encoded));
3581
3582        let response = self
3583            .sign_and_dispatch(request, ListAppsError::from_response)
3584            .await?;
3585        let mut response = response;
3586        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3587        proto::json::ResponsePayload::new(&response).deserialize::<ListAppsResponse, _>()
3588    }
3589
3590    /// <p>Creates a launch configuration for an application.</p>
3591    async fn put_app_launch_configuration(
3592        &self,
3593        input: PutAppLaunchConfigurationRequest,
3594    ) -> Result<PutAppLaunchConfigurationResponse, RusotoError<PutAppLaunchConfigurationError>>
3595    {
3596        let mut request = self.new_signed_request("POST", "/");
3597        request.add_header(
3598            "x-amz-target",
3599            "AWSServerMigrationService_V2016_10_24.PutAppLaunchConfiguration",
3600        );
3601        let encoded = serde_json::to_string(&input).unwrap();
3602        request.set_payload(Some(encoded));
3603
3604        let response = self
3605            .sign_and_dispatch(request, PutAppLaunchConfigurationError::from_response)
3606            .await?;
3607        let mut response = response;
3608        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3609        proto::json::ResponsePayload::new(&response)
3610            .deserialize::<PutAppLaunchConfigurationResponse, _>()
3611    }
3612
3613    /// <p>Creates or updates a replication configuration for an application.</p>
3614    async fn put_app_replication_configuration(
3615        &self,
3616        input: PutAppReplicationConfigurationRequest,
3617    ) -> Result<
3618        PutAppReplicationConfigurationResponse,
3619        RusotoError<PutAppReplicationConfigurationError>,
3620    > {
3621        let mut request = self.new_signed_request("POST", "/");
3622        request.add_header(
3623            "x-amz-target",
3624            "AWSServerMigrationService_V2016_10_24.PutAppReplicationConfiguration",
3625        );
3626        let encoded = serde_json::to_string(&input).unwrap();
3627        request.set_payload(Some(encoded));
3628
3629        let response = self
3630            .sign_and_dispatch(request, PutAppReplicationConfigurationError::from_response)
3631            .await?;
3632        let mut response = response;
3633        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3634        proto::json::ResponsePayload::new(&response)
3635            .deserialize::<PutAppReplicationConfigurationResponse, _>()
3636    }
3637
3638    /// <p>Starts replicating an application.</p>
3639    async fn start_app_replication(
3640        &self,
3641        input: StartAppReplicationRequest,
3642    ) -> Result<StartAppReplicationResponse, RusotoError<StartAppReplicationError>> {
3643        let mut request = self.new_signed_request("POST", "/");
3644        request.add_header(
3645            "x-amz-target",
3646            "AWSServerMigrationService_V2016_10_24.StartAppReplication",
3647        );
3648        let encoded = serde_json::to_string(&input).unwrap();
3649        request.set_payload(Some(encoded));
3650
3651        let response = self
3652            .sign_and_dispatch(request, StartAppReplicationError::from_response)
3653            .await?;
3654        let mut response = response;
3655        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3656        proto::json::ResponsePayload::new(&response).deserialize::<StartAppReplicationResponse, _>()
3657    }
3658
3659    /// <p>Starts an on-demand replication run for the specified replication job. This replication run starts immediately. This replication run is in addition to the ones already scheduled.</p> <p>There is a limit on the number of on-demand replications runs you can request in a 24-hour period.</p>
3660    async fn start_on_demand_replication_run(
3661        &self,
3662        input: StartOnDemandReplicationRunRequest,
3663    ) -> Result<StartOnDemandReplicationRunResponse, RusotoError<StartOnDemandReplicationRunError>>
3664    {
3665        let mut request = self.new_signed_request("POST", "/");
3666        request.add_header(
3667            "x-amz-target",
3668            "AWSServerMigrationService_V2016_10_24.StartOnDemandReplicationRun",
3669        );
3670        let encoded = serde_json::to_string(&input).unwrap();
3671        request.set_payload(Some(encoded));
3672
3673        let response = self
3674            .sign_and_dispatch(request, StartOnDemandReplicationRunError::from_response)
3675            .await?;
3676        let mut response = response;
3677        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3678        proto::json::ResponsePayload::new(&response)
3679            .deserialize::<StartOnDemandReplicationRunResponse, _>()
3680    }
3681
3682    /// <p>Stops replicating an application.</p>
3683    async fn stop_app_replication(
3684        &self,
3685        input: StopAppReplicationRequest,
3686    ) -> Result<StopAppReplicationResponse, RusotoError<StopAppReplicationError>> {
3687        let mut request = self.new_signed_request("POST", "/");
3688        request.add_header(
3689            "x-amz-target",
3690            "AWSServerMigrationService_V2016_10_24.StopAppReplication",
3691        );
3692        let encoded = serde_json::to_string(&input).unwrap();
3693        request.set_payload(Some(encoded));
3694
3695        let response = self
3696            .sign_and_dispatch(request, StopAppReplicationError::from_response)
3697            .await?;
3698        let mut response = response;
3699        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3700        proto::json::ResponsePayload::new(&response).deserialize::<StopAppReplicationResponse, _>()
3701    }
3702
3703    /// <p>Terminates the stack for an application.</p>
3704    async fn terminate_app(
3705        &self,
3706        input: TerminateAppRequest,
3707    ) -> Result<TerminateAppResponse, RusotoError<TerminateAppError>> {
3708        let mut request = self.new_signed_request("POST", "/");
3709        request.add_header(
3710            "x-amz-target",
3711            "AWSServerMigrationService_V2016_10_24.TerminateApp",
3712        );
3713        let encoded = serde_json::to_string(&input).unwrap();
3714        request.set_payload(Some(encoded));
3715
3716        let response = self
3717            .sign_and_dispatch(request, TerminateAppError::from_response)
3718            .await?;
3719        let mut response = response;
3720        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3721        proto::json::ResponsePayload::new(&response).deserialize::<TerminateAppResponse, _>()
3722    }
3723
3724    /// <p>Updates an application.</p>
3725    async fn update_app(
3726        &self,
3727        input: UpdateAppRequest,
3728    ) -> Result<UpdateAppResponse, RusotoError<UpdateAppError>> {
3729        let mut request = self.new_signed_request("POST", "/");
3730        request.add_header(
3731            "x-amz-target",
3732            "AWSServerMigrationService_V2016_10_24.UpdateApp",
3733        );
3734        let encoded = serde_json::to_string(&input).unwrap();
3735        request.set_payload(Some(encoded));
3736
3737        let response = self
3738            .sign_and_dispatch(request, UpdateAppError::from_response)
3739            .await?;
3740        let mut response = response;
3741        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3742        proto::json::ResponsePayload::new(&response).deserialize::<UpdateAppResponse, _>()
3743    }
3744
3745    /// <p>Updates the specified settings for the specified replication job.</p>
3746    async fn update_replication_job(
3747        &self,
3748        input: UpdateReplicationJobRequest,
3749    ) -> Result<UpdateReplicationJobResponse, RusotoError<UpdateReplicationJobError>> {
3750        let mut request = self.new_signed_request("POST", "/");
3751        request.add_header(
3752            "x-amz-target",
3753            "AWSServerMigrationService_V2016_10_24.UpdateReplicationJob",
3754        );
3755        let encoded = serde_json::to_string(&input).unwrap();
3756        request.set_payload(Some(encoded));
3757
3758        let response = self
3759            .sign_and_dispatch(request, UpdateReplicationJobError::from_response)
3760            .await?;
3761        let mut response = response;
3762        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3763        proto::json::ResponsePayload::new(&response)
3764            .deserialize::<UpdateReplicationJobResponse, _>()
3765    }
3766}