use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateDomainRequest {
#[serde(rename = "AcmCertificateArn")]
pub acm_certificate_arn: String,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateDomainResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateWebsiteAuthorizationProviderRequest {
#[serde(rename = "AuthorizationProviderType")]
pub authorization_provider_type: String,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateWebsiteAuthorizationProviderResponse {
#[serde(rename = "AuthorizationProviderId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_provider_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateWebsiteCertificateAuthorityRequest {
#[serde(rename = "Certificate")]
pub certificate: String,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociateWebsiteCertificateAuthorityResponse {
#[serde(rename = "WebsiteCaId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub website_ca_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateFleetRequest {
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FleetName")]
pub fleet_name: String,
#[serde(rename = "OptimizeForEndUserLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub optimize_for_end_user_location: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateFleetResponse {
#[serde(rename = "FleetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteFleetRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteFleetResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeAuditStreamConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeAuditStreamConfigurationResponse {
#[serde(rename = "AuditStreamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_stream_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeCompanyNetworkConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeCompanyNetworkConfigurationResponse {
#[serde(rename = "SecurityGroupIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_group_ids: Option<Vec<String>>,
#[serde(rename = "SubnetIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub subnet_ids: Option<Vec<String>>,
#[serde(rename = "VpcId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDevicePolicyConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDevicePolicyConfigurationResponse {
#[serde(rename = "DeviceCaCertificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_ca_certificate: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDeviceRequest {
#[serde(rename = "DeviceId")]
pub device_id: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDeviceResponse {
#[serde(rename = "FirstAccessedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub first_accessed_time: Option<f64>,
#[serde(rename = "LastAccessedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_accessed_time: Option<f64>,
#[serde(rename = "Manufacturer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub manufacturer: Option<String>,
#[serde(rename = "Model")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model: Option<String>,
#[serde(rename = "OperatingSystem")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system: Option<String>,
#[serde(rename = "OperatingSystemVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operating_system_version: Option<String>,
#[serde(rename = "PatchLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_level: Option<String>,
#[serde(rename = "Status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "Username")]
#[serde(skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDomainRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDomainResponse {
#[serde(rename = "AcmCertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acm_certificate_arn: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "DomainStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeFleetMetadataRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeFleetMetadataResponse {
#[serde(rename = "CompanyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub company_code: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FleetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_name: Option<String>,
#[serde(rename = "FleetStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_status: Option<String>,
#[serde(rename = "LastUpdatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_time: Option<f64>,
#[serde(rename = "OptimizeForEndUserLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub optimize_for_end_user_location: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeIdentityProviderConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeIdentityProviderConfigurationResponse {
#[serde(rename = "IdentityProviderSamlMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_provider_saml_metadata: Option<String>,
#[serde(rename = "IdentityProviderType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_provider_type: Option<String>,
#[serde(rename = "ServiceProviderSamlMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_provider_saml_metadata: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeWebsiteCertificateAuthorityRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "WebsiteCaId")]
pub website_ca_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeWebsiteCertificateAuthorityResponse {
#[serde(rename = "Certificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeviceSummary {
#[serde(rename = "DeviceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_id: Option<String>,
#[serde(rename = "DeviceStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_status: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateDomainRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateDomainResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateWebsiteAuthorizationProviderRequest {
#[serde(rename = "AuthorizationProviderId")]
pub authorization_provider_id: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateWebsiteAuthorizationProviderResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateWebsiteCertificateAuthorityRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "WebsiteCaId")]
pub website_ca_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DisassociateWebsiteCertificateAuthorityResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainSummary {
#[serde(rename = "CreatedTime")]
pub created_time: f64,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DomainStatus")]
pub domain_status: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct FleetSummary {
#[serde(rename = "CompanyCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub company_code: Option<String>,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FleetArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_arn: Option<String>,
#[serde(rename = "FleetName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_name: Option<String>,
#[serde(rename = "FleetStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_status: Option<String>,
#[serde(rename = "LastUpdatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_time: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDevicesRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: 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 ListDevicesResponse {
#[serde(rename = "Devices")]
#[serde(skip_serializing_if = "Option::is_none")]
pub devices: Option<Vec<DeviceSummary>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListDomainsRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: 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 ListDomainsResponse {
#[serde(rename = "Domains")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domains: Option<Vec<DomainSummary>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListFleetsRequest {
#[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 ListFleetsResponse {
#[serde(rename = "FleetSummaryList")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fleet_summary_list: Option<Vec<FleetSummary>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListWebsiteAuthorizationProvidersRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: 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 ListWebsiteAuthorizationProvidersResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WebsiteAuthorizationProviders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub website_authorization_providers: Option<Vec<WebsiteAuthorizationProviderSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ListWebsiteCertificateAuthoritiesRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: 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 ListWebsiteCertificateAuthoritiesResponse {
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "WebsiteCertificateAuthorities")]
#[serde(skip_serializing_if = "Option::is_none")]
pub website_certificate_authorities: Option<Vec<WebsiteCaSummary>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RestoreDomainAccessRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RestoreDomainAccessResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct RevokeDomainAccessRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RevokeDomainAccessResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct SignOutUserRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "Username")]
pub username: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct SignOutUserResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateAuditStreamConfigurationRequest {
#[serde(rename = "AuditStreamArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub audit_stream_arn: Option<String>,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAuditStreamConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateCompanyNetworkConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "SecurityGroupIds")]
pub security_group_ids: Vec<String>,
#[serde(rename = "SubnetIds")]
pub subnet_ids: Vec<String>,
#[serde(rename = "VpcId")]
pub vpc_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateCompanyNetworkConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDevicePolicyConfigurationRequest {
#[serde(rename = "DeviceCaCertificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub device_ca_certificate: Option<String>,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDevicePolicyConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDomainMetadataRequest {
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDomainMetadataResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateFleetMetadataRequest {
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "OptimizeForEndUserLocation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub optimize_for_end_user_location: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateFleetMetadataResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateIdentityProviderConfigurationRequest {
#[serde(rename = "FleetArn")]
pub fleet_arn: String,
#[serde(rename = "IdentityProviderSamlMetadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_provider_saml_metadata: Option<String>,
#[serde(rename = "IdentityProviderType")]
pub identity_provider_type: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateIdentityProviderConfigurationResponse {}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WebsiteAuthorizationProviderSummary {
#[serde(rename = "AuthorizationProviderId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_provider_id: Option<String>,
#[serde(rename = "AuthorizationProviderType")]
pub authorization_provider_type: String,
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct WebsiteCaSummary {
#[serde(rename = "CreatedTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_time: Option<f64>,
#[serde(rename = "DisplayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "WebsiteCaId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub website_ca_id: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum AssociateDomainError {
InternalServerError(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl AssociateDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateDomainError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(AssociateDomainError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(AssociateDomainError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(AssociateDomainError::ResourceAlreadyExists(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(AssociateDomainError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(AssociateDomainError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(AssociateDomainError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateDomainError {
fn description(&self) -> &str {
match *self {
AssociateDomainError::InternalServerError(ref cause) => cause,
AssociateDomainError::InvalidRequest(ref cause) => cause,
AssociateDomainError::ResourceAlreadyExists(ref cause) => cause,
AssociateDomainError::ResourceNotFound(ref cause) => cause,
AssociateDomainError::TooManyRequests(ref cause) => cause,
AssociateDomainError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateWebsiteAuthorizationProviderError {
InternalServerError(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl AssociateWebsiteAuthorizationProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateWebsiteAuthorizationProviderError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::InvalidRequest(err.msg),
)
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::ResourceAlreadyExists(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
AssociateWebsiteAuthorizationProviderError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateWebsiteAuthorizationProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateWebsiteAuthorizationProviderError {
fn description(&self) -> &str {
match *self {
AssociateWebsiteAuthorizationProviderError::InternalServerError(ref cause) => cause,
AssociateWebsiteAuthorizationProviderError::InvalidRequest(ref cause) => cause,
AssociateWebsiteAuthorizationProviderError::ResourceAlreadyExists(ref cause) => cause,
AssociateWebsiteAuthorizationProviderError::ResourceNotFound(ref cause) => cause,
AssociateWebsiteAuthorizationProviderError::TooManyRequests(ref cause) => cause,
AssociateWebsiteAuthorizationProviderError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateWebsiteCertificateAuthorityError {
InternalServerError(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl AssociateWebsiteCertificateAuthorityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateWebsiteCertificateAuthorityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::InvalidRequest(err.msg),
)
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::ResourceAlreadyExists(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
AssociateWebsiteCertificateAuthorityError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateWebsiteCertificateAuthorityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateWebsiteCertificateAuthorityError {
fn description(&self) -> &str {
match *self {
AssociateWebsiteCertificateAuthorityError::InternalServerError(ref cause) => cause,
AssociateWebsiteCertificateAuthorityError::InvalidRequest(ref cause) => cause,
AssociateWebsiteCertificateAuthorityError::ResourceAlreadyExists(ref cause) => cause,
AssociateWebsiteCertificateAuthorityError::ResourceNotFound(ref cause) => cause,
AssociateWebsiteCertificateAuthorityError::TooManyRequests(ref cause) => cause,
AssociateWebsiteCertificateAuthorityError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateFleetError {
InternalServerError(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFleetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(CreateFleetError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(CreateFleetError::InvalidRequest(err.msg))
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(CreateFleetError::ResourceAlreadyExists(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(CreateFleetError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateFleetError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateFleetError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateFleetError {
fn description(&self) -> &str {
match *self {
CreateFleetError::InternalServerError(ref cause) => cause,
CreateFleetError::InvalidRequest(ref cause) => cause,
CreateFleetError::ResourceAlreadyExists(ref cause) => cause,
CreateFleetError::ResourceNotFound(ref cause) => cause,
CreateFleetError::TooManyRequests(ref cause) => cause,
CreateFleetError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteFleetError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteFleetError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFleetError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(DeleteFleetError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DeleteFleetError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DeleteFleetError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteFleetError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteFleetError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteFleetError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteFleetError {
fn description(&self) -> &str {
match *self {
DeleteFleetError::InternalServerError(ref cause) => cause,
DeleteFleetError::InvalidRequest(ref cause) => cause,
DeleteFleetError::ResourceNotFound(ref cause) => cause,
DeleteFleetError::TooManyRequests(ref cause) => cause,
DeleteFleetError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeAuditStreamConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeAuditStreamConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeAuditStreamConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DescribeAuditStreamConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeAuditStreamConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeAuditStreamConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DescribeAuditStreamConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DescribeAuditStreamConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeAuditStreamConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeAuditStreamConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeAuditStreamConfigurationError::InternalServerError(ref cause) => cause,
DescribeAuditStreamConfigurationError::InvalidRequest(ref cause) => cause,
DescribeAuditStreamConfigurationError::ResourceNotFound(ref cause) => cause,
DescribeAuditStreamConfigurationError::TooManyRequests(ref cause) => cause,
DescribeAuditStreamConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeCompanyNetworkConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeCompanyNetworkConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeCompanyNetworkConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DescribeCompanyNetworkConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeCompanyNetworkConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeCompanyNetworkConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DescribeCompanyNetworkConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DescribeCompanyNetworkConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeCompanyNetworkConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeCompanyNetworkConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeCompanyNetworkConfigurationError::InternalServerError(ref cause) => cause,
DescribeCompanyNetworkConfigurationError::InvalidRequest(ref cause) => cause,
DescribeCompanyNetworkConfigurationError::ResourceNotFound(ref cause) => cause,
DescribeCompanyNetworkConfigurationError::TooManyRequests(ref cause) => cause,
DescribeCompanyNetworkConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDeviceError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeDeviceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDeviceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(DescribeDeviceError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeDeviceError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDeviceError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeDeviceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeDeviceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDeviceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDeviceError {
fn description(&self) -> &str {
match *self {
DescribeDeviceError::InternalServerError(ref cause) => cause,
DescribeDeviceError::InvalidRequest(ref cause) => cause,
DescribeDeviceError::ResourceNotFound(ref cause) => cause,
DescribeDeviceError::TooManyRequests(ref cause) => cause,
DescribeDeviceError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDevicePolicyConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeDevicePolicyConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDevicePolicyConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DescribeDevicePolicyConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeDevicePolicyConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeDevicePolicyConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DescribeDevicePolicyConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DescribeDevicePolicyConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDevicePolicyConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDevicePolicyConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeDevicePolicyConfigurationError::InternalServerError(ref cause) => cause,
DescribeDevicePolicyConfigurationError::InvalidRequest(ref cause) => cause,
DescribeDevicePolicyConfigurationError::ResourceNotFound(ref cause) => cause,
DescribeDevicePolicyConfigurationError::TooManyRequests(ref cause) => cause,
DescribeDevicePolicyConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDomainError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDomainError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(DescribeDomainError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeDomainError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeDomainError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeDomainError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeDomainError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDomainError {
fn description(&self) -> &str {
match *self {
DescribeDomainError::InternalServerError(ref cause) => cause,
DescribeDomainError::InvalidRequest(ref cause) => cause,
DescribeDomainError::ResourceNotFound(ref cause) => cause,
DescribeDomainError::TooManyRequests(ref cause) => cause,
DescribeDomainError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeFleetMetadataError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeFleetMetadataError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFleetMetadataError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(DescribeFleetMetadataError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DescribeFleetMetadataError::InvalidRequest(
err.msg,
))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DescribeFleetMetadataError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeFleetMetadataError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DescribeFleetMetadataError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeFleetMetadataError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeFleetMetadataError {
fn description(&self) -> &str {
match *self {
DescribeFleetMetadataError::InternalServerError(ref cause) => cause,
DescribeFleetMetadataError::InvalidRequest(ref cause) => cause,
DescribeFleetMetadataError::ResourceNotFound(ref cause) => cause,
DescribeFleetMetadataError::TooManyRequests(ref cause) => cause,
DescribeFleetMetadataError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeIdentityProviderConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeIdentityProviderConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeIdentityProviderConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DescribeIdentityProviderConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeIdentityProviderConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeIdentityProviderConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DescribeIdentityProviderConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DescribeIdentityProviderConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeIdentityProviderConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeIdentityProviderConfigurationError {
fn description(&self) -> &str {
match *self {
DescribeIdentityProviderConfigurationError::InternalServerError(ref cause) => cause,
DescribeIdentityProviderConfigurationError::InvalidRequest(ref cause) => cause,
DescribeIdentityProviderConfigurationError::ResourceNotFound(ref cause) => cause,
DescribeIdentityProviderConfigurationError::TooManyRequests(ref cause) => cause,
DescribeIdentityProviderConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeWebsiteCertificateAuthorityError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DescribeWebsiteCertificateAuthorityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeWebsiteCertificateAuthorityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DescribeWebsiteCertificateAuthorityError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DescribeWebsiteCertificateAuthorityError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DescribeWebsiteCertificateAuthorityError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DescribeWebsiteCertificateAuthorityError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DescribeWebsiteCertificateAuthorityError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeWebsiteCertificateAuthorityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeWebsiteCertificateAuthorityError {
fn description(&self) -> &str {
match *self {
DescribeWebsiteCertificateAuthorityError::InternalServerError(ref cause) => cause,
DescribeWebsiteCertificateAuthorityError::InvalidRequest(ref cause) => cause,
DescribeWebsiteCertificateAuthorityError::ResourceNotFound(ref cause) => cause,
DescribeWebsiteCertificateAuthorityError::TooManyRequests(ref cause) => cause,
DescribeWebsiteCertificateAuthorityError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateDomainError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DisassociateDomainError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DisassociateDomainError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(DisassociateDomainError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(DisassociateDomainError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(DisassociateDomainError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DisassociateDomainError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DisassociateDomainError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateDomainError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateDomainError {
fn description(&self) -> &str {
match *self {
DisassociateDomainError::InternalServerError(ref cause) => cause,
DisassociateDomainError::InvalidRequest(ref cause) => cause,
DisassociateDomainError::ResourceNotFound(ref cause) => cause,
DisassociateDomainError::TooManyRequests(ref cause) => cause,
DisassociateDomainError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateWebsiteAuthorizationProviderError {
InternalServerError(String),
InvalidRequest(String),
ResourceAlreadyExists(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DisassociateWebsiteAuthorizationProviderError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateWebsiteAuthorizationProviderError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::InvalidRequest(err.msg),
)
}
"ResourceAlreadyExistsException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::ResourceAlreadyExists(
err.msg,
),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DisassociateWebsiteAuthorizationProviderError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateWebsiteAuthorizationProviderError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateWebsiteAuthorizationProviderError {
fn description(&self) -> &str {
match *self {
DisassociateWebsiteAuthorizationProviderError::InternalServerError(ref cause) => cause,
DisassociateWebsiteAuthorizationProviderError::InvalidRequest(ref cause) => cause,
DisassociateWebsiteAuthorizationProviderError::ResourceAlreadyExists(ref cause) => {
cause
}
DisassociateWebsiteAuthorizationProviderError::ResourceNotFound(ref cause) => cause,
DisassociateWebsiteAuthorizationProviderError::TooManyRequests(ref cause) => cause,
DisassociateWebsiteAuthorizationProviderError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateWebsiteCertificateAuthorityError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DisassociateWebsiteCertificateAuthorityError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateWebsiteCertificateAuthorityError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
DisassociateWebsiteCertificateAuthorityError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
DisassociateWebsiteCertificateAuthorityError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
DisassociateWebsiteCertificateAuthorityError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
DisassociateWebsiteCertificateAuthorityError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
DisassociateWebsiteCertificateAuthorityError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateWebsiteCertificateAuthorityError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateWebsiteCertificateAuthorityError {
fn description(&self) -> &str {
match *self {
DisassociateWebsiteCertificateAuthorityError::InternalServerError(ref cause) => cause,
DisassociateWebsiteCertificateAuthorityError::InvalidRequest(ref cause) => cause,
DisassociateWebsiteCertificateAuthorityError::ResourceNotFound(ref cause) => cause,
DisassociateWebsiteCertificateAuthorityError::TooManyRequests(ref cause) => cause,
DisassociateWebsiteCertificateAuthorityError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDevicesError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ListDevicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDevicesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(ListDevicesError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListDevicesError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(ListDevicesError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListDevicesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListDevicesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDevicesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDevicesError {
fn description(&self) -> &str {
match *self {
ListDevicesError::InternalServerError(ref cause) => cause,
ListDevicesError::InvalidRequest(ref cause) => cause,
ListDevicesError::ResourceNotFound(ref cause) => cause,
ListDevicesError::TooManyRequests(ref cause) => cause,
ListDevicesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListDomainsError {
InternalServerError(String),
InvalidRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ListDomainsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListDomainsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(ListDomainsError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListDomainsError::InvalidRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListDomainsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListDomainsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListDomainsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListDomainsError {
fn description(&self) -> &str {
match *self {
ListDomainsError::InternalServerError(ref cause) => cause,
ListDomainsError::InvalidRequest(ref cause) => cause,
ListDomainsError::TooManyRequests(ref cause) => cause,
ListDomainsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListFleetsError {
InternalServerError(String),
InvalidRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ListFleetsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFleetsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(ListFleetsError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(ListFleetsError::InvalidRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListFleetsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ListFleetsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListFleetsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListFleetsError {
fn description(&self) -> &str {
match *self {
ListFleetsError::InternalServerError(ref cause) => cause,
ListFleetsError::InvalidRequest(ref cause) => cause,
ListFleetsError::TooManyRequests(ref cause) => cause,
ListFleetsError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListWebsiteAuthorizationProvidersError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ListWebsiteAuthorizationProvidersError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListWebsiteAuthorizationProvidersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
ListWebsiteAuthorizationProvidersError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ListWebsiteAuthorizationProvidersError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
ListWebsiteAuthorizationProvidersError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
ListWebsiteAuthorizationProvidersError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
ListWebsiteAuthorizationProvidersError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListWebsiteAuthorizationProvidersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListWebsiteAuthorizationProvidersError {
fn description(&self) -> &str {
match *self {
ListWebsiteAuthorizationProvidersError::InternalServerError(ref cause) => cause,
ListWebsiteAuthorizationProvidersError::InvalidRequest(ref cause) => cause,
ListWebsiteAuthorizationProvidersError::ResourceNotFound(ref cause) => cause,
ListWebsiteAuthorizationProvidersError::TooManyRequests(ref cause) => cause,
ListWebsiteAuthorizationProvidersError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ListWebsiteCertificateAuthoritiesError {
InternalServerError(String),
InvalidRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ListWebsiteCertificateAuthoritiesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ListWebsiteCertificateAuthoritiesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
ListWebsiteCertificateAuthoritiesError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
ListWebsiteCertificateAuthoritiesError::InvalidRequest(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
ListWebsiteCertificateAuthoritiesError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
ListWebsiteCertificateAuthoritiesError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ListWebsiteCertificateAuthoritiesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ListWebsiteCertificateAuthoritiesError {
fn description(&self) -> &str {
match *self {
ListWebsiteCertificateAuthoritiesError::InternalServerError(ref cause) => cause,
ListWebsiteCertificateAuthoritiesError::InvalidRequest(ref cause) => cause,
ListWebsiteCertificateAuthoritiesError::TooManyRequests(ref cause) => cause,
ListWebsiteCertificateAuthoritiesError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RestoreDomainAccessError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl RestoreDomainAccessError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RestoreDomainAccessError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(RestoreDomainAccessError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RestoreDomainAccessError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RestoreDomainAccessError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(RestoreDomainAccessError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(RestoreDomainAccessError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RestoreDomainAccessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RestoreDomainAccessError {
fn description(&self) -> &str {
match *self {
RestoreDomainAccessError::InternalServerError(ref cause) => cause,
RestoreDomainAccessError::InvalidRequest(ref cause) => cause,
RestoreDomainAccessError::ResourceNotFound(ref cause) => cause,
RestoreDomainAccessError::TooManyRequests(ref cause) => cause,
RestoreDomainAccessError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum RevokeDomainAccessError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl RevokeDomainAccessError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeDomainAccessError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(RevokeDomainAccessError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(RevokeDomainAccessError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(RevokeDomainAccessError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(RevokeDomainAccessError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(RevokeDomainAccessError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for RevokeDomainAccessError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for RevokeDomainAccessError {
fn description(&self) -> &str {
match *self {
RevokeDomainAccessError::InternalServerError(ref cause) => cause,
RevokeDomainAccessError::InvalidRequest(ref cause) => cause,
RevokeDomainAccessError::ResourceNotFound(ref cause) => cause,
RevokeDomainAccessError::TooManyRequests(ref cause) => cause,
RevokeDomainAccessError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum SignOutUserError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl SignOutUserError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<SignOutUserError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(SignOutUserError::InternalServerError(err.msg))
}
"InvalidRequestException" => {
return RusotoError::Service(SignOutUserError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(SignOutUserError::ResourceNotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(SignOutUserError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(SignOutUserError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for SignOutUserError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for SignOutUserError {
fn description(&self) -> &str {
match *self {
SignOutUserError::InternalServerError(ref cause) => cause,
SignOutUserError::InvalidRequest(ref cause) => cause,
SignOutUserError::ResourceNotFound(ref cause) => cause,
SignOutUserError::TooManyRequests(ref cause) => cause,
SignOutUserError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAuditStreamConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateAuditStreamConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateAuditStreamConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
UpdateAuditStreamConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
UpdateAuditStreamConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
UpdateAuditStreamConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
UpdateAuditStreamConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateAuditStreamConfigurationError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAuditStreamConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAuditStreamConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateAuditStreamConfigurationError::InternalServerError(ref cause) => cause,
UpdateAuditStreamConfigurationError::InvalidRequest(ref cause) => cause,
UpdateAuditStreamConfigurationError::ResourceNotFound(ref cause) => cause,
UpdateAuditStreamConfigurationError::TooManyRequests(ref cause) => cause,
UpdateAuditStreamConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateCompanyNetworkConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateCompanyNetworkConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateCompanyNetworkConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
UpdateCompanyNetworkConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
UpdateCompanyNetworkConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
UpdateCompanyNetworkConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
UpdateCompanyNetworkConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
UpdateCompanyNetworkConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateCompanyNetworkConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateCompanyNetworkConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateCompanyNetworkConfigurationError::InternalServerError(ref cause) => cause,
UpdateCompanyNetworkConfigurationError::InvalidRequest(ref cause) => cause,
UpdateCompanyNetworkConfigurationError::ResourceNotFound(ref cause) => cause,
UpdateCompanyNetworkConfigurationError::TooManyRequests(ref cause) => cause,
UpdateCompanyNetworkConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDevicePolicyConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDevicePolicyConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateDevicePolicyConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
UpdateDevicePolicyConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
UpdateDevicePolicyConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
UpdateDevicePolicyConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
UpdateDevicePolicyConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
UpdateDevicePolicyConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDevicePolicyConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDevicePolicyConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateDevicePolicyConfigurationError::InternalServerError(ref cause) => cause,
UpdateDevicePolicyConfigurationError::InvalidRequest(ref cause) => cause,
UpdateDevicePolicyConfigurationError::ResourceNotFound(ref cause) => cause,
UpdateDevicePolicyConfigurationError::TooManyRequests(ref cause) => cause,
UpdateDevicePolicyConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainMetadataError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDomainMetadataError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDomainMetadataError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(UpdateDomainMetadataError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateDomainMetadataError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateDomainMetadataError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDomainMetadataError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateDomainMetadataError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDomainMetadataError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDomainMetadataError {
fn description(&self) -> &str {
match *self {
UpdateDomainMetadataError::InternalServerError(ref cause) => cause,
UpdateDomainMetadataError::InvalidRequest(ref cause) => cause,
UpdateDomainMetadataError::ResourceNotFound(ref cause) => cause,
UpdateDomainMetadataError::TooManyRequests(ref cause) => cause,
UpdateDomainMetadataError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateFleetMetadataError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateFleetMetadataError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFleetMetadataError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(UpdateFleetMetadataError::InternalServerError(
err.msg,
))
}
"InvalidRequestException" => {
return RusotoError::Service(UpdateFleetMetadataError::InvalidRequest(err.msg))
}
"ResourceNotFoundException" => {
return RusotoError::Service(UpdateFleetMetadataError::ResourceNotFound(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateFleetMetadataError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateFleetMetadataError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateFleetMetadataError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateFleetMetadataError {
fn description(&self) -> &str {
match *self {
UpdateFleetMetadataError::InternalServerError(ref cause) => cause,
UpdateFleetMetadataError::InvalidRequest(ref cause) => cause,
UpdateFleetMetadataError::ResourceNotFound(ref cause) => cause,
UpdateFleetMetadataError::TooManyRequests(ref cause) => cause,
UpdateFleetMetadataError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateIdentityProviderConfigurationError {
InternalServerError(String),
InvalidRequest(String),
ResourceNotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateIdentityProviderConfigurationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateIdentityProviderConfigurationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"InternalServerErrorException" => {
return RusotoError::Service(
UpdateIdentityProviderConfigurationError::InternalServerError(err.msg),
)
}
"InvalidRequestException" => {
return RusotoError::Service(
UpdateIdentityProviderConfigurationError::InvalidRequest(err.msg),
)
}
"ResourceNotFoundException" => {
return RusotoError::Service(
UpdateIdentityProviderConfigurationError::ResourceNotFound(err.msg),
)
}
"TooManyRequestsException" => {
return RusotoError::Service(
UpdateIdentityProviderConfigurationError::TooManyRequests(err.msg),
)
}
"UnauthorizedException" => {
return RusotoError::Service(
UpdateIdentityProviderConfigurationError::Unauthorized(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateIdentityProviderConfigurationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateIdentityProviderConfigurationError {
fn description(&self) -> &str {
match *self {
UpdateIdentityProviderConfigurationError::InternalServerError(ref cause) => cause,
UpdateIdentityProviderConfigurationError::InvalidRequest(ref cause) => cause,
UpdateIdentityProviderConfigurationError::ResourceNotFound(ref cause) => cause,
UpdateIdentityProviderConfigurationError::TooManyRequests(ref cause) => cause,
UpdateIdentityProviderConfigurationError::Unauthorized(ref cause) => cause,
}
}
}
pub trait Worklink {
fn associate_domain(
&self,
input: AssociateDomainRequest,
) -> RusotoFuture<AssociateDomainResponse, AssociateDomainError>;
fn associate_website_authorization_provider(
&self,
input: AssociateWebsiteAuthorizationProviderRequest,
) -> RusotoFuture<
AssociateWebsiteAuthorizationProviderResponse,
AssociateWebsiteAuthorizationProviderError,
>;
fn associate_website_certificate_authority(
&self,
input: AssociateWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
AssociateWebsiteCertificateAuthorityResponse,
AssociateWebsiteCertificateAuthorityError,
>;
fn create_fleet(
&self,
input: CreateFleetRequest,
) -> RusotoFuture<CreateFleetResponse, CreateFleetError>;
fn delete_fleet(
&self,
input: DeleteFleetRequest,
) -> RusotoFuture<DeleteFleetResponse, DeleteFleetError>;
fn describe_audit_stream_configuration(
&self,
input: DescribeAuditStreamConfigurationRequest,
) -> RusotoFuture<DescribeAuditStreamConfigurationResponse, DescribeAuditStreamConfigurationError>;
fn describe_company_network_configuration(
&self,
input: DescribeCompanyNetworkConfigurationRequest,
) -> RusotoFuture<
DescribeCompanyNetworkConfigurationResponse,
DescribeCompanyNetworkConfigurationError,
>;
fn describe_device(
&self,
input: DescribeDeviceRequest,
) -> RusotoFuture<DescribeDeviceResponse, DescribeDeviceError>;
fn describe_device_policy_configuration(
&self,
input: DescribeDevicePolicyConfigurationRequest,
) -> RusotoFuture<
DescribeDevicePolicyConfigurationResponse,
DescribeDevicePolicyConfigurationError,
>;
fn describe_domain(
&self,
input: DescribeDomainRequest,
) -> RusotoFuture<DescribeDomainResponse, DescribeDomainError>;
fn describe_fleet_metadata(
&self,
input: DescribeFleetMetadataRequest,
) -> RusotoFuture<DescribeFleetMetadataResponse, DescribeFleetMetadataError>;
fn describe_identity_provider_configuration(
&self,
input: DescribeIdentityProviderConfigurationRequest,
) -> RusotoFuture<
DescribeIdentityProviderConfigurationResponse,
DescribeIdentityProviderConfigurationError,
>;
fn describe_website_certificate_authority(
&self,
input: DescribeWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
DescribeWebsiteCertificateAuthorityResponse,
DescribeWebsiteCertificateAuthorityError,
>;
fn disassociate_domain(
&self,
input: DisassociateDomainRequest,
) -> RusotoFuture<DisassociateDomainResponse, DisassociateDomainError>;
fn disassociate_website_authorization_provider(
&self,
input: DisassociateWebsiteAuthorizationProviderRequest,
) -> RusotoFuture<
DisassociateWebsiteAuthorizationProviderResponse,
DisassociateWebsiteAuthorizationProviderError,
>;
fn disassociate_website_certificate_authority(
&self,
input: DisassociateWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
DisassociateWebsiteCertificateAuthorityResponse,
DisassociateWebsiteCertificateAuthorityError,
>;
fn list_devices(
&self,
input: ListDevicesRequest,
) -> RusotoFuture<ListDevicesResponse, ListDevicesError>;
fn list_domains(
&self,
input: ListDomainsRequest,
) -> RusotoFuture<ListDomainsResponse, ListDomainsError>;
fn list_fleets(
&self,
input: ListFleetsRequest,
) -> RusotoFuture<ListFleetsResponse, ListFleetsError>;
fn list_website_authorization_providers(
&self,
input: ListWebsiteAuthorizationProvidersRequest,
) -> RusotoFuture<
ListWebsiteAuthorizationProvidersResponse,
ListWebsiteAuthorizationProvidersError,
>;
fn list_website_certificate_authorities(
&self,
input: ListWebsiteCertificateAuthoritiesRequest,
) -> RusotoFuture<
ListWebsiteCertificateAuthoritiesResponse,
ListWebsiteCertificateAuthoritiesError,
>;
fn restore_domain_access(
&self,
input: RestoreDomainAccessRequest,
) -> RusotoFuture<RestoreDomainAccessResponse, RestoreDomainAccessError>;
fn revoke_domain_access(
&self,
input: RevokeDomainAccessRequest,
) -> RusotoFuture<RevokeDomainAccessResponse, RevokeDomainAccessError>;
fn sign_out_user(
&self,
input: SignOutUserRequest,
) -> RusotoFuture<SignOutUserResponse, SignOutUserError>;
fn update_audit_stream_configuration(
&self,
input: UpdateAuditStreamConfigurationRequest,
) -> RusotoFuture<UpdateAuditStreamConfigurationResponse, UpdateAuditStreamConfigurationError>;
fn update_company_network_configuration(
&self,
input: UpdateCompanyNetworkConfigurationRequest,
) -> RusotoFuture<
UpdateCompanyNetworkConfigurationResponse,
UpdateCompanyNetworkConfigurationError,
>;
fn update_device_policy_configuration(
&self,
input: UpdateDevicePolicyConfigurationRequest,
) -> RusotoFuture<UpdateDevicePolicyConfigurationResponse, UpdateDevicePolicyConfigurationError>;
fn update_domain_metadata(
&self,
input: UpdateDomainMetadataRequest,
) -> RusotoFuture<UpdateDomainMetadataResponse, UpdateDomainMetadataError>;
fn update_fleet_metadata(
&self,
input: UpdateFleetMetadataRequest,
) -> RusotoFuture<UpdateFleetMetadataResponse, UpdateFleetMetadataError>;
fn update_identity_provider_configuration(
&self,
input: UpdateIdentityProviderConfigurationRequest,
) -> RusotoFuture<
UpdateIdentityProviderConfigurationResponse,
UpdateIdentityProviderConfigurationError,
>;
}
#[derive(Clone)]
pub struct WorklinkClient {
client: Client,
region: region::Region,
}
impl WorklinkClient {
pub fn new(region: region::Region) -> WorklinkClient {
WorklinkClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> WorklinkClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
WorklinkClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl Worklink for WorklinkClient {
fn associate_domain(
&self,
input: AssociateDomainRequest,
) -> RusotoFuture<AssociateDomainResponse, AssociateDomainError> {
let request_uri = "/associateDomain";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateDomainResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(AssociateDomainError::from_response(response))),
)
}
})
}
fn associate_website_authorization_provider(
&self,
input: AssociateWebsiteAuthorizationProviderRequest,
) -> RusotoFuture<
AssociateWebsiteAuthorizationProviderResponse,
AssociateWebsiteAuthorizationProviderError,
> {
let request_uri = "/associateWebsiteAuthorizationProvider";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateWebsiteAuthorizationProviderResponse, _>(
)?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateWebsiteAuthorizationProviderError::from_response(
response,
))
}))
}
})
}
fn associate_website_certificate_authority(
&self,
input: AssociateWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
AssociateWebsiteCertificateAuthorityResponse,
AssociateWebsiteCertificateAuthorityError,
> {
let request_uri = "/associateWebsiteCertificateAuthority";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<AssociateWebsiteCertificateAuthorityResponse, _>(
)?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateWebsiteCertificateAuthorityError::from_response(
response,
))
}))
}
})
}
fn create_fleet(
&self,
input: CreateFleetRequest,
) -> RusotoFuture<CreateFleetResponse, CreateFleetError> {
let request_uri = "/createFleet";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateFleetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateFleetError::from_response(response))),
)
}
})
}
fn delete_fleet(
&self,
input: DeleteFleetRequest,
) -> RusotoFuture<DeleteFleetResponse, DeleteFleetError> {
let request_uri = "/deleteFleet";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteFleetResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteFleetError::from_response(response))),
)
}
})
}
fn describe_audit_stream_configuration(
&self,
input: DescribeAuditStreamConfigurationRequest,
) -> RusotoFuture<DescribeAuditStreamConfigurationResponse, DescribeAuditStreamConfigurationError>
{
let request_uri = "/describeAuditStreamConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeAuditStreamConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeAuditStreamConfigurationError::from_response(
response,
))
}))
}
})
}
fn describe_company_network_configuration(
&self,
input: DescribeCompanyNetworkConfigurationRequest,
) -> RusotoFuture<
DescribeCompanyNetworkConfigurationResponse,
DescribeCompanyNetworkConfigurationError,
> {
let request_uri = "/describeCompanyNetworkConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeCompanyNetworkConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeCompanyNetworkConfigurationError::from_response(
response,
))
}))
}
})
}
fn describe_device(
&self,
input: DescribeDeviceRequest,
) -> RusotoFuture<DescribeDeviceResponse, DescribeDeviceError> {
let request_uri = "/describeDevice";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDeviceResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDeviceError::from_response(response))),
)
}
})
}
fn describe_device_policy_configuration(
&self,
input: DescribeDevicePolicyConfigurationRequest,
) -> RusotoFuture<
DescribeDevicePolicyConfigurationResponse,
DescribeDevicePolicyConfigurationError,
> {
let request_uri = "/describeDevicePolicyConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDevicePolicyConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDevicePolicyConfigurationError::from_response(
response,
))
}))
}
})
}
fn describe_domain(
&self,
input: DescribeDomainRequest,
) -> RusotoFuture<DescribeDomainResponse, DescribeDomainError> {
let request_uri = "/describeDomain";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDomainResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeDomainError::from_response(response))),
)
}
})
}
fn describe_fleet_metadata(
&self,
input: DescribeFleetMetadataRequest,
) -> RusotoFuture<DescribeFleetMetadataResponse, DescribeFleetMetadataError> {
let request_uri = "/describeFleetMetadata";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeFleetMetadataResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeFleetMetadataError::from_response(response))
}),
)
}
})
}
fn describe_identity_provider_configuration(
&self,
input: DescribeIdentityProviderConfigurationRequest,
) -> RusotoFuture<
DescribeIdentityProviderConfigurationResponse,
DescribeIdentityProviderConfigurationError,
> {
let request_uri = "/describeIdentityProviderConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeIdentityProviderConfigurationResponse, _>(
)?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeIdentityProviderConfigurationError::from_response(
response,
))
}))
}
})
}
fn describe_website_certificate_authority(
&self,
input: DescribeWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
DescribeWebsiteCertificateAuthorityResponse,
DescribeWebsiteCertificateAuthorityError,
> {
let request_uri = "/describeWebsiteCertificateAuthority";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeWebsiteCertificateAuthorityResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeWebsiteCertificateAuthorityError::from_response(
response,
))
}))
}
})
}
fn disassociate_domain(
&self,
input: DisassociateDomainRequest,
) -> RusotoFuture<DisassociateDomainResponse, DisassociateDomainError> {
let request_uri = "/disassociateDomain";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateDomainResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DisassociateDomainError::from_response(response))),
)
}
})
}
fn disassociate_website_authorization_provider(
&self,
input: DisassociateWebsiteAuthorizationProviderRequest,
) -> RusotoFuture<
DisassociateWebsiteAuthorizationProviderResponse,
DisassociateWebsiteAuthorizationProviderError,
> {
let request_uri = "/disassociateWebsiteAuthorizationProvider";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateWebsiteAuthorizationProviderResponse, _>(
)?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateWebsiteAuthorizationProviderError::from_response(response))
}))
}
})
}
fn disassociate_website_certificate_authority(
&self,
input: DisassociateWebsiteCertificateAuthorityRequest,
) -> RusotoFuture<
DisassociateWebsiteCertificateAuthorityResponse,
DisassociateWebsiteCertificateAuthorityError,
> {
let request_uri = "/disassociateWebsiteCertificateAuthority";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DisassociateWebsiteCertificateAuthorityResponse, _>(
)?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateWebsiteCertificateAuthorityError::from_response(
response,
))
}))
}
})
}
fn list_devices(
&self,
input: ListDevicesRequest,
) -> RusotoFuture<ListDevicesResponse, ListDevicesError> {
let request_uri = "/listDevices";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDevicesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDevicesError::from_response(response))),
)
}
})
}
fn list_domains(
&self,
input: ListDomainsRequest,
) -> RusotoFuture<ListDomainsResponse, ListDomainsError> {
let request_uri = "/listDomains";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListDomainsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListDomainsError::from_response(response))),
)
}
})
}
fn list_fleets(
&self,
input: ListFleetsRequest,
) -> RusotoFuture<ListFleetsResponse, ListFleetsError> {
let request_uri = "/listFleets";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListFleetsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ListFleetsError::from_response(response))),
)
}
})
}
fn list_website_authorization_providers(
&self,
input: ListWebsiteAuthorizationProvidersRequest,
) -> RusotoFuture<
ListWebsiteAuthorizationProvidersResponse,
ListWebsiteAuthorizationProvidersError,
> {
let request_uri = "/listWebsiteAuthorizationProviders";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListWebsiteAuthorizationProvidersResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListWebsiteAuthorizationProvidersError::from_response(
response,
))
}))
}
})
}
fn list_website_certificate_authorities(
&self,
input: ListWebsiteCertificateAuthoritiesRequest,
) -> RusotoFuture<
ListWebsiteCertificateAuthoritiesResponse,
ListWebsiteCertificateAuthoritiesError,
> {
let request_uri = "/listWebsiteCertificateAuthorities";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListWebsiteCertificateAuthoritiesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ListWebsiteCertificateAuthoritiesError::from_response(
response,
))
}))
}
})
}
fn restore_domain_access(
&self,
input: RestoreDomainAccessRequest,
) -> RusotoFuture<RestoreDomainAccessResponse, RestoreDomainAccessError> {
let request_uri = "/restoreDomainAccess";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RestoreDomainAccessResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(RestoreDomainAccessError::from_response(response))
}),
)
}
})
}
fn revoke_domain_access(
&self,
input: RevokeDomainAccessRequest,
) -> RusotoFuture<RevokeDomainAccessResponse, RevokeDomainAccessError> {
let request_uri = "/revokeDomainAccess";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RevokeDomainAccessResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(RevokeDomainAccessError::from_response(response))),
)
}
})
}
fn sign_out_user(
&self,
input: SignOutUserRequest,
) -> RusotoFuture<SignOutUserResponse, SignOutUserError> {
let request_uri = "/signOutUser";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SignOutUserResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(SignOutUserError::from_response(response))),
)
}
})
}
fn update_audit_stream_configuration(
&self,
input: UpdateAuditStreamConfigurationRequest,
) -> RusotoFuture<UpdateAuditStreamConfigurationResponse, UpdateAuditStreamConfigurationError>
{
let request_uri = "/updateAuditStreamConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAuditStreamConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateAuditStreamConfigurationError::from_response(response))
}))
}
})
}
fn update_company_network_configuration(
&self,
input: UpdateCompanyNetworkConfigurationRequest,
) -> RusotoFuture<
UpdateCompanyNetworkConfigurationResponse,
UpdateCompanyNetworkConfigurationError,
> {
let request_uri = "/updateCompanyNetworkConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateCompanyNetworkConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateCompanyNetworkConfigurationError::from_response(
response,
))
}))
}
})
}
fn update_device_policy_configuration(
&self,
input: UpdateDevicePolicyConfigurationRequest,
) -> RusotoFuture<UpdateDevicePolicyConfigurationResponse, UpdateDevicePolicyConfigurationError>
{
let request_uri = "/updateDevicePolicyConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDevicePolicyConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDevicePolicyConfigurationError::from_response(
response,
))
}))
}
})
}
fn update_domain_metadata(
&self,
input: UpdateDomainMetadataRequest,
) -> RusotoFuture<UpdateDomainMetadataResponse, UpdateDomainMetadataError> {
let request_uri = "/updateDomainMetadata";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDomainMetadataResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateDomainMetadataError::from_response(response))
}),
)
}
})
}
fn update_fleet_metadata(
&self,
input: UpdateFleetMetadataRequest,
) -> RusotoFuture<UpdateFleetMetadataResponse, UpdateFleetMetadataError> {
let request_uri = "/UpdateFleetMetadata";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateFleetMetadataResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateFleetMetadataError::from_response(response))
}),
)
}
})
}
fn update_identity_provider_configuration(
&self,
input: UpdateIdentityProviderConfigurationRequest,
) -> RusotoFuture<
UpdateIdentityProviderConfigurationResponse,
UpdateIdentityProviderConfigurationError,
> {
let request_uri = "/updateIdentityProviderConfiguration";
let mut request = SignedRequest::new("POST", "worklink", &self.region, &request_uri);
request.set_content_type("application/json".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateIdentityProviderConfigurationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateIdentityProviderConfigurationError::from_response(
response,
))
}))
}
})
}
}