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, Serialize)]
pub struct AcceptSharedDirectoryRequest {
#[serde(rename = "SharedDirectoryId")]
pub shared_directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AcceptSharedDirectoryResult {
#[serde(rename = "SharedDirectory")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory: Option<SharedDirectory>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddIpRoutesRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "IpRoutes")]
pub ip_routes: Vec<IpRoute>,
#[serde(rename = "UpdateSecurityGroupForDirectoryControllers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub update_security_group_for_directory_controllers: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddIpRoutesResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AddTagsToResourceRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AddTagsToResourceResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Attribute {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CancelSchemaExtensionRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "SchemaExtensionId")]
pub schema_extension_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CancelSchemaExtensionResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Computer {
#[serde(rename = "ComputerAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_attributes: Option<Vec<Attribute>>,
#[serde(rename = "ComputerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_id: Option<String>,
#[serde(rename = "ComputerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConditionalForwarder {
#[serde(rename = "DnsIpAddrs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_ip_addrs: Option<Vec<String>>,
#[serde(rename = "RemoteDomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_domain_name: Option<String>,
#[serde(rename = "ReplicationScope")]
#[serde(skip_serializing_if = "Option::is_none")]
pub replication_scope: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConnectDirectoryRequest {
#[serde(rename = "ConnectSettings")]
pub connect_settings: DirectoryConnectSettings,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "ShortName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(rename = "Size")]
pub size: 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 ConnectDirectoryResult {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateAliasRequest {
#[serde(rename = "Alias")]
pub alias: String,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAliasResult {
#[serde(rename = "Alias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alias: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateComputerRequest {
#[serde(rename = "ComputerAttributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_attributes: Option<Vec<Attribute>>,
#[serde(rename = "ComputerName")]
pub computer_name: String,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "OrganizationalUnitDistinguishedName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organizational_unit_distinguished_name: Option<String>,
#[serde(rename = "Password")]
pub password: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateComputerResult {
#[serde(rename = "Computer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer: Option<Computer>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateConditionalForwarderRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "DnsIpAddrs")]
pub dns_ip_addrs: Vec<String>,
#[serde(rename = "RemoteDomainName")]
pub remote_domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateConditionalForwarderResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectoryRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "ShortName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(rename = "Size")]
pub size: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "VpcSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_settings: Option<DirectoryVpcSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectoryResult {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateLogSubscriptionRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "LogGroupName")]
pub log_group_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateLogSubscriptionResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateMicrosoftADRequest {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Edition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub edition: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Password")]
pub password: String,
#[serde(rename = "ShortName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "VpcSettings")]
pub vpc_settings: DirectoryVpcSettings,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateMicrosoftADResult {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateSnapshotRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: 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 CreateSnapshotResult {
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTrustRequest {
#[serde(rename = "ConditionalForwarderIpAddrs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conditional_forwarder_ip_addrs: Option<Vec<String>>,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RemoteDomainName")]
pub remote_domain_name: String,
#[serde(rename = "SelectiveAuth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selective_auth: Option<String>,
#[serde(rename = "TrustDirection")]
pub trust_direction: String,
#[serde(rename = "TrustPassword")]
pub trust_password: String,
#[serde(rename = "TrustType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTrustResult {
#[serde(rename = "TrustId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteConditionalForwarderRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RemoteDomainName")]
pub remote_domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteConditionalForwarderResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectoryRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectoryResult {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteLogSubscriptionRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteLogSubscriptionResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteSnapshotRequest {
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteSnapshotResult {
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTrustRequest {
#[serde(rename = "DeleteAssociatedConditionalForwarder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub delete_associated_conditional_forwarder: Option<bool>,
#[serde(rename = "TrustId")]
pub trust_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTrustResult {
#[serde(rename = "TrustId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeregisterEventTopicRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "TopicName")]
pub topic_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeregisterEventTopicResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeConditionalForwardersRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RemoteDomainNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_domain_names: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeConditionalForwardersResult {
#[serde(rename = "ConditionalForwarders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub conditional_forwarders: Option<Vec<ConditionalForwarder>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectoriesRequest {
#[serde(rename = "DirectoryIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_ids: Option<Vec<String>>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: 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 DescribeDirectoriesResult {
#[serde(rename = "DirectoryDescriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_descriptions: Option<Vec<DirectoryDescription>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDomainControllersRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "DomainControllerIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_controller_ids: Option<Vec<String>>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: 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 DescribeDomainControllersResult {
#[serde(rename = "DomainControllers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_controllers: Option<Vec<DomainController>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeEventTopicsRequest {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "TopicNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic_names: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeEventTopicsResult {
#[serde(rename = "EventTopics")]
#[serde(skip_serializing_if = "Option::is_none")]
pub event_topics: Option<Vec<EventTopic>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSharedDirectoriesRequest {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "OwnerDirectoryId")]
pub owner_directory_id: String,
#[serde(rename = "SharedDirectoryIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSharedDirectoriesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SharedDirectories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directories: Option<Vec<SharedDirectory>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSnapshotsRequest {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SnapshotIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSnapshotsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Snapshots")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshots: Option<Vec<Snapshot>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTrustsRequest {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "TrustIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTrustsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Trusts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trusts: Option<Vec<Trust>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DirectoryConnectSettings {
#[serde(rename = "CustomerDnsIps")]
pub customer_dns_ips: Vec<String>,
#[serde(rename = "CustomerUserName")]
pub customer_user_name: String,
#[serde(rename = "SubnetIds")]
pub subnet_ids: Vec<String>,
#[serde(rename = "VpcId")]
pub vpc_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectoryConnectSettingsDescription {
#[serde(rename = "AvailabilityZones")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zones: Option<Vec<String>>,
#[serde(rename = "ConnectIps")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connect_ips: Option<Vec<String>>,
#[serde(rename = "CustomerUserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_user_name: Option<String>,
#[serde(rename = "SecurityGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_id: Option<String>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectoryDescription {
#[serde(rename = "AccessUrl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_url: Option<String>,
#[serde(rename = "Alias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alias: Option<String>,
#[serde(rename = "ConnectSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connect_settings: Option<DirectoryConnectSettingsDescription>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DesiredNumberOfDomainControllers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub desired_number_of_domain_controllers: Option<i64>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "DnsIpAddrs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_ip_addrs: Option<Vec<String>>,
#[serde(rename = "Edition")]
#[serde(skip_serializing_if = "Option::is_none")]
pub edition: Option<String>,
#[serde(rename = "LaunchTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_time: Option<f64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OwnerDirectoryDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_directory_description: Option<OwnerDirectoryDescription>,
#[serde(rename = "RadiusSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_settings: Option<RadiusSettings>,
#[serde(rename = "RadiusStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_status: Option<String>,
#[serde(rename = "ShareMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_method: Option<String>,
#[serde(rename = "ShareNotes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_notes: Option<String>,
#[serde(rename = "ShareStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_status: Option<String>,
#[serde(rename = "ShortName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub short_name: Option<String>,
#[serde(rename = "Size")]
#[serde(skip_serializing_if = "Option::is_none")]
pub size: Option<String>,
#[serde(rename = "SsoEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sso_enabled: Option<bool>,
#[serde(rename = "Stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
#[serde(rename = "StageLastUpdatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_last_updated_date_time: Option<f64>,
#[serde(rename = "StageReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_reason: Option<String>,
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "VpcSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_settings: Option<DirectoryVpcSettingsDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectoryLimits {
#[serde(rename = "CloudOnlyDirectoriesCurrentCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_directories_current_count: Option<i64>,
#[serde(rename = "CloudOnlyDirectoriesLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_directories_limit: Option<i64>,
#[serde(rename = "CloudOnlyDirectoriesLimitReached")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_directories_limit_reached: Option<bool>,
#[serde(rename = "CloudOnlyMicrosoftADCurrentCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_microsoft_ad_current_count: Option<i64>,
#[serde(rename = "CloudOnlyMicrosoftADLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_microsoft_ad_limit: Option<i64>,
#[serde(rename = "CloudOnlyMicrosoftADLimitReached")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloud_only_microsoft_ad_limit_reached: Option<bool>,
#[serde(rename = "ConnectedDirectoriesCurrentCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connected_directories_current_count: Option<i64>,
#[serde(rename = "ConnectedDirectoriesLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connected_directories_limit: Option<i64>,
#[serde(rename = "ConnectedDirectoriesLimitReached")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connected_directories_limit_reached: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DirectoryVpcSettings {
#[serde(rename = "SubnetIds")]
pub subnet_ids: Vec<String>,
#[serde(rename = "VpcId")]
pub vpc_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectoryVpcSettingsDescription {
#[serde(rename = "AvailabilityZones")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zones: Option<Vec<String>>,
#[serde(rename = "SecurityGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_id: Option<String>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableRadiusRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableRadiusResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableSsoRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "Password")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableSsoResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainController {
#[serde(rename = "AvailabilityZone")]
#[serde(skip_serializing_if = "Option::is_none")]
pub availability_zone: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "DnsIpAddr")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_ip_addr: Option<String>,
#[serde(rename = "DomainControllerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_controller_id: Option<String>,
#[serde(rename = "LaunchTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_time: Option<f64>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "StatusLastUpdatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_last_updated_date_time: Option<f64>,
#[serde(rename = "StatusReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_reason: Option<String>,
#[serde(rename = "SubnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableRadiusRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RadiusSettings")]
pub radius_settings: RadiusSettings,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableRadiusResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableSsoRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "Password")]
#[serde(skip_serializing_if = "Option::is_none")]
pub password: Option<String>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableSsoResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EventTopic {
#[serde(rename = "CreatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date_time: Option<f64>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "TopicArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic_arn: Option<String>,
#[serde(rename = "TopicName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub topic_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDirectoryLimitsRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDirectoryLimitsResult {
#[serde(rename = "DirectoryLimits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_limits: Option<DirectoryLimits>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetSnapshotLimitsRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetSnapshotLimitsResult {
#[serde(rename = "SnapshotLimits")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_limits: Option<SnapshotLimits>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct IpRoute {
#[serde(rename = "CidrIp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ip: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct IpRouteInfo {
#[serde(rename = "AddedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub added_date_time: Option<f64>,
#[serde(rename = "CidrIp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr_ip: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "IpRouteStatusMsg")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_route_status_msg: Option<String>,
#[serde(rename = "IpRouteStatusReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_route_status_reason: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListIpRoutesRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: 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 ListIpRoutesResult {
#[serde(rename = "IpRoutesInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_routes_info: Option<Vec<IpRouteInfo>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListLogSubscriptionsRequest {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: 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 ListLogSubscriptionsResult {
#[serde(rename = "LogSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_subscriptions: Option<Vec<LogSubscription>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListSchemaExtensionsRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: 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 ListSchemaExtensionsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SchemaExtensionsInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_extensions_info: Option<Vec<SchemaExtensionInfo>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "ResourceId")]
pub resource_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResult {
#[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<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LogSubscription {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "LogGroupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log_group_name: Option<String>,
#[serde(rename = "SubscriptionCreatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription_created_date_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OwnerDirectoryDescription {
#[serde(rename = "AccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_id: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "DnsIpAddrs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_ip_addrs: Option<Vec<String>>,
#[serde(rename = "RadiusSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_settings: Option<RadiusSettings>,
#[serde(rename = "RadiusStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_status: Option<String>,
#[serde(rename = "VpcSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_settings: Option<DirectoryVpcSettingsDescription>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RadiusSettings {
#[serde(rename = "AuthenticationProtocol")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_protocol: Option<String>,
#[serde(rename = "DisplayLabel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_label: Option<String>,
#[serde(rename = "RadiusPort")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_port: Option<i64>,
#[serde(rename = "RadiusRetries")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_retries: Option<i64>,
#[serde(rename = "RadiusServers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_servers: Option<Vec<String>>,
#[serde(rename = "RadiusTimeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub radius_timeout: Option<i64>,
#[serde(rename = "SharedSecret")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_secret: Option<String>,
#[serde(rename = "UseSameUsername")]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_same_username: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RegisterEventTopicRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "TopicName")]
pub topic_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RegisterEventTopicResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RejectSharedDirectoryRequest {
#[serde(rename = "SharedDirectoryId")]
pub shared_directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RejectSharedDirectoryResult {
#[serde(rename = "SharedDirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveIpRoutesRequest {
#[serde(rename = "CidrIps")]
pub cidr_ips: Vec<String>,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveIpRoutesResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RemoveTagsFromResourceRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RemoveTagsFromResourceResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ResetUserPasswordRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "NewPassword")]
pub new_password: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResetUserPasswordResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RestoreFromSnapshotRequest {
#[serde(rename = "SnapshotId")]
pub snapshot_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RestoreFromSnapshotResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SchemaExtensionInfo {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "EndDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_date_time: Option<f64>,
#[serde(rename = "SchemaExtensionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_extension_id: Option<String>,
#[serde(rename = "SchemaExtensionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_extension_status: Option<String>,
#[serde(rename = "SchemaExtensionStatusReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_extension_status_reason: Option<String>,
#[serde(rename = "StartDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_date_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ShareDirectoryRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "ShareMethod")]
pub share_method: String,
#[serde(rename = "ShareNotes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_notes: Option<String>,
#[serde(rename = "ShareTarget")]
pub share_target: ShareTarget,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ShareDirectoryResult {
#[serde(rename = "SharedDirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ShareTarget {
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SharedDirectory {
#[serde(rename = "CreatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date_time: Option<f64>,
#[serde(rename = "LastUpdatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date_time: Option<f64>,
#[serde(rename = "OwnerAccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account_id: Option<String>,
#[serde(rename = "OwnerDirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_directory_id: Option<String>,
#[serde(rename = "ShareMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_method: Option<String>,
#[serde(rename = "ShareNotes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_notes: Option<String>,
#[serde(rename = "ShareStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub share_status: Option<String>,
#[serde(rename = "SharedAccountId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_account_id: Option<String>,
#[serde(rename = "SharedDirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Snapshot {
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "SnapshotId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub snapshot_id: Option<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 = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SnapshotLimits {
#[serde(rename = "ManualSnapshotsCurrentCount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manual_snapshots_current_count: Option<i64>,
#[serde(rename = "ManualSnapshotsLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manual_snapshots_limit: Option<i64>,
#[serde(rename = "ManualSnapshotsLimitReached")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manual_snapshots_limit_reached: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartSchemaExtensionRequest {
#[serde(rename = "CreateSnapshotBeforeSchemaExtension")]
pub create_snapshot_before_schema_extension: bool,
#[serde(rename = "Description")]
pub description: String,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "LdifContent")]
pub ldif_content: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartSchemaExtensionResult {
#[serde(rename = "SchemaExtensionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema_extension_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
pub value: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Trust {
#[serde(rename = "CreatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date_time: Option<f64>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "LastUpdatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date_time: Option<f64>,
#[serde(rename = "RemoteDomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_domain_name: Option<String>,
#[serde(rename = "SelectiveAuth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selective_auth: Option<String>,
#[serde(rename = "StateLastUpdatedDateTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_last_updated_date_time: Option<f64>,
#[serde(rename = "TrustDirection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_direction: Option<String>,
#[serde(rename = "TrustId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_id: Option<String>,
#[serde(rename = "TrustState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_state: Option<String>,
#[serde(rename = "TrustStateReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_state_reason: Option<String>,
#[serde(rename = "TrustType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UnshareDirectoryRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "UnshareTarget")]
pub unshare_target: UnshareTarget,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UnshareDirectoryResult {
#[serde(rename = "SharedDirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_directory_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UnshareTarget {
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "Type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateConditionalForwarderRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "DnsIpAddrs")]
pub dns_ip_addrs: Vec<String>,
#[serde(rename = "RemoteDomainName")]
pub remote_domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateConditionalForwarderResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateNumberOfDomainControllersRequest {
#[serde(rename = "DesiredNumber")]
pub desired_number: i64,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateNumberOfDomainControllersResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRadiusRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RadiusSettings")]
pub radius_settings: RadiusSettings,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRadiusResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateTrustRequest {
#[serde(rename = "SelectiveAuth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selective_auth: Option<String>,
#[serde(rename = "TrustId")]
pub trust_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateTrustResult {
#[serde(rename = "RequestId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_id: Option<String>,
#[serde(rename = "TrustId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct VerifyTrustRequest {
#[serde(rename = "TrustId")]
pub trust_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VerifyTrustResult {
#[serde(rename = "TrustId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub trust_id: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AcceptSharedDirectoryError {
Client(String),
DirectoryAlreadyShared(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl AcceptSharedDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AcceptSharedDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(AcceptSharedDirectoryError::Client(err.msg))
}
"DirectoryAlreadySharedException" => {
return RusotoError::Service(
AcceptSharedDirectoryError::DirectoryAlreadyShared(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(AcceptSharedDirectoryError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AcceptSharedDirectoryError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(AcceptSharedDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AcceptSharedDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AcceptSharedDirectoryError {
fn description(&self) -> &str {
match *self {
AcceptSharedDirectoryError::Client(ref cause) => cause,
AcceptSharedDirectoryError::DirectoryAlreadyShared(ref cause) => cause,
AcceptSharedDirectoryError::EntityDoesNotExist(ref cause) => cause,
AcceptSharedDirectoryError::InvalidParameter(ref cause) => cause,
AcceptSharedDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddIpRoutesError {
Client(String),
DirectoryUnavailable(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
IpRouteLimitExceeded(String),
Service(String),
}
impl AddIpRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddIpRoutesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(AddIpRoutesError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(AddIpRoutesError::DirectoryUnavailable(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(AddIpRoutesError::EntityAlreadyExists(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(AddIpRoutesError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(AddIpRoutesError::InvalidParameter(err.msg))
}
"IpRouteLimitExceededException" => {
return RusotoError::Service(AddIpRoutesError::IpRouteLimitExceeded(err.msg))
}
"ServiceException" => {
return RusotoError::Service(AddIpRoutesError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddIpRoutesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddIpRoutesError {
fn description(&self) -> &str {
match *self {
AddIpRoutesError::Client(ref cause) => cause,
AddIpRoutesError::DirectoryUnavailable(ref cause) => cause,
AddIpRoutesError::EntityAlreadyExists(ref cause) => cause,
AddIpRoutesError::EntityDoesNotExist(ref cause) => cause,
AddIpRoutesError::InvalidParameter(ref cause) => cause,
AddIpRoutesError::IpRouteLimitExceeded(ref cause) => cause,
AddIpRoutesError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AddTagsToResourceError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
TagLimitExceeded(String),
}
impl AddTagsToResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddTagsToResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(AddTagsToResourceError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(AddTagsToResourceError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(AddTagsToResourceError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(AddTagsToResourceError::Service(err.msg))
}
"TagLimitExceededException" => {
return RusotoError::Service(AddTagsToResourceError::TagLimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AddTagsToResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AddTagsToResourceError {
fn description(&self) -> &str {
match *self {
AddTagsToResourceError::Client(ref cause) => cause,
AddTagsToResourceError::EntityDoesNotExist(ref cause) => cause,
AddTagsToResourceError::InvalidParameter(ref cause) => cause,
AddTagsToResourceError::Service(ref cause) => cause,
AddTagsToResourceError::TagLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CancelSchemaExtensionError {
Client(String),
EntityDoesNotExist(String),
Service(String),
}
impl CancelSchemaExtensionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelSchemaExtensionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CancelSchemaExtensionError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CancelSchemaExtensionError::EntityDoesNotExist(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(CancelSchemaExtensionError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CancelSchemaExtensionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CancelSchemaExtensionError {
fn description(&self) -> &str {
match *self {
CancelSchemaExtensionError::Client(ref cause) => cause,
CancelSchemaExtensionError::EntityDoesNotExist(ref cause) => cause,
CancelSchemaExtensionError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConnectDirectoryError {
Client(String),
DirectoryLimitExceeded(String),
InvalidParameter(String),
Service(String),
}
impl ConnectDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConnectDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ConnectDirectoryError::Client(err.msg))
}
"DirectoryLimitExceededException" => {
return RusotoError::Service(ConnectDirectoryError::DirectoryLimitExceeded(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ConnectDirectoryError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(ConnectDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConnectDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConnectDirectoryError {
fn description(&self) -> &str {
match *self {
ConnectDirectoryError::Client(ref cause) => cause,
ConnectDirectoryError::DirectoryLimitExceeded(ref cause) => cause,
ConnectDirectoryError::InvalidParameter(ref cause) => cause,
ConnectDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAliasError {
Client(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl CreateAliasError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAliasError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateAliasError::Client(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(CreateAliasError::EntityAlreadyExists(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CreateAliasError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateAliasError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateAliasError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateAliasError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAliasError {
fn description(&self) -> &str {
match *self {
CreateAliasError::Client(ref cause) => cause,
CreateAliasError::EntityAlreadyExists(ref cause) => cause,
CreateAliasError::EntityDoesNotExist(ref cause) => cause,
CreateAliasError::InvalidParameter(ref cause) => cause,
CreateAliasError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateComputerError {
AuthenticationFailed(String),
Client(String),
DirectoryUnavailable(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl CreateComputerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateComputerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthenticationFailedException" => {
return RusotoError::Service(CreateComputerError::AuthenticationFailed(err.msg))
}
"ClientException" => {
return RusotoError::Service(CreateComputerError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(CreateComputerError::DirectoryUnavailable(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(CreateComputerError::EntityAlreadyExists(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CreateComputerError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateComputerError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateComputerError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(CreateComputerError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateComputerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateComputerError {
fn description(&self) -> &str {
match *self {
CreateComputerError::AuthenticationFailed(ref cause) => cause,
CreateComputerError::Client(ref cause) => cause,
CreateComputerError::DirectoryUnavailable(ref cause) => cause,
CreateComputerError::EntityAlreadyExists(ref cause) => cause,
CreateComputerError::EntityDoesNotExist(ref cause) => cause,
CreateComputerError::InvalidParameter(ref cause) => cause,
CreateComputerError::Service(ref cause) => cause,
CreateComputerError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConditionalForwarderError {
Client(String),
DirectoryUnavailable(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl CreateConditionalForwarderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateConditionalForwarderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateConditionalForwarderError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(
CreateConditionalForwarderError::DirectoryUnavailable(err.msg),
)
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(
CreateConditionalForwarderError::EntityAlreadyExists(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
CreateConditionalForwarderError::EntityDoesNotExist(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(CreateConditionalForwarderError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(CreateConditionalForwarderError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
CreateConditionalForwarderError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateConditionalForwarderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConditionalForwarderError {
fn description(&self) -> &str {
match *self {
CreateConditionalForwarderError::Client(ref cause) => cause,
CreateConditionalForwarderError::DirectoryUnavailable(ref cause) => cause,
CreateConditionalForwarderError::EntityAlreadyExists(ref cause) => cause,
CreateConditionalForwarderError::EntityDoesNotExist(ref cause) => cause,
CreateConditionalForwarderError::InvalidParameter(ref cause) => cause,
CreateConditionalForwarderError::Service(ref cause) => cause,
CreateConditionalForwarderError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectoryError {
Client(String),
DirectoryLimitExceeded(String),
InvalidParameter(String),
Service(String),
}
impl CreateDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateDirectoryError::Client(err.msg))
}
"DirectoryLimitExceededException" => {
return RusotoError::Service(CreateDirectoryError::DirectoryLimitExceeded(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateDirectoryError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectoryError {
fn description(&self) -> &str {
match *self {
CreateDirectoryError::Client(ref cause) => cause,
CreateDirectoryError::DirectoryLimitExceeded(ref cause) => cause,
CreateDirectoryError::InvalidParameter(ref cause) => cause,
CreateDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLogSubscriptionError {
Client(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InsufficientPermissions(String),
Service(String),
UnsupportedOperation(String),
}
impl CreateLogSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLogSubscriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateLogSubscriptionError::Client(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(CreateLogSubscriptionError::EntityAlreadyExists(
err.msg,
))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CreateLogSubscriptionError::EntityDoesNotExist(
err.msg,
))
}
"InsufficientPermissionsException" => {
return RusotoError::Service(
CreateLogSubscriptionError::InsufficientPermissions(err.msg),
)
}
"ServiceException" => {
return RusotoError::Service(CreateLogSubscriptionError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(CreateLogSubscriptionError::UnsupportedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateLogSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLogSubscriptionError {
fn description(&self) -> &str {
match *self {
CreateLogSubscriptionError::Client(ref cause) => cause,
CreateLogSubscriptionError::EntityAlreadyExists(ref cause) => cause,
CreateLogSubscriptionError::EntityDoesNotExist(ref cause) => cause,
CreateLogSubscriptionError::InsufficientPermissions(ref cause) => cause,
CreateLogSubscriptionError::Service(ref cause) => cause,
CreateLogSubscriptionError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateMicrosoftADError {
Client(String),
DirectoryLimitExceeded(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl CreateMicrosoftADError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMicrosoftADError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateMicrosoftADError::Client(err.msg))
}
"DirectoryLimitExceededException" => {
return RusotoError::Service(CreateMicrosoftADError::DirectoryLimitExceeded(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateMicrosoftADError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateMicrosoftADError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(CreateMicrosoftADError::UnsupportedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateMicrosoftADError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateMicrosoftADError {
fn description(&self) -> &str {
match *self {
CreateMicrosoftADError::Client(ref cause) => cause,
CreateMicrosoftADError::DirectoryLimitExceeded(ref cause) => cause,
CreateMicrosoftADError::InvalidParameter(ref cause) => cause,
CreateMicrosoftADError::Service(ref cause) => cause,
CreateMicrosoftADError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateSnapshotError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
SnapshotLimitExceeded(String),
}
impl CreateSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateSnapshotError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateSnapshotError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CreateSnapshotError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateSnapshotError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateSnapshotError::Service(err.msg))
}
"SnapshotLimitExceededException" => {
return RusotoError::Service(CreateSnapshotError::SnapshotLimitExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateSnapshotError {
fn description(&self) -> &str {
match *self {
CreateSnapshotError::Client(ref cause) => cause,
CreateSnapshotError::EntityDoesNotExist(ref cause) => cause,
CreateSnapshotError::InvalidParameter(ref cause) => cause,
CreateSnapshotError::Service(ref cause) => cause,
CreateSnapshotError::SnapshotLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTrustError {
Client(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl CreateTrustError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTrustError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(CreateTrustError::Client(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(CreateTrustError::EntityAlreadyExists(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(CreateTrustError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(CreateTrustError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(CreateTrustError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(CreateTrustError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTrustError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTrustError {
fn description(&self) -> &str {
match *self {
CreateTrustError::Client(ref cause) => cause,
CreateTrustError::EntityAlreadyExists(ref cause) => cause,
CreateTrustError::EntityDoesNotExist(ref cause) => cause,
CreateTrustError::InvalidParameter(ref cause) => cause,
CreateTrustError::Service(ref cause) => cause,
CreateTrustError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConditionalForwarderError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DeleteConditionalForwarderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteConditionalForwarderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeleteConditionalForwarderError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(
DeleteConditionalForwarderError::DirectoryUnavailable(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
DeleteConditionalForwarderError::EntityDoesNotExist(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteConditionalForwarderError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DeleteConditionalForwarderError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
DeleteConditionalForwarderError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteConditionalForwarderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConditionalForwarderError {
fn description(&self) -> &str {
match *self {
DeleteConditionalForwarderError::Client(ref cause) => cause,
DeleteConditionalForwarderError::DirectoryUnavailable(ref cause) => cause,
DeleteConditionalForwarderError::EntityDoesNotExist(ref cause) => cause,
DeleteConditionalForwarderError::InvalidParameter(ref cause) => cause,
DeleteConditionalForwarderError::Service(ref cause) => cause,
DeleteConditionalForwarderError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectoryError {
Client(String),
EntityDoesNotExist(String),
Service(String),
}
impl DeleteDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeleteDirectoryError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DeleteDirectoryError::EntityDoesNotExist(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DeleteDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectoryError {
fn description(&self) -> &str {
match *self {
DeleteDirectoryError::Client(ref cause) => cause,
DeleteDirectoryError::EntityDoesNotExist(ref cause) => cause,
DeleteDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLogSubscriptionError {
Client(String),
EntityDoesNotExist(String),
Service(String),
UnsupportedOperation(String),
}
impl DeleteLogSubscriptionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLogSubscriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeleteLogSubscriptionError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DeleteLogSubscriptionError::EntityDoesNotExist(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DeleteLogSubscriptionError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(DeleteLogSubscriptionError::UnsupportedOperation(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteLogSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLogSubscriptionError {
fn description(&self) -> &str {
match *self {
DeleteLogSubscriptionError::Client(ref cause) => cause,
DeleteLogSubscriptionError::EntityDoesNotExist(ref cause) => cause,
DeleteLogSubscriptionError::Service(ref cause) => cause,
DeleteLogSubscriptionError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteSnapshotError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl DeleteSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteSnapshotError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeleteSnapshotError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DeleteSnapshotError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteSnapshotError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DeleteSnapshotError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteSnapshotError {
fn description(&self) -> &str {
match *self {
DeleteSnapshotError::Client(ref cause) => cause,
DeleteSnapshotError::EntityDoesNotExist(ref cause) => cause,
DeleteSnapshotError::InvalidParameter(ref cause) => cause,
DeleteSnapshotError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTrustError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DeleteTrustError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTrustError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeleteTrustError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DeleteTrustError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DeleteTrustError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DeleteTrustError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(DeleteTrustError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTrustError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTrustError {
fn description(&self) -> &str {
match *self {
DeleteTrustError::Client(ref cause) => cause,
DeleteTrustError::EntityDoesNotExist(ref cause) => cause,
DeleteTrustError::InvalidParameter(ref cause) => cause,
DeleteTrustError::Service(ref cause) => cause,
DeleteTrustError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeregisterEventTopicError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl DeregisterEventTopicError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeregisterEventTopicError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DeregisterEventTopicError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DeregisterEventTopicError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DeregisterEventTopicError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DeregisterEventTopicError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeregisterEventTopicError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeregisterEventTopicError {
fn description(&self) -> &str {
match *self {
DeregisterEventTopicError::Client(ref cause) => cause,
DeregisterEventTopicError::EntityDoesNotExist(ref cause) => cause,
DeregisterEventTopicError::InvalidParameter(ref cause) => cause,
DeregisterEventTopicError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConditionalForwardersError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DescribeConditionalForwardersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeConditionalForwardersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeConditionalForwardersError::Client(
err.msg,
))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(
DescribeConditionalForwardersError::DirectoryUnavailable(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
DescribeConditionalForwardersError::EntityDoesNotExist(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
DescribeConditionalForwardersError::InvalidParameter(err.msg),
)
}
"ServiceException" => {
return RusotoError::Service(DescribeConditionalForwardersError::Service(
err.msg,
))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
DescribeConditionalForwardersError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeConditionalForwardersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConditionalForwardersError {
fn description(&self) -> &str {
match *self {
DescribeConditionalForwardersError::Client(ref cause) => cause,
DescribeConditionalForwardersError::DirectoryUnavailable(ref cause) => cause,
DescribeConditionalForwardersError::EntityDoesNotExist(ref cause) => cause,
DescribeConditionalForwardersError::InvalidParameter(ref cause) => cause,
DescribeConditionalForwardersError::Service(ref cause) => cause,
DescribeConditionalForwardersError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectoriesError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
}
impl DescribeDirectoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDirectoriesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeDirectoriesError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DescribeDirectoriesError::EntityDoesNotExist(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(DescribeDirectoriesError::InvalidNextToken(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeDirectoriesError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DescribeDirectoriesError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectoriesError {
fn description(&self) -> &str {
match *self {
DescribeDirectoriesError::Client(ref cause) => cause,
DescribeDirectoriesError::EntityDoesNotExist(ref cause) => cause,
DescribeDirectoriesError::InvalidNextToken(ref cause) => cause,
DescribeDirectoriesError::InvalidParameter(ref cause) => cause,
DescribeDirectoriesError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDomainControllersError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DescribeDomainControllersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDomainControllersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeDomainControllersError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
DescribeDomainControllersError::EntityDoesNotExist(err.msg),
)
}
"InvalidNextTokenException" => {
return RusotoError::Service(DescribeDomainControllersError::InvalidNextToken(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeDomainControllersError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DescribeDomainControllersError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
DescribeDomainControllersError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDomainControllersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDomainControllersError {
fn description(&self) -> &str {
match *self {
DescribeDomainControllersError::Client(ref cause) => cause,
DescribeDomainControllersError::EntityDoesNotExist(ref cause) => cause,
DescribeDomainControllersError::InvalidNextToken(ref cause) => cause,
DescribeDomainControllersError::InvalidParameter(ref cause) => cause,
DescribeDomainControllersError::Service(ref cause) => cause,
DescribeDomainControllersError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeEventTopicsError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl DescribeEventTopicsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeEventTopicsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeEventTopicsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DescribeEventTopicsError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeEventTopicsError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DescribeEventTopicsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeEventTopicsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeEventTopicsError {
fn description(&self) -> &str {
match *self {
DescribeEventTopicsError::Client(ref cause) => cause,
DescribeEventTopicsError::EntityDoesNotExist(ref cause) => cause,
DescribeEventTopicsError::InvalidParameter(ref cause) => cause,
DescribeEventTopicsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSharedDirectoriesError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DescribeSharedDirectoriesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSharedDirectoriesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeSharedDirectoriesError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
DescribeSharedDirectoriesError::EntityDoesNotExist(err.msg),
)
}
"InvalidNextTokenException" => {
return RusotoError::Service(DescribeSharedDirectoriesError::InvalidNextToken(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeSharedDirectoriesError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(DescribeSharedDirectoriesError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
DescribeSharedDirectoriesError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSharedDirectoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSharedDirectoriesError {
fn description(&self) -> &str {
match *self {
DescribeSharedDirectoriesError::Client(ref cause) => cause,
DescribeSharedDirectoriesError::EntityDoesNotExist(ref cause) => cause,
DescribeSharedDirectoriesError::InvalidNextToken(ref cause) => cause,
DescribeSharedDirectoriesError::InvalidParameter(ref cause) => cause,
DescribeSharedDirectoriesError::Service(ref cause) => cause,
DescribeSharedDirectoriesError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSnapshotsError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
}
impl DescribeSnapshotsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSnapshotsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeSnapshotsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DescribeSnapshotsError::EntityDoesNotExist(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(DescribeSnapshotsError::InvalidNextToken(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeSnapshotsError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DescribeSnapshotsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSnapshotsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSnapshotsError {
fn description(&self) -> &str {
match *self {
DescribeSnapshotsError::Client(ref cause) => cause,
DescribeSnapshotsError::EntityDoesNotExist(ref cause) => cause,
DescribeSnapshotsError::InvalidNextToken(ref cause) => cause,
DescribeSnapshotsError::InvalidParameter(ref cause) => cause,
DescribeSnapshotsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTrustsError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl DescribeTrustsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTrustsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DescribeTrustsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DescribeTrustsError::EntityDoesNotExist(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(DescribeTrustsError::InvalidNextToken(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(DescribeTrustsError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DescribeTrustsError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(DescribeTrustsError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTrustsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTrustsError {
fn description(&self) -> &str {
match *self {
DescribeTrustsError::Client(ref cause) => cause,
DescribeTrustsError::EntityDoesNotExist(ref cause) => cause,
DescribeTrustsError::InvalidNextToken(ref cause) => cause,
DescribeTrustsError::InvalidParameter(ref cause) => cause,
DescribeTrustsError::Service(ref cause) => cause,
DescribeTrustsError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableRadiusError {
Client(String),
EntityDoesNotExist(String),
Service(String),
}
impl DisableRadiusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableRadiusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(DisableRadiusError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(DisableRadiusError::EntityDoesNotExist(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DisableRadiusError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableRadiusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableRadiusError {
fn description(&self) -> &str {
match *self {
DisableRadiusError::Client(ref cause) => cause,
DisableRadiusError::EntityDoesNotExist(ref cause) => cause,
DisableRadiusError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableSsoError {
AuthenticationFailed(String),
Client(String),
EntityDoesNotExist(String),
InsufficientPermissions(String),
Service(String),
}
impl DisableSsoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableSsoError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthenticationFailedException" => {
return RusotoError::Service(DisableSsoError::AuthenticationFailed(err.msg))
}
"ClientException" => return RusotoError::Service(DisableSsoError::Client(err.msg)),
"EntityDoesNotExistException" => {
return RusotoError::Service(DisableSsoError::EntityDoesNotExist(err.msg))
}
"InsufficientPermissionsException" => {
return RusotoError::Service(DisableSsoError::InsufficientPermissions(err.msg))
}
"ServiceException" => {
return RusotoError::Service(DisableSsoError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableSsoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableSsoError {
fn description(&self) -> &str {
match *self {
DisableSsoError::AuthenticationFailed(ref cause) => cause,
DisableSsoError::Client(ref cause) => cause,
DisableSsoError::EntityDoesNotExist(ref cause) => cause,
DisableSsoError::InsufficientPermissions(ref cause) => cause,
DisableSsoError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableRadiusError {
Client(String),
EntityAlreadyExists(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl EnableRadiusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableRadiusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(EnableRadiusError::Client(err.msg))
}
"EntityAlreadyExistsException" => {
return RusotoError::Service(EnableRadiusError::EntityAlreadyExists(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(EnableRadiusError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(EnableRadiusError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(EnableRadiusError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableRadiusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableRadiusError {
fn description(&self) -> &str {
match *self {
EnableRadiusError::Client(ref cause) => cause,
EnableRadiusError::EntityAlreadyExists(ref cause) => cause,
EnableRadiusError::EntityDoesNotExist(ref cause) => cause,
EnableRadiusError::InvalidParameter(ref cause) => cause,
EnableRadiusError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableSsoError {
AuthenticationFailed(String),
Client(String),
EntityDoesNotExist(String),
InsufficientPermissions(String),
Service(String),
}
impl EnableSsoError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableSsoError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AuthenticationFailedException" => {
return RusotoError::Service(EnableSsoError::AuthenticationFailed(err.msg))
}
"ClientException" => return RusotoError::Service(EnableSsoError::Client(err.msg)),
"EntityDoesNotExistException" => {
return RusotoError::Service(EnableSsoError::EntityDoesNotExist(err.msg))
}
"InsufficientPermissionsException" => {
return RusotoError::Service(EnableSsoError::InsufficientPermissions(err.msg))
}
"ServiceException" => {
return RusotoError::Service(EnableSsoError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableSsoError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableSsoError {
fn description(&self) -> &str {
match *self {
EnableSsoError::AuthenticationFailed(ref cause) => cause,
EnableSsoError::Client(ref cause) => cause,
EnableSsoError::EntityDoesNotExist(ref cause) => cause,
EnableSsoError::InsufficientPermissions(ref cause) => cause,
EnableSsoError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDirectoryLimitsError {
Client(String),
EntityDoesNotExist(String),
Service(String),
}
impl GetDirectoryLimitsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDirectoryLimitsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(GetDirectoryLimitsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(GetDirectoryLimitsError::EntityDoesNotExist(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(GetDirectoryLimitsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDirectoryLimitsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDirectoryLimitsError {
fn description(&self) -> &str {
match *self {
GetDirectoryLimitsError::Client(ref cause) => cause,
GetDirectoryLimitsError::EntityDoesNotExist(ref cause) => cause,
GetDirectoryLimitsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetSnapshotLimitsError {
Client(String),
EntityDoesNotExist(String),
Service(String),
}
impl GetSnapshotLimitsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSnapshotLimitsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(GetSnapshotLimitsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(GetSnapshotLimitsError::EntityDoesNotExist(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(GetSnapshotLimitsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSnapshotLimitsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSnapshotLimitsError {
fn description(&self) -> &str {
match *self {
GetSnapshotLimitsError::Client(ref cause) => cause,
GetSnapshotLimitsError::EntityDoesNotExist(ref cause) => cause,
GetSnapshotLimitsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListIpRoutesError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
}
impl ListIpRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListIpRoutesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ListIpRoutesError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ListIpRoutesError::EntityDoesNotExist(err.msg))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListIpRoutesError::InvalidNextToken(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ListIpRoutesError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(ListIpRoutesError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListIpRoutesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListIpRoutesError {
fn description(&self) -> &str {
match *self {
ListIpRoutesError::Client(ref cause) => cause,
ListIpRoutesError::EntityDoesNotExist(ref cause) => cause,
ListIpRoutesError::InvalidNextToken(ref cause) => cause,
ListIpRoutesError::InvalidParameter(ref cause) => cause,
ListIpRoutesError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListLogSubscriptionsError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
Service(String),
}
impl ListLogSubscriptionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLogSubscriptionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ListLogSubscriptionsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ListLogSubscriptionsError::EntityDoesNotExist(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListLogSubscriptionsError::InvalidNextToken(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(ListLogSubscriptionsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListLogSubscriptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListLogSubscriptionsError {
fn description(&self) -> &str {
match *self {
ListLogSubscriptionsError::Client(ref cause) => cause,
ListLogSubscriptionsError::EntityDoesNotExist(ref cause) => cause,
ListLogSubscriptionsError::InvalidNextToken(ref cause) => cause,
ListLogSubscriptionsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListSchemaExtensionsError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
Service(String),
}
impl ListSchemaExtensionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListSchemaExtensionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ListSchemaExtensionsError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ListSchemaExtensionsError::EntityDoesNotExist(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListSchemaExtensionsError::InvalidNextToken(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(ListSchemaExtensionsError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListSchemaExtensionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListSchemaExtensionsError {
fn description(&self) -> &str {
match *self {
ListSchemaExtensionsError::Client(ref cause) => cause,
ListSchemaExtensionsError::EntityDoesNotExist(ref cause) => cause,
ListSchemaExtensionsError::InvalidNextToken(ref cause) => cause,
ListSchemaExtensionsError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
Client(String),
EntityDoesNotExist(String),
InvalidNextToken(String),
InvalidParameter(String),
Service(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ListTagsForResourceError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ListTagsForResourceError::EntityDoesNotExist(
err.msg,
))
}
"InvalidNextTokenException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidNextToken(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(ListTagsForResourceError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(ListTagsForResourceError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListTagsForResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListTagsForResourceError {
fn description(&self) -> &str {
match *self {
ListTagsForResourceError::Client(ref cause) => cause,
ListTagsForResourceError::EntityDoesNotExist(ref cause) => cause,
ListTagsForResourceError::InvalidNextToken(ref cause) => cause,
ListTagsForResourceError::InvalidParameter(ref cause) => cause,
ListTagsForResourceError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RegisterEventTopicError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl RegisterEventTopicError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RegisterEventTopicError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(RegisterEventTopicError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(RegisterEventTopicError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(RegisterEventTopicError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(RegisterEventTopicError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RegisterEventTopicError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RegisterEventTopicError {
fn description(&self) -> &str {
match *self {
RegisterEventTopicError::Client(ref cause) => cause,
RegisterEventTopicError::EntityDoesNotExist(ref cause) => cause,
RegisterEventTopicError::InvalidParameter(ref cause) => cause,
RegisterEventTopicError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RejectSharedDirectoryError {
Client(String),
DirectoryAlreadyShared(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl RejectSharedDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RejectSharedDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(RejectSharedDirectoryError::Client(err.msg))
}
"DirectoryAlreadySharedException" => {
return RusotoError::Service(
RejectSharedDirectoryError::DirectoryAlreadyShared(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(RejectSharedDirectoryError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(RejectSharedDirectoryError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(RejectSharedDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RejectSharedDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RejectSharedDirectoryError {
fn description(&self) -> &str {
match *self {
RejectSharedDirectoryError::Client(ref cause) => cause,
RejectSharedDirectoryError::DirectoryAlreadyShared(ref cause) => cause,
RejectSharedDirectoryError::EntityDoesNotExist(ref cause) => cause,
RejectSharedDirectoryError::InvalidParameter(ref cause) => cause,
RejectSharedDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveIpRoutesError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl RemoveIpRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveIpRoutesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(RemoveIpRoutesError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(RemoveIpRoutesError::DirectoryUnavailable(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(RemoveIpRoutesError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(RemoveIpRoutesError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(RemoveIpRoutesError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveIpRoutesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveIpRoutesError {
fn description(&self) -> &str {
match *self {
RemoveIpRoutesError::Client(ref cause) => cause,
RemoveIpRoutesError::DirectoryUnavailable(ref cause) => cause,
RemoveIpRoutesError::EntityDoesNotExist(ref cause) => cause,
RemoveIpRoutesError::InvalidParameter(ref cause) => cause,
RemoveIpRoutesError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RemoveTagsFromResourceError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl RemoveTagsFromResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveTagsFromResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(RemoveTagsFromResourceError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(RemoveTagsFromResourceError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(RemoveTagsFromResourceError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(RemoveTagsFromResourceError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RemoveTagsFromResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RemoveTagsFromResourceError {
fn description(&self) -> &str {
match *self {
RemoveTagsFromResourceError::Client(ref cause) => cause,
RemoveTagsFromResourceError::EntityDoesNotExist(ref cause) => cause,
RemoveTagsFromResourceError::InvalidParameter(ref cause) => cause,
RemoveTagsFromResourceError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ResetUserPasswordError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidPassword(String),
Service(String),
UnsupportedOperation(String),
UserDoesNotExist(String),
}
impl ResetUserPasswordError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ResetUserPasswordError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(ResetUserPasswordError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(ResetUserPasswordError::DirectoryUnavailable(
err.msg,
))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ResetUserPasswordError::EntityDoesNotExist(
err.msg,
))
}
"InvalidPasswordException" => {
return RusotoError::Service(ResetUserPasswordError::InvalidPassword(err.msg))
}
"ServiceException" => {
return RusotoError::Service(ResetUserPasswordError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(ResetUserPasswordError::UnsupportedOperation(
err.msg,
))
}
"UserDoesNotExistException" => {
return RusotoError::Service(ResetUserPasswordError::UserDoesNotExist(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ResetUserPasswordError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ResetUserPasswordError {
fn description(&self) -> &str {
match *self {
ResetUserPasswordError::Client(ref cause) => cause,
ResetUserPasswordError::DirectoryUnavailable(ref cause) => cause,
ResetUserPasswordError::EntityDoesNotExist(ref cause) => cause,
ResetUserPasswordError::InvalidPassword(ref cause) => cause,
ResetUserPasswordError::Service(ref cause) => cause,
ResetUserPasswordError::UnsupportedOperation(ref cause) => cause,
ResetUserPasswordError::UserDoesNotExist(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreFromSnapshotError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl RestoreFromSnapshotError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreFromSnapshotError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(RestoreFromSnapshotError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(RestoreFromSnapshotError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(RestoreFromSnapshotError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(RestoreFromSnapshotError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RestoreFromSnapshotError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreFromSnapshotError {
fn description(&self) -> &str {
match *self {
RestoreFromSnapshotError::Client(ref cause) => cause,
RestoreFromSnapshotError::EntityDoesNotExist(ref cause) => cause,
RestoreFromSnapshotError::InvalidParameter(ref cause) => cause,
RestoreFromSnapshotError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ShareDirectoryError {
AccessDenied(String),
Client(String),
DirectoryAlreadyShared(String),
EntityDoesNotExist(String),
InvalidParameter(String),
InvalidTarget(String),
Organizations(String),
Service(String),
ShareLimitExceeded(String),
UnsupportedOperation(String),
}
impl ShareDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ShareDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ShareDirectoryError::AccessDenied(err.msg))
}
"ClientException" => {
return RusotoError::Service(ShareDirectoryError::Client(err.msg))
}
"DirectoryAlreadySharedException" => {
return RusotoError::Service(ShareDirectoryError::DirectoryAlreadyShared(
err.msg,
))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(ShareDirectoryError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(ShareDirectoryError::InvalidParameter(err.msg))
}
"InvalidTargetException" => {
return RusotoError::Service(ShareDirectoryError::InvalidTarget(err.msg))
}
"OrganizationsException" => {
return RusotoError::Service(ShareDirectoryError::Organizations(err.msg))
}
"ServiceException" => {
return RusotoError::Service(ShareDirectoryError::Service(err.msg))
}
"ShareLimitExceededException" => {
return RusotoError::Service(ShareDirectoryError::ShareLimitExceeded(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(ShareDirectoryError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ShareDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ShareDirectoryError {
fn description(&self) -> &str {
match *self {
ShareDirectoryError::AccessDenied(ref cause) => cause,
ShareDirectoryError::Client(ref cause) => cause,
ShareDirectoryError::DirectoryAlreadyShared(ref cause) => cause,
ShareDirectoryError::EntityDoesNotExist(ref cause) => cause,
ShareDirectoryError::InvalidParameter(ref cause) => cause,
ShareDirectoryError::InvalidTarget(ref cause) => cause,
ShareDirectoryError::Organizations(ref cause) => cause,
ShareDirectoryError::Service(ref cause) => cause,
ShareDirectoryError::ShareLimitExceeded(ref cause) => cause,
ShareDirectoryError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartSchemaExtensionError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
SnapshotLimitExceeded(String),
}
impl StartSchemaExtensionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartSchemaExtensionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(StartSchemaExtensionError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(StartSchemaExtensionError::DirectoryUnavailable(
err.msg,
))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(StartSchemaExtensionError::EntityDoesNotExist(
err.msg,
))
}
"InvalidParameterException" => {
return RusotoError::Service(StartSchemaExtensionError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(StartSchemaExtensionError::Service(err.msg))
}
"SnapshotLimitExceededException" => {
return RusotoError::Service(StartSchemaExtensionError::SnapshotLimitExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartSchemaExtensionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartSchemaExtensionError {
fn description(&self) -> &str {
match *self {
StartSchemaExtensionError::Client(ref cause) => cause,
StartSchemaExtensionError::DirectoryUnavailable(ref cause) => cause,
StartSchemaExtensionError::EntityDoesNotExist(ref cause) => cause,
StartSchemaExtensionError::InvalidParameter(ref cause) => cause,
StartSchemaExtensionError::Service(ref cause) => cause,
StartSchemaExtensionError::SnapshotLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UnshareDirectoryError {
Client(String),
DirectoryNotShared(String),
EntityDoesNotExist(String),
InvalidTarget(String),
Service(String),
}
impl UnshareDirectoryError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UnshareDirectoryError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(UnshareDirectoryError::Client(err.msg))
}
"DirectoryNotSharedException" => {
return RusotoError::Service(UnshareDirectoryError::DirectoryNotShared(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(UnshareDirectoryError::EntityDoesNotExist(err.msg))
}
"InvalidTargetException" => {
return RusotoError::Service(UnshareDirectoryError::InvalidTarget(err.msg))
}
"ServiceException" => {
return RusotoError::Service(UnshareDirectoryError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UnshareDirectoryError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UnshareDirectoryError {
fn description(&self) -> &str {
match *self {
UnshareDirectoryError::Client(ref cause) => cause,
UnshareDirectoryError::DirectoryNotShared(ref cause) => cause,
UnshareDirectoryError::EntityDoesNotExist(ref cause) => cause,
UnshareDirectoryError::InvalidTarget(ref cause) => cause,
UnshareDirectoryError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateConditionalForwarderError {
Client(String),
DirectoryUnavailable(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl UpdateConditionalForwarderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateConditionalForwarderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(UpdateConditionalForwarderError::Client(err.msg))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(
UpdateConditionalForwarderError::DirectoryUnavailable(err.msg),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
UpdateConditionalForwarderError::EntityDoesNotExist(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateConditionalForwarderError::InvalidParameter(
err.msg,
))
}
"ServiceException" => {
return RusotoError::Service(UpdateConditionalForwarderError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
UpdateConditionalForwarderError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateConditionalForwarderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateConditionalForwarderError {
fn description(&self) -> &str {
match *self {
UpdateConditionalForwarderError::Client(ref cause) => cause,
UpdateConditionalForwarderError::DirectoryUnavailable(ref cause) => cause,
UpdateConditionalForwarderError::EntityDoesNotExist(ref cause) => cause,
UpdateConditionalForwarderError::InvalidParameter(ref cause) => cause,
UpdateConditionalForwarderError::Service(ref cause) => cause,
UpdateConditionalForwarderError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateNumberOfDomainControllersError {
Client(String),
DirectoryUnavailable(String),
DomainControllerLimitExceeded(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl UpdateNumberOfDomainControllersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateNumberOfDomainControllersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(UpdateNumberOfDomainControllersError::Client(
err.msg,
))
}
"DirectoryUnavailableException" => {
return RusotoError::Service(
UpdateNumberOfDomainControllersError::DirectoryUnavailable(err.msg),
)
}
"DomainControllerLimitExceededException" => {
return RusotoError::Service(
UpdateNumberOfDomainControllersError::DomainControllerLimitExceeded(
err.msg,
),
)
}
"EntityDoesNotExistException" => {
return RusotoError::Service(
UpdateNumberOfDomainControllersError::EntityDoesNotExist(err.msg),
)
}
"InvalidParameterException" => {
return RusotoError::Service(
UpdateNumberOfDomainControllersError::InvalidParameter(err.msg),
)
}
"ServiceException" => {
return RusotoError::Service(UpdateNumberOfDomainControllersError::Service(
err.msg,
))
}
"UnsupportedOperationException" => {
return RusotoError::Service(
UpdateNumberOfDomainControllersError::UnsupportedOperation(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateNumberOfDomainControllersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateNumberOfDomainControllersError {
fn description(&self) -> &str {
match *self {
UpdateNumberOfDomainControllersError::Client(ref cause) => cause,
UpdateNumberOfDomainControllersError::DirectoryUnavailable(ref cause) => cause,
UpdateNumberOfDomainControllersError::DomainControllerLimitExceeded(ref cause) => cause,
UpdateNumberOfDomainControllersError::EntityDoesNotExist(ref cause) => cause,
UpdateNumberOfDomainControllersError::InvalidParameter(ref cause) => cause,
UpdateNumberOfDomainControllersError::Service(ref cause) => cause,
UpdateNumberOfDomainControllersError::UnsupportedOperation(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRadiusError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl UpdateRadiusError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRadiusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(UpdateRadiusError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(UpdateRadiusError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateRadiusError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(UpdateRadiusError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRadiusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRadiusError {
fn description(&self) -> &str {
match *self {
UpdateRadiusError::Client(ref cause) => cause,
UpdateRadiusError::EntityDoesNotExist(ref cause) => cause,
UpdateRadiusError::InvalidParameter(ref cause) => cause,
UpdateRadiusError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateTrustError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
}
impl UpdateTrustError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTrustError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(UpdateTrustError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(UpdateTrustError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(UpdateTrustError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(UpdateTrustError::Service(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateTrustError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateTrustError {
fn description(&self) -> &str {
match *self {
UpdateTrustError::Client(ref cause) => cause,
UpdateTrustError::EntityDoesNotExist(ref cause) => cause,
UpdateTrustError::InvalidParameter(ref cause) => cause,
UpdateTrustError::Service(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum VerifyTrustError {
Client(String),
EntityDoesNotExist(String),
InvalidParameter(String),
Service(String),
UnsupportedOperation(String),
}
impl VerifyTrustError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<VerifyTrustError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ClientException" => {
return RusotoError::Service(VerifyTrustError::Client(err.msg))
}
"EntityDoesNotExistException" => {
return RusotoError::Service(VerifyTrustError::EntityDoesNotExist(err.msg))
}
"InvalidParameterException" => {
return RusotoError::Service(VerifyTrustError::InvalidParameter(err.msg))
}
"ServiceException" => {
return RusotoError::Service(VerifyTrustError::Service(err.msg))
}
"UnsupportedOperationException" => {
return RusotoError::Service(VerifyTrustError::UnsupportedOperation(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for VerifyTrustError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for VerifyTrustError {
fn description(&self) -> &str {
match *self {
VerifyTrustError::Client(ref cause) => cause,
VerifyTrustError::EntityDoesNotExist(ref cause) => cause,
VerifyTrustError::InvalidParameter(ref cause) => cause,
VerifyTrustError::Service(ref cause) => cause,
VerifyTrustError::UnsupportedOperation(ref cause) => cause,
}
}
}
pub trait DirectoryService {
fn accept_shared_directory(
&self,
input: AcceptSharedDirectoryRequest,
) -> RusotoFuture<AcceptSharedDirectoryResult, AcceptSharedDirectoryError>;
fn add_ip_routes(
&self,
input: AddIpRoutesRequest,
) -> RusotoFuture<AddIpRoutesResult, AddIpRoutesError>;
fn add_tags_to_resource(
&self,
input: AddTagsToResourceRequest,
) -> RusotoFuture<AddTagsToResourceResult, AddTagsToResourceError>;
fn cancel_schema_extension(
&self,
input: CancelSchemaExtensionRequest,
) -> RusotoFuture<CancelSchemaExtensionResult, CancelSchemaExtensionError>;
fn connect_directory(
&self,
input: ConnectDirectoryRequest,
) -> RusotoFuture<ConnectDirectoryResult, ConnectDirectoryError>;
fn create_alias(
&self,
input: CreateAliasRequest,
) -> RusotoFuture<CreateAliasResult, CreateAliasError>;
fn create_computer(
&self,
input: CreateComputerRequest,
) -> RusotoFuture<CreateComputerResult, CreateComputerError>;
fn create_conditional_forwarder(
&self,
input: CreateConditionalForwarderRequest,
) -> RusotoFuture<CreateConditionalForwarderResult, CreateConditionalForwarderError>;
fn create_directory(
&self,
input: CreateDirectoryRequest,
) -> RusotoFuture<CreateDirectoryResult, CreateDirectoryError>;
fn create_log_subscription(
&self,
input: CreateLogSubscriptionRequest,
) -> RusotoFuture<CreateLogSubscriptionResult, CreateLogSubscriptionError>;
fn create_microsoft_ad(
&self,
input: CreateMicrosoftADRequest,
) -> RusotoFuture<CreateMicrosoftADResult, CreateMicrosoftADError>;
fn create_snapshot(
&self,
input: CreateSnapshotRequest,
) -> RusotoFuture<CreateSnapshotResult, CreateSnapshotError>;
fn create_trust(
&self,
input: CreateTrustRequest,
) -> RusotoFuture<CreateTrustResult, CreateTrustError>;
fn delete_conditional_forwarder(
&self,
input: DeleteConditionalForwarderRequest,
) -> RusotoFuture<DeleteConditionalForwarderResult, DeleteConditionalForwarderError>;
fn delete_directory(
&self,
input: DeleteDirectoryRequest,
) -> RusotoFuture<DeleteDirectoryResult, DeleteDirectoryError>;
fn delete_log_subscription(
&self,
input: DeleteLogSubscriptionRequest,
) -> RusotoFuture<DeleteLogSubscriptionResult, DeleteLogSubscriptionError>;
fn delete_snapshot(
&self,
input: DeleteSnapshotRequest,
) -> RusotoFuture<DeleteSnapshotResult, DeleteSnapshotError>;
fn delete_trust(
&self,
input: DeleteTrustRequest,
) -> RusotoFuture<DeleteTrustResult, DeleteTrustError>;
fn deregister_event_topic(
&self,
input: DeregisterEventTopicRequest,
) -> RusotoFuture<DeregisterEventTopicResult, DeregisterEventTopicError>;
fn describe_conditional_forwarders(
&self,
input: DescribeConditionalForwardersRequest,
) -> RusotoFuture<DescribeConditionalForwardersResult, DescribeConditionalForwardersError>;
fn describe_directories(
&self,
input: DescribeDirectoriesRequest,
) -> RusotoFuture<DescribeDirectoriesResult, DescribeDirectoriesError>;
fn describe_domain_controllers(
&self,
input: DescribeDomainControllersRequest,
) -> RusotoFuture<DescribeDomainControllersResult, DescribeDomainControllersError>;
fn describe_event_topics(
&self,
input: DescribeEventTopicsRequest,
) -> RusotoFuture<DescribeEventTopicsResult, DescribeEventTopicsError>;
fn describe_shared_directories(
&self,
input: DescribeSharedDirectoriesRequest,
) -> RusotoFuture<DescribeSharedDirectoriesResult, DescribeSharedDirectoriesError>;
fn describe_snapshots(
&self,
input: DescribeSnapshotsRequest,
) -> RusotoFuture<DescribeSnapshotsResult, DescribeSnapshotsError>;
fn describe_trusts(
&self,
input: DescribeTrustsRequest,
) -> RusotoFuture<DescribeTrustsResult, DescribeTrustsError>;
fn disable_radius(
&self,
input: DisableRadiusRequest,
) -> RusotoFuture<DisableRadiusResult, DisableRadiusError>;
fn disable_sso(
&self,
input: DisableSsoRequest,
) -> RusotoFuture<DisableSsoResult, DisableSsoError>;
fn enable_radius(
&self,
input: EnableRadiusRequest,
) -> RusotoFuture<EnableRadiusResult, EnableRadiusError>;
fn enable_sso(&self, input: EnableSsoRequest) -> RusotoFuture<EnableSsoResult, EnableSsoError>;
fn get_directory_limits(
&self,
) -> RusotoFuture<GetDirectoryLimitsResult, GetDirectoryLimitsError>;
fn get_snapshot_limits(
&self,
input: GetSnapshotLimitsRequest,
) -> RusotoFuture<GetSnapshotLimitsResult, GetSnapshotLimitsError>;
fn list_ip_routes(
&self,
input: ListIpRoutesRequest,
) -> RusotoFuture<ListIpRoutesResult, ListIpRoutesError>;
fn list_log_subscriptions(
&self,
input: ListLogSubscriptionsRequest,
) -> RusotoFuture<ListLogSubscriptionsResult, ListLogSubscriptionsError>;
fn list_schema_extensions(
&self,
input: ListSchemaExtensionsRequest,
) -> RusotoFuture<ListSchemaExtensionsResult, ListSchemaExtensionsError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResult, ListTagsForResourceError>;
fn register_event_topic(
&self,
input: RegisterEventTopicRequest,
) -> RusotoFuture<RegisterEventTopicResult, RegisterEventTopicError>;
fn reject_shared_directory(
&self,
input: RejectSharedDirectoryRequest,
) -> RusotoFuture<RejectSharedDirectoryResult, RejectSharedDirectoryError>;
fn remove_ip_routes(
&self,
input: RemoveIpRoutesRequest,
) -> RusotoFuture<RemoveIpRoutesResult, RemoveIpRoutesError>;
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceRequest,
) -> RusotoFuture<RemoveTagsFromResourceResult, RemoveTagsFromResourceError>;
fn reset_user_password(
&self,
input: ResetUserPasswordRequest,
) -> RusotoFuture<ResetUserPasswordResult, ResetUserPasswordError>;
fn restore_from_snapshot(
&self,
input: RestoreFromSnapshotRequest,
) -> RusotoFuture<RestoreFromSnapshotResult, RestoreFromSnapshotError>;
fn share_directory(
&self,
input: ShareDirectoryRequest,
) -> RusotoFuture<ShareDirectoryResult, ShareDirectoryError>;
fn start_schema_extension(
&self,
input: StartSchemaExtensionRequest,
) -> RusotoFuture<StartSchemaExtensionResult, StartSchemaExtensionError>;
fn unshare_directory(
&self,
input: UnshareDirectoryRequest,
) -> RusotoFuture<UnshareDirectoryResult, UnshareDirectoryError>;
fn update_conditional_forwarder(
&self,
input: UpdateConditionalForwarderRequest,
) -> RusotoFuture<UpdateConditionalForwarderResult, UpdateConditionalForwarderError>;
fn update_number_of_domain_controllers(
&self,
input: UpdateNumberOfDomainControllersRequest,
) -> RusotoFuture<UpdateNumberOfDomainControllersResult, UpdateNumberOfDomainControllersError>;
fn update_radius(
&self,
input: UpdateRadiusRequest,
) -> RusotoFuture<UpdateRadiusResult, UpdateRadiusError>;
fn update_trust(
&self,
input: UpdateTrustRequest,
) -> RusotoFuture<UpdateTrustResult, UpdateTrustError>;
fn verify_trust(
&self,
input: VerifyTrustRequest,
) -> RusotoFuture<VerifyTrustResult, VerifyTrustError>;
}
#[derive(Clone)]
pub struct DirectoryServiceClient {
client: Client,
region: region::Region,
}
impl DirectoryServiceClient {
pub fn new(region: region::Region) -> DirectoryServiceClient {
DirectoryServiceClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> DirectoryServiceClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
DirectoryServiceClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl DirectoryService for DirectoryServiceClient {
fn accept_shared_directory(
&self,
input: AcceptSharedDirectoryRequest,
) -> RusotoFuture<AcceptSharedDirectoryResult, AcceptSharedDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.AcceptSharedDirectory",
);
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::<AcceptSharedDirectoryResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(AcceptSharedDirectoryError::from_response(response))
}),
)
}
})
}
fn add_ip_routes(
&self,
input: AddIpRoutesRequest,
) -> RusotoFuture<AddIpRoutesResult, AddIpRoutesError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.AddIpRoutes");
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::<AddIpRoutesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddIpRoutesError::from_response(response))),
)
}
})
}
fn add_tags_to_resource(
&self,
input: AddTagsToResourceRequest,
) -> RusotoFuture<AddTagsToResourceResult, AddTagsToResourceError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.AddTagsToResource",
);
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::<AddTagsToResourceResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AddTagsToResourceError::from_response(response))),
)
}
})
}
fn cancel_schema_extension(
&self,
input: CancelSchemaExtensionRequest,
) -> RusotoFuture<CancelSchemaExtensionResult, CancelSchemaExtensionError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.CancelSchemaExtension",
);
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::<CancelSchemaExtensionResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CancelSchemaExtensionError::from_response(response))
}),
)
}
})
}
fn connect_directory(
&self,
input: ConnectDirectoryRequest,
) -> RusotoFuture<ConnectDirectoryResult, ConnectDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.ConnectDirectory");
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::<ConnectDirectoryResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ConnectDirectoryError::from_response(response))),
)
}
})
}
fn create_alias(
&self,
input: CreateAliasRequest,
) -> RusotoFuture<CreateAliasResult, CreateAliasError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.CreateAlias");
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::<CreateAliasResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAliasError::from_response(response))),
)
}
})
}
fn create_computer(
&self,
input: CreateComputerRequest,
) -> RusotoFuture<CreateComputerResult, CreateComputerError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.CreateComputer");
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::<CreateComputerResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateComputerError::from_response(response))),
)
}
})
}
fn create_conditional_forwarder(
&self,
input: CreateConditionalForwarderRequest,
) -> RusotoFuture<CreateConditionalForwarderResult, CreateConditionalForwarderError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.CreateConditionalForwarder",
);
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::<CreateConditionalForwarderResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateConditionalForwarderError::from_response(response))
}))
}
})
}
fn create_directory(
&self,
input: CreateDirectoryRequest,
) -> RusotoFuture<CreateDirectoryResult, CreateDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.CreateDirectory");
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::<CreateDirectoryResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDirectoryError::from_response(response))),
)
}
})
}
fn create_log_subscription(
&self,
input: CreateLogSubscriptionRequest,
) -> RusotoFuture<CreateLogSubscriptionResult, CreateLogSubscriptionError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.CreateLogSubscription",
);
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::<CreateLogSubscriptionResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateLogSubscriptionError::from_response(response))
}),
)
}
})
}
fn create_microsoft_ad(
&self,
input: CreateMicrosoftADRequest,
) -> RusotoFuture<CreateMicrosoftADResult, CreateMicrosoftADError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.CreateMicrosoftAD",
);
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::<CreateMicrosoftADResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateMicrosoftADError::from_response(response))),
)
}
})
}
fn create_snapshot(
&self,
input: CreateSnapshotRequest,
) -> RusotoFuture<CreateSnapshotResult, CreateSnapshotError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.CreateSnapshot");
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::<CreateSnapshotResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateSnapshotError::from_response(response))),
)
}
})
}
fn create_trust(
&self,
input: CreateTrustRequest,
) -> RusotoFuture<CreateTrustResult, CreateTrustError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.CreateTrust");
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::<CreateTrustResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTrustError::from_response(response))),
)
}
})
}
fn delete_conditional_forwarder(
&self,
input: DeleteConditionalForwarderRequest,
) -> RusotoFuture<DeleteConditionalForwarderResult, DeleteConditionalForwarderError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DeleteConditionalForwarder",
);
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::<DeleteConditionalForwarderResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteConditionalForwarderError::from_response(response))
}))
}
})
}
fn delete_directory(
&self,
input: DeleteDirectoryRequest,
) -> RusotoFuture<DeleteDirectoryResult, DeleteDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DeleteDirectory");
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::<DeleteDirectoryResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDirectoryError::from_response(response))),
)
}
})
}
fn delete_log_subscription(
&self,
input: DeleteLogSubscriptionRequest,
) -> RusotoFuture<DeleteLogSubscriptionResult, DeleteLogSubscriptionError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DeleteLogSubscription",
);
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::<DeleteLogSubscriptionResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteLogSubscriptionError::from_response(response))
}),
)
}
})
}
fn delete_snapshot(
&self,
input: DeleteSnapshotRequest,
) -> RusotoFuture<DeleteSnapshotResult, DeleteSnapshotError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DeleteSnapshot");
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::<DeleteSnapshotResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteSnapshotError::from_response(response))),
)
}
})
}
fn delete_trust(
&self,
input: DeleteTrustRequest,
) -> RusotoFuture<DeleteTrustResult, DeleteTrustError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DeleteTrust");
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::<DeleteTrustResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTrustError::from_response(response))),
)
}
})
}
fn deregister_event_topic(
&self,
input: DeregisterEventTopicRequest,
) -> RusotoFuture<DeregisterEventTopicResult, DeregisterEventTopicError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DeregisterEventTopic",
);
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::<DeregisterEventTopicResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeregisterEventTopicError::from_response(response))
}),
)
}
})
}
fn describe_conditional_forwarders(
&self,
input: DescribeConditionalForwardersRequest,
) -> RusotoFuture<DescribeConditionalForwardersResult, DescribeConditionalForwardersError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeConditionalForwarders",
);
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::<DescribeConditionalForwardersResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeConditionalForwardersError::from_response(response))
}))
}
})
}
fn describe_directories(
&self,
input: DescribeDirectoriesRequest,
) -> RusotoFuture<DescribeDirectoriesResult, DescribeDirectoriesError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeDirectories",
);
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::<DescribeDirectoriesResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeDirectoriesError::from_response(response))
}),
)
}
})
}
fn describe_domain_controllers(
&self,
input: DescribeDomainControllersRequest,
) -> RusotoFuture<DescribeDomainControllersResult, DescribeDomainControllersError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeDomainControllers",
);
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::<DescribeDomainControllersResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDomainControllersError::from_response(response))
}))
}
})
}
fn describe_event_topics(
&self,
input: DescribeEventTopicsRequest,
) -> RusotoFuture<DescribeEventTopicsResult, DescribeEventTopicsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeEventTopics",
);
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::<DescribeEventTopicsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeEventTopicsError::from_response(response))
}),
)
}
})
}
fn describe_shared_directories(
&self,
input: DescribeSharedDirectoriesRequest,
) -> RusotoFuture<DescribeSharedDirectoriesResult, DescribeSharedDirectoriesError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeSharedDirectories",
);
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::<DescribeSharedDirectoriesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeSharedDirectoriesError::from_response(response))
}))
}
})
}
fn describe_snapshots(
&self,
input: DescribeSnapshotsRequest,
) -> RusotoFuture<DescribeSnapshotsResult, DescribeSnapshotsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.DescribeSnapshots",
);
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::<DescribeSnapshotsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeSnapshotsError::from_response(response))),
)
}
})
}
fn describe_trusts(
&self,
input: DescribeTrustsRequest,
) -> RusotoFuture<DescribeTrustsResult, DescribeTrustsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DescribeTrusts");
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::<DescribeTrustsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTrustsError::from_response(response))),
)
}
})
}
fn disable_radius(
&self,
input: DisableRadiusRequest,
) -> RusotoFuture<DisableRadiusResult, DisableRadiusError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DisableRadius");
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::<DisableRadiusResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableRadiusError::from_response(response))),
)
}
})
}
fn disable_sso(
&self,
input: DisableSsoRequest,
) -> RusotoFuture<DisableSsoResult, DisableSsoError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.DisableSso");
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::<DisableSsoResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableSsoError::from_response(response))),
)
}
})
}
fn enable_radius(
&self,
input: EnableRadiusRequest,
) -> RusotoFuture<EnableRadiusResult, EnableRadiusError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.EnableRadius");
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::<EnableRadiusResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(EnableRadiusError::from_response(response))),
)
}
})
}
fn enable_sso(&self, input: EnableSsoRequest) -> RusotoFuture<EnableSsoResult, EnableSsoError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.EnableSso");
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::<EnableSsoResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(EnableSsoError::from_response(response))),
)
}
})
}
fn get_directory_limits(
&self,
) -> RusotoFuture<GetDirectoryLimitsResult, GetDirectoryLimitsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.GetDirectoryLimits",
);
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::<GetDirectoryLimitsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDirectoryLimitsError::from_response(response))),
)
}
})
}
fn get_snapshot_limits(
&self,
input: GetSnapshotLimitsRequest,
) -> RusotoFuture<GetSnapshotLimitsResult, GetSnapshotLimitsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.GetSnapshotLimits",
);
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::<GetSnapshotLimitsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSnapshotLimitsError::from_response(response))),
)
}
})
}
fn list_ip_routes(
&self,
input: ListIpRoutesRequest,
) -> RusotoFuture<ListIpRoutesResult, ListIpRoutesError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.ListIpRoutes");
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::<ListIpRoutesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListIpRoutesError::from_response(response))),
)
}
})
}
fn list_log_subscriptions(
&self,
input: ListLogSubscriptionsRequest,
) -> RusotoFuture<ListLogSubscriptionsResult, ListLogSubscriptionsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.ListLogSubscriptions",
);
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::<ListLogSubscriptionsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListLogSubscriptionsError::from_response(response))
}),
)
}
})
}
fn list_schema_extensions(
&self,
input: ListSchemaExtensionsRequest,
) -> RusotoFuture<ListSchemaExtensionsResult, ListSchemaExtensionsError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.ListSchemaExtensions",
);
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::<ListSchemaExtensionsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListSchemaExtensionsError::from_response(response))
}),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResult, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.ListTagsForResource",
);
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::<ListTagsForResourceResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn register_event_topic(
&self,
input: RegisterEventTopicRequest,
) -> RusotoFuture<RegisterEventTopicResult, RegisterEventTopicError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.RegisterEventTopic",
);
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::<RegisterEventTopicResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RegisterEventTopicError::from_response(response))),
)
}
})
}
fn reject_shared_directory(
&self,
input: RejectSharedDirectoryRequest,
) -> RusotoFuture<RejectSharedDirectoryResult, RejectSharedDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.RejectSharedDirectory",
);
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::<RejectSharedDirectoryResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RejectSharedDirectoryError::from_response(response))
}),
)
}
})
}
fn remove_ip_routes(
&self,
input: RemoveIpRoutesRequest,
) -> RusotoFuture<RemoveIpRoutesResult, RemoveIpRoutesError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.RemoveIpRoutes");
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::<RemoveIpRoutesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RemoveIpRoutesError::from_response(response))),
)
}
})
}
fn remove_tags_from_resource(
&self,
input: RemoveTagsFromResourceRequest,
) -> RusotoFuture<RemoveTagsFromResourceResult, RemoveTagsFromResourceError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.RemoveTagsFromResource",
);
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::<RemoveTagsFromResourceResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RemoveTagsFromResourceError::from_response(response))
}),
)
}
})
}
fn reset_user_password(
&self,
input: ResetUserPasswordRequest,
) -> RusotoFuture<ResetUserPasswordResult, ResetUserPasswordError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.ResetUserPassword",
);
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::<ResetUserPasswordResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ResetUserPasswordError::from_response(response))),
)
}
})
}
fn restore_from_snapshot(
&self,
input: RestoreFromSnapshotRequest,
) -> RusotoFuture<RestoreFromSnapshotResult, RestoreFromSnapshotError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.RestoreFromSnapshot",
);
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::<RestoreFromSnapshotResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RestoreFromSnapshotError::from_response(response))
}),
)
}
})
}
fn share_directory(
&self,
input: ShareDirectoryRequest,
) -> RusotoFuture<ShareDirectoryResult, ShareDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.ShareDirectory");
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::<ShareDirectoryResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ShareDirectoryError::from_response(response))),
)
}
})
}
fn start_schema_extension(
&self,
input: StartSchemaExtensionRequest,
) -> RusotoFuture<StartSchemaExtensionResult, StartSchemaExtensionError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.StartSchemaExtension",
);
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::<StartSchemaExtensionResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(StartSchemaExtensionError::from_response(response))
}),
)
}
})
}
fn unshare_directory(
&self,
input: UnshareDirectoryRequest,
) -> RusotoFuture<UnshareDirectoryResult, UnshareDirectoryError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.UnshareDirectory");
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::<UnshareDirectoryResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UnshareDirectoryError::from_response(response))),
)
}
})
}
fn update_conditional_forwarder(
&self,
input: UpdateConditionalForwarderRequest,
) -> RusotoFuture<UpdateConditionalForwarderResult, UpdateConditionalForwarderError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.UpdateConditionalForwarder",
);
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::<UpdateConditionalForwarderResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateConditionalForwarderError::from_response(response))
}))
}
})
}
fn update_number_of_domain_controllers(
&self,
input: UpdateNumberOfDomainControllersRequest,
) -> RusotoFuture<UpdateNumberOfDomainControllersResult, UpdateNumberOfDomainControllersError>
{
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"DirectoryService_20150416.UpdateNumberOfDomainControllers",
);
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::<UpdateNumberOfDomainControllersResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateNumberOfDomainControllersError::from_response(
response,
))
}))
}
})
}
fn update_radius(
&self,
input: UpdateRadiusRequest,
) -> RusotoFuture<UpdateRadiusResult, UpdateRadiusError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.UpdateRadius");
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::<UpdateRadiusResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateRadiusError::from_response(response))),
)
}
})
}
fn update_trust(
&self,
input: UpdateTrustRequest,
) -> RusotoFuture<UpdateTrustResult, UpdateTrustError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.UpdateTrust");
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::<UpdateTrustResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateTrustError::from_response(response))),
)
}
})
}
fn verify_trust(
&self,
input: VerifyTrustRequest,
) -> RusotoFuture<VerifyTrustResult, VerifyTrustError> {
let mut request = SignedRequest::new("POST", "ds", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "DirectoryService_20150416.VerifyTrust");
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::<VerifyTrustResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(VerifyTrustError::from_response(response))),
)
}
})
}
}