use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AppSummary {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "creationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub creation_time: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "lastModified")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified: Option<f64>,
#[serde(rename = "latestReplicationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_replication_time: Option<f64>,
#[serde(rename = "launchDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_details: Option<LaunchDetails>,
#[serde(rename = "launchStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_status: Option<String>,
#[serde(rename = "launchStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_status_message: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "replicationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_status: Option<String>,
#[serde(rename = "replicationStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_status_message: Option<String>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "statusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_message: Option<String>,
#[serde(rename = "totalServerGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_server_groups: Option<i64>,
#[serde(rename = "totalServers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub total_servers: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Connector {
#[serde(rename = "associatedOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_on: Option<f64>,
#[serde(rename = "capabilityList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capability_list: Option<Vec<String>>,
#[serde(rename = "connectorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_id: Option<String>,
#[serde(rename = "ipAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
#[serde(rename = "macAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mac_address: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
#[serde(rename = "vmManagerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_id: Option<String>,
#[serde(rename = "vmManagerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_name: Option<String>,
#[serde(rename = "vmManagerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAppRequest {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "serverGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_groups: Option<Vec<ServerGroup>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAppResponse {
#[serde(rename = "appSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_summary: Option<AppSummary>,
#[serde(rename = "serverGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_groups: Option<Vec<ServerGroup>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateReplicationJobRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<i64>,
#[serde(rename = "kmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "licenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "numberOfRecentAmisToKeep")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_recent_amis_to_keep: Option<i64>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "runOnce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_once: Option<bool>,
#[serde(rename = "seedReplicationTime")]
pub seed_replication_time: f64,
#[serde(rename = "serverId")]
pub server_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateReplicationJobResponse {
#[serde(rename = "replicationJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAppLaunchConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAppLaunchConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAppReplicationConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAppReplicationConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAppRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "forceStopAppReplication")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_stop_app_replication: Option<bool>,
#[serde(rename = "forceTerminateApp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub force_terminate_app: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteAppResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteReplicationJobRequest {
#[serde(rename = "replicationJobId")]
pub replication_job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteReplicationJobResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteServerCatalogRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteServerCatalogResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateConnectorRequest {
#[serde(rename = "connectorId")]
pub connector_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateConnectorResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GenerateChangeSetRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "changesetFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub changeset_format: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GenerateChangeSetResponse {
#[serde(rename = "s3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_location: Option<S3Location>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GenerateTemplateRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "templateFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_format: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GenerateTemplateResponse {
#[serde(rename = "s3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_location: Option<S3Location>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAppLaunchConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAppLaunchConfigurationResponse {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "serverGroupLaunchConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_launch_configurations: Option<Vec<ServerGroupLaunchConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAppReplicationConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAppReplicationConfigurationResponse {
#[serde(rename = "serverGroupReplicationConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_replication_configurations: Option<Vec<ServerGroupReplicationConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAppRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAppResponse {
#[serde(rename = "appSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_summary: Option<AppSummary>,
#[serde(rename = "serverGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_groups: Option<Vec<ServerGroup>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetConnectorsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetConnectorsResponse {
#[serde(rename = "connectorList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_list: Option<Vec<Connector>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetReplicationJobsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "replicationJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetReplicationJobsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "replicationJobList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_list: Option<Vec<ReplicationJob>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetReplicationRunsRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "replicationJobId")]
pub replication_job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetReplicationRunsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "replicationJob")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job: Option<ReplicationJob>,
#[serde(rename = "replicationRunList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_run_list: Option<Vec<ReplicationRun>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetServersRequest {
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "vmServerAddressList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_server_address_list: Option<Vec<VmServerAddress>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetServersResponse {
#[serde(rename = "lastModifiedOn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_modified_on: Option<f64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "serverCatalogStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_catalog_status: Option<String>,
#[serde(rename = "serverList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_list: Option<Vec<Server>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ImportServerCatalogRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImportServerCatalogResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct LaunchAppRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LaunchAppResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LaunchDetails {
#[serde(rename = "latestLaunchTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_launch_time: Option<f64>,
#[serde(rename = "stackId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack_id: Option<String>,
#[serde(rename = "stackName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAppsRequest {
#[serde(rename = "appIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_ids: Option<Vec<String>>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAppsResponse {
#[serde(rename = "apps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub apps: Option<Vec<AppSummary>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutAppLaunchConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "serverGroupLaunchConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_launch_configurations: Option<Vec<ServerGroupLaunchConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutAppLaunchConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct PutAppReplicationConfigurationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "serverGroupReplicationConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_replication_configurations: Option<Vec<ServerGroupReplicationConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct PutAppReplicationConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ReplicationJob {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<i64>,
#[serde(rename = "kmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "latestAmiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latest_ami_id: Option<String>,
#[serde(rename = "licenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "nextReplicationRunStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_replication_run_start_time: Option<f64>,
#[serde(rename = "numberOfRecentAmisToKeep")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_recent_amis_to_keep: Option<i64>,
#[serde(rename = "replicationJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_id: Option<String>,
#[serde(rename = "replicationRunList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_run_list: Option<Vec<ReplicationRun>>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "runOnce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_once: Option<bool>,
#[serde(rename = "seedReplicationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub seed_replication_time: Option<f64>,
#[serde(rename = "serverId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_id: Option<String>,
#[serde(rename = "serverType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_type: Option<String>,
#[serde(rename = "state")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "statusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_message: Option<String>,
#[serde(rename = "vmServer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_server: Option<VmServer>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ReplicationRun {
#[serde(rename = "amiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ami_id: Option<String>,
#[serde(rename = "completedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub completed_time: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "kmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "replicationRunId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_run_id: Option<String>,
#[serde(rename = "scheduledStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheduled_start_time: Option<f64>,
#[serde(rename = "stageDetails")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_details: Option<ReplicationRunStageDetails>,
#[serde(rename = "state")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "statusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_message: Option<String>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ReplicationRunStageDetails {
#[serde(rename = "stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
#[serde(rename = "stageProgress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_progress: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct S3Location {
#[serde(rename = "bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bucket: Option<String>,
#[serde(rename = "key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Server {
#[serde(rename = "replicationJobId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_id: Option<String>,
#[serde(rename = "replicationJobTerminated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_job_terminated: Option<bool>,
#[serde(rename = "serverId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_id: Option<String>,
#[serde(rename = "serverType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_type: Option<String>,
#[serde(rename = "vmServer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_server: Option<VmServer>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerGroup {
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "serverGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_id: Option<String>,
#[serde(rename = "serverList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_list: Option<Vec<Server>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerGroupLaunchConfiguration {
#[serde(rename = "launchOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_order: Option<i64>,
#[serde(rename = "serverGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_id: Option<String>,
#[serde(rename = "serverLaunchConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_launch_configurations: Option<Vec<ServerLaunchConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerGroupReplicationConfiguration {
#[serde(rename = "serverGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_group_id: Option<String>,
#[serde(rename = "serverReplicationConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_replication_configurations: Option<Vec<ServerReplicationConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerLaunchConfiguration {
#[serde(rename = "associatePublicIpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associate_public_ip_address: Option<bool>,
#[serde(rename = "ec2KeyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ec_2_key_name: Option<String>,
#[serde(rename = "instanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option<String>,
#[serde(rename = "logicalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logical_id: Option<String>,
#[serde(rename = "securityGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group: Option<String>,
#[serde(rename = "server")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server: Option<Server>,
#[serde(rename = "subnet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet: Option<String>,
#[serde(rename = "userData")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_data: Option<UserData>,
#[serde(rename = "vpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerReplicationConfiguration {
#[serde(rename = "server")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server: Option<Server>,
#[serde(rename = "serverReplicationParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_replication_parameters: Option<ServerReplicationParameters>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServerReplicationParameters {
#[serde(rename = "encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<i64>,
#[serde(rename = "kmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "licenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "numberOfRecentAmisToKeep")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_recent_amis_to_keep: Option<i64>,
#[serde(rename = "runOnce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub run_once: Option<bool>,
#[serde(rename = "seedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub seed_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartAppReplicationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartAppReplicationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartOnDemandReplicationRunRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "replicationJobId")]
pub replication_job_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartOnDemandReplicationRunResponse {
#[serde(rename = "replicationRunId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_run_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopAppReplicationRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopAppReplicationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TerminateAppRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TerminateAppResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAppRequest {
#[serde(rename = "appId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
#[serde(rename = "serverGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_groups: Option<Vec<ServerGroup>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAppResponse {
#[serde(rename = "appSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub app_summary: Option<AppSummary>,
#[serde(rename = "serverGroups")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_groups: Option<Vec<ServerGroup>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateReplicationJobRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "encrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub encrypted: Option<bool>,
#[serde(rename = "frequency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub frequency: Option<i64>,
#[serde(rename = "kmsKeyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub kms_key_id: Option<String>,
#[serde(rename = "licenseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub license_type: Option<String>,
#[serde(rename = "nextReplicationRunStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_replication_run_start_time: Option<f64>,
#[serde(rename = "numberOfRecentAmisToKeep")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_recent_amis_to_keep: Option<i64>,
#[serde(rename = "replicationJobId")]
pub replication_job_id: String,
#[serde(rename = "roleName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub role_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateReplicationJobResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserData {
#[serde(rename = "s3Location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_location: Option<S3Location>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VmServer {
#[serde(rename = "vmManagerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_name: Option<String>,
#[serde(rename = "vmManagerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_type: Option<String>,
#[serde(rename = "vmName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_name: Option<String>,
#[serde(rename = "vmPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_path: Option<String>,
#[serde(rename = "vmServerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_server_address: Option<VmServerAddress>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VmServerAddress {
#[serde(rename = "vmId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_id: Option<String>,
#[serde(rename = "vmManagerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vm_manager_id: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum CreateAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl CreateAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(CreateAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(CreateAppError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(CreateAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAppError {
fn description(&self) -> &str {
match *self {
CreateAppError::InternalError(ref cause) => cause,
CreateAppError::InvalidParameter(ref cause) => cause,
CreateAppError::MissingRequiredParameter(ref cause) => cause,
CreateAppError::OperationNotPermitted(ref cause) => cause,
CreateAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateReplicationJobError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
NoConnectorsAvailable(String),
OperationNotPermitted(String),
ReplicationJobAlreadyExists(String),
ServerCannotBeReplicated(String),
TemporarilyUnavailable(String),
UnauthorizedOperation(String),
}
impl CreateReplicationJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateReplicationJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(CreateReplicationJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateReplicationJobError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
CreateReplicationJobError::MissingRequiredParameter(err.msg),
)
}
"NoConnectorsAvailableException" => {
return RusotoError::Service(CreateReplicationJobError::NoConnectorsAvailable(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateReplicationJobError::OperationNotPermitted(
err.msg,
))
}
"ReplicationJobAlreadyExistsException" => {
return RusotoError::Service(
CreateReplicationJobError::ReplicationJobAlreadyExists(err.msg),
)
}
"ServerCannotBeReplicatedException" => {
return RusotoError::Service(
CreateReplicationJobError::ServerCannotBeReplicated(err.msg),
)
}
"TemporarilyUnavailableException" => {
return RusotoError::Service(CreateReplicationJobError::TemporarilyUnavailable(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(CreateReplicationJobError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateReplicationJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateReplicationJobError {
fn description(&self) -> &str {
match *self {
CreateReplicationJobError::InternalError(ref cause) => cause,
CreateReplicationJobError::InvalidParameter(ref cause) => cause,
CreateReplicationJobError::MissingRequiredParameter(ref cause) => cause,
CreateReplicationJobError::NoConnectorsAvailable(ref cause) => cause,
CreateReplicationJobError::OperationNotPermitted(ref cause) => cause,
CreateReplicationJobError::ReplicationJobAlreadyExists(ref cause) => cause,
CreateReplicationJobError::ServerCannotBeReplicated(ref cause) => cause,
CreateReplicationJobError::TemporarilyUnavailable(ref cause) => cause,
CreateReplicationJobError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl DeleteAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(DeleteAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(DeleteAppError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(DeleteAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(DeleteAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAppError {
fn description(&self) -> &str {
match *self {
DeleteAppError::InternalError(ref cause) => cause,
DeleteAppError::InvalidParameter(ref cause) => cause,
DeleteAppError::MissingRequiredParameter(ref cause) => cause,
DeleteAppError::OperationNotPermitted(ref cause) => cause,
DeleteAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAppLaunchConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl DeleteAppLaunchConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteAppLaunchConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(DeleteAppLaunchConfigurationError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(
DeleteAppLaunchConfigurationError::InvalidParameter(err.msg),
)
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
DeleteAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
DeleteAppLaunchConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
DeleteAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAppLaunchConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAppLaunchConfigurationError {
fn description(&self) -> &str {
match *self {
DeleteAppLaunchConfigurationError::InternalError(ref cause) => cause,
DeleteAppLaunchConfigurationError::InvalidParameter(ref cause) => cause,
DeleteAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => cause,
DeleteAppLaunchConfigurationError::OperationNotPermitted(ref cause) => cause,
DeleteAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAppReplicationConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl DeleteAppReplicationConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteAppReplicationConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(
DeleteAppReplicationConfigurationError::InternalError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
DeleteAppReplicationConfigurationError::InvalidParameter(err.msg),
)
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
DeleteAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
DeleteAppReplicationConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
DeleteAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAppReplicationConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAppReplicationConfigurationError {
fn description(&self) -> &str {
match *self {
DeleteAppReplicationConfigurationError::InternalError(ref cause) => cause,
DeleteAppReplicationConfigurationError::InvalidParameter(ref cause) => cause,
DeleteAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => cause,
DeleteAppReplicationConfigurationError::OperationNotPermitted(ref cause) => cause,
DeleteAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteReplicationJobError {
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
ReplicationJobNotFound(String),
UnauthorizedOperation(String),
}
impl DeleteReplicationJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteReplicationJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(DeleteReplicationJobError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
DeleteReplicationJobError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(DeleteReplicationJobError::OperationNotPermitted(
err.msg,
))
}
"ReplicationJobNotFoundException" => {
return RusotoError::Service(DeleteReplicationJobError::ReplicationJobNotFound(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(DeleteReplicationJobError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteReplicationJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteReplicationJobError {
fn description(&self) -> &str {
match *self {
DeleteReplicationJobError::InvalidParameter(ref cause) => cause,
DeleteReplicationJobError::MissingRequiredParameter(ref cause) => cause,
DeleteReplicationJobError::OperationNotPermitted(ref cause) => cause,
DeleteReplicationJobError::ReplicationJobNotFound(ref cause) => cause,
DeleteReplicationJobError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteServerCatalogError {
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl DeleteServerCatalogError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteServerCatalogError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(DeleteServerCatalogError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
DeleteServerCatalogError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(DeleteServerCatalogError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(DeleteServerCatalogError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteServerCatalogError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteServerCatalogError {
fn description(&self) -> &str {
match *self {
DeleteServerCatalogError::InvalidParameter(ref cause) => cause,
DeleteServerCatalogError::MissingRequiredParameter(ref cause) => cause,
DeleteServerCatalogError::OperationNotPermitted(ref cause) => cause,
DeleteServerCatalogError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateConnectorError {
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl DisassociateConnectorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateConnectorError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(DisassociateConnectorError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
DisassociateConnectorError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(DisassociateConnectorError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(DisassociateConnectorError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateConnectorError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateConnectorError {
fn description(&self) -> &str {
match *self {
DisassociateConnectorError::InvalidParameter(ref cause) => cause,
DisassociateConnectorError::MissingRequiredParameter(ref cause) => cause,
DisassociateConnectorError::OperationNotPermitted(ref cause) => cause,
DisassociateConnectorError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GenerateChangeSetError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl GenerateChangeSetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateChangeSetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(GenerateChangeSetError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GenerateChangeSetError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(GenerateChangeSetError::MissingRequiredParameter(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(GenerateChangeSetError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(GenerateChangeSetError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GenerateChangeSetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GenerateChangeSetError {
fn description(&self) -> &str {
match *self {
GenerateChangeSetError::InternalError(ref cause) => cause,
GenerateChangeSetError::InvalidParameter(ref cause) => cause,
GenerateChangeSetError::MissingRequiredParameter(ref cause) => cause,
GenerateChangeSetError::OperationNotPermitted(ref cause) => cause,
GenerateChangeSetError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GenerateTemplateError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl GenerateTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateTemplateError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(GenerateTemplateError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GenerateTemplateError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(GenerateTemplateError::MissingRequiredParameter(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(GenerateTemplateError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(GenerateTemplateError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GenerateTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GenerateTemplateError {
fn description(&self) -> &str {
match *self {
GenerateTemplateError::InternalError(ref cause) => cause,
GenerateTemplateError::InvalidParameter(ref cause) => cause,
GenerateTemplateError::MissingRequiredParameter(ref cause) => cause,
GenerateTemplateError::OperationNotPermitted(ref cause) => cause,
GenerateTemplateError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl GetAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(GetAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(GetAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(GetAppError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(GetAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(GetAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAppError {
fn description(&self) -> &str {
match *self {
GetAppError::InternalError(ref cause) => cause,
GetAppError::InvalidParameter(ref cause) => cause,
GetAppError::MissingRequiredParameter(ref cause) => cause,
GetAppError::OperationNotPermitted(ref cause) => cause,
GetAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAppLaunchConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl GetAppLaunchConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAppLaunchConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(GetAppLaunchConfigurationError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(GetAppLaunchConfigurationError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
GetAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
GetAppLaunchConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
GetAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAppLaunchConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAppLaunchConfigurationError {
fn description(&self) -> &str {
match *self {
GetAppLaunchConfigurationError::InternalError(ref cause) => cause,
GetAppLaunchConfigurationError::InvalidParameter(ref cause) => cause,
GetAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => cause,
GetAppLaunchConfigurationError::OperationNotPermitted(ref cause) => cause,
GetAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAppReplicationConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl GetAppReplicationConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<GetAppReplicationConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(
GetAppReplicationConfigurationError::InternalError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
GetAppReplicationConfigurationError::InvalidParameter(err.msg),
)
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
GetAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
GetAppReplicationConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
GetAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAppReplicationConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAppReplicationConfigurationError {
fn description(&self) -> &str {
match *self {
GetAppReplicationConfigurationError::InternalError(ref cause) => cause,
GetAppReplicationConfigurationError::InvalidParameter(ref cause) => cause,
GetAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => cause,
GetAppReplicationConfigurationError::OperationNotPermitted(ref cause) => cause,
GetAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetConnectorsError {
UnauthorizedOperation(String),
}
impl GetConnectorsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetConnectorsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"UnauthorizedOperationException" => {
return RusotoError::Service(GetConnectorsError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetConnectorsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetConnectorsError {
fn description(&self) -> &str {
match *self {
GetConnectorsError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetReplicationJobsError {
InvalidParameter(String),
MissingRequiredParameter(String),
UnauthorizedOperation(String),
}
impl GetReplicationJobsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetReplicationJobsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(GetReplicationJobsError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(GetReplicationJobsError::MissingRequiredParameter(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(GetReplicationJobsError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetReplicationJobsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetReplicationJobsError {
fn description(&self) -> &str {
match *self {
GetReplicationJobsError::InvalidParameter(ref cause) => cause,
GetReplicationJobsError::MissingRequiredParameter(ref cause) => cause,
GetReplicationJobsError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetReplicationRunsError {
InvalidParameter(String),
MissingRequiredParameter(String),
UnauthorizedOperation(String),
}
impl GetReplicationRunsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetReplicationRunsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(GetReplicationRunsError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(GetReplicationRunsError::MissingRequiredParameter(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(GetReplicationRunsError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetReplicationRunsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetReplicationRunsError {
fn description(&self) -> &str {
match *self {
GetReplicationRunsError::InvalidParameter(ref cause) => cause,
GetReplicationRunsError::MissingRequiredParameter(ref cause) => cause,
GetReplicationRunsError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetServersError {
UnauthorizedOperation(String),
}
impl GetServersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetServersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"UnauthorizedOperationException" => {
return RusotoError::Service(GetServersError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetServersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetServersError {
fn description(&self) -> &str {
match *self {
GetServersError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ImportServerCatalogError {
InvalidParameter(String),
MissingRequiredParameter(String),
NoConnectorsAvailable(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl ImportServerCatalogError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportServerCatalogError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(ImportServerCatalogError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
ImportServerCatalogError::MissingRequiredParameter(err.msg),
)
}
"NoConnectorsAvailableException" => {
return RusotoError::Service(ImportServerCatalogError::NoConnectorsAvailable(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(ImportServerCatalogError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(ImportServerCatalogError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ImportServerCatalogError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ImportServerCatalogError {
fn description(&self) -> &str {
match *self {
ImportServerCatalogError::InvalidParameter(ref cause) => cause,
ImportServerCatalogError::MissingRequiredParameter(ref cause) => cause,
ImportServerCatalogError::NoConnectorsAvailable(ref cause) => cause,
ImportServerCatalogError::OperationNotPermitted(ref cause) => cause,
ImportServerCatalogError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum LaunchAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl LaunchAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<LaunchAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(LaunchAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(LaunchAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(LaunchAppError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(LaunchAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(LaunchAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for LaunchAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for LaunchAppError {
fn description(&self) -> &str {
match *self {
LaunchAppError::InternalError(ref cause) => cause,
LaunchAppError::InvalidParameter(ref cause) => cause,
LaunchAppError::MissingRequiredParameter(ref cause) => cause,
LaunchAppError::OperationNotPermitted(ref cause) => cause,
LaunchAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAppsError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl ListAppsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAppsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(ListAppsError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListAppsError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(ListAppsError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(ListAppsError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(ListAppsError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAppsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAppsError {
fn description(&self) -> &str {
match *self {
ListAppsError::InternalError(ref cause) => cause,
ListAppsError::InvalidParameter(ref cause) => cause,
ListAppsError::MissingRequiredParameter(ref cause) => cause,
ListAppsError::OperationNotPermitted(ref cause) => cause,
ListAppsError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutAppLaunchConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl PutAppLaunchConfigurationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutAppLaunchConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(PutAppLaunchConfigurationError::InternalError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(PutAppLaunchConfigurationError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
PutAppLaunchConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
PutAppLaunchConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
PutAppLaunchConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutAppLaunchConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutAppLaunchConfigurationError {
fn description(&self) -> &str {
match *self {
PutAppLaunchConfigurationError::InternalError(ref cause) => cause,
PutAppLaunchConfigurationError::InvalidParameter(ref cause) => cause,
PutAppLaunchConfigurationError::MissingRequiredParameter(ref cause) => cause,
PutAppLaunchConfigurationError::OperationNotPermitted(ref cause) => cause,
PutAppLaunchConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum PutAppReplicationConfigurationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl PutAppReplicationConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<PutAppReplicationConfigurationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(
PutAppReplicationConfigurationError::InternalError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
PutAppReplicationConfigurationError::InvalidParameter(err.msg),
)
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
PutAppReplicationConfigurationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
PutAppReplicationConfigurationError::OperationNotPermitted(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
PutAppReplicationConfigurationError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutAppReplicationConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutAppReplicationConfigurationError {
fn description(&self) -> &str {
match *self {
PutAppReplicationConfigurationError::InternalError(ref cause) => cause,
PutAppReplicationConfigurationError::InvalidParameter(ref cause) => cause,
PutAppReplicationConfigurationError::MissingRequiredParameter(ref cause) => cause,
PutAppReplicationConfigurationError::OperationNotPermitted(ref cause) => cause,
PutAppReplicationConfigurationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartAppReplicationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl StartAppReplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartAppReplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(StartAppReplicationError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StartAppReplicationError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
StartAppReplicationError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(StartAppReplicationError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(StartAppReplicationError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartAppReplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartAppReplicationError {
fn description(&self) -> &str {
match *self {
StartAppReplicationError::InternalError(ref cause) => cause,
StartAppReplicationError::InvalidParameter(ref cause) => cause,
StartAppReplicationError::MissingRequiredParameter(ref cause) => cause,
StartAppReplicationError::OperationNotPermitted(ref cause) => cause,
StartAppReplicationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartOnDemandReplicationRunError {
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
ReplicationRunLimitExceeded(String),
UnauthorizedOperation(String),
}
impl StartOnDemandReplicationRunError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<StartOnDemandReplicationRunError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterException" => {
return RusotoError::Service(
StartOnDemandReplicationRunError::InvalidParameter(err.msg),
)
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
StartOnDemandReplicationRunError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
StartOnDemandReplicationRunError::OperationNotPermitted(err.msg),
)
}
"ReplicationRunLimitExceededException" => {
return RusotoError::Service(
StartOnDemandReplicationRunError::ReplicationRunLimitExceeded(err.msg),
)
}
"UnauthorizedOperationException" => {
return RusotoError::Service(
StartOnDemandReplicationRunError::UnauthorizedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartOnDemandReplicationRunError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartOnDemandReplicationRunError {
fn description(&self) -> &str {
match *self {
StartOnDemandReplicationRunError::InvalidParameter(ref cause) => cause,
StartOnDemandReplicationRunError::MissingRequiredParameter(ref cause) => cause,
StartOnDemandReplicationRunError::OperationNotPermitted(ref cause) => cause,
StartOnDemandReplicationRunError::ReplicationRunLimitExceeded(ref cause) => cause,
StartOnDemandReplicationRunError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopAppReplicationError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl StopAppReplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopAppReplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(StopAppReplicationError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StopAppReplicationError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(StopAppReplicationError::MissingRequiredParameter(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StopAppReplicationError::OperationNotPermitted(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(StopAppReplicationError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopAppReplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopAppReplicationError {
fn description(&self) -> &str {
match *self {
StopAppReplicationError::InternalError(ref cause) => cause,
StopAppReplicationError::InvalidParameter(ref cause) => cause,
StopAppReplicationError::MissingRequiredParameter(ref cause) => cause,
StopAppReplicationError::OperationNotPermitted(ref cause) => cause,
StopAppReplicationError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TerminateAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl TerminateAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TerminateAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(TerminateAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(TerminateAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(TerminateAppError::MissingRequiredParameter(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(TerminateAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(TerminateAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TerminateAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TerminateAppError {
fn description(&self) -> &str {
match *self {
TerminateAppError::InternalError(ref cause) => cause,
TerminateAppError::InvalidParameter(ref cause) => cause,
TerminateAppError::MissingRequiredParameter(ref cause) => cause,
TerminateAppError::OperationNotPermitted(ref cause) => cause,
TerminateAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAppError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
UnauthorizedOperation(String),
}
impl UpdateAppError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAppError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(UpdateAppError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateAppError::InvalidParameter(err.msg))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(UpdateAppError::MissingRequiredParameter(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(UpdateAppError::OperationNotPermitted(err.msg))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(UpdateAppError::UnauthorizedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAppError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAppError {
fn description(&self) -> &str {
match *self {
UpdateAppError::InternalError(ref cause) => cause,
UpdateAppError::InvalidParameter(ref cause) => cause,
UpdateAppError::MissingRequiredParameter(ref cause) => cause,
UpdateAppError::OperationNotPermitted(ref cause) => cause,
UpdateAppError::UnauthorizedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateReplicationJobError {
InternalError(String),
InvalidParameter(String),
MissingRequiredParameter(String),
OperationNotPermitted(String),
ReplicationJobNotFound(String),
ServerCannotBeReplicated(String),
TemporarilyUnavailable(String),
UnauthorizedOperation(String),
}
impl UpdateReplicationJobError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateReplicationJobError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InternalError" => {
return RusotoError::Service(UpdateReplicationJobError::InternalError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateReplicationJobError::InvalidParameter(
err.msg,
))
}
"MissingRequiredParameterException" => {
return RusotoError::Service(
UpdateReplicationJobError::MissingRequiredParameter(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(UpdateReplicationJobError::OperationNotPermitted(
err.msg,
))
}
"ReplicationJobNotFoundException" => {
return RusotoError::Service(UpdateReplicationJobError::ReplicationJobNotFound(
err.msg,
))
}
"ServerCannotBeReplicatedException" => {
return RusotoError::Service(
UpdateReplicationJobError::ServerCannotBeReplicated(err.msg),
)
}
"TemporarilyUnavailableException" => {
return RusotoError::Service(UpdateReplicationJobError::TemporarilyUnavailable(
err.msg,
))
}
"UnauthorizedOperationException" => {
return RusotoError::Service(UpdateReplicationJobError::UnauthorizedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateReplicationJobError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateReplicationJobError {
fn description(&self) -> &str {
match *self {
UpdateReplicationJobError::InternalError(ref cause) => cause,
UpdateReplicationJobError::InvalidParameter(ref cause) => cause,
UpdateReplicationJobError::MissingRequiredParameter(ref cause) => cause,
UpdateReplicationJobError::OperationNotPermitted(ref cause) => cause,
UpdateReplicationJobError::ReplicationJobNotFound(ref cause) => cause,
UpdateReplicationJobError::ServerCannotBeReplicated(ref cause) => cause,
UpdateReplicationJobError::TemporarilyUnavailable(ref cause) => cause,
UpdateReplicationJobError::UnauthorizedOperation(ref cause) => cause,
}
}
}
pub trait ServerMigrationService {
fn create_app(
&self,
input: CreateAppRequest,
) -> RusotoFuture<CreateAppResponse, CreateAppError>;
fn create_replication_job(
&self,
input: CreateReplicationJobRequest,
) -> RusotoFuture<CreateReplicationJobResponse, CreateReplicationJobError>;
fn delete_app(
&self,
input: DeleteAppRequest,
) -> RusotoFuture<DeleteAppResponse, DeleteAppError>;
fn delete_app_launch_configuration(
&self,
input: DeleteAppLaunchConfigurationRequest,
) -> RusotoFuture<DeleteAppLaunchConfigurationResponse, DeleteAppLaunchConfigurationError>;
fn delete_app_replication_configuration(
&self,
input: DeleteAppReplicationConfigurationRequest,
) -> RusotoFuture<
DeleteAppReplicationConfigurationResponse,
DeleteAppReplicationConfigurationError,
>;
fn delete_replication_job(
&self,
input: DeleteReplicationJobRequest,
) -> RusotoFuture<DeleteReplicationJobResponse, DeleteReplicationJobError>;
fn delete_server_catalog(
&self,
) -> RusotoFuture<DeleteServerCatalogResponse, DeleteServerCatalogError>;
fn disassociate_connector(
&self,
input: DisassociateConnectorRequest,
) -> RusotoFuture<DisassociateConnectorResponse, DisassociateConnectorError>;
fn generate_change_set(
&self,
input: GenerateChangeSetRequest,
) -> RusotoFuture<GenerateChangeSetResponse, GenerateChangeSetError>;
fn generate_template(
&self,
input: GenerateTemplateRequest,
) -> RusotoFuture<GenerateTemplateResponse, GenerateTemplateError>;
fn get_app(&self, input: GetAppRequest) -> RusotoFuture<GetAppResponse, GetAppError>;
fn get_app_launch_configuration(
&self,
input: GetAppLaunchConfigurationRequest,
) -> RusotoFuture<GetAppLaunchConfigurationResponse, GetAppLaunchConfigurationError>;
fn get_app_replication_configuration(
&self,
input: GetAppReplicationConfigurationRequest,
) -> RusotoFuture<GetAppReplicationConfigurationResponse, GetAppReplicationConfigurationError>;
fn get_connectors(
&self,
input: GetConnectorsRequest,
) -> RusotoFuture<GetConnectorsResponse, GetConnectorsError>;
fn get_replication_jobs(
&self,
input: GetReplicationJobsRequest,
) -> RusotoFuture<GetReplicationJobsResponse, GetReplicationJobsError>;
fn get_replication_runs(
&self,
input: GetReplicationRunsRequest,
) -> RusotoFuture<GetReplicationRunsResponse, GetReplicationRunsError>;
fn get_servers(
&self,
input: GetServersRequest,
) -> RusotoFuture<GetServersResponse, GetServersError>;
fn import_server_catalog(
&self,
) -> RusotoFuture<ImportServerCatalogResponse, ImportServerCatalogError>;
fn launch_app(
&self,
input: LaunchAppRequest,
) -> RusotoFuture<LaunchAppResponse, LaunchAppError>;
fn list_apps(&self, input: ListAppsRequest) -> RusotoFuture<ListAppsResponse, ListAppsError>;
fn put_app_launch_configuration(
&self,
input: PutAppLaunchConfigurationRequest,
) -> RusotoFuture<PutAppLaunchConfigurationResponse, PutAppLaunchConfigurationError>;
fn put_app_replication_configuration(
&self,
input: PutAppReplicationConfigurationRequest,
) -> RusotoFuture<PutAppReplicationConfigurationResponse, PutAppReplicationConfigurationError>;
fn start_app_replication(
&self,
input: StartAppReplicationRequest,
) -> RusotoFuture<StartAppReplicationResponse, StartAppReplicationError>;
fn start_on_demand_replication_run(
&self,
input: StartOnDemandReplicationRunRequest,
) -> RusotoFuture<StartOnDemandReplicationRunResponse, StartOnDemandReplicationRunError>;
fn stop_app_replication(
&self,
input: StopAppReplicationRequest,
) -> RusotoFuture<StopAppReplicationResponse, StopAppReplicationError>;
fn terminate_app(
&self,
input: TerminateAppRequest,
) -> RusotoFuture<TerminateAppResponse, TerminateAppError>;
fn update_app(
&self,
input: UpdateAppRequest,
) -> RusotoFuture<UpdateAppResponse, UpdateAppError>;
fn update_replication_job(
&self,
input: UpdateReplicationJobRequest,
) -> RusotoFuture<UpdateReplicationJobResponse, UpdateReplicationJobError>;
}
#[derive(Clone)]
pub struct ServerMigrationServiceClient {
client: Client,
region: region::Region,
}
impl ServerMigrationServiceClient {
pub fn new(region: region::Region) -> ServerMigrationServiceClient {
ServerMigrationServiceClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ServerMigrationServiceClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
ServerMigrationServiceClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl ServerMigrationService for ServerMigrationServiceClient {
fn create_app(
&self,
input: CreateAppRequest,
) -> RusotoFuture<CreateAppResponse, CreateAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.CreateApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAppError::from_response(response))),
)
}
})
}
fn create_replication_job(
&self,
input: CreateReplicationJobRequest,
) -> RusotoFuture<CreateReplicationJobResponse, CreateReplicationJobError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.CreateReplicationJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateReplicationJobResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateReplicationJobError::from_response(response))
}),
)
}
})
}
fn delete_app(
&self,
input: DeleteAppRequest,
) -> RusotoFuture<DeleteAppResponse, DeleteAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DeleteApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteAppError::from_response(response))),
)
}
})
}
fn delete_app_launch_configuration(
&self,
input: DeleteAppLaunchConfigurationRequest,
) -> RusotoFuture<DeleteAppLaunchConfigurationResponse, DeleteAppLaunchConfigurationError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DeleteAppLaunchConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAppLaunchConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteAppLaunchConfigurationError::from_response(response))
}))
}
})
}
fn delete_app_replication_configuration(
&self,
input: DeleteAppReplicationConfigurationRequest,
) -> RusotoFuture<
DeleteAppReplicationConfigurationResponse,
DeleteAppReplicationConfigurationError,
> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DeleteAppReplicationConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteAppReplicationConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteAppReplicationConfigurationError::from_response(
response,
))
}))
}
})
}
fn delete_replication_job(
&self,
input: DeleteReplicationJobRequest,
) -> RusotoFuture<DeleteReplicationJobResponse, DeleteReplicationJobError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DeleteReplicationJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteReplicationJobResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteReplicationJobError::from_response(response))
}),
)
}
})
}
fn delete_server_catalog(
&self,
) -> RusotoFuture<DeleteServerCatalogResponse, DeleteServerCatalogError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DeleteServerCatalog",
);
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteServerCatalogResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteServerCatalogError::from_response(response))
}),
)
}
})
}
fn disassociate_connector(
&self,
input: DisassociateConnectorRequest,
) -> RusotoFuture<DisassociateConnectorResponse, DisassociateConnectorError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.DisassociateConnector",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateConnectorResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DisassociateConnectorError::from_response(response))
}),
)
}
})
}
fn generate_change_set(
&self,
input: GenerateChangeSetRequest,
) -> RusotoFuture<GenerateChangeSetResponse, GenerateChangeSetError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GenerateChangeSet",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GenerateChangeSetResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GenerateChangeSetError::from_response(response))),
)
}
})
}
fn generate_template(
&self,
input: GenerateTemplateRequest,
) -> RusotoFuture<GenerateTemplateResponse, GenerateTemplateError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GenerateTemplate",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GenerateTemplateResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GenerateTemplateError::from_response(response))),
)
}
})
}
fn get_app(&self, input: GetAppRequest) -> RusotoFuture<GetAppResponse, GetAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<GetAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAppError::from_response(response))),
)
}
})
}
fn get_app_launch_configuration(
&self,
input: GetAppLaunchConfigurationRequest,
) -> RusotoFuture<GetAppLaunchConfigurationResponse, GetAppLaunchConfigurationError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetAppLaunchConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetAppLaunchConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetAppLaunchConfigurationError::from_response(response))
}))
}
})
}
fn get_app_replication_configuration(
&self,
input: GetAppReplicationConfigurationRequest,
) -> RusotoFuture<GetAppReplicationConfigurationResponse, GetAppReplicationConfigurationError>
{
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetAppReplicationConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetAppReplicationConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetAppReplicationConfigurationError::from_response(response))
}))
}
})
}
fn get_connectors(
&self,
input: GetConnectorsRequest,
) -> RusotoFuture<GetConnectorsResponse, GetConnectorsError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetConnectors",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetConnectorsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetConnectorsError::from_response(response))),
)
}
})
}
fn get_replication_jobs(
&self,
input: GetReplicationJobsRequest,
) -> RusotoFuture<GetReplicationJobsResponse, GetReplicationJobsError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetReplicationJobs",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetReplicationJobsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetReplicationJobsError::from_response(response))),
)
}
})
}
fn get_replication_runs(
&self,
input: GetReplicationRunsRequest,
) -> RusotoFuture<GetReplicationRunsResponse, GetReplicationRunsError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetReplicationRuns",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetReplicationRunsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetReplicationRunsError::from_response(response))),
)
}
})
}
fn get_servers(
&self,
input: GetServersRequest,
) -> RusotoFuture<GetServersResponse, GetServersError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.GetServers",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<GetServersResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetServersError::from_response(response))),
)
}
})
}
fn import_server_catalog(
&self,
) -> RusotoFuture<ImportServerCatalogResponse, ImportServerCatalogError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.ImportServerCatalog",
);
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ImportServerCatalogResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ImportServerCatalogError::from_response(response))
}),
)
}
})
}
fn launch_app(
&self,
input: LaunchAppRequest,
) -> RusotoFuture<LaunchAppResponse, LaunchAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.LaunchApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<LaunchAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(LaunchAppError::from_response(response))),
)
}
})
}
fn list_apps(&self, input: ListAppsRequest) -> RusotoFuture<ListAppsResponse, ListAppsError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.ListApps",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ListAppsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListAppsError::from_response(response))),
)
}
})
}
fn put_app_launch_configuration(
&self,
input: PutAppLaunchConfigurationRequest,
) -> RusotoFuture<PutAppLaunchConfigurationResponse, PutAppLaunchConfigurationError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.PutAppLaunchConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PutAppLaunchConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(PutAppLaunchConfigurationError::from_response(response))
}))
}
})
}
fn put_app_replication_configuration(
&self,
input: PutAppReplicationConfigurationRequest,
) -> RusotoFuture<PutAppReplicationConfigurationResponse, PutAppReplicationConfigurationError>
{
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.PutAppReplicationConfiguration",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<PutAppReplicationConfigurationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(PutAppReplicationConfigurationError::from_response(response))
}))
}
})
}
fn start_app_replication(
&self,
input: StartAppReplicationRequest,
) -> RusotoFuture<StartAppReplicationResponse, StartAppReplicationError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.StartAppReplication",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StartAppReplicationResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartAppReplicationError::from_response(response))
}),
)
}
})
}
fn start_on_demand_replication_run(
&self,
input: StartOnDemandReplicationRunRequest,
) -> RusotoFuture<StartOnDemandReplicationRunResponse, StartOnDemandReplicationRunError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.StartOnDemandReplicationRun",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StartOnDemandReplicationRunResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartOnDemandReplicationRunError::from_response(response))
}))
}
})
}
fn stop_app_replication(
&self,
input: StopAppReplicationRequest,
) -> RusotoFuture<StopAppReplicationResponse, StopAppReplicationError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.StopAppReplication",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<StopAppReplicationResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopAppReplicationError::from_response(response))),
)
}
})
}
fn terminate_app(
&self,
input: TerminateAppRequest,
) -> RusotoFuture<TerminateAppResponse, TerminateAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.TerminateApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<TerminateAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TerminateAppError::from_response(response))),
)
}
})
}
fn update_app(
&self,
input: UpdateAppRequest,
) -> RusotoFuture<UpdateAppResponse, UpdateAppError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.UpdateApp",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAppResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAppError::from_response(response))),
)
}
})
}
fn update_replication_job(
&self,
input: UpdateReplicationJobRequest,
) -> RusotoFuture<UpdateReplicationJobResponse, UpdateReplicationJobError> {
let mut request = SignedRequest::new("POST", "sms", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSServerMigrationService_V2016_10_24.UpdateReplicationJob",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateReplicationJobResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateReplicationJobError::from_response(response))
}),
)
}
})
}
}