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 AgentConfigurationStatus {
#[serde(rename = "agentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "operationSucceeded")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation_succeeded: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AgentInfo {
#[serde(rename = "agentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_id: Option<String>,
#[serde(rename = "agentNetworkInfoList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_network_info_list: Option<Vec<AgentNetworkInfo>>,
#[serde(rename = "agentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_type: Option<String>,
#[serde(rename = "collectionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub collection_status: Option<String>,
#[serde(rename = "connectorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_id: Option<String>,
#[serde(rename = "health")]
#[serde(skip_serializing_if = "Option::is_none")]
pub health: Option<String>,
#[serde(rename = "hostName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub host_name: Option<String>,
#[serde(rename = "lastHealthPingTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_health_ping_time: Option<String>,
#[serde(rename = "registeredTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registered_time: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AgentNetworkInfo {
#[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>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateConfigurationItemsToApplicationRequest {
#[serde(rename = "applicationConfigurationId")]
pub application_configuration_id: String,
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateConfigurationItemsToApplicationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DiscoveryBatchDeleteImportDataError {
#[serde(rename = "errorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "errorDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_description: Option<String>,
#[serde(rename = "importTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_task_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDeleteImportDataRequest {
#[serde(rename = "importTaskIds")]
pub import_task_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDeleteImportDataResponse {
#[serde(rename = "errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<DiscoveryBatchDeleteImportDataError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfigurationTag {
#[serde(rename = "configurationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_id: Option<String>,
#[serde(rename = "configurationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_type: Option<String>,
#[serde(rename = "key")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
#[serde(rename = "timeOfCreation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub time_of_creation: Option<f64>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ContinuousExportDescription {
#[serde(rename = "dataSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data_source: Option<String>,
#[serde(rename = "exportId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_id: Option<String>,
#[serde(rename = "s3Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_bucket: Option<String>,
#[serde(rename = "schemaStorageConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_storage_config: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "statusDetail")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_detail: Option<String>,
#[serde(rename = "stopTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stop_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateApplicationRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateApplicationResponse {
#[serde(rename = "configurationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTagsRequest {
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
#[serde(rename = "tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTagsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CustomerAgentInfo {
#[serde(rename = "activeAgents")]
pub active_agents: i64,
#[serde(rename = "blackListedAgents")]
pub black_listed_agents: i64,
#[serde(rename = "healthyAgents")]
pub healthy_agents: i64,
#[serde(rename = "shutdownAgents")]
pub shutdown_agents: i64,
#[serde(rename = "totalAgents")]
pub total_agents: i64,
#[serde(rename = "unhealthyAgents")]
pub unhealthy_agents: i64,
#[serde(rename = "unknownAgents")]
pub unknown_agents: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CustomerConnectorInfo {
#[serde(rename = "activeConnectors")]
pub active_connectors: i64,
#[serde(rename = "blackListedConnectors")]
pub black_listed_connectors: i64,
#[serde(rename = "healthyConnectors")]
pub healthy_connectors: i64,
#[serde(rename = "shutdownConnectors")]
pub shutdown_connectors: i64,
#[serde(rename = "totalConnectors")]
pub total_connectors: i64,
#[serde(rename = "unhealthyConnectors")]
pub unhealthy_connectors: i64,
#[serde(rename = "unknownConnectors")]
pub unknown_connectors: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteApplicationsRequest {
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteApplicationsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTagsRequest {
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
#[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 DeleteTagsResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAgentsRequest {
#[serde(rename = "agentIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_ids: Option<Vec<String>>,
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 DescribeAgentsResponse {
#[serde(rename = "agentsInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agents_info: Option<Vec<AgentInfo>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeConfigurationsRequest {
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeConfigurationsResponse {
#[serde(rename = "configurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configurations: Option<Vec<::std::collections::HashMap<String, String>>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeContinuousExportsRequest {
#[serde(rename = "exportIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_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 DescribeContinuousExportsResponse {
#[serde(rename = "descriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub descriptions: Option<Vec<ContinuousExportDescription>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeExportConfigurationsRequest {
#[serde(rename = "exportIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_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 DescribeExportConfigurationsResponse {
#[serde(rename = "exportsInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exports_info: Option<Vec<ExportInfo>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeExportTasksRequest {
#[serde(rename = "exportIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_ids: Option<Vec<String>>,
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ExportFilter>>,
#[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 DescribeExportTasksResponse {
#[serde(rename = "exportsInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exports_info: Option<Vec<ExportInfo>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeImportTasksRequest {
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ImportTaskFilter>>,
#[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 DescribeImportTasksResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tasks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tasks: Option<Vec<ImportTask>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTagsRequest {
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<TagFilter>>,
#[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 DescribeTagsResponse {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<ConfigurationTag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateConfigurationItemsFromApplicationRequest {
#[serde(rename = "applicationConfigurationId")]
pub application_configuration_id: String,
#[serde(rename = "configurationIds")]
pub configuration_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateConfigurationItemsFromApplicationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ExportConfigurationsResponse {
#[serde(rename = "exportId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ExportFilter {
#[serde(rename = "condition")]
pub condition: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ExportInfo {
#[serde(rename = "configurationsDownloadUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configurations_download_url: Option<String>,
#[serde(rename = "exportId")]
pub export_id: String,
#[serde(rename = "exportRequestTime")]
pub export_request_time: f64,
#[serde(rename = "exportStatus")]
pub export_status: String,
#[serde(rename = "isTruncated")]
#[serde(skip_serializing_if = "Option::is_none")]
pub is_truncated: Option<bool>,
#[serde(rename = "requestedEndTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_end_time: Option<f64>,
#[serde(rename = "requestedStartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_start_time: Option<f64>,
#[serde(rename = "statusMessage")]
pub status_message: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Filter {
#[serde(rename = "condition")]
pub condition: String,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDiscoverySummaryRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDiscoverySummaryResponse {
#[serde(rename = "agentSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_summary: Option<CustomerAgentInfo>,
#[serde(rename = "applications")]
#[serde(skip_serializing_if = "Option::is_none")]
pub applications: Option<i64>,
#[serde(rename = "connectorSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connector_summary: Option<CustomerConnectorInfo>,
#[serde(rename = "servers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub servers: Option<i64>,
#[serde(rename = "serversMappedToApplications")]
#[serde(skip_serializing_if = "Option::is_none")]
pub servers_mapped_to_applications: Option<i64>,
#[serde(rename = "serversMappedtoTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub servers_mappedto_tags: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImportTask {
#[serde(rename = "applicationImportFailure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_import_failure: Option<i64>,
#[serde(rename = "applicationImportSuccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_import_success: Option<i64>,
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "errorsAndFailedEntriesZip")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors_and_failed_entries_zip: Option<String>,
#[serde(rename = "importCompletionTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_completion_time: Option<f64>,
#[serde(rename = "importDeletedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_deleted_time: Option<f64>,
#[serde(rename = "importRequestTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_request_time: Option<f64>,
#[serde(rename = "importTaskId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_task_id: Option<String>,
#[serde(rename = "importUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub import_url: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "serverImportFailure")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_import_failure: Option<i64>,
#[serde(rename = "serverImportSuccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub server_import_success: Option<i64>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ImportTaskFilter {
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "values")]
#[serde(skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListConfigurationsRequest {
#[serde(rename = "configurationType")]
pub configuration_type: String,
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<Filter>>,
#[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 = "orderBy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub order_by: Option<Vec<OrderByElement>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListConfigurationsResponse {
#[serde(rename = "configurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configurations: Option<Vec<::std::collections::HashMap<String, String>>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListServerNeighborsRequest {
#[serde(rename = "configurationId")]
pub configuration_id: String,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "neighborConfigurationIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub neighbor_configuration_ids: Option<Vec<String>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "portInformationNeeded")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port_information_needed: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListServerNeighborsResponse {
#[serde(rename = "knownDependencyCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub known_dependency_count: Option<i64>,
#[serde(rename = "neighbors")]
pub neighbors: Vec<NeighborConnectionDetail>,
#[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 NeighborConnectionDetail {
#[serde(rename = "connectionsCount")]
pub connections_count: i64,
#[serde(rename = "destinationPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_port: Option<i64>,
#[serde(rename = "destinationServerId")]
pub destination_server_id: String,
#[serde(rename = "sourceServerId")]
pub source_server_id: String,
#[serde(rename = "transportProtocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub transport_protocol: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct OrderByElement {
#[serde(rename = "fieldName")]
pub field_name: String,
#[serde(rename = "sortOrder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sort_order: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartContinuousExportRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartContinuousExportResponse {
#[serde(rename = "dataSource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data_source: Option<String>,
#[serde(rename = "exportId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_id: Option<String>,
#[serde(rename = "s3Bucket")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s_3_bucket: Option<String>,
#[serde(rename = "schemaStorageConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_storage_config: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartDataCollectionByAgentIdsRequest {
#[serde(rename = "agentIds")]
pub agent_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartDataCollectionByAgentIdsResponse {
#[serde(rename = "agentsConfigurationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agents_configuration_status: Option<Vec<AgentConfigurationStatus>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartExportTaskRequest {
#[serde(rename = "endTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_time: Option<f64>,
#[serde(rename = "exportDataFormat")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_data_format: Option<Vec<String>>,
#[serde(rename = "filters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub filters: Option<Vec<ExportFilter>>,
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartExportTaskResponse {
#[serde(rename = "exportId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub export_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartImportTaskRequest {
#[serde(rename = "clientRequestToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_request_token: Option<String>,
#[serde(rename = "importUrl")]
pub import_url: String,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartImportTaskResponse {
#[serde(rename = "task")]
#[serde(skip_serializing_if = "Option::is_none")]
pub task: Option<ImportTask>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopContinuousExportRequest {
#[serde(rename = "exportId")]
pub export_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopContinuousExportResponse {
#[serde(rename = "startTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "stopTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stop_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopDataCollectionByAgentIdsRequest {
#[serde(rename = "agentIds")]
pub agent_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopDataCollectionByAgentIdsResponse {
#[serde(rename = "agentsConfigurationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub agents_configuration_status: Option<Vec<AgentConfigurationStatus>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct Tag {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagFilter {
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "values")]
pub values: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateApplicationRequest {
#[serde(rename = "configurationId")]
pub configuration_id: 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>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateApplicationResponse {}
#[derive(Debug, PartialEq)]
pub enum AssociateConfigurationItemsToApplicationError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl AssociateConfigurationItemsToApplicationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateConfigurationItemsToApplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
AssociateConfigurationItemsToApplicationError::AuthorizationError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
AssociateConfigurationItemsToApplicationError::InvalidParameter(err.msg),
)
}
"InvalidParameterValueException" => {
return RusotoError::Service(
AssociateConfigurationItemsToApplicationError::InvalidParameterValue(
err.msg,
),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(
AssociateConfigurationItemsToApplicationError::ServerInternalError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateConfigurationItemsToApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateConfigurationItemsToApplicationError {
fn description(&self) -> &str {
match *self {
AssociateConfigurationItemsToApplicationError::AuthorizationError(ref cause) => cause,
AssociateConfigurationItemsToApplicationError::InvalidParameter(ref cause) => cause,
AssociateConfigurationItemsToApplicationError::InvalidParameterValue(ref cause) => {
cause
}
AssociateConfigurationItemsToApplicationError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchDeleteImportDataError {
AuthorizationError(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl BatchDeleteImportDataError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchDeleteImportDataError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(BatchDeleteImportDataError::AuthorizationError(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(BatchDeleteImportDataError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(BatchDeleteImportDataError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchDeleteImportDataError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchDeleteImportDataError {
fn description(&self) -> &str {
match *self {
BatchDeleteImportDataError::AuthorizationError(ref cause) => cause,
BatchDeleteImportDataError::InvalidParameterValue(ref cause) => cause,
BatchDeleteImportDataError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApplicationError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl CreateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(CreateApplicationError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateApplicationError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(CreateApplicationError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(CreateApplicationError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApplicationError {
fn description(&self) -> &str {
match *self {
CreateApplicationError::AuthorizationError(ref cause) => cause,
CreateApplicationError::InvalidParameter(ref cause) => cause,
CreateApplicationError::InvalidParameterValue(ref cause) => cause,
CreateApplicationError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl CreateTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(CreateTagsError::AuthorizationError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateTagsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(CreateTagsError::InvalidParameterValue(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateTagsError::ResourceNotFound(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(CreateTagsError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTagsError {
fn description(&self) -> &str {
match *self {
CreateTagsError::AuthorizationError(ref cause) => cause,
CreateTagsError::InvalidParameter(ref cause) => cause,
CreateTagsError::InvalidParameterValue(ref cause) => cause,
CreateTagsError::ResourceNotFound(ref cause) => cause,
CreateTagsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApplicationsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DeleteApplicationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApplicationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DeleteApplicationsError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteApplicationsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DeleteApplicationsError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DeleteApplicationsError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteApplicationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApplicationsError {
fn description(&self) -> &str {
match *self {
DeleteApplicationsError::AuthorizationError(ref cause) => cause,
DeleteApplicationsError::InvalidParameter(ref cause) => cause,
DeleteApplicationsError::InvalidParameterValue(ref cause) => cause,
DeleteApplicationsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl DeleteTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DeleteTagsError::AuthorizationError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteTagsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DeleteTagsError::InvalidParameterValue(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteTagsError::ResourceNotFound(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DeleteTagsError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTagsError {
fn description(&self) -> &str {
match *self {
DeleteTagsError::AuthorizationError(ref cause) => cause,
DeleteTagsError::InvalidParameter(ref cause) => cause,
DeleteTagsError::InvalidParameterValue(ref cause) => cause,
DeleteTagsError::ResourceNotFound(ref cause) => cause,
DeleteTagsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAgentsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DescribeAgentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAgentsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DescribeAgentsError::AuthorizationError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeAgentsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DescribeAgentsError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DescribeAgentsError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAgentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAgentsError {
fn description(&self) -> &str {
match *self {
DescribeAgentsError::AuthorizationError(ref cause) => cause,
DescribeAgentsError::InvalidParameter(ref cause) => cause,
DescribeAgentsError::InvalidParameterValue(ref cause) => cause,
DescribeAgentsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConfigurationsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DescribeConfigurationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConfigurationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DescribeConfigurationsError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeConfigurationsError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(
DescribeConfigurationsError::InvalidParameterValue(err.msg),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(DescribeConfigurationsError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConfigurationsError {
fn description(&self) -> &str {
match *self {
DescribeConfigurationsError::AuthorizationError(ref cause) => cause,
DescribeConfigurationsError::InvalidParameter(ref cause) => cause,
DescribeConfigurationsError::InvalidParameterValue(ref cause) => cause,
DescribeConfigurationsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeContinuousExportsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
OperationNotPermitted(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl DescribeContinuousExportsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeContinuousExportsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
DescribeContinuousExportsError::AuthorizationError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeContinuousExportsError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(
DescribeContinuousExportsError::InvalidParameterValue(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(
DescribeContinuousExportsError::OperationNotPermitted(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeContinuousExportsError::ResourceNotFound(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(
DescribeContinuousExportsError::ServerInternalError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeContinuousExportsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeContinuousExportsError {
fn description(&self) -> &str {
match *self {
DescribeContinuousExportsError::AuthorizationError(ref cause) => cause,
DescribeContinuousExportsError::InvalidParameter(ref cause) => cause,
DescribeContinuousExportsError::InvalidParameterValue(ref cause) => cause,
DescribeContinuousExportsError::OperationNotPermitted(ref cause) => cause,
DescribeContinuousExportsError::ResourceNotFound(ref cause) => cause,
DescribeContinuousExportsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeExportConfigurationsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl DescribeExportConfigurationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeExportConfigurationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
DescribeExportConfigurationsError::AuthorizationError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
DescribeExportConfigurationsError::InvalidParameter(err.msg),
)
}
"InvalidParameterValueException" => {
return RusotoError::Service(
DescribeExportConfigurationsError::InvalidParameterValue(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeExportConfigurationsError::ResourceNotFound(err.msg),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(
DescribeExportConfigurationsError::ServerInternalError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeExportConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeExportConfigurationsError {
fn description(&self) -> &str {
match *self {
DescribeExportConfigurationsError::AuthorizationError(ref cause) => cause,
DescribeExportConfigurationsError::InvalidParameter(ref cause) => cause,
DescribeExportConfigurationsError::InvalidParameterValue(ref cause) => cause,
DescribeExportConfigurationsError::ResourceNotFound(ref cause) => cause,
DescribeExportConfigurationsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeExportTasksError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DescribeExportTasksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeExportTasksError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DescribeExportTasksError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeExportTasksError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DescribeExportTasksError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DescribeExportTasksError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeExportTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeExportTasksError {
fn description(&self) -> &str {
match *self {
DescribeExportTasksError::AuthorizationError(ref cause) => cause,
DescribeExportTasksError::InvalidParameter(ref cause) => cause,
DescribeExportTasksError::InvalidParameterValue(ref cause) => cause,
DescribeExportTasksError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeImportTasksError {
AuthorizationError(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DescribeImportTasksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeImportTasksError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DescribeImportTasksError::AuthorizationError(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DescribeImportTasksError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DescribeImportTasksError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeImportTasksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeImportTasksError {
fn description(&self) -> &str {
match *self {
DescribeImportTasksError::AuthorizationError(ref cause) => cause,
DescribeImportTasksError::InvalidParameterValue(ref cause) => cause,
DescribeImportTasksError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(DescribeTagsError::AuthorizationError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeTagsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(DescribeTagsError::InvalidParameterValue(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeTagsError::ResourceNotFound(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(DescribeTagsError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTagsError {
fn description(&self) -> &str {
match *self {
DescribeTagsError::AuthorizationError(ref cause) => cause,
DescribeTagsError::InvalidParameter(ref cause) => cause,
DescribeTagsError::InvalidParameterValue(ref cause) => cause,
DescribeTagsError::ResourceNotFound(ref cause) => cause,
DescribeTagsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateConfigurationItemsFromApplicationError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl DisassociateConfigurationItemsFromApplicationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateConfigurationItemsFromApplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
DisassociateConfigurationItemsFromApplicationError::AuthorizationError(
err.msg,
),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
DisassociateConfigurationItemsFromApplicationError::InvalidParameter(
err.msg,
),
)
}
"InvalidParameterValueException" => {
return RusotoError::Service(
DisassociateConfigurationItemsFromApplicationError::InvalidParameterValue(
err.msg,
),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(
DisassociateConfigurationItemsFromApplicationError::ServerInternalError(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateConfigurationItemsFromApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateConfigurationItemsFromApplicationError {
fn description(&self) -> &str {
match *self {
DisassociateConfigurationItemsFromApplicationError::AuthorizationError(ref cause) => {
cause
}
DisassociateConfigurationItemsFromApplicationError::InvalidParameter(ref cause) => {
cause
}
DisassociateConfigurationItemsFromApplicationError::InvalidParameterValue(
ref cause,
) => cause,
DisassociateConfigurationItemsFromApplicationError::ServerInternalError(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum ExportConfigurationsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
OperationNotPermitted(String),
ServerInternalError(String),
}
impl ExportConfigurationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExportConfigurationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(ExportConfigurationsError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ExportConfigurationsError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(ExportConfigurationsError::InvalidParameterValue(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(ExportConfigurationsError::OperationNotPermitted(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(ExportConfigurationsError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ExportConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ExportConfigurationsError {
fn description(&self) -> &str {
match *self {
ExportConfigurationsError::AuthorizationError(ref cause) => cause,
ExportConfigurationsError::InvalidParameter(ref cause) => cause,
ExportConfigurationsError::InvalidParameterValue(ref cause) => cause,
ExportConfigurationsError::OperationNotPermitted(ref cause) => cause,
ExportConfigurationsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDiscoverySummaryError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl GetDiscoverySummaryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDiscoverySummaryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(GetDiscoverySummaryError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(GetDiscoverySummaryError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(GetDiscoverySummaryError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(GetDiscoverySummaryError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDiscoverySummaryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDiscoverySummaryError {
fn description(&self) -> &str {
match *self {
GetDiscoverySummaryError::AuthorizationError(ref cause) => cause,
GetDiscoverySummaryError::InvalidParameter(ref cause) => cause,
GetDiscoverySummaryError::InvalidParameterValue(ref cause) => cause,
GetDiscoverySummaryError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListConfigurationsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl ListConfigurationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListConfigurationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(ListConfigurationsError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ListConfigurationsError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(ListConfigurationsError::InvalidParameterValue(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListConfigurationsError::ResourceNotFound(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(ListConfigurationsError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListConfigurationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListConfigurationsError {
fn description(&self) -> &str {
match *self {
ListConfigurationsError::AuthorizationError(ref cause) => cause,
ListConfigurationsError::InvalidParameter(ref cause) => cause,
ListConfigurationsError::InvalidParameterValue(ref cause) => cause,
ListConfigurationsError::ResourceNotFound(ref cause) => cause,
ListConfigurationsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListServerNeighborsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl ListServerNeighborsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListServerNeighborsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(ListServerNeighborsError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ListServerNeighborsError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(ListServerNeighborsError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(ListServerNeighborsError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListServerNeighborsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListServerNeighborsError {
fn description(&self) -> &str {
match *self {
ListServerNeighborsError::AuthorizationError(ref cause) => cause,
ListServerNeighborsError::InvalidParameter(ref cause) => cause,
ListServerNeighborsError::InvalidParameterValue(ref cause) => cause,
ListServerNeighborsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartContinuousExportError {
AuthorizationError(String),
ConflictError(String),
InvalidParameter(String),
InvalidParameterValue(String),
OperationNotPermitted(String),
ResourceInUse(String),
ServerInternalError(String),
}
impl StartContinuousExportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartContinuousExportError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(StartContinuousExportError::AuthorizationError(
err.msg,
))
}
"ConflictErrorException" => {
return RusotoError::Service(StartContinuousExportError::ConflictError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StartContinuousExportError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(StartContinuousExportError::InvalidParameterValue(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StartContinuousExportError::OperationNotPermitted(
err.msg,
))
}
"ResourceInUseException" => {
return RusotoError::Service(StartContinuousExportError::ResourceInUse(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(StartContinuousExportError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartContinuousExportError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartContinuousExportError {
fn description(&self) -> &str {
match *self {
StartContinuousExportError::AuthorizationError(ref cause) => cause,
StartContinuousExportError::ConflictError(ref cause) => cause,
StartContinuousExportError::InvalidParameter(ref cause) => cause,
StartContinuousExportError::InvalidParameterValue(ref cause) => cause,
StartContinuousExportError::OperationNotPermitted(ref cause) => cause,
StartContinuousExportError::ResourceInUse(ref cause) => cause,
StartContinuousExportError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartDataCollectionByAgentIdsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl StartDataCollectionByAgentIdsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<StartDataCollectionByAgentIdsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
StartDataCollectionByAgentIdsError::AuthorizationError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
StartDataCollectionByAgentIdsError::InvalidParameter(err.msg),
)
}
"InvalidParameterValueException" => {
return RusotoError::Service(
StartDataCollectionByAgentIdsError::InvalidParameterValue(err.msg),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(
StartDataCollectionByAgentIdsError::ServerInternalError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartDataCollectionByAgentIdsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartDataCollectionByAgentIdsError {
fn description(&self) -> &str {
match *self {
StartDataCollectionByAgentIdsError::AuthorizationError(ref cause) => cause,
StartDataCollectionByAgentIdsError::InvalidParameter(ref cause) => cause,
StartDataCollectionByAgentIdsError::InvalidParameterValue(ref cause) => cause,
StartDataCollectionByAgentIdsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartExportTaskError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
OperationNotPermitted(String),
ServerInternalError(String),
}
impl StartExportTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartExportTaskError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(StartExportTaskError::AuthorizationError(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(StartExportTaskError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(StartExportTaskError::InvalidParameterValue(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StartExportTaskError::OperationNotPermitted(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(StartExportTaskError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartExportTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartExportTaskError {
fn description(&self) -> &str {
match *self {
StartExportTaskError::AuthorizationError(ref cause) => cause,
StartExportTaskError::InvalidParameter(ref cause) => cause,
StartExportTaskError::InvalidParameterValue(ref cause) => cause,
StartExportTaskError::OperationNotPermitted(ref cause) => cause,
StartExportTaskError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartImportTaskError {
AuthorizationError(String),
InvalidParameterValue(String),
ResourceInUse(String),
ServerInternalError(String),
}
impl StartImportTaskError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartImportTaskError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(StartImportTaskError::AuthorizationError(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(StartImportTaskError::InvalidParameterValue(
err.msg,
))
}
"ResourceInUseException" => {
return RusotoError::Service(StartImportTaskError::ResourceInUse(err.msg))
}
"ServerInternalErrorException" => {
return RusotoError::Service(StartImportTaskError::ServerInternalError(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartImportTaskError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartImportTaskError {
fn description(&self) -> &str {
match *self {
StartImportTaskError::AuthorizationError(ref cause) => cause,
StartImportTaskError::InvalidParameterValue(ref cause) => cause,
StartImportTaskError::ResourceInUse(ref cause) => cause,
StartImportTaskError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopContinuousExportError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
OperationNotPermitted(String),
ResourceInUse(String),
ResourceNotFound(String),
ServerInternalError(String),
}
impl StopContinuousExportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopContinuousExportError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(StopContinuousExportError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(StopContinuousExportError::InvalidParameter(
err.msg,
))
}
"InvalidParameterValueException" => {
return RusotoError::Service(StopContinuousExportError::InvalidParameterValue(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StopContinuousExportError::OperationNotPermitted(
err.msg,
))
}
"ResourceInUseException" => {
return RusotoError::Service(StopContinuousExportError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopContinuousExportError::ResourceNotFound(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(StopContinuousExportError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopContinuousExportError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopContinuousExportError {
fn description(&self) -> &str {
match *self {
StopContinuousExportError::AuthorizationError(ref cause) => cause,
StopContinuousExportError::InvalidParameter(ref cause) => cause,
StopContinuousExportError::InvalidParameterValue(ref cause) => cause,
StopContinuousExportError::OperationNotPermitted(ref cause) => cause,
StopContinuousExportError::ResourceInUse(ref cause) => cause,
StopContinuousExportError::ResourceNotFound(ref cause) => cause,
StopContinuousExportError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopDataCollectionByAgentIdsError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl StopDataCollectionByAgentIdsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<StopDataCollectionByAgentIdsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(
StopDataCollectionByAgentIdsError::AuthorizationError(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
StopDataCollectionByAgentIdsError::InvalidParameter(err.msg),
)
}
"InvalidParameterValueException" => {
return RusotoError::Service(
StopDataCollectionByAgentIdsError::InvalidParameterValue(err.msg),
)
}
"ServerInternalErrorException" => {
return RusotoError::Service(
StopDataCollectionByAgentIdsError::ServerInternalError(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopDataCollectionByAgentIdsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopDataCollectionByAgentIdsError {
fn description(&self) -> &str {
match *self {
StopDataCollectionByAgentIdsError::AuthorizationError(ref cause) => cause,
StopDataCollectionByAgentIdsError::InvalidParameter(ref cause) => cause,
StopDataCollectionByAgentIdsError::InvalidParameterValue(ref cause) => cause,
StopDataCollectionByAgentIdsError::ServerInternalError(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApplicationError {
AuthorizationError(String),
InvalidParameter(String),
InvalidParameterValue(String),
ServerInternalError(String),
}
impl UpdateApplicationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApplicationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthorizationErrorException" => {
return RusotoError::Service(UpdateApplicationError::AuthorizationError(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateApplicationError::InvalidParameter(err.msg))
}
"InvalidParameterValueException" => {
return RusotoError::Service(UpdateApplicationError::InvalidParameterValue(
err.msg,
))
}
"ServerInternalErrorException" => {
return RusotoError::Service(UpdateApplicationError::ServerInternalError(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateApplicationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApplicationError {
fn description(&self) -> &str {
match *self {
UpdateApplicationError::AuthorizationError(ref cause) => cause,
UpdateApplicationError::InvalidParameter(ref cause) => cause,
UpdateApplicationError::InvalidParameterValue(ref cause) => cause,
UpdateApplicationError::ServerInternalError(ref cause) => cause,
}
}
}
pub trait Discovery {
fn associate_configuration_items_to_application(
&self,
input: AssociateConfigurationItemsToApplicationRequest,
) -> RusotoFuture<
AssociateConfigurationItemsToApplicationResponse,
AssociateConfigurationItemsToApplicationError,
>;
fn batch_delete_import_data(
&self,
input: BatchDeleteImportDataRequest,
) -> RusotoFuture<BatchDeleteImportDataResponse, BatchDeleteImportDataError>;
fn create_application(
&self,
input: CreateApplicationRequest,
) -> RusotoFuture<CreateApplicationResponse, CreateApplicationError>;
fn create_tags(
&self,
input: CreateTagsRequest,
) -> RusotoFuture<CreateTagsResponse, CreateTagsError>;
fn delete_applications(
&self,
input: DeleteApplicationsRequest,
) -> RusotoFuture<DeleteApplicationsResponse, DeleteApplicationsError>;
fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> RusotoFuture<DeleteTagsResponse, DeleteTagsError>;
fn describe_agents(
&self,
input: DescribeAgentsRequest,
) -> RusotoFuture<DescribeAgentsResponse, DescribeAgentsError>;
fn describe_configurations(
&self,
input: DescribeConfigurationsRequest,
) -> RusotoFuture<DescribeConfigurationsResponse, DescribeConfigurationsError>;
fn describe_continuous_exports(
&self,
input: DescribeContinuousExportsRequest,
) -> RusotoFuture<DescribeContinuousExportsResponse, DescribeContinuousExportsError>;
fn describe_export_configurations(
&self,
input: DescribeExportConfigurationsRequest,
) -> RusotoFuture<DescribeExportConfigurationsResponse, DescribeExportConfigurationsError>;
fn describe_export_tasks(
&self,
input: DescribeExportTasksRequest,
) -> RusotoFuture<DescribeExportTasksResponse, DescribeExportTasksError>;
fn describe_import_tasks(
&self,
input: DescribeImportTasksRequest,
) -> RusotoFuture<DescribeImportTasksResponse, DescribeImportTasksError>;
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResponse, DescribeTagsError>;
fn disassociate_configuration_items_from_application(
&self,
input: DisassociateConfigurationItemsFromApplicationRequest,
) -> RusotoFuture<
DisassociateConfigurationItemsFromApplicationResponse,
DisassociateConfigurationItemsFromApplicationError,
>;
fn export_configurations(
&self,
) -> RusotoFuture<ExportConfigurationsResponse, ExportConfigurationsError>;
fn get_discovery_summary(
&self,
) -> RusotoFuture<GetDiscoverySummaryResponse, GetDiscoverySummaryError>;
fn list_configurations(
&self,
input: ListConfigurationsRequest,
) -> RusotoFuture<ListConfigurationsResponse, ListConfigurationsError>;
fn list_server_neighbors(
&self,
input: ListServerNeighborsRequest,
) -> RusotoFuture<ListServerNeighborsResponse, ListServerNeighborsError>;
fn start_continuous_export(
&self,
) -> RusotoFuture<StartContinuousExportResponse, StartContinuousExportError>;
fn start_data_collection_by_agent_ids(
&self,
input: StartDataCollectionByAgentIdsRequest,
) -> RusotoFuture<StartDataCollectionByAgentIdsResponse, StartDataCollectionByAgentIdsError>;
fn start_export_task(
&self,
input: StartExportTaskRequest,
) -> RusotoFuture<StartExportTaskResponse, StartExportTaskError>;
fn start_import_task(
&self,
input: StartImportTaskRequest,
) -> RusotoFuture<StartImportTaskResponse, StartImportTaskError>;
fn stop_continuous_export(
&self,
input: StopContinuousExportRequest,
) -> RusotoFuture<StopContinuousExportResponse, StopContinuousExportError>;
fn stop_data_collection_by_agent_ids(
&self,
input: StopDataCollectionByAgentIdsRequest,
) -> RusotoFuture<StopDataCollectionByAgentIdsResponse, StopDataCollectionByAgentIdsError>;
fn update_application(
&self,
input: UpdateApplicationRequest,
) -> RusotoFuture<UpdateApplicationResponse, UpdateApplicationError>;
}
#[derive(Clone)]
pub struct DiscoveryClient {
client: Client,
region: region::Region,
}
impl DiscoveryClient {
pub fn new(region: region::Region) -> DiscoveryClient {
DiscoveryClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> DiscoveryClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
DiscoveryClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Discovery for DiscoveryClient {
fn associate_configuration_items_to_application(
&self,
input: AssociateConfigurationItemsToApplicationRequest,
) -> RusotoFuture<
AssociateConfigurationItemsToApplicationResponse,
AssociateConfigurationItemsToApplicationError,
> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.AssociateConfigurationItemsToApplication",
);
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::<AssociateConfigurationItemsToApplicationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateConfigurationItemsToApplicationError::from_response(response))
}))
}
})
}
fn batch_delete_import_data(
&self,
input: BatchDeleteImportDataRequest,
) -> RusotoFuture<BatchDeleteImportDataResponse, BatchDeleteImportDataError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.BatchDeleteImportData",
);
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::<BatchDeleteImportDataResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(BatchDeleteImportDataError::from_response(response))
}),
)
}
})
}
fn create_application(
&self,
input: CreateApplicationRequest,
) -> RusotoFuture<CreateApplicationResponse, CreateApplicationError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.CreateApplication",
);
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::<CreateApplicationResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateApplicationError::from_response(response))),
)
}
})
}
fn create_tags(
&self,
input: CreateTagsRequest,
) -> RusotoFuture<CreateTagsResponse, CreateTagsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AWSPoseidonService_V2015_11_01.CreateTags");
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::<CreateTagsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTagsError::from_response(response))),
)
}
})
}
fn delete_applications(
&self,
input: DeleteApplicationsRequest,
) -> RusotoFuture<DeleteApplicationsResponse, DeleteApplicationsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DeleteApplications",
);
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::<DeleteApplicationsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteApplicationsError::from_response(response))),
)
}
})
}
fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> RusotoFuture<DeleteTagsResponse, DeleteTagsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "AWSPoseidonService_V2015_11_01.DeleteTags");
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::<DeleteTagsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTagsError::from_response(response))),
)
}
})
}
fn describe_agents(
&self,
input: DescribeAgentsRequest,
) -> RusotoFuture<DescribeAgentsResponse, DescribeAgentsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeAgents",
);
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::<DescribeAgentsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeAgentsError::from_response(response))),
)
}
})
}
fn describe_configurations(
&self,
input: DescribeConfigurationsRequest,
) -> RusotoFuture<DescribeConfigurationsResponse, DescribeConfigurationsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeConfigurations",
);
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::<DescribeConfigurationsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeConfigurationsError::from_response(response))
}),
)
}
})
}
fn describe_continuous_exports(
&self,
input: DescribeContinuousExportsRequest,
) -> RusotoFuture<DescribeContinuousExportsResponse, DescribeContinuousExportsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeContinuousExports",
);
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::<DescribeContinuousExportsResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeContinuousExportsError::from_response(response))
}))
}
})
}
fn describe_export_configurations(
&self,
input: DescribeExportConfigurationsRequest,
) -> RusotoFuture<DescribeExportConfigurationsResponse, DescribeExportConfigurationsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeExportConfigurations",
);
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::<DescribeExportConfigurationsResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeExportConfigurationsError::from_response(response))
}))
}
})
}
fn describe_export_tasks(
&self,
input: DescribeExportTasksRequest,
) -> RusotoFuture<DescribeExportTasksResponse, DescribeExportTasksError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeExportTasks",
);
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::<DescribeExportTasksResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeExportTasksError::from_response(response))
}),
)
}
})
}
fn describe_import_tasks(
&self,
input: DescribeImportTasksRequest,
) -> RusotoFuture<DescribeImportTasksResponse, DescribeImportTasksError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeImportTasks",
);
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::<DescribeImportTasksResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeImportTasksError::from_response(response))
}),
)
}
})
}
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResponse, DescribeTagsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DescribeTags",
);
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::<DescribeTagsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTagsError::from_response(response))),
)
}
})
}
fn disassociate_configuration_items_from_application(
&self,
input: DisassociateConfigurationItemsFromApplicationRequest,
) -> RusotoFuture<
DisassociateConfigurationItemsFromApplicationResponse,
DisassociateConfigurationItemsFromApplicationError,
> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.DisassociateConfigurationItemsFromApplication",
);
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::<DisassociateConfigurationItemsFromApplicationResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateConfigurationItemsFromApplicationError::from_response(response))
}))
}
})
}
fn export_configurations(
&self,
) -> RusotoFuture<ExportConfigurationsResponse, ExportConfigurationsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.ExportConfigurations",
);
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::<ExportConfigurationsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ExportConfigurationsError::from_response(response))
}),
)
}
})
}
fn get_discovery_summary(
&self,
) -> RusotoFuture<GetDiscoverySummaryResponse, GetDiscoverySummaryError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.GetDiscoverySummary",
);
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::<GetDiscoverySummaryResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDiscoverySummaryError::from_response(response))
}),
)
}
})
}
fn list_configurations(
&self,
input: ListConfigurationsRequest,
) -> RusotoFuture<ListConfigurationsResponse, ListConfigurationsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.ListConfigurations",
);
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::<ListConfigurationsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListConfigurationsError::from_response(response))),
)
}
})
}
fn list_server_neighbors(
&self,
input: ListServerNeighborsRequest,
) -> RusotoFuture<ListServerNeighborsResponse, ListServerNeighborsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.ListServerNeighbors",
);
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::<ListServerNeighborsResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListServerNeighborsError::from_response(response))
}),
)
}
})
}
fn start_continuous_export(
&self,
) -> RusotoFuture<StartContinuousExportResponse, StartContinuousExportError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StartContinuousExport",
);
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::<StartContinuousExportResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartContinuousExportError::from_response(response))
}),
)
}
})
}
fn start_data_collection_by_agent_ids(
&self,
input: StartDataCollectionByAgentIdsRequest,
) -> RusotoFuture<StartDataCollectionByAgentIdsResponse, StartDataCollectionByAgentIdsError>
{
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StartDataCollectionByAgentIds",
);
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::<StartDataCollectionByAgentIdsResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StartDataCollectionByAgentIdsError::from_response(response))
}))
}
})
}
fn start_export_task(
&self,
input: StartExportTaskRequest,
) -> RusotoFuture<StartExportTaskResponse, StartExportTaskError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StartExportTask",
);
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::<StartExportTaskResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartExportTaskError::from_response(response))),
)
}
})
}
fn start_import_task(
&self,
input: StartImportTaskRequest,
) -> RusotoFuture<StartImportTaskResponse, StartImportTaskError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StartImportTask",
);
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::<StartImportTaskResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartImportTaskError::from_response(response))),
)
}
})
}
fn stop_continuous_export(
&self,
input: StopContinuousExportRequest,
) -> RusotoFuture<StopContinuousExportResponse, StopContinuousExportError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StopContinuousExport",
);
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::<StopContinuousExportResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StopContinuousExportError::from_response(response))
}),
)
}
})
}
fn stop_data_collection_by_agent_ids(
&self,
input: StopDataCollectionByAgentIdsRequest,
) -> RusotoFuture<StopDataCollectionByAgentIdsResponse, StopDataCollectionByAgentIdsError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.StopDataCollectionByAgentIds",
);
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::<StopDataCollectionByAgentIdsResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(StopDataCollectionByAgentIdsError::from_response(response))
}))
}
})
}
fn update_application(
&self,
input: UpdateApplicationRequest,
) -> RusotoFuture<UpdateApplicationResponse, UpdateApplicationError> {
let mut request = SignedRequest::new("POST", "discovery", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"AWSPoseidonService_V2015_11_01.UpdateApplication",
);
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::<UpdateApplicationResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateApplicationError::from_response(response))),
)
}
})
}
}