use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Application {
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "IconURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub icon_url: Option<String>,
#[serde(rename = "LaunchParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_parameters: Option<String>,
#[serde(rename = "LaunchPath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub launch_path: Option<String>,
#[serde(rename = "Metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ApplicationSettings {
#[serde(rename = "Enabled")]
pub enabled: bool,
#[serde(rename = "SettingsGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub settings_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ApplicationSettingsResponse {
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "SettingsGroup")]
#[serde(skip_serializing_if = "Option::is_none")]
pub settings_group: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateFleetRequest {
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[serde(rename = "StackName")]
pub stack_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateFleetResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchAssociateUserStackRequest {
#[serde(rename = "UserStackAssociations")]
pub user_stack_associations: Vec<UserStackAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchAssociateUserStackResult {
#[serde(rename = "errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<UserStackAssociationError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct BatchDisassociateUserStackRequest {
#[serde(rename = "UserStackAssociations")]
pub user_stack_associations: Vec<UserStackAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BatchDisassociateUserStackResult {
#[serde(rename = "errors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub errors: Option<Vec<UserStackAssociationError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ComputeCapacity {
#[serde(rename = "DesiredInstances")]
pub desired_instances: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ComputeCapacityStatus {
#[serde(rename = "Available")]
#[serde(skip_serializing_if = "Option::is_none")]
pub available: Option<i64>,
#[serde(rename = "Desired")]
pub desired: i64,
#[serde(rename = "InUse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub in_use: Option<i64>,
#[serde(rename = "Running")]
#[serde(skip_serializing_if = "Option::is_none")]
pub running: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CopyImageRequest {
#[serde(rename = "DestinationImageDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_image_description: Option<String>,
#[serde(rename = "DestinationImageName")]
pub destination_image_name: String,
#[serde(rename = "DestinationRegion")]
pub destination_region: String,
#[serde(rename = "SourceImageName")]
pub source_image_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CopyImageResponse {
#[serde(rename = "DestinationImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_image_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectoryConfigRequest {
#[serde(rename = "DirectoryName")]
pub directory_name: String,
#[serde(rename = "OrganizationalUnitDistinguishedNames")]
pub organizational_unit_distinguished_names: Vec<String>,
#[serde(rename = "ServiceAccountCredentials")]
pub service_account_credentials: ServiceAccountCredentials,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectoryConfigResult {
#[serde(rename = "DirectoryConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_config: Option<DirectoryConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateFleetRequest {
#[serde(rename = "ComputeCapacity")]
pub compute_capacity: ComputeCapacity,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainJoinInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_join_info: Option<DomainJoinInfo>,
#[serde(rename = "EnableDefaultInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_internet_access: Option<bool>,
#[serde(rename = "FleetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_type: Option<String>,
#[serde(rename = "IdleDisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle_disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "ImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_arn: Option<String>,
#[serde(rename = "ImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_name: Option<String>,
#[serde(rename = "InstanceType")]
pub instance_type: String,
#[serde(rename = "MaxUserDurationInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_user_duration_in_seconds: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateFleetResult {
#[serde(rename = "Fleet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet: Option<Fleet>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateImageBuilderRequest {
#[serde(rename = "AppstreamAgentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub appstream_agent_version: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainJoinInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_join_info: Option<DomainJoinInfo>,
#[serde(rename = "EnableDefaultInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_internet_access: Option<bool>,
#[serde(rename = "ImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_arn: Option<String>,
#[serde(rename = "ImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_name: Option<String>,
#[serde(rename = "InstanceType")]
pub instance_type: String,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateImageBuilderResult {
#[serde(rename = "ImageBuilder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder: Option<ImageBuilder>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateImageBuilderStreamingURLRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Validity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validity: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateImageBuilderStreamingURLResult {
#[serde(rename = "Expires")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expires: Option<f64>,
#[serde(rename = "StreamingURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streaming_url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateStackRequest {
#[serde(rename = "ApplicationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_settings: Option<ApplicationSettings>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FeedbackURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feedback_url: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RedirectURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub redirect_url: Option<String>,
#[serde(rename = "StorageConnectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage_connectors: Option<Vec<StorageConnector>>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "UserSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_settings: Option<Vec<UserSetting>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateStackResult {
#[serde(rename = "Stack")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack: Option<Stack>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateStreamingURLRequest {
#[serde(rename = "ApplicationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_id: Option<String>,
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[serde(rename = "SessionContext")]
#[serde(skip_serializing_if = "Option::is_none")]
pub session_context: Option<String>,
#[serde(rename = "StackName")]
pub stack_name: String,
#[serde(rename = "UserId")]
pub user_id: String,
#[serde(rename = "Validity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validity: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateStreamingURLResult {
#[serde(rename = "Expires")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expires: Option<f64>,
#[serde(rename = "StreamingURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub streaming_url: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUsageReportSubscriptionRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUsageReportSubscriptionResult {
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "Schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateUserRequest {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "MessageAction")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message_action: Option<String>,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateUserResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectoryConfigRequest {
#[serde(rename = "DirectoryName")]
pub directory_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectoryConfigResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFleetRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFleetResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteImageBuilderRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteImageBuilderResult {
#[serde(rename = "ImageBuilder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder: Option<ImageBuilder>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteImagePermissionsRequest {
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SharedAccountId")]
pub shared_account_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteImagePermissionsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteImageRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteImageResult {
#[serde(rename = "Image")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image: Option<Image>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteStackRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteStackResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUsageReportSubscriptionRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteUsageReportSubscriptionResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUserRequest {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteUserResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectoryConfigsRequest {
#[serde(rename = "DirectoryNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_names: Option<Vec<String>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDirectoryConfigsResult {
#[serde(rename = "DirectoryConfigs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_configs: Option<Vec<DirectoryConfig>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeFleetsRequest {
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[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 DescribeFleetsResult {
#[serde(rename = "Fleets")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleets: Option<Vec<Fleet>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeImageBuildersRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[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 DescribeImageBuildersResult {
#[serde(rename = "ImageBuilders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builders: Option<Vec<ImageBuilder>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeImagePermissionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SharedAwsAccountIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_aws_account_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeImagePermissionsResult {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "SharedImagePermissionsList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub shared_image_permissions_list: Option<Vec<SharedImagePermissions>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeImagesRequest {
#[serde(rename = "Arns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arns: Option<Vec<String>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: 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 DescribeImagesResult {
#[serde(rename = "Images")]
#[serde(skip_serializing_if = "Option::is_none")]
pub images: Option<Vec<Image>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeSessionsRequest {
#[serde(rename = "AuthenticationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_type: Option<String>,
#[serde(rename = "FleetName")]
pub fleet_name: 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 = "StackName")]
pub stack_name: String,
#[serde(rename = "UserId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeSessionsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Sessions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub sessions: Option<Vec<Session>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeStacksRequest {
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[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 DescribeStacksResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Stacks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stacks: Option<Vec<Stack>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUsageReportSubscriptionsRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUsageReportSubscriptionsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UsageReportSubscriptions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_report_subscriptions: Option<Vec<UsageReportSubscription>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUserStackAssociationsRequest {
#[serde(rename = "AuthenticationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_type: Option<String>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "StackName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack_name: 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 DescribeUserStackAssociationsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserStackAssociations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_stack_associations: Option<Vec<UserStackAssociation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeUsersRequest {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeUsersResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Users")]
#[serde(skip_serializing_if = "Option::is_none")]
pub users: Option<Vec<User>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectoryConfig {
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DirectoryName")]
pub directory_name: String,
#[serde(rename = "OrganizationalUnitDistinguishedNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organizational_unit_distinguished_names: Option<Vec<String>>,
#[serde(rename = "ServiceAccountCredentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_account_credentials: Option<ServiceAccountCredentials>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisableUserRequest {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisableUserResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateFleetRequest {
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[serde(rename = "StackName")]
pub stack_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateFleetResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DomainJoinInfo {
#[serde(rename = "DirectoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_name: Option<String>,
#[serde(rename = "OrganizationalUnitDistinguishedName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organizational_unit_distinguished_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct EnableUserRequest {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct EnableUserResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ExpireSessionRequest {
#[serde(rename = "SessionId")]
pub session_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ExpireSessionResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Fleet {
#[serde(rename = "Arn")]
pub arn: String,
#[serde(rename = "ComputeCapacityStatus")]
pub compute_capacity_status: ComputeCapacityStatus,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainJoinInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_join_info: Option<DomainJoinInfo>,
#[serde(rename = "EnableDefaultInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_internet_access: Option<bool>,
#[serde(rename = "FleetErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_errors: Option<Vec<FleetError>>,
#[serde(rename = "FleetType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_type: Option<String>,
#[serde(rename = "IdleDisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle_disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "ImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_arn: Option<String>,
#[serde(rename = "ImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_name: Option<String>,
#[serde(rename = "InstanceType")]
pub instance_type: String,
#[serde(rename = "MaxUserDurationInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_user_duration_in_seconds: Option<i64>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "State")]
pub state: String,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FleetError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Image {
#[serde(rename = "Applications")]
#[serde(skip_serializing_if = "Option::is_none")]
pub applications: Option<Vec<Application>>,
#[serde(rename = "AppstreamAgentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub appstream_agent_version: Option<String>,
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "BaseImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_image_arn: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "ImageBuilderSupported")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder_supported: Option<bool>,
#[serde(rename = "ImagePermissions")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_permissions: Option<ImagePermissions>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
#[serde(rename = "PublicBaseImageReleasedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub public_base_image_released_date: Option<f64>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "StateChangeReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_change_reason: Option<ImageStateChangeReason>,
#[serde(rename = "Visibility")]
#[serde(skip_serializing_if = "Option::is_none")]
pub visibility: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImageBuilder {
#[serde(rename = "AppstreamAgentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub appstream_agent_version: Option<String>,
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainJoinInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_join_info: Option<DomainJoinInfo>,
#[serde(rename = "EnableDefaultInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_internet_access: Option<bool>,
#[serde(rename = "ImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_arn: Option<String>,
#[serde(rename = "ImageBuilderErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder_errors: Option<Vec<ResourceError>>,
#[serde(rename = "InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Platform")]
#[serde(skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "StateChangeReason")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_change_reason: Option<ImageBuilderStateChangeReason>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImageBuilderStateChangeReason {
#[serde(rename = "Code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ImagePermissions {
#[serde(rename = "allowFleet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_fleet: Option<bool>,
#[serde(rename = "allowImageBuilder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allow_image_builder: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImageStateChangeReason {
#[serde(rename = "Code")]
#[serde(skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[serde(rename = "Message")]
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct LastReportGenerationExecutionError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAssociatedFleetsRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "StackName")]
pub stack_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListAssociatedFleetsResult {
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAssociatedStacksRequest {
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[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 ListAssociatedStacksResult {
#[serde(rename = "Names")]
#[serde(skip_serializing_if = "Option::is_none")]
pub names: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListTagsForResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ListTagsForResourceResponse {
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct NetworkAccessConfiguration {
#[serde(rename = "EniId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub eni_id: Option<String>,
#[serde(rename = "EniPrivateIpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub eni_private_ip_address: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "ErrorTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_timestamp: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ServiceAccountCredentials {
#[serde(rename = "AccountName")]
pub account_name: String,
#[serde(rename = "AccountPassword")]
pub account_password: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Session {
#[serde(rename = "AuthenticationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authentication_type: Option<String>,
#[serde(rename = "ConnectionState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_state: Option<String>,
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[serde(rename = "Id")]
pub id: String,
#[serde(rename = "MaxExpirationTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_expiration_time: Option<f64>,
#[serde(rename = "NetworkAccessConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub network_access_configuration: Option<NetworkAccessConfiguration>,
#[serde(rename = "StackName")]
pub stack_name: String,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
#[serde(rename = "State")]
pub state: String,
#[serde(rename = "UserId")]
pub user_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SharedImagePermissions {
#[serde(rename = "imagePermissions")]
pub image_permissions: ImagePermissions,
#[serde(rename = "sharedAccountId")]
pub shared_account_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Stack {
#[serde(rename = "ApplicationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_settings: Option<ApplicationSettingsResponse>,
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FeedbackURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feedback_url: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RedirectURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub redirect_url: Option<String>,
#[serde(rename = "StackErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack_errors: Option<Vec<StackError>>,
#[serde(rename = "StorageConnectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage_connectors: Option<Vec<StorageConnector>>,
#[serde(rename = "UserSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_settings: Option<Vec<UserSetting>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StackError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartFleetRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartFleetResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartImageBuilderRequest {
#[serde(rename = "AppstreamAgentVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub appstream_agent_version: Option<String>,
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartImageBuilderResult {
#[serde(rename = "ImageBuilder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder: Option<ImageBuilder>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopFleetRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopFleetResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopImageBuilderRequest {
#[serde(rename = "Name")]
pub name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopImageBuilderResult {
#[serde(rename = "ImageBuilder")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_builder: Option<ImageBuilder>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct StorageConnector {
#[serde(rename = "ConnectorType")]
pub connector_type: String,
#[serde(rename = "Domains")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domains: Option<Vec<String>>,
#[serde(rename = "ResourceIdentifier")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_identifier: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "Tags")]
pub tags: ::std::collections::HashMap<String, String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "ResourceArn")]
pub resource_arn: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDirectoryConfigRequest {
#[serde(rename = "DirectoryName")]
pub directory_name: String,
#[serde(rename = "OrganizationalUnitDistinguishedNames")]
#[serde(skip_serializing_if = "Option::is_none")]
pub organizational_unit_distinguished_names: Option<Vec<String>>,
#[serde(rename = "ServiceAccountCredentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_account_credentials: Option<ServiceAccountCredentials>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDirectoryConfigResult {
#[serde(rename = "DirectoryConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_config: Option<DirectoryConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateFleetRequest {
#[serde(rename = "AttributesToDelete")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes_to_delete: Option<Vec<String>>,
#[serde(rename = "ComputeCapacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compute_capacity: Option<ComputeCapacity>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainJoinInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_join_info: Option<DomainJoinInfo>,
#[serde(rename = "EnableDefaultInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_default_internet_access: Option<bool>,
#[serde(rename = "IdleDisconnectTimeoutInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle_disconnect_timeout_in_seconds: Option<i64>,
#[serde(rename = "ImageArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_arn: Option<String>,
#[serde(rename = "ImageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_name: Option<String>,
#[serde(rename = "InstanceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub instance_type: Option<String>,
#[serde(rename = "MaxUserDurationInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_user_duration_in_seconds: Option<i64>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "VpcConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_config: Option<VpcConfig>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateFleetResult {
#[serde(rename = "Fleet")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet: Option<Fleet>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateImagePermissionsRequest {
#[serde(rename = "ImagePermissions")]
pub image_permissions: ImagePermissions,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "SharedAccountId")]
pub shared_account_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateImagePermissionsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateStackRequest {
#[serde(rename = "ApplicationSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub application_settings: Option<ApplicationSettings>,
#[serde(rename = "AttributesToDelete")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes_to_delete: Option<Vec<String>>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FeedbackURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub feedback_url: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "RedirectURL")]
#[serde(skip_serializing_if = "Option::is_none")]
pub redirect_url: Option<String>,
#[serde(rename = "StorageConnectors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub storage_connectors: Option<Vec<StorageConnector>>,
#[serde(rename = "UserSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_settings: Option<Vec<UserSetting>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateStackResult {
#[serde(rename = "Stack")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stack: Option<Stack>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UsageReportSubscription {
#[serde(rename = "LastGeneratedReportDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_generated_report_date: Option<f64>,
#[serde(rename = "S3BucketName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub s3_bucket_name: Option<String>,
#[serde(rename = "Schedule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schedule: Option<String>,
#[serde(rename = "SubscriptionErrors")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subscription_errors: Option<Vec<LastReportGenerationExecutionError>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct User {
#[serde(rename = "Arn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub arn: Option<String>,
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "Enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "FirstName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
#[serde(rename = "LastName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserSetting {
#[serde(rename = "Action")]
pub action: String,
#[serde(rename = "Permission")]
pub permission: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct UserStackAssociation {
#[serde(rename = "AuthenticationType")]
pub authentication_type: String,
#[serde(rename = "SendEmailNotification")]
#[serde(skip_serializing_if = "Option::is_none")]
pub send_email_notification: Option<bool>,
#[serde(rename = "StackName")]
pub stack_name: String,
#[serde(rename = "UserName")]
pub user_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserStackAssociationError {
#[serde(rename = "ErrorCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_code: Option<String>,
#[serde(rename = "ErrorMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub error_message: Option<String>,
#[serde(rename = "UserStackAssociation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_stack_association: Option<UserStackAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct VpcConfig {
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
}
#[derive(Debug, PartialEq)]
pub enum AssociateFleetError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceNotFound(String),
}
impl AssociateFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(AssociateFleetError::ConcurrentModification(
err.msg,
))
}
"IncompatibleImageException" => {
return RusotoError::Service(AssociateFleetError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(AssociateFleetError::InvalidAccountStatus(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(AssociateFleetError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(AssociateFleetError::OperationNotPermitted(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AssociateFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateFleetError {
fn description(&self) -> &str {
match *self {
AssociateFleetError::ConcurrentModification(ref cause) => cause,
AssociateFleetError::IncompatibleImage(ref cause) => cause,
AssociateFleetError::InvalidAccountStatus(ref cause) => cause,
AssociateFleetError::LimitExceeded(ref cause) => cause,
AssociateFleetError::OperationNotPermitted(ref cause) => cause,
AssociateFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchAssociateUserStackError {
OperationNotPermitted(String),
}
impl BatchAssociateUserStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<BatchAssociateUserStackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"OperationNotPermittedException" => {
return RusotoError::Service(
BatchAssociateUserStackError::OperationNotPermitted(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchAssociateUserStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchAssociateUserStackError {
fn description(&self) -> &str {
match *self {
BatchAssociateUserStackError::OperationNotPermitted(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum BatchDisassociateUserStackError {}
impl BatchDisassociateUserStackError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<BatchDisassociateUserStackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for BatchDisassociateUserStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for BatchDisassociateUserStackError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum CopyImageError {
IncompatibleImage(String),
InvalidAccountStatus(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl CopyImageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CopyImageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"IncompatibleImageException" => {
return RusotoError::Service(CopyImageError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(CopyImageError::InvalidAccountStatus(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CopyImageError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CopyImageError::ResourceAlreadyExists(err.msg))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(CopyImageError::ResourceNotAvailable(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CopyImageError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CopyImageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CopyImageError {
fn description(&self) -> &str {
match *self {
CopyImageError::IncompatibleImage(ref cause) => cause,
CopyImageError::InvalidAccountStatus(ref cause) => cause,
CopyImageError::LimitExceeded(ref cause) => cause,
CopyImageError::ResourceAlreadyExists(ref cause) => cause,
CopyImageError::ResourceNotAvailable(ref cause) => cause,
CopyImageError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectoryConfigError {
InvalidAccountStatus(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
}
impl CreateDirectoryConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDirectoryConfigError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(CreateDirectoryConfigError::InvalidAccountStatus(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDirectoryConfigError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateDirectoryConfigError::ResourceAlreadyExists(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectoryConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectoryConfigError {
fn description(&self) -> &str {
match *self {
CreateDirectoryConfigError::InvalidAccountStatus(ref cause) => cause,
CreateDirectoryConfigError::LimitExceeded(ref cause) => cause,
CreateDirectoryConfigError::ResourceAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateFleetError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
InvalidParameterCombination(String),
InvalidRole(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceAlreadyExists(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl CreateFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(CreateFleetError::ConcurrentModification(err.msg))
}
"IncompatibleImageException" => {
return RusotoError::Service(CreateFleetError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(CreateFleetError::InvalidAccountStatus(err.msg))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(CreateFleetError::InvalidParameterCombination(
err.msg,
))
}
"InvalidRoleException" => {
return RusotoError::Service(CreateFleetError::InvalidRole(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateFleetError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateFleetError::OperationNotPermitted(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateFleetError::ResourceAlreadyExists(err.msg))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(CreateFleetError::ResourceNotAvailable(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateFleetError {
fn description(&self) -> &str {
match *self {
CreateFleetError::ConcurrentModification(ref cause) => cause,
CreateFleetError::IncompatibleImage(ref cause) => cause,
CreateFleetError::InvalidAccountStatus(ref cause) => cause,
CreateFleetError::InvalidParameterCombination(ref cause) => cause,
CreateFleetError::InvalidRole(ref cause) => cause,
CreateFleetError::LimitExceeded(ref cause) => cause,
CreateFleetError::OperationNotPermitted(ref cause) => cause,
CreateFleetError::ResourceAlreadyExists(ref cause) => cause,
CreateFleetError::ResourceNotAvailable(ref cause) => cause,
CreateFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateImageBuilderError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
InvalidParameterCombination(String),
InvalidRole(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceAlreadyExists(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl CreateImageBuilderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateImageBuilderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(CreateImageBuilderError::ConcurrentModification(
err.msg,
))
}
"IncompatibleImageException" => {
return RusotoError::Service(CreateImageBuilderError::IncompatibleImage(
err.msg,
))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(CreateImageBuilderError::InvalidAccountStatus(
err.msg,
))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(
CreateImageBuilderError::InvalidParameterCombination(err.msg),
)
}
"InvalidRoleException" => {
return RusotoError::Service(CreateImageBuilderError::InvalidRole(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateImageBuilderError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateImageBuilderError::OperationNotPermitted(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateImageBuilderError::ResourceAlreadyExists(
err.msg,
))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(CreateImageBuilderError::ResourceNotAvailable(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateImageBuilderError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateImageBuilderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateImageBuilderError {
fn description(&self) -> &str {
match *self {
CreateImageBuilderError::ConcurrentModification(ref cause) => cause,
CreateImageBuilderError::IncompatibleImage(ref cause) => cause,
CreateImageBuilderError::InvalidAccountStatus(ref cause) => cause,
CreateImageBuilderError::InvalidParameterCombination(ref cause) => cause,
CreateImageBuilderError::InvalidRole(ref cause) => cause,
CreateImageBuilderError::LimitExceeded(ref cause) => cause,
CreateImageBuilderError::OperationNotPermitted(ref cause) => cause,
CreateImageBuilderError::ResourceAlreadyExists(ref cause) => cause,
CreateImageBuilderError::ResourceNotAvailable(ref cause) => cause,
CreateImageBuilderError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateImageBuilderStreamingURLError {
OperationNotPermitted(String),
ResourceNotFound(String),
}
impl CreateImageBuilderStreamingURLError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateImageBuilderStreamingURLError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"OperationNotPermittedException" => {
return RusotoError::Service(
CreateImageBuilderStreamingURLError::OperationNotPermitted(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
CreateImageBuilderStreamingURLError::ResourceNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateImageBuilderStreamingURLError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateImageBuilderStreamingURLError {
fn description(&self) -> &str {
match *self {
CreateImageBuilderStreamingURLError::OperationNotPermitted(ref cause) => cause,
CreateImageBuilderStreamingURLError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStackError {
ConcurrentModification(String),
InvalidAccountStatus(String),
InvalidParameterCombination(String),
InvalidRole(String),
LimitExceeded(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
}
impl CreateStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(CreateStackError::ConcurrentModification(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(CreateStackError::InvalidAccountStatus(err.msg))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(CreateStackError::InvalidParameterCombination(
err.msg,
))
}
"InvalidRoleException" => {
return RusotoError::Service(CreateStackError::InvalidRole(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStackError::LimitExceeded(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateStackError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateStackError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStackError {
fn description(&self) -> &str {
match *self {
CreateStackError::ConcurrentModification(ref cause) => cause,
CreateStackError::InvalidAccountStatus(ref cause) => cause,
CreateStackError::InvalidParameterCombination(ref cause) => cause,
CreateStackError::InvalidRole(ref cause) => cause,
CreateStackError::LimitExceeded(ref cause) => cause,
CreateStackError::ResourceAlreadyExists(ref cause) => cause,
CreateStackError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStreamingURLError {
InvalidParameterCombination(String),
OperationNotPermitted(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl CreateStreamingURLError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStreamingURLError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterCombinationException" => {
return RusotoError::Service(
CreateStreamingURLError::InvalidParameterCombination(err.msg),
)
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateStreamingURLError::OperationNotPermitted(
err.msg,
))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(CreateStreamingURLError::ResourceNotAvailable(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateStreamingURLError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateStreamingURLError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStreamingURLError {
fn description(&self) -> &str {
match *self {
CreateStreamingURLError::InvalidParameterCombination(ref cause) => cause,
CreateStreamingURLError::OperationNotPermitted(ref cause) => cause,
CreateStreamingURLError::ResourceNotAvailable(ref cause) => cause,
CreateStreamingURLError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUsageReportSubscriptionError {
InvalidAccountStatus(String),
}
impl CreateUsageReportSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateUsageReportSubscriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(
CreateUsageReportSubscriptionError::InvalidAccountStatus(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUsageReportSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUsageReportSubscriptionError {
fn description(&self) -> &str {
match *self {
CreateUsageReportSubscriptionError::InvalidAccountStatus(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateUserError {
InvalidAccountStatus(String),
InvalidParameterCombination(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceAlreadyExists(String),
}
impl CreateUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(CreateUserError::InvalidAccountStatus(err.msg))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(CreateUserError::InvalidParameterCombination(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUserError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(CreateUserError::OperationNotPermitted(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateUserError::ResourceAlreadyExists(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUserError {
fn description(&self) -> &str {
match *self {
CreateUserError::InvalidAccountStatus(ref cause) => cause,
CreateUserError::InvalidParameterCombination(ref cause) => cause,
CreateUserError::LimitExceeded(ref cause) => cause,
CreateUserError::OperationNotPermitted(ref cause) => cause,
CreateUserError::ResourceAlreadyExists(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectoryConfigError {
ResourceInUse(String),
ResourceNotFound(String),
}
impl DeleteDirectoryConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDirectoryConfigError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceInUseException" => {
return RusotoError::Service(DeleteDirectoryConfigError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteDirectoryConfigError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectoryConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectoryConfigError {
fn description(&self) -> &str {
match *self {
DeleteDirectoryConfigError::ResourceInUse(ref cause) => cause,
DeleteDirectoryConfigError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFleetError {
ConcurrentModification(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl DeleteFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteFleetError::ConcurrentModification(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteFleetError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFleetError {
fn description(&self) -> &str {
match *self {
DeleteFleetError::ConcurrentModification(ref cause) => cause,
DeleteFleetError::ResourceInUse(ref cause) => cause,
DeleteFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteImageError {
ConcurrentModification(String),
OperationNotPermitted(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl DeleteImageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteImageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteImageError::ConcurrentModification(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(DeleteImageError::OperationNotPermitted(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteImageError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteImageError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteImageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteImageError {
fn description(&self) -> &str {
match *self {
DeleteImageError::ConcurrentModification(ref cause) => cause,
DeleteImageError::OperationNotPermitted(ref cause) => cause,
DeleteImageError::ResourceInUse(ref cause) => cause,
DeleteImageError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteImageBuilderError {
ConcurrentModification(String),
OperationNotPermitted(String),
ResourceNotFound(String),
}
impl DeleteImageBuilderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteImageBuilderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteImageBuilderError::ConcurrentModification(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(DeleteImageBuilderError::OperationNotPermitted(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteImageBuilderError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteImageBuilderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteImageBuilderError {
fn description(&self) -> &str {
match *self {
DeleteImageBuilderError::ConcurrentModification(ref cause) => cause,
DeleteImageBuilderError::OperationNotPermitted(ref cause) => cause,
DeleteImageBuilderError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteImagePermissionsError {
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl DeleteImagePermissionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteImagePermissionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotAvailableException" => {
return RusotoError::Service(DeleteImagePermissionsError::ResourceNotAvailable(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteImagePermissionsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteImagePermissionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteImagePermissionsError {
fn description(&self) -> &str {
match *self {
DeleteImagePermissionsError::ResourceNotAvailable(ref cause) => cause,
DeleteImagePermissionsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStackError {
ConcurrentModification(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl DeleteStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(DeleteStackError::ConcurrentModification(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteStackError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteStackError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStackError {
fn description(&self) -> &str {
match *self {
DeleteStackError::ConcurrentModification(ref cause) => cause,
DeleteStackError::ResourceInUse(ref cause) => cause,
DeleteStackError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUsageReportSubscriptionError {
InvalidAccountStatus(String),
ResourceNotFound(String),
}
impl DeleteUsageReportSubscriptionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteUsageReportSubscriptionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(
DeleteUsageReportSubscriptionError::InvalidAccountStatus(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DeleteUsageReportSubscriptionError::ResourceNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUsageReportSubscriptionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUsageReportSubscriptionError {
fn description(&self) -> &str {
match *self {
DeleteUsageReportSubscriptionError::InvalidAccountStatus(ref cause) => cause,
DeleteUsageReportSubscriptionError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteUserError {
ResourceNotFound(String),
}
impl DeleteUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteUserError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUserError {
fn description(&self) -> &str {
match *self {
DeleteUserError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectoryConfigsError {
ResourceNotFound(String),
}
impl DescribeDirectoryConfigsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDirectoryConfigsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDirectoryConfigsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectoryConfigsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectoryConfigsError {
fn description(&self) -> &str {
match *self {
DescribeDirectoryConfigsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeFleetsError {
ResourceNotFound(String),
}
impl DescribeFleetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFleetsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeFleetsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeFleetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeFleetsError {
fn description(&self) -> &str {
match *self {
DescribeFleetsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeImageBuildersError {
ResourceNotFound(String),
}
impl DescribeImageBuildersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeImageBuildersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeImageBuildersError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeImageBuildersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeImageBuildersError {
fn description(&self) -> &str {
match *self {
DescribeImageBuildersError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeImagePermissionsError {
ResourceNotFound(String),
}
impl DescribeImagePermissionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeImagePermissionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeImagePermissionsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeImagePermissionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeImagePermissionsError {
fn description(&self) -> &str {
match *self {
DescribeImagePermissionsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeImagesError {
InvalidParameterCombination(String),
ResourceNotFound(String),
}
impl DescribeImagesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeImagesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterCombinationException" => {
return RusotoError::Service(DescribeImagesError::InvalidParameterCombination(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeImagesError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeImagesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeImagesError {
fn description(&self) -> &str {
match *self {
DescribeImagesError::InvalidParameterCombination(ref cause) => cause,
DescribeImagesError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeSessionsError {
InvalidParameterCombination(String),
}
impl DescribeSessionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeSessionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterCombinationException" => {
return RusotoError::Service(
DescribeSessionsError::InvalidParameterCombination(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeSessionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeSessionsError {
fn description(&self) -> &str {
match *self {
DescribeSessionsError::InvalidParameterCombination(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeStacksError {
ResourceNotFound(String),
}
impl DescribeStacksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeStacksError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeStacksError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeStacksError {
fn description(&self) -> &str {
match *self {
DescribeStacksError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUsageReportSubscriptionsError {
InvalidAccountStatus(String),
ResourceNotFound(String),
}
impl DescribeUsageReportSubscriptionsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeUsageReportSubscriptionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(
DescribeUsageReportSubscriptionsError::InvalidAccountStatus(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeUsageReportSubscriptionsError::ResourceNotFound(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUsageReportSubscriptionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUsageReportSubscriptionsError {
fn description(&self) -> &str {
match *self {
DescribeUsageReportSubscriptionsError::InvalidAccountStatus(ref cause) => cause,
DescribeUsageReportSubscriptionsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUserStackAssociationsError {
InvalidParameterCombination(String),
}
impl DescribeUserStackAssociationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeUserStackAssociationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterCombinationException" => {
return RusotoError::Service(
DescribeUserStackAssociationsError::InvalidParameterCombination(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUserStackAssociationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUserStackAssociationsError {
fn description(&self) -> &str {
match *self {
DescribeUserStackAssociationsError::InvalidParameterCombination(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeUsersError {
InvalidParameterCombination(String),
ResourceNotFound(String),
}
impl DescribeUsersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUsersError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterCombinationException" => {
return RusotoError::Service(DescribeUsersError::InvalidParameterCombination(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeUsersError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeUsersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeUsersError {
fn description(&self) -> &str {
match *self {
DescribeUsersError::InvalidParameterCombination(ref cause) => cause,
DescribeUsersError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisableUserError {
ResourceNotFound(String),
}
impl DisableUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisableUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DisableUserError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisableUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisableUserError {
fn description(&self) -> &str {
match *self {
DisableUserError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateFleetError {
ConcurrentModification(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl DisassociateFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(DisassociateFleetError::ConcurrentModification(
err.msg,
))
}
"ResourceInUseException" => {
return RusotoError::Service(DisassociateFleetError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisassociateFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateFleetError {
fn description(&self) -> &str {
match *self {
DisassociateFleetError::ConcurrentModification(ref cause) => cause,
DisassociateFleetError::ResourceInUse(ref cause) => cause,
DisassociateFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum EnableUserError {
InvalidAccountStatus(String),
ResourceNotFound(String),
}
impl EnableUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<EnableUserError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(EnableUserError::InvalidAccountStatus(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(EnableUserError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for EnableUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for EnableUserError {
fn description(&self) -> &str {
match *self {
EnableUserError::InvalidAccountStatus(ref cause) => cause,
EnableUserError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ExpireSessionError {}
impl ExpireSessionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExpireSessionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ExpireSessionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ExpireSessionError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAssociatedFleetsError {}
impl ListAssociatedFleetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssociatedFleetsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAssociatedFleetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAssociatedFleetsError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAssociatedStacksError {}
impl ListAssociatedStacksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAssociatedStacksError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAssociatedStacksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAssociatedStacksError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
ResourceNotFound(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() {
"ResourceNotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::ResourceNotFound(
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::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartFleetError {
ConcurrentModification(String),
InvalidAccountStatus(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceNotFound(String),
}
impl StartFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(StartFleetError::ConcurrentModification(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(StartFleetError::InvalidAccountStatus(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(StartFleetError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StartFleetError::OperationNotPermitted(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StartFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartFleetError {
fn description(&self) -> &str {
match *self {
StartFleetError::ConcurrentModification(ref cause) => cause,
StartFleetError::InvalidAccountStatus(ref cause) => cause,
StartFleetError::LimitExceeded(ref cause) => cause,
StartFleetError::OperationNotPermitted(ref cause) => cause,
StartFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartImageBuilderError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl StartImageBuilderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartImageBuilderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(StartImageBuilderError::ConcurrentModification(
err.msg,
))
}
"IncompatibleImageException" => {
return RusotoError::Service(StartImageBuilderError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(StartImageBuilderError::InvalidAccountStatus(
err.msg,
))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(StartImageBuilderError::ResourceNotAvailable(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StartImageBuilderError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StartImageBuilderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartImageBuilderError {
fn description(&self) -> &str {
match *self {
StartImageBuilderError::ConcurrentModification(ref cause) => cause,
StartImageBuilderError::IncompatibleImage(ref cause) => cause,
StartImageBuilderError::InvalidAccountStatus(ref cause) => cause,
StartImageBuilderError::ResourceNotAvailable(ref cause) => cause,
StartImageBuilderError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopFleetError {
ConcurrentModification(String),
ResourceNotFound(String),
}
impl StopFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(StopFleetError::ConcurrentModification(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopFleetError {
fn description(&self) -> &str {
match *self {
StopFleetError::ConcurrentModification(ref cause) => cause,
StopFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StopImageBuilderError {
ConcurrentModification(String),
OperationNotPermitted(String),
ResourceNotFound(String),
}
impl StopImageBuilderError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopImageBuilderError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(StopImageBuilderError::ConcurrentModification(
err.msg,
))
}
"OperationNotPermittedException" => {
return RusotoError::Service(StopImageBuilderError::OperationNotPermitted(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(StopImageBuilderError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for StopImageBuilderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopImageBuilderError {
fn description(&self) -> &str {
match *self {
StopImageBuilderError::ConcurrentModification(ref cause) => cause,
StopImageBuilderError::OperationNotPermitted(ref cause) => cause,
StopImageBuilderError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
InvalidAccountStatus(String),
LimitExceeded(String),
ResourceNotFound(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidAccountStatusException" => {
return RusotoError::Service(TagResourceError::InvalidAccountStatus(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::InvalidAccountStatus(ref cause) => cause,
TagResourceError::LimitExceeded(ref cause) => cause,
TagResourceError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
ResourceNotFound(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDirectoryConfigError {
ConcurrentModification(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl UpdateDirectoryConfigError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDirectoryConfigError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(
UpdateDirectoryConfigError::ConcurrentModification(err.msg),
)
}
"ResourceInUseException" => {
return RusotoError::Service(UpdateDirectoryConfigError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDirectoryConfigError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDirectoryConfigError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDirectoryConfigError {
fn description(&self) -> &str {
match *self {
UpdateDirectoryConfigError::ConcurrentModification(ref cause) => cause,
UpdateDirectoryConfigError::ResourceInUse(ref cause) => cause,
UpdateDirectoryConfigError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateFleetError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
InvalidParameterCombination(String),
InvalidRole(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceInUse(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl UpdateFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFleetError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateFleetError::ConcurrentModification(err.msg))
}
"IncompatibleImageException" => {
return RusotoError::Service(UpdateFleetError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(UpdateFleetError::InvalidAccountStatus(err.msg))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(UpdateFleetError::InvalidParameterCombination(
err.msg,
))
}
"InvalidRoleException" => {
return RusotoError::Service(UpdateFleetError::InvalidRole(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateFleetError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(UpdateFleetError::OperationNotPermitted(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(UpdateFleetError::ResourceInUse(err.msg))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(UpdateFleetError::ResourceNotAvailable(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateFleetError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateFleetError {
fn description(&self) -> &str {
match *self {
UpdateFleetError::ConcurrentModification(ref cause) => cause,
UpdateFleetError::IncompatibleImage(ref cause) => cause,
UpdateFleetError::InvalidAccountStatus(ref cause) => cause,
UpdateFleetError::InvalidParameterCombination(ref cause) => cause,
UpdateFleetError::InvalidRole(ref cause) => cause,
UpdateFleetError::LimitExceeded(ref cause) => cause,
UpdateFleetError::OperationNotPermitted(ref cause) => cause,
UpdateFleetError::ResourceInUse(ref cause) => cause,
UpdateFleetError::ResourceNotAvailable(ref cause) => cause,
UpdateFleetError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateImagePermissionsError {
LimitExceeded(String),
ResourceNotAvailable(String),
ResourceNotFound(String),
}
impl UpdateImagePermissionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateImagePermissionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"LimitExceededException" => {
return RusotoError::Service(UpdateImagePermissionsError::LimitExceeded(
err.msg,
))
}
"ResourceNotAvailableException" => {
return RusotoError::Service(UpdateImagePermissionsError::ResourceNotAvailable(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateImagePermissionsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateImagePermissionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateImagePermissionsError {
fn description(&self) -> &str {
match *self {
UpdateImagePermissionsError::LimitExceeded(ref cause) => cause,
UpdateImagePermissionsError::ResourceNotAvailable(ref cause) => cause,
UpdateImagePermissionsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStackError {
ConcurrentModification(String),
IncompatibleImage(String),
InvalidAccountStatus(String),
InvalidParameterCombination(String),
InvalidRole(String),
LimitExceeded(String),
OperationNotPermitted(String),
ResourceInUse(String),
ResourceNotFound(String),
}
impl UpdateStackError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStackError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ConcurrentModificationException" => {
return RusotoError::Service(UpdateStackError::ConcurrentModification(err.msg))
}
"IncompatibleImageException" => {
return RusotoError::Service(UpdateStackError::IncompatibleImage(err.msg))
}
"InvalidAccountStatusException" => {
return RusotoError::Service(UpdateStackError::InvalidAccountStatus(err.msg))
}
"InvalidParameterCombinationException" => {
return RusotoError::Service(UpdateStackError::InvalidParameterCombination(
err.msg,
))
}
"InvalidRoleException" => {
return RusotoError::Service(UpdateStackError::InvalidRole(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateStackError::LimitExceeded(err.msg))
}
"OperationNotPermittedException" => {
return RusotoError::Service(UpdateStackError::OperationNotPermitted(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(UpdateStackError::ResourceInUse(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateStackError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateStackError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStackError {
fn description(&self) -> &str {
match *self {
UpdateStackError::ConcurrentModification(ref cause) => cause,
UpdateStackError::IncompatibleImage(ref cause) => cause,
UpdateStackError::InvalidAccountStatus(ref cause) => cause,
UpdateStackError::InvalidParameterCombination(ref cause) => cause,
UpdateStackError::InvalidRole(ref cause) => cause,
UpdateStackError::LimitExceeded(ref cause) => cause,
UpdateStackError::OperationNotPermitted(ref cause) => cause,
UpdateStackError::ResourceInUse(ref cause) => cause,
UpdateStackError::ResourceNotFound(ref cause) => cause,
}
}
}
pub trait AppStream {
fn associate_fleet(
&self,
input: AssociateFleetRequest,
) -> RusotoFuture<AssociateFleetResult, AssociateFleetError>;
fn batch_associate_user_stack(
&self,
input: BatchAssociateUserStackRequest,
) -> RusotoFuture<BatchAssociateUserStackResult, BatchAssociateUserStackError>;
fn batch_disassociate_user_stack(
&self,
input: BatchDisassociateUserStackRequest,
) -> RusotoFuture<BatchDisassociateUserStackResult, BatchDisassociateUserStackError>;
fn copy_image(
&self,
input: CopyImageRequest,
) -> RusotoFuture<CopyImageResponse, CopyImageError>;
fn create_directory_config(
&self,
input: CreateDirectoryConfigRequest,
) -> RusotoFuture<CreateDirectoryConfigResult, CreateDirectoryConfigError>;
fn create_fleet(
&self,
input: CreateFleetRequest,
) -> RusotoFuture<CreateFleetResult, CreateFleetError>;
fn create_image_builder(
&self,
input: CreateImageBuilderRequest,
) -> RusotoFuture<CreateImageBuilderResult, CreateImageBuilderError>;
fn create_image_builder_streaming_url(
&self,
input: CreateImageBuilderStreamingURLRequest,
) -> RusotoFuture<CreateImageBuilderStreamingURLResult, CreateImageBuilderStreamingURLError>;
fn create_stack(
&self,
input: CreateStackRequest,
) -> RusotoFuture<CreateStackResult, CreateStackError>;
fn create_streaming_url(
&self,
input: CreateStreamingURLRequest,
) -> RusotoFuture<CreateStreamingURLResult, CreateStreamingURLError>;
fn create_usage_report_subscription(
&self,
) -> RusotoFuture<CreateUsageReportSubscriptionResult, CreateUsageReportSubscriptionError>;
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResult, CreateUserError>;
fn delete_directory_config(
&self,
input: DeleteDirectoryConfigRequest,
) -> RusotoFuture<DeleteDirectoryConfigResult, DeleteDirectoryConfigError>;
fn delete_fleet(
&self,
input: DeleteFleetRequest,
) -> RusotoFuture<DeleteFleetResult, DeleteFleetError>;
fn delete_image(
&self,
input: DeleteImageRequest,
) -> RusotoFuture<DeleteImageResult, DeleteImageError>;
fn delete_image_builder(
&self,
input: DeleteImageBuilderRequest,
) -> RusotoFuture<DeleteImageBuilderResult, DeleteImageBuilderError>;
fn delete_image_permissions(
&self,
input: DeleteImagePermissionsRequest,
) -> RusotoFuture<DeleteImagePermissionsResult, DeleteImagePermissionsError>;
fn delete_stack(
&self,
input: DeleteStackRequest,
) -> RusotoFuture<DeleteStackResult, DeleteStackError>;
fn delete_usage_report_subscription(
&self,
) -> RusotoFuture<DeleteUsageReportSubscriptionResult, DeleteUsageReportSubscriptionError>;
fn delete_user(
&self,
input: DeleteUserRequest,
) -> RusotoFuture<DeleteUserResult, DeleteUserError>;
fn describe_directory_configs(
&self,
input: DescribeDirectoryConfigsRequest,
) -> RusotoFuture<DescribeDirectoryConfigsResult, DescribeDirectoryConfigsError>;
fn describe_fleets(
&self,
input: DescribeFleetsRequest,
) -> RusotoFuture<DescribeFleetsResult, DescribeFleetsError>;
fn describe_image_builders(
&self,
input: DescribeImageBuildersRequest,
) -> RusotoFuture<DescribeImageBuildersResult, DescribeImageBuildersError>;
fn describe_image_permissions(
&self,
input: DescribeImagePermissionsRequest,
) -> RusotoFuture<DescribeImagePermissionsResult, DescribeImagePermissionsError>;
fn describe_images(
&self,
input: DescribeImagesRequest,
) -> RusotoFuture<DescribeImagesResult, DescribeImagesError>;
fn describe_sessions(
&self,
input: DescribeSessionsRequest,
) -> RusotoFuture<DescribeSessionsResult, DescribeSessionsError>;
fn describe_stacks(
&self,
input: DescribeStacksRequest,
) -> RusotoFuture<DescribeStacksResult, DescribeStacksError>;
fn describe_usage_report_subscriptions(
&self,
input: DescribeUsageReportSubscriptionsRequest,
) -> RusotoFuture<DescribeUsageReportSubscriptionsResult, DescribeUsageReportSubscriptionsError>;
fn describe_user_stack_associations(
&self,
input: DescribeUserStackAssociationsRequest,
) -> RusotoFuture<DescribeUserStackAssociationsResult, DescribeUserStackAssociationsError>;
fn describe_users(
&self,
input: DescribeUsersRequest,
) -> RusotoFuture<DescribeUsersResult, DescribeUsersError>;
fn disable_user(
&self,
input: DisableUserRequest,
) -> RusotoFuture<DisableUserResult, DisableUserError>;
fn disassociate_fleet(
&self,
input: DisassociateFleetRequest,
) -> RusotoFuture<DisassociateFleetResult, DisassociateFleetError>;
fn enable_user(
&self,
input: EnableUserRequest,
) -> RusotoFuture<EnableUserResult, EnableUserError>;
fn expire_session(
&self,
input: ExpireSessionRequest,
) -> RusotoFuture<ExpireSessionResult, ExpireSessionError>;
fn list_associated_fleets(
&self,
input: ListAssociatedFleetsRequest,
) -> RusotoFuture<ListAssociatedFleetsResult, ListAssociatedFleetsError>;
fn list_associated_stacks(
&self,
input: ListAssociatedStacksRequest,
) -> RusotoFuture<ListAssociatedStacksResult, ListAssociatedStacksError>;
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError>;
fn start_fleet(
&self,
input: StartFleetRequest,
) -> RusotoFuture<StartFleetResult, StartFleetError>;
fn start_image_builder(
&self,
input: StartImageBuilderRequest,
) -> RusotoFuture<StartImageBuilderResult, StartImageBuilderError>;
fn stop_fleet(&self, input: StopFleetRequest) -> RusotoFuture<StopFleetResult, StopFleetError>;
fn stop_image_builder(
&self,
input: StopImageBuilderRequest,
) -> RusotoFuture<StopImageBuilderResult, StopImageBuilderError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_directory_config(
&self,
input: UpdateDirectoryConfigRequest,
) -> RusotoFuture<UpdateDirectoryConfigResult, UpdateDirectoryConfigError>;
fn update_fleet(
&self,
input: UpdateFleetRequest,
) -> RusotoFuture<UpdateFleetResult, UpdateFleetError>;
fn update_image_permissions(
&self,
input: UpdateImagePermissionsRequest,
) -> RusotoFuture<UpdateImagePermissionsResult, UpdateImagePermissionsError>;
fn update_stack(
&self,
input: UpdateStackRequest,
) -> RusotoFuture<UpdateStackResult, UpdateStackError>;
}
#[derive(Clone)]
pub struct AppStreamClient {
client: Client,
region: region::Region,
}
impl AppStreamClient {
pub fn new(region: region::Region) -> AppStreamClient {
AppStreamClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> AppStreamClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
AppStreamClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl AppStream for AppStreamClient {
fn associate_fleet(
&self,
input: AssociateFleetRequest,
) -> RusotoFuture<AssociateFleetResult, AssociateFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.AssociateFleet");
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::<AssociateFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AssociateFleetError::from_response(response))),
)
}
})
}
fn batch_associate_user_stack(
&self,
input: BatchAssociateUserStackRequest,
) -> RusotoFuture<BatchAssociateUserStackResult, BatchAssociateUserStackError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.BatchAssociateUserStack",
);
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::<BatchAssociateUserStackResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(BatchAssociateUserStackError::from_response(response))
}))
}
})
}
fn batch_disassociate_user_stack(
&self,
input: BatchDisassociateUserStackRequest,
) -> RusotoFuture<BatchDisassociateUserStackResult, BatchDisassociateUserStackError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.BatchDisassociateUserStack",
);
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::<BatchDisassociateUserStackResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(BatchDisassociateUserStackError::from_response(response))
}))
}
})
}
fn copy_image(
&self,
input: CopyImageRequest,
) -> RusotoFuture<CopyImageResponse, CopyImageError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CopyImage");
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::<CopyImageResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CopyImageError::from_response(response))),
)
}
})
}
fn create_directory_config(
&self,
input: CreateDirectoryConfigRequest,
) -> RusotoFuture<CreateDirectoryConfigResult, CreateDirectoryConfigError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.CreateDirectoryConfig",
);
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::<CreateDirectoryConfigResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateDirectoryConfigError::from_response(response))
}),
)
}
})
}
fn create_fleet(
&self,
input: CreateFleetRequest,
) -> RusotoFuture<CreateFleetResult, CreateFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CreateFleet");
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::<CreateFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateFleetError::from_response(response))),
)
}
})
}
fn create_image_builder(
&self,
input: CreateImageBuilderRequest,
) -> RusotoFuture<CreateImageBuilderResult, CreateImageBuilderError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CreateImageBuilder");
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::<CreateImageBuilderResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateImageBuilderError::from_response(response))),
)
}
})
}
fn create_image_builder_streaming_url(
&self,
input: CreateImageBuilderStreamingURLRequest,
) -> RusotoFuture<CreateImageBuilderStreamingURLResult, CreateImageBuilderStreamingURLError>
{
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.CreateImageBuilderStreamingURL",
);
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::<CreateImageBuilderStreamingURLResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateImageBuilderStreamingURLError::from_response(response))
}))
}
})
}
fn create_stack(
&self,
input: CreateStackRequest,
) -> RusotoFuture<CreateStackResult, CreateStackError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CreateStack");
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::<CreateStackResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateStackError::from_response(response))),
)
}
})
}
fn create_streaming_url(
&self,
input: CreateStreamingURLRequest,
) -> RusotoFuture<CreateStreamingURLResult, CreateStreamingURLError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CreateStreamingURL");
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::<CreateStreamingURLResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateStreamingURLError::from_response(response))),
)
}
})
}
fn create_usage_report_subscription(
&self,
) -> RusotoFuture<CreateUsageReportSubscriptionResult, CreateUsageReportSubscriptionError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.CreateUsageReportSubscription",
);
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::<CreateUsageReportSubscriptionResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateUsageReportSubscriptionError::from_response(response))
}))
}
})
}
fn create_user(
&self,
input: CreateUserRequest,
) -> RusotoFuture<CreateUserResult, CreateUserError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.CreateUser");
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::<CreateUserResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateUserError::from_response(response))),
)
}
})
}
fn delete_directory_config(
&self,
input: DeleteDirectoryConfigRequest,
) -> RusotoFuture<DeleteDirectoryConfigResult, DeleteDirectoryConfigError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DeleteDirectoryConfig",
);
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::<DeleteDirectoryConfigResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteDirectoryConfigError::from_response(response))
}),
)
}
})
}
fn delete_fleet(
&self,
input: DeleteFleetRequest,
) -> RusotoFuture<DeleteFleetResult, DeleteFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DeleteFleet");
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::<DeleteFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteFleetError::from_response(response))),
)
}
})
}
fn delete_image(
&self,
input: DeleteImageRequest,
) -> RusotoFuture<DeleteImageResult, DeleteImageError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DeleteImage");
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::<DeleteImageResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteImageError::from_response(response))),
)
}
})
}
fn delete_image_builder(
&self,
input: DeleteImageBuilderRequest,
) -> RusotoFuture<DeleteImageBuilderResult, DeleteImageBuilderError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DeleteImageBuilder");
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::<DeleteImageBuilderResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteImageBuilderError::from_response(response))),
)
}
})
}
fn delete_image_permissions(
&self,
input: DeleteImagePermissionsRequest,
) -> RusotoFuture<DeleteImagePermissionsResult, DeleteImagePermissionsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DeleteImagePermissions",
);
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::<DeleteImagePermissionsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteImagePermissionsError::from_response(response))
}),
)
}
})
}
fn delete_stack(
&self,
input: DeleteStackRequest,
) -> RusotoFuture<DeleteStackResult, DeleteStackError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DeleteStack");
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::<DeleteStackResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteStackError::from_response(response))),
)
}
})
}
fn delete_usage_report_subscription(
&self,
) -> RusotoFuture<DeleteUsageReportSubscriptionResult, DeleteUsageReportSubscriptionError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DeleteUsageReportSubscription",
);
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::<DeleteUsageReportSubscriptionResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteUsageReportSubscriptionError::from_response(response))
}))
}
})
}
fn delete_user(
&self,
input: DeleteUserRequest,
) -> RusotoFuture<DeleteUserResult, DeleteUserError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DeleteUser");
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::<DeleteUserResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUserError::from_response(response))),
)
}
})
}
fn describe_directory_configs(
&self,
input: DescribeDirectoryConfigsRequest,
) -> RusotoFuture<DescribeDirectoryConfigsResult, DescribeDirectoryConfigsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DescribeDirectoryConfigs",
);
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::<DescribeDirectoryConfigsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDirectoryConfigsError::from_response(response))
}))
}
})
}
fn describe_fleets(
&self,
input: DescribeFleetsRequest,
) -> RusotoFuture<DescribeFleetsResult, DescribeFleetsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DescribeFleets");
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::<DescribeFleetsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeFleetsError::from_response(response))),
)
}
})
}
fn describe_image_builders(
&self,
input: DescribeImageBuildersRequest,
) -> RusotoFuture<DescribeImageBuildersResult, DescribeImageBuildersError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DescribeImageBuilders",
);
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::<DescribeImageBuildersResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeImageBuildersError::from_response(response))
}),
)
}
})
}
fn describe_image_permissions(
&self,
input: DescribeImagePermissionsRequest,
) -> RusotoFuture<DescribeImagePermissionsResult, DescribeImagePermissionsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DescribeImagePermissions",
);
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::<DescribeImagePermissionsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeImagePermissionsError::from_response(response))
}))
}
})
}
fn describe_images(
&self,
input: DescribeImagesRequest,
) -> RusotoFuture<DescribeImagesResult, DescribeImagesError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DescribeImages");
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::<DescribeImagesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeImagesError::from_response(response))),
)
}
})
}
fn describe_sessions(
&self,
input: DescribeSessionsRequest,
) -> RusotoFuture<DescribeSessionsResult, DescribeSessionsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DescribeSessions");
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::<DescribeSessionsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeSessionsError::from_response(response))),
)
}
})
}
fn describe_stacks(
&self,
input: DescribeStacksRequest,
) -> RusotoFuture<DescribeStacksResult, DescribeStacksError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DescribeStacks");
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::<DescribeStacksResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeStacksError::from_response(response))),
)
}
})
}
fn describe_usage_report_subscriptions(
&self,
input: DescribeUsageReportSubscriptionsRequest,
) -> RusotoFuture<DescribeUsageReportSubscriptionsResult, DescribeUsageReportSubscriptionsError>
{
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DescribeUsageReportSubscriptions",
);
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::<DescribeUsageReportSubscriptionsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeUsageReportSubscriptionsError::from_response(
response,
))
}))
}
})
}
fn describe_user_stack_associations(
&self,
input: DescribeUserStackAssociationsRequest,
) -> RusotoFuture<DescribeUserStackAssociationsResult, DescribeUserStackAssociationsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.DescribeUserStackAssociations",
);
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::<DescribeUserStackAssociationsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeUserStackAssociationsError::from_response(response))
}))
}
})
}
fn describe_users(
&self,
input: DescribeUsersRequest,
) -> RusotoFuture<DescribeUsersResult, DescribeUsersError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DescribeUsers");
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::<DescribeUsersResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeUsersError::from_response(response))),
)
}
})
}
fn disable_user(
&self,
input: DisableUserRequest,
) -> RusotoFuture<DisableUserResult, DisableUserError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DisableUser");
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::<DisableUserResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisableUserError::from_response(response))),
)
}
})
}
fn disassociate_fleet(
&self,
input: DisassociateFleetRequest,
) -> RusotoFuture<DisassociateFleetResult, DisassociateFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.DisassociateFleet");
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::<DisassociateFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisassociateFleetError::from_response(response))),
)
}
})
}
fn enable_user(
&self,
input: EnableUserRequest,
) -> RusotoFuture<EnableUserResult, EnableUserError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.EnableUser");
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::<EnableUserResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(EnableUserError::from_response(response))),
)
}
})
}
fn expire_session(
&self,
input: ExpireSessionRequest,
) -> RusotoFuture<ExpireSessionResult, ExpireSessionError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.ExpireSession");
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::<ExpireSessionResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ExpireSessionError::from_response(response))),
)
}
})
}
fn list_associated_fleets(
&self,
input: ListAssociatedFleetsRequest,
) -> RusotoFuture<ListAssociatedFleetsResult, ListAssociatedFleetsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.ListAssociatedFleets",
);
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::<ListAssociatedFleetsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListAssociatedFleetsError::from_response(response))
}),
)
}
})
}
fn list_associated_stacks(
&self,
input: ListAssociatedStacksRequest,
) -> RusotoFuture<ListAssociatedStacksResult, ListAssociatedStacksError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.ListAssociatedStacks",
);
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::<ListAssociatedStacksResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListAssociatedStacksError::from_response(response))
}),
)
}
})
}
fn list_tags_for_resource(
&self,
input: ListTagsForResourceRequest,
) -> RusotoFuture<ListTagsForResourceResponse, ListTagsForResourceError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.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::<ListTagsForResourceResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ListTagsForResourceError::from_response(response))
}),
)
}
})
}
fn start_fleet(
&self,
input: StartFleetRequest,
) -> RusotoFuture<StartFleetResult, StartFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.StartFleet");
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::<StartFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartFleetError::from_response(response))),
)
}
})
}
fn start_image_builder(
&self,
input: StartImageBuilderRequest,
) -> RusotoFuture<StartImageBuilderResult, StartImageBuilderError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.StartImageBuilder");
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::<StartImageBuilderResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartImageBuilderError::from_response(response))),
)
}
})
}
fn stop_fleet(&self, input: StopFleetRequest) -> RusotoFuture<StopFleetResult, StopFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.StopFleet");
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::<StopFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopFleetError::from_response(response))),
)
}
})
}
fn stop_image_builder(
&self,
input: StopImageBuilderRequest,
) -> RusotoFuture<StopImageBuilderResult, StopImageBuilderError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.StopImageBuilder");
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::<StopImageBuilderResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopImageBuilderError::from_response(response))),
)
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.TagResource");
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::<TagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.UntagResource");
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::<UntagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_directory_config(
&self,
input: UpdateDirectoryConfigRequest,
) -> RusotoFuture<UpdateDirectoryConfigResult, UpdateDirectoryConfigError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.UpdateDirectoryConfig",
);
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::<UpdateDirectoryConfigResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateDirectoryConfigError::from_response(response))
}),
)
}
})
}
fn update_fleet(
&self,
input: UpdateFleetRequest,
) -> RusotoFuture<UpdateFleetResult, UpdateFleetError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.UpdateFleet");
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::<UpdateFleetResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateFleetError::from_response(response))),
)
}
})
}
fn update_image_permissions(
&self,
input: UpdateImagePermissionsRequest,
) -> RusotoFuture<UpdateImagePermissionsResult, UpdateImagePermissionsError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"PhotonAdminProxyService.UpdateImagePermissions",
);
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::<UpdateImagePermissionsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateImagePermissionsError::from_response(response))
}),
)
}
})
}
fn update_stack(
&self,
input: UpdateStackRequest,
) -> RusotoFuture<UpdateStackResult, UpdateStackError> {
let mut request = SignedRequest::new("POST", "appstream", &self.region, "/");
request.set_endpoint_prefix("appstream2".to_string());
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "PhotonAdminProxyService.UpdateStack");
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::<UpdateStackResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateStackError::from_response(response))),
)
}
})
}
}