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 AccountModification {
#[serde(rename = "DedicatedTenancyManagementCidrRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_management_cidr_range: Option<String>,
#[serde(rename = "DedicatedTenancySupport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_support: Option<String>,
#[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 = "ModificationState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modification_state: Option<String>,
#[serde(rename = "StartTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateIpGroupsRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "GroupIds")]
pub group_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateIpGroupsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AuthorizeIpRulesRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "UserRules")]
pub user_rules: Vec<IpRuleItem>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AuthorizeIpRulesResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ClientProperties {
#[serde(rename = "ReconnectEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub reconnect_enabled: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ClientPropertiesResult {
#[serde(rename = "ClientProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_properties: Option<ClientProperties>,
#[serde(rename = "ResourceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ComputeType {
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateIpGroupRequest {
#[serde(rename = "GroupDesc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_desc: Option<String>,
#[serde(rename = "GroupName")]
pub group_name: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "UserRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_rules: Option<Vec<IpRuleItem>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateIpGroupResult {
#[serde(rename = "GroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTagsRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "Tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTagsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateWorkspacesRequest {
#[serde(rename = "Workspaces")]
pub workspaces: Vec<WorkspaceRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedCreateWorkspaceRequest>>,
#[serde(rename = "PendingRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pending_requests: Option<Vec<Workspace>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DefaultWorkspaceCreationProperties {
#[serde(rename = "CustomSecurityGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub custom_security_group_id: Option<String>,
#[serde(rename = "DefaultOu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_ou: Option<String>,
#[serde(rename = "EnableInternetAccess")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_internet_access: Option<bool>,
#[serde(rename = "EnableWorkDocs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enable_work_docs: Option<bool>,
#[serde(rename = "UserEnabledAsLocalAdministrator")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_enabled_as_local_administrator: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteIpGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteIpGroupResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteTagsRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
#[serde(rename = "TagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteTagsResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteWorkspaceImageRequest {
#[serde(rename = "ImageId")]
pub image_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteWorkspaceImageResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAccountModificationsRequest {
#[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 DescribeAccountModificationsResult {
#[serde(rename = "AccountModifications")]
#[serde(skip_serializing_if = "Option::is_none")]
pub account_modifications: Option<Vec<AccountModification>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAccountRequest {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAccountResult {
#[serde(rename = "DedicatedTenancyManagementCidrRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_management_cidr_range: Option<String>,
#[serde(rename = "DedicatedTenancySupport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_support: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeClientPropertiesRequest {
#[serde(rename = "ResourceIds")]
pub resource_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeClientPropertiesResult {
#[serde(rename = "ClientPropertiesList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_properties_list: Option<Vec<ClientPropertiesResult>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeIpGroupsRequest {
#[serde(rename = "GroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_ids: Option<Vec<String>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeIpGroupsResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Result")]
#[serde(skip_serializing_if = "Option::is_none")]
pub result: Option<Vec<WorkspacesIpGroup>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTagsRequest {
#[serde(rename = "ResourceId")]
pub resource_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTagsResult {
#[serde(rename = "TagList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tag_list: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkspaceBundlesRequest {
#[serde(rename = "BundleIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bundle_ids: Option<Vec<String>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWorkspaceBundlesResult {
#[serde(rename = "Bundles")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bundles: Option<Vec<WorkspaceBundle>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkspaceDirectoriesRequest {
#[serde(rename = "DirectoryIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_ids: 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 DescribeWorkspaceDirectoriesResult {
#[serde(rename = "Directories")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directories: Option<Vec<WorkspaceDirectory>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkspaceImagesRequest {
#[serde(rename = "ImageIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_ids: Option<Vec<String>>,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWorkspaceImagesResult {
#[serde(rename = "Images")]
#[serde(skip_serializing_if = "Option::is_none")]
pub images: Option<Vec<WorkspaceImage>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkspacesConnectionStatusRequest {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WorkspaceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWorkspacesConnectionStatusResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WorkspacesConnectionStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspaces_connection_status: Option<Vec<WorkspaceConnectionStatus>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWorkspacesRequest {
#[serde(rename = "BundleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bundle_id: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "Limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
#[serde(rename = "WorkspaceIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWorkspacesResult {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "Workspaces")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspaces: Option<Vec<Workspace>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateIpGroupsRequest {
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "GroupIds")]
pub group_ids: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateIpGroupsResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FailedCreateWorkspaceRequest {
#[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 = "WorkspaceRequest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_request: Option<WorkspaceRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FailedWorkspaceChangeRequest {
#[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 = "WorkspaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ImportWorkspaceImageRequest {
#[serde(rename = "Ec2ImageId")]
pub ec_2_image_id: String,
#[serde(rename = "ImageDescription")]
pub image_description: String,
#[serde(rename = "ImageName")]
pub image_name: String,
#[serde(rename = "IngestionProcess")]
pub ingestion_process: String,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ImportWorkspaceImageResult {
#[serde(rename = "ImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct IpRuleItem {
#[serde(rename = "ipRule")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_rule: Option<String>,
#[serde(rename = "ruleDesc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rule_desc: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListAvailableManagementCidrRangesRequest {
#[serde(rename = "ManagementCidrRangeConstraint")]
pub management_cidr_range_constraint: 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 ListAvailableManagementCidrRangesResult {
#[serde(rename = "ManagementCidrRanges")]
#[serde(skip_serializing_if = "Option::is_none")]
pub management_cidr_ranges: 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 ModificationState {
#[serde(rename = "Resource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ModifyAccountRequest {
#[serde(rename = "DedicatedTenancyManagementCidrRange")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_management_cidr_range: Option<String>,
#[serde(rename = "DedicatedTenancySupport")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dedicated_tenancy_support: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ModifyAccountResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ModifyClientPropertiesRequest {
#[serde(rename = "ClientProperties")]
pub client_properties: ClientProperties,
#[serde(rename = "ResourceId")]
pub resource_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ModifyClientPropertiesResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ModifyWorkspacePropertiesRequest {
#[serde(rename = "WorkspaceId")]
pub workspace_id: String,
#[serde(rename = "WorkspaceProperties")]
pub workspace_properties: WorkspaceProperties,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ModifyWorkspacePropertiesResult {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ModifyWorkspaceStateRequest {
#[serde(rename = "WorkspaceId")]
pub workspace_id: String,
#[serde(rename = "WorkspaceState")]
pub workspace_state: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ModifyWorkspaceStateResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct OperatingSystem {
#[serde(rename = "Type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RebootRequest {
#[serde(rename = "WorkspaceId")]
pub workspace_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RebootWorkspacesRequest {
#[serde(rename = "RebootWorkspaceRequests")]
pub reboot_workspace_requests: Vec<RebootRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RebootWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedWorkspaceChangeRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RebuildRequest {
#[serde(rename = "WorkspaceId")]
pub workspace_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RebuildWorkspacesRequest {
#[serde(rename = "AdditionalInfo")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_info: Option<String>,
#[serde(rename = "RebuildWorkspaceRequests")]
pub rebuild_workspace_requests: Vec<RebuildRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RebuildWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedWorkspaceChangeRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RevokeIpRulesRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "UserRules")]
pub user_rules: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RevokeIpRulesResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RootStorage {
#[serde(rename = "Capacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capacity: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartRequest {
#[serde(rename = "WorkspaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StartWorkspacesRequest {
#[serde(rename = "StartWorkspaceRequests")]
pub start_workspace_requests: Vec<StartRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StartWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedWorkspaceChangeRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopRequest {
#[serde(rename = "WorkspaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct StopWorkspacesRequest {
#[serde(rename = "StopWorkspaceRequests")]
pub stop_workspace_requests: Vec<StopRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct StopWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedWorkspaceChangeRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "Key")]
pub key: String,
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TerminateRequest {
#[serde(rename = "WorkspaceId")]
pub workspace_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TerminateWorkspacesRequest {
#[serde(rename = "TerminateWorkspaceRequests")]
pub terminate_workspace_requests: Vec<TerminateRequest>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TerminateWorkspacesResult {
#[serde(rename = "FailedRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub failed_requests: Option<Vec<FailedWorkspaceChangeRequest>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRulesOfIpGroupRequest {
#[serde(rename = "GroupId")]
pub group_id: String,
#[serde(rename = "UserRules")]
pub user_rules: Vec<IpRuleItem>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRulesOfIpGroupResult {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UserStorage {
#[serde(rename = "Capacity")]
#[serde(skip_serializing_if = "Option::is_none")]
pub capacity: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Workspace {
#[serde(rename = "BundleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bundle_id: Option<String>,
#[serde(rename = "ComputerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub computer_name: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[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 = "IpAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_address: Option<String>,
#[serde(rename = "ModificationStates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub modification_states: Option<Vec<ModificationState>>,
#[serde(rename = "RootVolumeEncryptionEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_volume_encryption_enabled: Option<bool>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "SubnetId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_id: Option<String>,
#[serde(rename = "UserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_name: Option<String>,
#[serde(rename = "UserVolumeEncryptionEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_volume_encryption_enabled: Option<bool>,
#[serde(rename = "VolumeEncryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_encryption_key: Option<String>,
#[serde(rename = "WorkspaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
#[serde(rename = "WorkspaceProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_properties: Option<WorkspaceProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WorkspaceBundle {
#[serde(rename = "BundleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bundle_id: Option<String>,
#[serde(rename = "ComputeType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compute_type: Option<ComputeType>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "Owner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner: Option<String>,
#[serde(rename = "RootStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_storage: Option<RootStorage>,
#[serde(rename = "UserStorage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_storage: Option<UserStorage>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WorkspaceConnectionStatus {
#[serde(rename = "ConnectionState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_state: Option<String>,
#[serde(rename = "ConnectionStateCheckTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_state_check_timestamp: Option<f64>,
#[serde(rename = "LastKnownUserConnectionTimestamp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_known_user_connection_timestamp: Option<f64>,
#[serde(rename = "WorkspaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WorkspaceDirectory {
#[serde(rename = "Alias")]
#[serde(skip_serializing_if = "Option::is_none")]
pub alias: Option<String>,
#[serde(rename = "CustomerUserName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_user_name: Option<String>,
#[serde(rename = "DirectoryId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_id: Option<String>,
#[serde(rename = "DirectoryName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_name: Option<String>,
#[serde(rename = "DirectoryType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub directory_type: Option<String>,
#[serde(rename = "DnsIpAddresses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns_ip_addresses: Option<Vec<String>>,
#[serde(rename = "IamRoleId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub iam_role_id: Option<String>,
#[serde(rename = "RegistrationCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub registration_code: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "WorkspaceCreationProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_creation_properties: Option<DefaultWorkspaceCreationProperties>,
#[serde(rename = "WorkspaceSecurityGroupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_security_group_id: Option<String>,
#[serde(rename = "ipGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ip_group_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WorkspaceImage {
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[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 = "ImageId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub image_id: Option<String>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<OperatingSystem>,
#[serde(rename = "RequiredTenancy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub required_tenancy: Option<String>,
#[serde(rename = "State")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WorkspaceProperties {
#[serde(rename = "ComputeTypeName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub compute_type_name: Option<String>,
#[serde(rename = "RootVolumeSizeGib")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_volume_size_gib: Option<i64>,
#[serde(rename = "RunningMode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub running_mode: Option<String>,
#[serde(rename = "RunningModeAutoStopTimeoutInMinutes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub running_mode_auto_stop_timeout_in_minutes: Option<i64>,
#[serde(rename = "UserVolumeSizeGib")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_volume_size_gib: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WorkspaceRequest {
#[serde(rename = "BundleId")]
pub bundle_id: String,
#[serde(rename = "DirectoryId")]
pub directory_id: String,
#[serde(rename = "RootVolumeEncryptionEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub root_volume_encryption_enabled: Option<bool>,
#[serde(rename = "Tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
#[serde(rename = "UserName")]
pub user_name: String,
#[serde(rename = "UserVolumeEncryptionEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_volume_encryption_enabled: Option<bool>,
#[serde(rename = "VolumeEncryptionKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub volume_encryption_key: Option<String>,
#[serde(rename = "WorkspaceProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub workspace_properties: Option<WorkspaceProperties>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WorkspacesIpGroup {
#[serde(rename = "groupDesc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_desc: Option<String>,
#[serde(rename = "groupId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_id: Option<String>,
#[serde(rename = "groupName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub group_name: Option<String>,
#[serde(rename = "userRules")]
#[serde(skip_serializing_if = "Option::is_none")]
pub user_rules: Option<Vec<IpRuleItem>>,
}
#[derive(Debug, PartialEq)]
pub enum AssociateIpGroupsError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
OperationNotSupported(String),
ResourceLimitExceeded(String),
ResourceNotFound(String),
}
impl AssociateIpGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateIpGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AssociateIpGroupsError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(AssociateIpGroupsError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(AssociateIpGroupsError::InvalidResourceState(
err.msg,
))
}
"OperationNotSupportedException" => {
return RusotoError::Service(AssociateIpGroupsError::OperationNotSupported(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(AssociateIpGroupsError::ResourceLimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AssociateIpGroupsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateIpGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateIpGroupsError {
fn description(&self) -> &str {
match *self {
AssociateIpGroupsError::AccessDenied(ref cause) => cause,
AssociateIpGroupsError::InvalidParameterValues(ref cause) => cause,
AssociateIpGroupsError::InvalidResourceState(ref cause) => cause,
AssociateIpGroupsError::OperationNotSupported(ref cause) => cause,
AssociateIpGroupsError::ResourceLimitExceeded(ref cause) => cause,
AssociateIpGroupsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AuthorizeIpRulesError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceLimitExceeded(String),
ResourceNotFound(String),
}
impl AuthorizeIpRulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AuthorizeIpRulesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(AuthorizeIpRulesError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(AuthorizeIpRulesError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(AuthorizeIpRulesError::InvalidResourceState(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(AuthorizeIpRulesError::ResourceLimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AuthorizeIpRulesError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AuthorizeIpRulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AuthorizeIpRulesError {
fn description(&self) -> &str {
match *self {
AuthorizeIpRulesError::AccessDenied(ref cause) => cause,
AuthorizeIpRulesError::InvalidParameterValues(ref cause) => cause,
AuthorizeIpRulesError::InvalidResourceState(ref cause) => cause,
AuthorizeIpRulesError::ResourceLimitExceeded(ref cause) => cause,
AuthorizeIpRulesError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateIpGroupError {
AccessDenied(String),
InvalidParameterValues(String),
ResourceAlreadyExists(String),
ResourceCreationFailed(String),
ResourceLimitExceeded(String),
}
impl CreateIpGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIpGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(CreateIpGroupError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(CreateIpGroupError::InvalidParameterValues(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateIpGroupError::ResourceAlreadyExists(err.msg))
}
"ResourceCreationFailedException" => {
return RusotoError::Service(CreateIpGroupError::ResourceCreationFailed(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateIpGroupError::ResourceLimitExceeded(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateIpGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateIpGroupError {
fn description(&self) -> &str {
match *self {
CreateIpGroupError::AccessDenied(ref cause) => cause,
CreateIpGroupError::InvalidParameterValues(ref cause) => cause,
CreateIpGroupError::ResourceAlreadyExists(ref cause) => cause,
CreateIpGroupError::ResourceCreationFailed(ref cause) => cause,
CreateIpGroupError::ResourceLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTagsError {
InvalidParameterValues(String),
ResourceLimitExceeded(String),
ResourceNotFound(String),
}
impl CreateTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(CreateTagsError::InvalidParameterValues(err.msg))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateTagsError::ResourceLimitExceeded(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateTagsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTagsError {
fn description(&self) -> &str {
match *self {
CreateTagsError::InvalidParameterValues(ref cause) => cause,
CreateTagsError::ResourceLimitExceeded(ref cause) => cause,
CreateTagsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateWorkspacesError {
InvalidParameterValues(String),
ResourceLimitExceeded(String),
}
impl CreateWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateWorkspacesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(CreateWorkspacesError::InvalidParameterValues(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(CreateWorkspacesError::ResourceLimitExceeded(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateWorkspacesError {
fn description(&self) -> &str {
match *self {
CreateWorkspacesError::InvalidParameterValues(ref cause) => cause,
CreateWorkspacesError::ResourceLimitExceeded(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIpGroupError {
AccessDenied(String),
InvalidParameterValues(String),
ResourceAssociated(String),
ResourceNotFound(String),
}
impl DeleteIpGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIpGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteIpGroupError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(DeleteIpGroupError::InvalidParameterValues(
err.msg,
))
}
"ResourceAssociatedException" => {
return RusotoError::Service(DeleteIpGroupError::ResourceAssociated(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteIpGroupError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteIpGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIpGroupError {
fn description(&self) -> &str {
match *self {
DeleteIpGroupError::AccessDenied(ref cause) => cause,
DeleteIpGroupError::InvalidParameterValues(ref cause) => cause,
DeleteIpGroupError::ResourceAssociated(ref cause) => cause,
DeleteIpGroupError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteTagsError {
InvalidParameterValues(String),
ResourceNotFound(String),
}
impl DeleteTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(DeleteTagsError::InvalidParameterValues(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteTagsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteTagsError {
fn description(&self) -> &str {
match *self {
DeleteTagsError::InvalidParameterValues(ref cause) => cause,
DeleteTagsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteWorkspaceImageError {
AccessDenied(String),
InvalidResourceState(String),
ResourceAssociated(String),
}
impl DeleteWorkspaceImageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteWorkspaceImageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DeleteWorkspaceImageError::AccessDenied(err.msg))
}
"InvalidResourceStateException" => {
return RusotoError::Service(DeleteWorkspaceImageError::InvalidResourceState(
err.msg,
))
}
"ResourceAssociatedException" => {
return RusotoError::Service(DeleteWorkspaceImageError::ResourceAssociated(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteWorkspaceImageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteWorkspaceImageError {
fn description(&self) -> &str {
match *self {
DeleteWorkspaceImageError::AccessDenied(ref cause) => cause,
DeleteWorkspaceImageError::InvalidResourceState(ref cause) => cause,
DeleteWorkspaceImageError::ResourceAssociated(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountError {
AccessDenied(String),
}
impl DescribeAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAccountError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DescribeAccountError::AccessDenied(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountError {
fn description(&self) -> &str {
match *self {
DescribeAccountError::AccessDenied(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAccountModificationsError {
AccessDenied(String),
}
impl DescribeAccountModificationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeAccountModificationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DescribeAccountModificationsError::AccessDenied(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAccountModificationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAccountModificationsError {
fn description(&self) -> &str {
match *self {
DescribeAccountModificationsError::AccessDenied(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeClientPropertiesError {
AccessDenied(String),
InvalidParameterValues(String),
ResourceNotFound(String),
}
impl DescribeClientPropertiesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeClientPropertiesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DescribeClientPropertiesError::AccessDenied(
err.msg,
))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(
DescribeClientPropertiesError::InvalidParameterValues(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeClientPropertiesError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeClientPropertiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeClientPropertiesError {
fn description(&self) -> &str {
match *self {
DescribeClientPropertiesError::AccessDenied(ref cause) => cause,
DescribeClientPropertiesError::InvalidParameterValues(ref cause) => cause,
DescribeClientPropertiesError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeIpGroupsError {
AccessDenied(String),
InvalidParameterValues(String),
}
impl DescribeIpGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeIpGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DescribeIpGroupsError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(DescribeIpGroupsError::InvalidParameterValues(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeIpGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeIpGroupsError {
fn description(&self) -> &str {
match *self {
DescribeIpGroupsError::AccessDenied(ref cause) => cause,
DescribeIpGroupsError::InvalidParameterValues(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
ResourceNotFound(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeTagsError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTagsError {
fn description(&self) -> &str {
match *self {
DescribeTagsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkspaceBundlesError {
InvalidParameterValues(String),
}
impl DescribeWorkspaceBundlesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeWorkspaceBundlesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(
DescribeWorkspaceBundlesError::InvalidParameterValues(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkspaceBundlesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkspaceBundlesError {
fn description(&self) -> &str {
match *self {
DescribeWorkspaceBundlesError::InvalidParameterValues(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkspaceDirectoriesError {
InvalidParameterValues(String),
}
impl DescribeWorkspaceDirectoriesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeWorkspaceDirectoriesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(
DescribeWorkspaceDirectoriesError::InvalidParameterValues(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkspaceDirectoriesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkspaceDirectoriesError {
fn description(&self) -> &str {
match *self {
DescribeWorkspaceDirectoriesError::InvalidParameterValues(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkspaceImagesError {
AccessDenied(String),
}
impl DescribeWorkspaceImagesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeWorkspaceImagesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DescribeWorkspaceImagesError::AccessDenied(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkspaceImagesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkspaceImagesError {
fn description(&self) -> &str {
match *self {
DescribeWorkspaceImagesError::AccessDenied(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkspacesError {
InvalidParameterValues(String),
ResourceUnavailable(String),
}
impl DescribeWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeWorkspacesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(DescribeWorkspacesError::InvalidParameterValues(
err.msg,
))
}
"ResourceUnavailableException" => {
return RusotoError::Service(DescribeWorkspacesError::ResourceUnavailable(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkspacesError {
fn description(&self) -> &str {
match *self {
DescribeWorkspacesError::InvalidParameterValues(ref cause) => cause,
DescribeWorkspacesError::ResourceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWorkspacesConnectionStatusError {
InvalidParameterValues(String),
}
impl DescribeWorkspacesConnectionStatusError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeWorkspacesConnectionStatusError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(
DescribeWorkspacesConnectionStatusError::InvalidParameterValues(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWorkspacesConnectionStatusError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWorkspacesConnectionStatusError {
fn description(&self) -> &str {
match *self {
DescribeWorkspacesConnectionStatusError::InvalidParameterValues(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateIpGroupsError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceNotFound(String),
}
impl DisassociateIpGroupsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateIpGroupsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(DisassociateIpGroupsError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(DisassociateIpGroupsError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(DisassociateIpGroupsError::InvalidResourceState(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisassociateIpGroupsError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateIpGroupsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateIpGroupsError {
fn description(&self) -> &str {
match *self {
DisassociateIpGroupsError::AccessDenied(ref cause) => cause,
DisassociateIpGroupsError::InvalidParameterValues(ref cause) => cause,
DisassociateIpGroupsError::InvalidResourceState(ref cause) => cause,
DisassociateIpGroupsError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ImportWorkspaceImageError {
AccessDenied(String),
InvalidParameterValues(String),
OperationNotSupported(String),
ResourceAlreadyExists(String),
ResourceLimitExceeded(String),
ResourceNotFound(String),
}
impl ImportWorkspaceImageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportWorkspaceImageError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ImportWorkspaceImageError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(ImportWorkspaceImageError::InvalidParameterValues(
err.msg,
))
}
"OperationNotSupportedException" => {
return RusotoError::Service(ImportWorkspaceImageError::OperationNotSupported(
err.msg,
))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(ImportWorkspaceImageError::ResourceAlreadyExists(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(ImportWorkspaceImageError::ResourceLimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ImportWorkspaceImageError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ImportWorkspaceImageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ImportWorkspaceImageError {
fn description(&self) -> &str {
match *self {
ImportWorkspaceImageError::AccessDenied(ref cause) => cause,
ImportWorkspaceImageError::InvalidParameterValues(ref cause) => cause,
ImportWorkspaceImageError::OperationNotSupported(ref cause) => cause,
ImportWorkspaceImageError::ResourceAlreadyExists(ref cause) => cause,
ImportWorkspaceImageError::ResourceLimitExceeded(ref cause) => cause,
ImportWorkspaceImageError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListAvailableManagementCidrRangesError {
AccessDenied(String),
InvalidParameterValues(String),
}
impl ListAvailableManagementCidrRangesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListAvailableManagementCidrRangesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(
ListAvailableManagementCidrRangesError::AccessDenied(err.msg),
)
}
"InvalidParameterValuesException" => {
return RusotoError::Service(
ListAvailableManagementCidrRangesError::InvalidParameterValues(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListAvailableManagementCidrRangesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListAvailableManagementCidrRangesError {
fn description(&self) -> &str {
match *self {
ListAvailableManagementCidrRangesError::AccessDenied(ref cause) => cause,
ListAvailableManagementCidrRangesError::InvalidParameterValues(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyAccountError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceNotFound(String),
ResourceUnavailable(String),
}
impl ModifyAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyAccountError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ModifyAccountError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(ModifyAccountError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(ModifyAccountError::InvalidResourceState(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ModifyAccountError::ResourceNotFound(err.msg))
}
"ResourceUnavailableException" => {
return RusotoError::Service(ModifyAccountError::ResourceUnavailable(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ModifyAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyAccountError {
fn description(&self) -> &str {
match *self {
ModifyAccountError::AccessDenied(ref cause) => cause,
ModifyAccountError::InvalidParameterValues(ref cause) => cause,
ModifyAccountError::InvalidResourceState(ref cause) => cause,
ModifyAccountError::ResourceNotFound(ref cause) => cause,
ModifyAccountError::ResourceUnavailable(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyClientPropertiesError {
AccessDenied(String),
InvalidParameterValues(String),
ResourceNotFound(String),
}
impl ModifyClientPropertiesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyClientPropertiesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ModifyClientPropertiesError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(
ModifyClientPropertiesError::InvalidParameterValues(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(ModifyClientPropertiesError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ModifyClientPropertiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyClientPropertiesError {
fn description(&self) -> &str {
match *self {
ModifyClientPropertiesError::AccessDenied(ref cause) => cause,
ModifyClientPropertiesError::InvalidParameterValues(ref cause) => cause,
ModifyClientPropertiesError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyWorkspacePropertiesError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
OperationInProgress(String),
ResourceNotFound(String),
ResourceUnavailable(String),
UnsupportedWorkspaceConfiguration(String),
}
impl ModifyWorkspacePropertiesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyWorkspacePropertiesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(ModifyWorkspacePropertiesError::AccessDenied(
err.msg,
))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(
ModifyWorkspacePropertiesError::InvalidParameterValues(err.msg),
)
}
"InvalidResourceStateException" => {
return RusotoError::Service(
ModifyWorkspacePropertiesError::InvalidResourceState(err.msg),
)
}
"OperationInProgressException" => {
return RusotoError::Service(
ModifyWorkspacePropertiesError::OperationInProgress(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(ModifyWorkspacePropertiesError::ResourceNotFound(
err.msg,
))
}
"ResourceUnavailableException" => {
return RusotoError::Service(
ModifyWorkspacePropertiesError::ResourceUnavailable(err.msg),
)
}
"UnsupportedWorkspaceConfigurationException" => {
return RusotoError::Service(
ModifyWorkspacePropertiesError::UnsupportedWorkspaceConfiguration(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ModifyWorkspacePropertiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyWorkspacePropertiesError {
fn description(&self) -> &str {
match *self {
ModifyWorkspacePropertiesError::AccessDenied(ref cause) => cause,
ModifyWorkspacePropertiesError::InvalidParameterValues(ref cause) => cause,
ModifyWorkspacePropertiesError::InvalidResourceState(ref cause) => cause,
ModifyWorkspacePropertiesError::OperationInProgress(ref cause) => cause,
ModifyWorkspacePropertiesError::ResourceNotFound(ref cause) => cause,
ModifyWorkspacePropertiesError::ResourceUnavailable(ref cause) => cause,
ModifyWorkspacePropertiesError::UnsupportedWorkspaceConfiguration(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ModifyWorkspaceStateError {
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceNotFound(String),
}
impl ModifyWorkspaceStateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ModifyWorkspaceStateError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"InvalidParameterValuesException" => {
return RusotoError::Service(ModifyWorkspaceStateError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(ModifyWorkspaceStateError::InvalidResourceState(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ModifyWorkspaceStateError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ModifyWorkspaceStateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ModifyWorkspaceStateError {
fn description(&self) -> &str {
match *self {
ModifyWorkspaceStateError::InvalidParameterValues(ref cause) => cause,
ModifyWorkspaceStateError::InvalidResourceState(ref cause) => cause,
ModifyWorkspaceStateError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RebootWorkspacesError {}
impl RebootWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebootWorkspacesError> {
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 RebootWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RebootWorkspacesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum RebuildWorkspacesError {}
impl RebuildWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RebuildWorkspacesError> {
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 RebuildWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RebuildWorkspacesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeIpRulesError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceNotFound(String),
}
impl RevokeIpRulesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeIpRulesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(RevokeIpRulesError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(RevokeIpRulesError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(RevokeIpRulesError::InvalidResourceState(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RevokeIpRulesError::ResourceNotFound(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RevokeIpRulesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeIpRulesError {
fn description(&self) -> &str {
match *self {
RevokeIpRulesError::AccessDenied(ref cause) => cause,
RevokeIpRulesError::InvalidParameterValues(ref cause) => cause,
RevokeIpRulesError::InvalidResourceState(ref cause) => cause,
RevokeIpRulesError::ResourceNotFound(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum StartWorkspacesError {}
impl StartWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartWorkspacesError> {
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 StartWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StartWorkspacesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum StopWorkspacesError {}
impl StopWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopWorkspacesError> {
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 StopWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for StopWorkspacesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum TerminateWorkspacesError {}
impl TerminateWorkspacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TerminateWorkspacesError> {
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 TerminateWorkspacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TerminateWorkspacesError {
fn description(&self) -> &str {
match *self {}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRulesOfIpGroupError {
AccessDenied(String),
InvalidParameterValues(String),
InvalidResourceState(String),
ResourceLimitExceeded(String),
ResourceNotFound(String),
}
impl UpdateRulesOfIpGroupError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRulesOfIpGroupError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"AccessDeniedException" => {
return RusotoError::Service(UpdateRulesOfIpGroupError::AccessDenied(err.msg))
}
"InvalidParameterValuesException" => {
return RusotoError::Service(UpdateRulesOfIpGroupError::InvalidParameterValues(
err.msg,
))
}
"InvalidResourceStateException" => {
return RusotoError::Service(UpdateRulesOfIpGroupError::InvalidResourceState(
err.msg,
))
}
"ResourceLimitExceededException" => {
return RusotoError::Service(UpdateRulesOfIpGroupError::ResourceLimitExceeded(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateRulesOfIpGroupError::ResourceNotFound(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRulesOfIpGroupError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRulesOfIpGroupError {
fn description(&self) -> &str {
match *self {
UpdateRulesOfIpGroupError::AccessDenied(ref cause) => cause,
UpdateRulesOfIpGroupError::InvalidParameterValues(ref cause) => cause,
UpdateRulesOfIpGroupError::InvalidResourceState(ref cause) => cause,
UpdateRulesOfIpGroupError::ResourceLimitExceeded(ref cause) => cause,
UpdateRulesOfIpGroupError::ResourceNotFound(ref cause) => cause,
}
}
}
pub trait Workspaces {
fn associate_ip_groups(
&self,
input: AssociateIpGroupsRequest,
) -> RusotoFuture<AssociateIpGroupsResult, AssociateIpGroupsError>;
fn authorize_ip_rules(
&self,
input: AuthorizeIpRulesRequest,
) -> RusotoFuture<AuthorizeIpRulesResult, AuthorizeIpRulesError>;
fn create_ip_group(
&self,
input: CreateIpGroupRequest,
) -> RusotoFuture<CreateIpGroupResult, CreateIpGroupError>;
fn create_tags(
&self,
input: CreateTagsRequest,
) -> RusotoFuture<CreateTagsResult, CreateTagsError>;
fn create_workspaces(
&self,
input: CreateWorkspacesRequest,
) -> RusotoFuture<CreateWorkspacesResult, CreateWorkspacesError>;
fn delete_ip_group(
&self,
input: DeleteIpGroupRequest,
) -> RusotoFuture<DeleteIpGroupResult, DeleteIpGroupError>;
fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> RusotoFuture<DeleteTagsResult, DeleteTagsError>;
fn delete_workspace_image(
&self,
input: DeleteWorkspaceImageRequest,
) -> RusotoFuture<DeleteWorkspaceImageResult, DeleteWorkspaceImageError>;
fn describe_account(&self) -> RusotoFuture<DescribeAccountResult, DescribeAccountError>;
fn describe_account_modifications(
&self,
input: DescribeAccountModificationsRequest,
) -> RusotoFuture<DescribeAccountModificationsResult, DescribeAccountModificationsError>;
fn describe_client_properties(
&self,
input: DescribeClientPropertiesRequest,
) -> RusotoFuture<DescribeClientPropertiesResult, DescribeClientPropertiesError>;
fn describe_ip_groups(
&self,
input: DescribeIpGroupsRequest,
) -> RusotoFuture<DescribeIpGroupsResult, DescribeIpGroupsError>;
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResult, DescribeTagsError>;
fn describe_workspace_bundles(
&self,
input: DescribeWorkspaceBundlesRequest,
) -> RusotoFuture<DescribeWorkspaceBundlesResult, DescribeWorkspaceBundlesError>;
fn describe_workspace_directories(
&self,
input: DescribeWorkspaceDirectoriesRequest,
) -> RusotoFuture<DescribeWorkspaceDirectoriesResult, DescribeWorkspaceDirectoriesError>;
fn describe_workspace_images(
&self,
input: DescribeWorkspaceImagesRequest,
) -> RusotoFuture<DescribeWorkspaceImagesResult, DescribeWorkspaceImagesError>;
fn describe_workspaces(
&self,
input: DescribeWorkspacesRequest,
) -> RusotoFuture<DescribeWorkspacesResult, DescribeWorkspacesError>;
fn describe_workspaces_connection_status(
&self,
input: DescribeWorkspacesConnectionStatusRequest,
) -> RusotoFuture<
DescribeWorkspacesConnectionStatusResult,
DescribeWorkspacesConnectionStatusError,
>;
fn disassociate_ip_groups(
&self,
input: DisassociateIpGroupsRequest,
) -> RusotoFuture<DisassociateIpGroupsResult, DisassociateIpGroupsError>;
fn import_workspace_image(
&self,
input: ImportWorkspaceImageRequest,
) -> RusotoFuture<ImportWorkspaceImageResult, ImportWorkspaceImageError>;
fn list_available_management_cidr_ranges(
&self,
input: ListAvailableManagementCidrRangesRequest,
) -> RusotoFuture<ListAvailableManagementCidrRangesResult, ListAvailableManagementCidrRangesError>;
fn modify_account(
&self,
input: ModifyAccountRequest,
) -> RusotoFuture<ModifyAccountResult, ModifyAccountError>;
fn modify_client_properties(
&self,
input: ModifyClientPropertiesRequest,
) -> RusotoFuture<ModifyClientPropertiesResult, ModifyClientPropertiesError>;
fn modify_workspace_properties(
&self,
input: ModifyWorkspacePropertiesRequest,
) -> RusotoFuture<ModifyWorkspacePropertiesResult, ModifyWorkspacePropertiesError>;
fn modify_workspace_state(
&self,
input: ModifyWorkspaceStateRequest,
) -> RusotoFuture<ModifyWorkspaceStateResult, ModifyWorkspaceStateError>;
fn reboot_workspaces(
&self,
input: RebootWorkspacesRequest,
) -> RusotoFuture<RebootWorkspacesResult, RebootWorkspacesError>;
fn rebuild_workspaces(
&self,
input: RebuildWorkspacesRequest,
) -> RusotoFuture<RebuildWorkspacesResult, RebuildWorkspacesError>;
fn revoke_ip_rules(
&self,
input: RevokeIpRulesRequest,
) -> RusotoFuture<RevokeIpRulesResult, RevokeIpRulesError>;
fn start_workspaces(
&self,
input: StartWorkspacesRequest,
) -> RusotoFuture<StartWorkspacesResult, StartWorkspacesError>;
fn stop_workspaces(
&self,
input: StopWorkspacesRequest,
) -> RusotoFuture<StopWorkspacesResult, StopWorkspacesError>;
fn terminate_workspaces(
&self,
input: TerminateWorkspacesRequest,
) -> RusotoFuture<TerminateWorkspacesResult, TerminateWorkspacesError>;
fn update_rules_of_ip_group(
&self,
input: UpdateRulesOfIpGroupRequest,
) -> RusotoFuture<UpdateRulesOfIpGroupResult, UpdateRulesOfIpGroupError>;
}
#[derive(Clone)]
pub struct WorkspacesClient {
client: Client,
region: region::Region,
}
impl WorkspacesClient {
pub fn new(region: region::Region) -> WorkspacesClient {
WorkspacesClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> WorkspacesClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
WorkspacesClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Workspaces for WorkspacesClient {
fn associate_ip_groups(
&self,
input: AssociateIpGroupsRequest,
) -> RusotoFuture<AssociateIpGroupsResult, AssociateIpGroupsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.AssociateIpGroups");
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::<AssociateIpGroupsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AssociateIpGroupsError::from_response(response))),
)
}
})
}
fn authorize_ip_rules(
&self,
input: AuthorizeIpRulesRequest,
) -> RusotoFuture<AuthorizeIpRulesResult, AuthorizeIpRulesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.AuthorizeIpRules");
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::<AuthorizeIpRulesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AuthorizeIpRulesError::from_response(response))),
)
}
})
}
fn create_ip_group(
&self,
input: CreateIpGroupRequest,
) -> RusotoFuture<CreateIpGroupResult, CreateIpGroupError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.CreateIpGroup");
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::<CreateIpGroupResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateIpGroupError::from_response(response))),
)
}
})
}
fn create_tags(
&self,
input: CreateTagsRequest,
) -> RusotoFuture<CreateTagsResult, CreateTagsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.CreateTags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateTagsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateTagsError::from_response(response))),
)
}
})
}
fn create_workspaces(
&self,
input: CreateWorkspacesRequest,
) -> RusotoFuture<CreateWorkspacesResult, CreateWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.CreateWorkspaces");
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::<CreateWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateWorkspacesError::from_response(response))),
)
}
})
}
fn delete_ip_group(
&self,
input: DeleteIpGroupRequest,
) -> RusotoFuture<DeleteIpGroupResult, DeleteIpGroupError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DeleteIpGroup");
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::<DeleteIpGroupResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteIpGroupError::from_response(response))),
)
}
})
}
fn delete_tags(
&self,
input: DeleteTagsRequest,
) -> RusotoFuture<DeleteTagsResult, DeleteTagsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DeleteTags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteTagsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteTagsError::from_response(response))),
)
}
})
}
fn delete_workspace_image(
&self,
input: DeleteWorkspaceImageRequest,
) -> RusotoFuture<DeleteWorkspaceImageResult, DeleteWorkspaceImageError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DeleteWorkspaceImage");
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::<DeleteWorkspaceImageResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteWorkspaceImageError::from_response(response))
}),
)
}
})
}
fn describe_account(&self) -> RusotoFuture<DescribeAccountResult, DescribeAccountError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeAccount");
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::<DescribeAccountResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeAccountError::from_response(response))),
)
}
})
}
fn describe_account_modifications(
&self,
input: DescribeAccountModificationsRequest,
) -> RusotoFuture<DescribeAccountModificationsResult, DescribeAccountModificationsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"WorkspacesService.DescribeAccountModifications",
);
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::<DescribeAccountModificationsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAccountModificationsError::from_response(response))
}))
}
})
}
fn describe_client_properties(
&self,
input: DescribeClientPropertiesRequest,
) -> RusotoFuture<DescribeClientPropertiesResult, DescribeClientPropertiesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeClientProperties");
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::<DescribeClientPropertiesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeClientPropertiesError::from_response(response))
}))
}
})
}
fn describe_ip_groups(
&self,
input: DescribeIpGroupsRequest,
) -> RusotoFuture<DescribeIpGroupsResult, DescribeIpGroupsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeIpGroups");
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::<DescribeIpGroupsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeIpGroupsError::from_response(response))),
)
}
})
}
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResult, DescribeTagsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeTags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTagsResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTagsError::from_response(response))),
)
}
})
}
fn describe_workspace_bundles(
&self,
input: DescribeWorkspaceBundlesRequest,
) -> RusotoFuture<DescribeWorkspaceBundlesResult, DescribeWorkspaceBundlesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeWorkspaceBundles");
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::<DescribeWorkspaceBundlesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeWorkspaceBundlesError::from_response(response))
}))
}
})
}
fn describe_workspace_directories(
&self,
input: DescribeWorkspaceDirectoriesRequest,
) -> RusotoFuture<DescribeWorkspaceDirectoriesResult, DescribeWorkspaceDirectoriesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"WorkspacesService.DescribeWorkspaceDirectories",
);
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::<DescribeWorkspaceDirectoriesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeWorkspaceDirectoriesError::from_response(response))
}))
}
})
}
fn describe_workspace_images(
&self,
input: DescribeWorkspaceImagesRequest,
) -> RusotoFuture<DescribeWorkspaceImagesResult, DescribeWorkspaceImagesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeWorkspaceImages");
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::<DescribeWorkspaceImagesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeWorkspaceImagesError::from_response(response))
}))
}
})
}
fn describe_workspaces(
&self,
input: DescribeWorkspacesRequest,
) -> RusotoFuture<DescribeWorkspacesResult, DescribeWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DescribeWorkspaces");
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::<DescribeWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeWorkspacesError::from_response(response))),
)
}
})
}
fn describe_workspaces_connection_status(
&self,
input: DescribeWorkspacesConnectionStatusRequest,
) -> RusotoFuture<
DescribeWorkspacesConnectionStatusResult,
DescribeWorkspacesConnectionStatusError,
> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"WorkspacesService.DescribeWorkspacesConnectionStatus",
);
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::<DescribeWorkspacesConnectionStatusResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeWorkspacesConnectionStatusError::from_response(
response,
))
}))
}
})
}
fn disassociate_ip_groups(
&self,
input: DisassociateIpGroupsRequest,
) -> RusotoFuture<DisassociateIpGroupsResult, DisassociateIpGroupsError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.DisassociateIpGroups");
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::<DisassociateIpGroupsResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DisassociateIpGroupsError::from_response(response))
}),
)
}
})
}
fn import_workspace_image(
&self,
input: ImportWorkspaceImageRequest,
) -> RusotoFuture<ImportWorkspaceImageResult, ImportWorkspaceImageError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.ImportWorkspaceImage");
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::<ImportWorkspaceImageResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ImportWorkspaceImageError::from_response(response))
}),
)
}
})
}
fn list_available_management_cidr_ranges(
&self,
input: ListAvailableManagementCidrRangesRequest,
) -> RusotoFuture<ListAvailableManagementCidrRangesResult, ListAvailableManagementCidrRangesError>
{
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"WorkspacesService.ListAvailableManagementCidrRanges",
);
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::<ListAvailableManagementCidrRangesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListAvailableManagementCidrRangesError::from_response(
response,
))
}))
}
})
}
fn modify_account(
&self,
input: ModifyAccountRequest,
) -> RusotoFuture<ModifyAccountResult, ModifyAccountError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.ModifyAccount");
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::<ModifyAccountResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ModifyAccountError::from_response(response))),
)
}
})
}
fn modify_client_properties(
&self,
input: ModifyClientPropertiesRequest,
) -> RusotoFuture<ModifyClientPropertiesResult, ModifyClientPropertiesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.ModifyClientProperties");
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::<ModifyClientPropertiesResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ModifyClientPropertiesError::from_response(response))
}),
)
}
})
}
fn modify_workspace_properties(
&self,
input: ModifyWorkspacePropertiesRequest,
) -> RusotoFuture<ModifyWorkspacePropertiesResult, ModifyWorkspacePropertiesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"WorkspacesService.ModifyWorkspaceProperties",
);
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::<ModifyWorkspacePropertiesResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ModifyWorkspacePropertiesError::from_response(response))
}))
}
})
}
fn modify_workspace_state(
&self,
input: ModifyWorkspaceStateRequest,
) -> RusotoFuture<ModifyWorkspaceStateResult, ModifyWorkspaceStateError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.ModifyWorkspaceState");
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::<ModifyWorkspaceStateResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(ModifyWorkspaceStateError::from_response(response))
}),
)
}
})
}
fn reboot_workspaces(
&self,
input: RebootWorkspacesRequest,
) -> RusotoFuture<RebootWorkspacesResult, RebootWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.RebootWorkspaces");
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::<RebootWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RebootWorkspacesError::from_response(response))),
)
}
})
}
fn rebuild_workspaces(
&self,
input: RebuildWorkspacesRequest,
) -> RusotoFuture<RebuildWorkspacesResult, RebuildWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.RebuildWorkspaces");
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::<RebuildWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RebuildWorkspacesError::from_response(response))),
)
}
})
}
fn revoke_ip_rules(
&self,
input: RevokeIpRulesRequest,
) -> RusotoFuture<RevokeIpRulesResult, RevokeIpRulesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.RevokeIpRules");
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::<RevokeIpRulesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RevokeIpRulesError::from_response(response))),
)
}
})
}
fn start_workspaces(
&self,
input: StartWorkspacesRequest,
) -> RusotoFuture<StartWorkspacesResult, StartWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.StartWorkspaces");
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::<StartWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StartWorkspacesError::from_response(response))),
)
}
})
}
fn stop_workspaces(
&self,
input: StopWorkspacesRequest,
) -> RusotoFuture<StopWorkspacesResult, StopWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.StopWorkspaces");
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::<StopWorkspacesResult, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(StopWorkspacesError::from_response(response))),
)
}
})
}
fn terminate_workspaces(
&self,
input: TerminateWorkspacesRequest,
) -> RusotoFuture<TerminateWorkspacesResult, TerminateWorkspacesError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.TerminateWorkspaces");
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::<TerminateWorkspacesResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(TerminateWorkspacesError::from_response(response))
}),
)
}
})
}
fn update_rules_of_ip_group(
&self,
input: UpdateRulesOfIpGroupRequest,
) -> RusotoFuture<UpdateRulesOfIpGroupResult, UpdateRulesOfIpGroupError> {
let mut request = SignedRequest::new("POST", "workspaces", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "WorkspacesService.UpdateRulesOfIpGroup");
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::<UpdateRulesOfIpGroupResult, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateRulesOfIpGroupError::from_response(response))
}),
)
}
})
}
}