use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct AccessLogSettings {
#[serde(rename = "destinationArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub destination_arn: Option<String>,
#[serde(rename = "format")]
#[serde(skip_serializing_if = "Option::is_none")]
pub format: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Account {
#[serde(rename = "apiKeyVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_version: Option<String>,
#[serde(rename = "cloudwatchRoleArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cloudwatch_role_arn: Option<String>,
#[serde(rename = "features")]
#[serde(skip_serializing_if = "Option::is_none")]
pub features: Option<Vec<String>>,
#[serde(rename = "throttleSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttle_settings: Option<ThrottleSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ApiKey {
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "customerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "lastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "stageKeys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_keys: Option<Vec<String>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ApiKeyIds {
#[serde(rename = "ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ids: Option<Vec<String>>,
#[serde(rename = "warnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub warnings: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ApiKeys {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<ApiKey>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "warnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub warnings: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ApiStage {
#[serde(rename = "apiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
#[serde(rename = "throttle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttle: Option<::std::collections::HashMap<String, ThrottleSettings>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Authorizer {
#[serde(rename = "authType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_type: Option<String>,
#[serde(rename = "authorizerCredentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials: Option<String>,
#[serde(rename = "authorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "authorizerUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_uri: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "identitySource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_source: Option<String>,
#[serde(rename = "identityValidationExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_validation_expression: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "providerARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_ar_ns: Option<Vec<String>>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Authorizers {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Authorizer>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BasePathMapping {
#[serde(rename = "basePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_path: Option<String>,
#[serde(rename = "restApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rest_api_id: Option<String>,
#[serde(rename = "stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct BasePathMappings {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<BasePathMapping>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct CanarySettings {
#[serde(rename = "deploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "percentTraffic")]
#[serde(skip_serializing_if = "Option::is_none")]
pub percent_traffic: Option<f64>,
#[serde(rename = "stageVariableOverrides")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_variable_overrides: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "useStageCache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_stage_cache: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ClientCertificate {
#[serde(rename = "clientCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_certificate_id: Option<String>,
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "expirationDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub expiration_date: Option<f64>,
#[serde(rename = "pemEncodedCertificate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub pem_encoded_certificate: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ClientCertificates {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<ClientCertificate>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateApiKeyRequest {
#[serde(rename = "customerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "enabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[serde(rename = "generateDistinctId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub generate_distinct_id: Option<bool>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "stageKeys")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_keys: Option<Vec<StageKey>>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateAuthorizerRequest {
#[serde(rename = "authType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_type: Option<String>,
#[serde(rename = "authorizerCredentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials: Option<String>,
#[serde(rename = "authorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "authorizerUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_uri: Option<String>,
#[serde(rename = "identitySource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_source: Option<String>,
#[serde(rename = "identityValidationExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub identity_validation_expression: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "providerARNs")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_ar_ns: Option<Vec<String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateBasePathMappingRequest {
#[serde(rename = "basePath")]
#[serde(skip_serializing_if = "Option::is_none")]
pub base_path: Option<String>,
#[serde(rename = "domainName")]
pub domain_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateDeploymentRequest {
#[serde(rename = "cacheClusterEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_enabled: Option<bool>,
#[serde(rename = "cacheClusterSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_size: Option<String>,
#[serde(rename = "canarySettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canary_settings: Option<DeploymentCanarySettings>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageDescription")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_description: Option<String>,
#[serde(rename = "stageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<String>,
#[serde(rename = "tracingEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tracing_enabled: Option<bool>,
#[serde(rename = "variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateDocumentationPartRequest {
#[serde(rename = "location")]
pub location: DocumentationPartLocation,
#[serde(rename = "properties")]
pub properties: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateDocumentationVersionRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateDomainNameRequest {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_body: Option<String>,
#[serde(rename = "certificateChain")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_chain: Option<String>,
#[serde(rename = "certificateName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_name: Option<String>,
#[serde(rename = "certificatePrivateKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_private_key: Option<String>,
#[serde(rename = "domainName")]
pub domain_name: String,
#[serde(rename = "endpointConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_configuration: Option<EndpointConfiguration>,
#[serde(rename = "regionalCertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_certificate_arn: Option<String>,
#[serde(rename = "regionalCertificateName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_certificate_name: Option<String>,
#[serde(rename = "securityPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_policy: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateModelRequest {
#[serde(rename = "contentType")]
pub content_type: String,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "schema")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateRequestValidatorRequest {
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "validateRequestBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validate_request_body: Option<bool>,
#[serde(rename = "validateRequestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validate_request_parameters: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateResourceRequest {
#[serde(rename = "parentId")]
pub parent_id: String,
#[serde(rename = "pathPart")]
pub path_part: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateRestApiRequest {
#[serde(rename = "apiKeySource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_source: Option<String>,
#[serde(rename = "binaryMediaTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub binary_media_types: Option<Vec<String>>,
#[serde(rename = "cloneFrom")]
#[serde(skip_serializing_if = "Option::is_none")]
pub clone_from: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "endpointConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_configuration: Option<EndpointConfiguration>,
#[serde(rename = "minimumCompressionSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_compression_size: Option<i64>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "policy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateStageRequest {
#[serde(rename = "cacheClusterEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_enabled: Option<bool>,
#[serde(rename = "cacheClusterSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_size: Option<String>,
#[serde(rename = "canarySettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canary_settings: Option<CanarySettings>,
#[serde(rename = "deploymentId")]
pub deployment_id: String,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "documentationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub documentation_version: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "tracingEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tracing_enabled: Option<bool>,
#[serde(rename = "variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateUsagePlanKeyRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "keyType")]
pub key_type: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateUsagePlanRequest {
#[serde(rename = "apiStages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_stages: Option<Vec<ApiStage>>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "quota")]
#[serde(skip_serializing_if = "Option::is_none")]
pub quota: Option<QuotaSettings>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "throttle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttle: Option<ThrottleSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVpcLinkRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "name")]
pub name: String,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "targetArns")]
pub target_arns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteApiKeyRequest {
#[serde(rename = "apiKey")]
pub api_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteAuthorizerRequest {
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteBasePathMappingRequest {
#[serde(rename = "basePath")]
pub base_path: String,
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteClientCertificateRequest {
#[serde(rename = "clientCertificateId")]
pub client_certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteDeploymentRequest {
#[serde(rename = "deploymentId")]
pub deployment_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteDocumentationPartRequest {
#[serde(rename = "documentationPartId")]
pub documentation_part_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteDocumentationVersionRequest {
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteDomainNameRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteGatewayResponseRequest {
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteIntegrationRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteIntegrationResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMethodRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMethodResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteModelRequest {
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteRequestValidatorRequest {
#[serde(rename = "requestValidatorId")]
pub request_validator_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteResourceRequest {
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteRestApiRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteStageRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteUsagePlanKeyRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteUsagePlanRequest {
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVpcLinkRequest {
#[serde(rename = "vpcLinkId")]
pub vpc_link_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Deployment {
#[serde(rename = "apiSummary")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_summary: Option<
::std::collections::HashMap<String, ::std::collections::HashMap<String, MethodSnapshot>>,
>,
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeploymentCanarySettings {
#[serde(rename = "percentTraffic")]
#[serde(skip_serializing_if = "Option::is_none")]
pub percent_traffic: Option<f64>,
#[serde(rename = "stageVariableOverrides")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_variable_overrides: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "useStageCache")]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_stage_cache: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Deployments {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Deployment>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DocumentationPart {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<DocumentationPartLocation>,
#[serde(rename = "properties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub properties: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DocumentationPartIds {
#[serde(rename = "ids")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ids: Option<Vec<String>>,
#[serde(rename = "warnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub warnings: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DocumentationPartLocation {
#[serde(rename = "method")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DocumentationParts {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<DocumentationPart>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DocumentationVersion {
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DocumentationVersions {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<DocumentationVersion>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DomainName {
#[serde(rename = "certificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_arn: Option<String>,
#[serde(rename = "certificateName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_name: Option<String>,
#[serde(rename = "certificateUploadDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub certificate_upload_date: Option<f64>,
#[serde(rename = "distributionDomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub distribution_domain_name: Option<String>,
#[serde(rename = "distributionHostedZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub distribution_hosted_zone_id: Option<String>,
#[serde(rename = "domainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "domainNameStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_status: Option<String>,
#[serde(rename = "domainNameStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_status_message: Option<String>,
#[serde(rename = "endpointConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_configuration: Option<EndpointConfiguration>,
#[serde(rename = "regionalCertificateArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_certificate_arn: Option<String>,
#[serde(rename = "regionalCertificateName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_certificate_name: Option<String>,
#[serde(rename = "regionalDomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_domain_name: Option<String>,
#[serde(rename = "regionalHostedZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regional_hosted_zone_id: Option<String>,
#[serde(rename = "securityPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub security_policy: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DomainNames {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<DomainName>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct EndpointConfiguration {
#[serde(rename = "types")]
#[serde(skip_serializing_if = "Option::is_none")]
pub types: Option<Vec<String>>,
#[serde(rename = "vpcEndpointIds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vpc_endpoint_ids: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct ExportResponse {
pub body: Option<bytes::Bytes>,
pub content_disposition: Option<String>,
pub content_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct FlushStageAuthorizersCacheRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct FlushStageCacheRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GatewayResponse {
#[serde(rename = "defaultResponse")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_response: Option<bool>,
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_type: Option<String>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GatewayResponses {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<GatewayResponse>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GenerateClientCertificateRequest {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAccountRequest {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetApiKeyRequest {
#[serde(rename = "apiKey")]
pub api_key: String,
#[serde(rename = "includeValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_value: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetApiKeysRequest {
#[serde(rename = "customerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_id: Option<String>,
#[serde(rename = "includeValues")]
#[serde(skip_serializing_if = "Option::is_none")]
pub include_values: Option<bool>,
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "nameQuery")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_query: Option<String>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAuthorizerRequest {
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetAuthorizersRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetBasePathMappingRequest {
#[serde(rename = "basePath")]
pub base_path: String,
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetBasePathMappingsRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetClientCertificateRequest {
#[serde(rename = "clientCertificateId")]
pub client_certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetClientCertificatesRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDeploymentRequest {
#[serde(rename = "deploymentId")]
pub deployment_id: String,
#[serde(rename = "embed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embed: Option<Vec<String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDeploymentsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDocumentationPartRequest {
#[serde(rename = "documentationPartId")]
pub documentation_part_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDocumentationPartsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "locationStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location_status: Option<String>,
#[serde(rename = "nameQuery")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_query: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDocumentationVersionRequest {
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDocumentationVersionsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDomainNameRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetDomainNamesRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetExportRequest {
#[serde(rename = "accepts")]
#[serde(skip_serializing_if = "Option::is_none")]
pub accepts: Option<String>,
#[serde(rename = "exportType")]
pub export_type: String,
#[serde(rename = "parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetGatewayResponseRequest {
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetGatewayResponsesRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetIntegrationRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetIntegrationResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetMethodRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetMethodResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetModelRequest {
#[serde(rename = "flatten")]
#[serde(skip_serializing_if = "Option::is_none")]
pub flatten: Option<bool>,
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetModelTemplateRequest {
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetModelsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRequestValidatorRequest {
#[serde(rename = "requestValidatorId")]
pub request_validator_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRequestValidatorsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetResourceRequest {
#[serde(rename = "embed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embed: Option<Vec<String>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetResourcesRequest {
#[serde(rename = "embed")]
#[serde(skip_serializing_if = "Option::is_none")]
pub embed: Option<Vec<String>>,
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRestApiRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetRestApisRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSdkRequest {
#[serde(rename = "parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "sdkType")]
pub sdk_type: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSdkTypeRequest {
#[serde(rename = "id")]
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetSdkTypesRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetStageRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetStagesRequest {
#[serde(rename = "deploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetTagsRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsagePlanKeyRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsagePlanKeysRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "nameQuery")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name_query: Option<String>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsagePlanRequest {
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsagePlansRequest {
#[serde(rename = "keyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetUsageRequest {
#[serde(rename = "endDate")]
pub end_date: String,
#[serde(rename = "keyId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub key_id: Option<String>,
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "startDate")]
pub start_date: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVpcLinkRequest {
#[serde(rename = "vpcLinkId")]
pub vpc_link_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct GetVpcLinksRequest {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ImportApiKeysRequest {
#[serde(rename = "body")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub body: bytes::Bytes,
#[serde(rename = "failOnWarnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fail_on_warnings: Option<bool>,
#[serde(rename = "format")]
pub format: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ImportDocumentationPartsRequest {
#[serde(rename = "body")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub body: bytes::Bytes,
#[serde(rename = "failOnWarnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fail_on_warnings: Option<bool>,
#[serde(rename = "mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ImportRestApiRequest {
#[serde(rename = "body")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub body: bytes::Bytes,
#[serde(rename = "failOnWarnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fail_on_warnings: Option<bool>,
#[serde(rename = "parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Integration {
#[serde(rename = "cacheKeyParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_key_parameters: Option<Vec<String>>,
#[serde(rename = "cacheNamespace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_namespace: Option<String>,
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "connectionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_type: Option<String>,
#[serde(rename = "contentHandling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling: Option<String>,
#[serde(rename = "credentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials: Option<String>,
#[serde(rename = "httpMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_method: Option<String>,
#[serde(rename = "integrationResponses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_responses: Option<::std::collections::HashMap<String, IntegrationResponse>>,
#[serde(rename = "passthroughBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub passthrough_behavior: Option<String>,
#[serde(rename = "requestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "requestTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "timeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "uri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct IntegrationResponse {
#[serde(rename = "contentHandling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling: Option<String>,
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "selectionPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selection_pattern: Option<String>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Method {
#[serde(rename = "apiKeyRequired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_required: Option<bool>,
#[serde(rename = "authorizationScopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_scopes: Option<Vec<String>>,
#[serde(rename = "authorizationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_type: Option<String>,
#[serde(rename = "authorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "httpMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_method: Option<String>,
#[serde(rename = "methodIntegration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method_integration: Option<Integration>,
#[serde(rename = "methodResponses")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method_responses: Option<::std::collections::HashMap<String, MethodResponse>>,
#[serde(rename = "operationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation_name: Option<String>,
#[serde(rename = "requestModels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_models: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "requestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_parameters: Option<::std::collections::HashMap<String, bool>>,
#[serde(rename = "requestValidatorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_validator_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MethodResponse {
#[serde(rename = "responseModels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_models: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, bool>>,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MethodSetting {
#[serde(rename = "cacheDataEncrypted")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_data_encrypted: Option<bool>,
#[serde(rename = "cacheTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_ttl_in_seconds: Option<i64>,
#[serde(rename = "cachingEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub caching_enabled: Option<bool>,
#[serde(rename = "dataTraceEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data_trace_enabled: Option<bool>,
#[serde(rename = "loggingLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_level: Option<String>,
#[serde(rename = "metricsEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metrics_enabled: Option<bool>,
#[serde(rename = "requireAuthorizationForCacheControl")]
#[serde(skip_serializing_if = "Option::is_none")]
pub require_authorization_for_cache_control: Option<bool>,
#[serde(rename = "throttlingBurstLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttling_burst_limit: Option<i64>,
#[serde(rename = "throttlingRateLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttling_rate_limit: Option<f64>,
#[serde(rename = "unauthorizedCacheControlHeaderStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unauthorized_cache_control_header_strategy: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MethodSnapshot {
#[serde(rename = "apiKeyRequired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_required: Option<bool>,
#[serde(rename = "authorizationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Model {
#[serde(rename = "contentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_type: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "schema")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Models {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Model>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PatchOperation {
#[serde(rename = "from")]
#[serde(skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
#[serde(rename = "op")]
#[serde(skip_serializing_if = "Option::is_none")]
pub op: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutGatewayResponseRequest {
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_code: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutIntegrationRequest {
#[serde(rename = "cacheKeyParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_key_parameters: Option<Vec<String>>,
#[serde(rename = "cacheNamespace")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_namespace: Option<String>,
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "connectionType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_type: Option<String>,
#[serde(rename = "contentHandling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling: Option<String>,
#[serde(rename = "credentials")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials: Option<String>,
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "integrationHttpMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_http_method: Option<String>,
#[serde(rename = "passthroughBehavior")]
#[serde(skip_serializing_if = "Option::is_none")]
pub passthrough_behavior: Option<String>,
#[serde(rename = "requestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "requestTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "timeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
#[serde(rename = "type")]
pub type_: String,
#[serde(rename = "uri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub uri: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutIntegrationResponseRequest {
#[serde(rename = "contentHandling")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling: Option<String>,
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseTemplates")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_templates: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "selectionPattern")]
#[serde(skip_serializing_if = "Option::is_none")]
pub selection_pattern: Option<String>,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutMethodRequest {
#[serde(rename = "apiKeyRequired")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_required: Option<bool>,
#[serde(rename = "authorizationScopes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization_scopes: Option<Vec<String>>,
#[serde(rename = "authorizationType")]
pub authorization_type: String,
#[serde(rename = "authorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "operationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub operation_name: Option<String>,
#[serde(rename = "requestModels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_models: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "requestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_parameters: Option<::std::collections::HashMap<String, bool>>,
#[serde(rename = "requestValidatorId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub request_validator_id: Option<String>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutMethodResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "responseModels")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_models: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "responseParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub response_parameters: Option<::std::collections::HashMap<String, bool>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct PutRestApiRequest {
#[serde(rename = "body")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
pub body: bytes::Bytes,
#[serde(rename = "failOnWarnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub fail_on_warnings: Option<bool>,
#[serde(rename = "mode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mode: Option<String>,
#[serde(rename = "parameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parameters: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct QuotaSettings {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "offset")]
#[serde(skip_serializing_if = "Option::is_none")]
pub offset: Option<i64>,
#[serde(rename = "period")]
#[serde(skip_serializing_if = "Option::is_none")]
pub period: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RequestValidator {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "validateRequestBody")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validate_request_body: Option<bool>,
#[serde(rename = "validateRequestParameters")]
#[serde(skip_serializing_if = "Option::is_none")]
pub validate_request_parameters: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RequestValidators {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<RequestValidator>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Resource {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "parentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "pathPart")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path_part: Option<String>,
#[serde(rename = "resourceMethods")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_methods: Option<::std::collections::HashMap<String, Method>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Resources {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Resource>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RestApi {
#[serde(rename = "apiKeySource")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_source: Option<String>,
#[serde(rename = "binaryMediaTypes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub binary_media_types: Option<Vec<String>>,
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "endpointConfiguration")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_configuration: Option<EndpointConfiguration>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "minimumCompressionSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_compression_size: Option<i64>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "policy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "version")]
#[serde(skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
#[serde(rename = "warnings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub warnings: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RestApis {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<RestApi>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SdkConfigurationProperty {
#[serde(rename = "defaultValue")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_value: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "friendlyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub friendly_name: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "required")]
#[serde(skip_serializing_if = "Option::is_none")]
pub required: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq)]
pub struct SdkResponse {
pub body: Option<bytes::Bytes>,
pub content_disposition: Option<String>,
pub content_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SdkType {
#[serde(rename = "configurationProperties")]
#[serde(skip_serializing_if = "Option::is_none")]
pub configuration_properties: Option<Vec<SdkConfigurationProperty>>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "friendlyName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub friendly_name: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct SdkTypes {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<SdkType>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Stage {
#[serde(rename = "accessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[serde(rename = "cacheClusterEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_enabled: Option<bool>,
#[serde(rename = "cacheClusterSize")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_size: Option<String>,
#[serde(rename = "cacheClusterStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cache_cluster_status: Option<String>,
#[serde(rename = "canarySettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub canary_settings: Option<CanarySettings>,
#[serde(rename = "clientCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_certificate_id: Option<String>,
#[serde(rename = "createdDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub created_date: Option<f64>,
#[serde(rename = "deploymentId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_id: Option<String>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "documentationVersion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub documentation_version: Option<String>,
#[serde(rename = "lastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "methodSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method_settings: Option<::std::collections::HashMap<String, MethodSetting>>,
#[serde(rename = "stageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "tracingEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tracing_enabled: Option<bool>,
#[serde(rename = "variables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub variables: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "webAclArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub web_acl_arn: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct StageKey {
#[serde(rename = "restApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rest_api_id: Option<String>,
#[serde(rename = "stageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Stages {
#[serde(rename = "item")]
#[serde(skip_serializing_if = "Option::is_none")]
pub item: Option<Vec<Stage>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: ::std::collections::HashMap<String, String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Tags {
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Template {
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TestInvokeAuthorizerRequest {
#[serde(rename = "additionalContext")]
#[serde(skip_serializing_if = "Option::is_none")]
pub additional_context: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "body")]
#[serde(skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "headers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub headers: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "multiValueHeaders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub multi_value_headers: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "pathWithQueryString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path_with_query_string: Option<String>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageVariables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TestInvokeAuthorizerResponse {
#[serde(rename = "authorization")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorization: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "claims")]
#[serde(skip_serializing_if = "Option::is_none")]
pub claims: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "clientStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_status: Option<i64>,
#[serde(rename = "latency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latency: Option<i64>,
#[serde(rename = "log")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log: Option<String>,
#[serde(rename = "policy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub policy: Option<String>,
#[serde(rename = "principalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub principal_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TestInvokeMethodRequest {
#[serde(rename = "body")]
#[serde(skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "clientCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_certificate_id: Option<String>,
#[serde(rename = "headers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub headers: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "multiValueHeaders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub multi_value_headers: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "pathWithQueryString")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path_with_query_string: Option<String>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageVariables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TestInvokeMethodResponse {
#[serde(rename = "body")]
#[serde(skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
#[serde(rename = "headers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub headers: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "latency")]
#[serde(skip_serializing_if = "Option::is_none")]
pub latency: Option<i64>,
#[serde(rename = "log")]
#[serde(skip_serializing_if = "Option::is_none")]
pub log: Option<String>,
#[serde(rename = "multiValueHeaders")]
#[serde(skip_serializing_if = "Option::is_none")]
pub multi_value_headers: Option<::std::collections::HashMap<String, Vec<String>>>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ThrottleSettings {
#[serde(rename = "burstLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub burst_limit: Option<i64>,
#[serde(rename = "rateLimit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub rate_limit: Option<f64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateAccountRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateApiKeyRequest {
#[serde(rename = "apiKey")]
pub api_key: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateAuthorizerRequest {
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateBasePathMappingRequest {
#[serde(rename = "basePath")]
pub base_path: String,
#[serde(rename = "domainName")]
pub domain_name: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateClientCertificateRequest {
#[serde(rename = "clientCertificateId")]
pub client_certificate_id: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateDeploymentRequest {
#[serde(rename = "deploymentId")]
pub deployment_id: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateDocumentationPartRequest {
#[serde(rename = "documentationPartId")]
pub documentation_part_id: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateDocumentationVersionRequest {
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateDomainNameRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateGatewayResponseRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateIntegrationRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateIntegrationResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateMethodRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateMethodResponseRequest {
#[serde(rename = "httpMethod")]
pub http_method: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "statusCode")]
pub status_code: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateModelRequest {
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateRequestValidatorRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "requestValidatorId")]
pub request_validator_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateResourceRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateRestApiRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateStageRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateUsagePlanRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateUsageRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVpcLinkRequest {
#[serde(rename = "patchOperations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub patch_operations: Option<Vec<PatchOperation>>,
#[serde(rename = "vpcLinkId")]
pub vpc_link_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct Usage {
#[serde(rename = "endDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub end_date: Option<String>,
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<::std::collections::HashMap<String, Vec<Vec<i64>>>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
#[serde(rename = "startDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub start_date: Option<String>,
#[serde(rename = "usagePlanId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub usage_plan_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UsagePlan {
#[serde(rename = "apiStages")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_stages: Option<Vec<ApiStage>>,
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "productCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub product_code: Option<String>,
#[serde(rename = "quota")]
#[serde(skip_serializing_if = "Option::is_none")]
pub quota: Option<QuotaSettings>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "throttle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub throttle: Option<ThrottleSettings>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UsagePlanKey {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UsagePlanKeys {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<UsagePlanKey>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UsagePlans {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<UsagePlan>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VpcLink {
#[serde(rename = "description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
#[serde(rename = "statusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status_message: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
#[serde(rename = "targetArns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VpcLinks {
#[serde(rename = "items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<VpcLink>>,
#[serde(rename = "position")]
#[serde(skip_serializing_if = "Option::is_none")]
pub position: Option<String>,
}
#[derive(Debug, PartialEq)]
pub enum CreateApiKeyError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateApiKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApiKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateApiKeyError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateApiKeyError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateApiKeyError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateApiKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateApiKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateApiKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateApiKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateApiKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateApiKeyError::Conflict(ref cause) => write!(f, "{}", cause),
CreateApiKeyError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
CreateApiKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateApiKeyError {}
#[derive(Debug, PartialEq)]
pub enum CreateAuthorizerError {
BadRequest(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateAuthorizerError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateAuthorizerError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateAuthorizerError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateAuthorizerError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateAuthorizerError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateAuthorizerError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateAuthorizerError::NotFound(ref cause) => write!(f, "{}", cause),
CreateAuthorizerError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateAuthorizerError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateAuthorizerError {}
#[derive(Debug, PartialEq)]
pub enum CreateBasePathMappingError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateBasePathMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBasePathMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateBasePathMappingError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateBasePathMappingError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateBasePathMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateBasePathMappingError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateBasePathMappingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateBasePathMappingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateBasePathMappingError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateBasePathMappingError::Conflict(ref cause) => write!(f, "{}", cause),
CreateBasePathMappingError::NotFound(ref cause) => write!(f, "{}", cause),
CreateBasePathMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateBasePathMappingError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateBasePathMappingError {}
#[derive(Debug, PartialEq)]
pub enum CreateDeploymentError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDeploymentError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateDeploymentError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDeploymentError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateDeploymentError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateDeploymentError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDeploymentError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateDeploymentError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateDeploymentError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateDeploymentError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::Conflict(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::NotFound(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateDeploymentError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateDeploymentError {}
#[derive(Debug, PartialEq)]
pub enum CreateDocumentationPartError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateDocumentationPartError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDocumentationPartError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDocumentationPartError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateDocumentationPartError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDocumentationPartError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(CreateDocumentationPartError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDocumentationPartError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateDocumentationPartError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateDocumentationPartError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateDocumentationPartError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateDocumentationPartError::Conflict(ref cause) => write!(f, "{}", cause),
CreateDocumentationPartError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateDocumentationPartError::NotFound(ref cause) => write!(f, "{}", cause),
CreateDocumentationPartError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateDocumentationPartError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateDocumentationPartError {}
#[derive(Debug, PartialEq)]
pub enum CreateDocumentationVersionError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateDocumentationVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDocumentationVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDocumentationVersionError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(CreateDocumentationVersionError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateDocumentationVersionError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(CreateDocumentationVersionError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDocumentationVersionError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateDocumentationVersionError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateDocumentationVersionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateDocumentationVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateDocumentationVersionError::Conflict(ref cause) => write!(f, "{}", cause),
CreateDocumentationVersionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateDocumentationVersionError::NotFound(ref cause) => write!(f, "{}", cause),
CreateDocumentationVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateDocumentationVersionError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateDocumentationVersionError {}
#[derive(Debug, PartialEq)]
pub enum CreateDomainNameError {
BadRequest(String),
Conflict(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateDomainNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateDomainNameError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateDomainNameError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateDomainNameError::Conflict(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDomainNameError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateDomainNameError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateDomainNameError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateDomainNameError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateDomainNameError::Conflict(ref cause) => write!(f, "{}", cause),
CreateDomainNameError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateDomainNameError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateDomainNameError {}
#[derive(Debug, PartialEq)]
pub enum CreateModelError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateModelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateModelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateModelError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateModelError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateModelError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateModelError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateModelError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateModelError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateModelError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateModelError::Conflict(ref cause) => write!(f, "{}", cause),
CreateModelError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateModelError::NotFound(ref cause) => write!(f, "{}", cause),
CreateModelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateModelError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateModelError {}
#[derive(Debug, PartialEq)]
pub enum CreateRequestValidatorError {
BadRequest(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateRequestValidatorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRequestValidatorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRequestValidatorError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateRequestValidatorError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(CreateRequestValidatorError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateRequestValidatorError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateRequestValidatorError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateRequestValidatorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateRequestValidatorError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateRequestValidatorError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateRequestValidatorError::NotFound(ref cause) => write!(f, "{}", cause),
CreateRequestValidatorError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateRequestValidatorError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateRequestValidatorError {}
#[derive(Debug, PartialEq)]
pub enum CreateResourceError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateResourceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateResourceError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateResourceError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateResourceError::Conflict(ref cause) => write!(f, "{}", cause),
CreateResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateResourceError::NotFound(ref cause) => write!(f, "{}", cause),
CreateResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateResourceError {}
#[derive(Debug, PartialEq)]
pub enum CreateRestApiError {
BadRequest(String),
LimitExceeded(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRestApiError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateRestApiError::LimitExceeded(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateRestApiError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateRestApiError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateRestApiError {}
#[derive(Debug, PartialEq)]
pub enum CreateStageError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateStageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateStageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateStageError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateStageError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateStageError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateStageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateStageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateStageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateStageError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateStageError::Conflict(ref cause) => write!(f, "{}", cause),
CreateStageError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateStageError::NotFound(ref cause) => write!(f, "{}", cause),
CreateStageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateStageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateStageError {}
#[derive(Debug, PartialEq)]
pub enum CreateUsagePlanError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateUsagePlanError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUsagePlanError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateUsagePlanError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateUsagePlanError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateUsagePlanError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateUsagePlanError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateUsagePlanError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateUsagePlanError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateUsagePlanError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateUsagePlanError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateUsagePlanError::Conflict(ref cause) => write!(f, "{}", cause),
CreateUsagePlanError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateUsagePlanError::NotFound(ref cause) => write!(f, "{}", cause),
CreateUsagePlanError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateUsagePlanError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateUsagePlanError {}
#[derive(Debug, PartialEq)]
pub enum CreateUsagePlanKeyError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateUsagePlanKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUsagePlanKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateUsagePlanKeyError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateUsagePlanKeyError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateUsagePlanKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateUsagePlanKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateUsagePlanKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateUsagePlanKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateUsagePlanKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateUsagePlanKeyError::Conflict(ref cause) => write!(f, "{}", cause),
CreateUsagePlanKeyError::NotFound(ref cause) => write!(f, "{}", cause),
CreateUsagePlanKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateUsagePlanKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateUsagePlanKeyError {}
#[derive(Debug, PartialEq)]
pub enum CreateVpcLinkError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl CreateVpcLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVpcLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateVpcLinkError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateVpcLinkError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(CreateVpcLinkError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVpcLinkError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVpcLinkError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVpcLinkError::TooManyRequests(ref cause) => write!(f, "{}", cause),
CreateVpcLinkError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVpcLinkError {}
#[derive(Debug, PartialEq)]
pub enum DeleteApiKeyError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteApiKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApiKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(DeleteApiKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteApiKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteApiKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteApiKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteApiKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteApiKeyError {}
#[derive(Debug, PartialEq)]
pub enum DeleteAuthorizerError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteAuthorizerError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteAuthorizerError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteAuthorizerError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteAuthorizerError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteAuthorizerError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteAuthorizerError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteAuthorizerError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteAuthorizerError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteAuthorizerError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteAuthorizerError {}
#[derive(Debug, PartialEq)]
pub enum DeleteBasePathMappingError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteBasePathMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBasePathMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteBasePathMappingError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteBasePathMappingError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteBasePathMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteBasePathMappingError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteBasePathMappingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteBasePathMappingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteBasePathMappingError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteBasePathMappingError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteBasePathMappingError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteBasePathMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteBasePathMappingError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteBasePathMappingError {}
#[derive(Debug, PartialEq)]
pub enum DeleteClientCertificateError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteClientCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteClientCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteClientCertificateError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteClientCertificateError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteClientCertificateError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteClientCertificateError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteClientCertificateError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteClientCertificateError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteClientCertificateError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteClientCertificateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteClientCertificateError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteClientCertificateError {}
#[derive(Debug, PartialEq)]
pub enum DeleteDeploymentError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteDeploymentError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteDeploymentError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteDeploymentError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteDeploymentError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteDeploymentError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteDeploymentError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteDeploymentError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteDeploymentError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteDeploymentError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteDeploymentError {}
#[derive(Debug, PartialEq)]
pub enum DeleteDocumentationPartError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteDocumentationPartError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDocumentationPartError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteDocumentationPartError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteDocumentationPartError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteDocumentationPartError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteDocumentationPartError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteDocumentationPartError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteDocumentationPartError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteDocumentationPartError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteDocumentationPartError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteDocumentationPartError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteDocumentationPartError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteDocumentationPartError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteDocumentationPartError {}
#[derive(Debug, PartialEq)]
pub enum DeleteDocumentationVersionError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteDocumentationVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDocumentationVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteDocumentationVersionError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(DeleteDocumentationVersionError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteDocumentationVersionError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteDocumentationVersionError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteDocumentationVersionError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteDocumentationVersionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteDocumentationVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteDocumentationVersionError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteDocumentationVersionError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteDocumentationVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteDocumentationVersionError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteDocumentationVersionError {}
#[derive(Debug, PartialEq)]
pub enum DeleteDomainNameError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteDomainNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDomainNameError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteDomainNameError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteDomainNameError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteDomainNameError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteDomainNameError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteDomainNameError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteDomainNameError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteDomainNameError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteDomainNameError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteDomainNameError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteDomainNameError {}
#[derive(Debug, PartialEq)]
pub enum DeleteGatewayResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteGatewayResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGatewayResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteGatewayResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteGatewayResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteGatewayResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteGatewayResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteGatewayResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteGatewayResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteGatewayResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteGatewayResponseError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteGatewayResponseError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteGatewayResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteGatewayResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteGatewayResponseError {}
#[derive(Debug, PartialEq)]
pub enum DeleteIntegrationError {
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteIntegrationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIntegrationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictException" => {
return RusotoError::Service(DeleteIntegrationError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteIntegrationError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteIntegrationError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteIntegrationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteIntegrationError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteIntegrationError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteIntegrationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteIntegrationError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteIntegrationError {}
#[derive(Debug, PartialEq)]
pub enum DeleteIntegrationResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteIntegrationResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteIntegrationResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteIntegrationResponseError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(DeleteIntegrationResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteIntegrationResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteIntegrationResponseError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteIntegrationResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteIntegrationResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteIntegrationResponseError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteIntegrationResponseError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteIntegrationResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteIntegrationResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteIntegrationResponseError {}
#[derive(Debug, PartialEq)]
pub enum DeleteMethodError {
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteMethodError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMethodError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"ConflictException" => {
return RusotoError::Service(DeleteMethodError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteMethodError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteMethodError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteMethodError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMethodError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMethodError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteMethodError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteMethodError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteMethodError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMethodError {}
#[derive(Debug, PartialEq)]
pub enum DeleteMethodResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteMethodResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMethodResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteMethodResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteMethodResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteMethodResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteMethodResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteMethodResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMethodResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMethodResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteMethodResponseError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteMethodResponseError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteMethodResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteMethodResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMethodResponseError {}
#[derive(Debug, PartialEq)]
pub enum DeleteModelError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteModelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteModelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteModelError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteModelError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteModelError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteModelError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteModelError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteModelError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteModelError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteModelError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteModelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteModelError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteModelError {}
#[derive(Debug, PartialEq)]
pub enum DeleteRequestValidatorError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteRequestValidatorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRequestValidatorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteRequestValidatorError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteRequestValidatorError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRequestValidatorError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteRequestValidatorError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteRequestValidatorError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteRequestValidatorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteRequestValidatorError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteRequestValidatorError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteRequestValidatorError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteRequestValidatorError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteRequestValidatorError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteRequestValidatorError {}
#[derive(Debug, PartialEq)]
pub enum DeleteResourceError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteResourceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteResourceError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteResourceError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteResourceError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteResourceError {}
#[derive(Debug, PartialEq)]
pub enum DeleteRestApiError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteRestApiError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRestApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteRestApiError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteRestApiError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteRestApiError {}
#[derive(Debug, PartialEq)]
pub enum DeleteStageError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteStageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteStageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteStageError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteStageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteStageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteStageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteStageError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteStageError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteStageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteStageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteStageError {}
#[derive(Debug, PartialEq)]
pub enum DeleteUsagePlanError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteUsagePlanError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUsagePlanError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteUsagePlanError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteUsagePlanError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUsagePlanError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteUsagePlanError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteUsagePlanError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteUsagePlanError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteUsagePlanError {}
#[derive(Debug, PartialEq)]
pub enum DeleteUsagePlanKeyError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteUsagePlanKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUsagePlanKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteUsagePlanKeyError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(DeleteUsagePlanKeyError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteUsagePlanKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteUsagePlanKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteUsagePlanKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteUsagePlanKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteUsagePlanKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanKeyError::Conflict(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanKeyError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteUsagePlanKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteUsagePlanKeyError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVpcLinkError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl DeleteVpcLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVpcLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVpcLinkError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVpcLinkError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteVpcLinkError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(DeleteVpcLinkError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVpcLinkError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVpcLinkError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVpcLinkError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVpcLinkError::TooManyRequests(ref cause) => write!(f, "{}", cause),
DeleteVpcLinkError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVpcLinkError {}
#[derive(Debug, PartialEq)]
pub enum FlushStageAuthorizersCacheError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl FlushStageAuthorizersCacheError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<FlushStageAuthorizersCacheError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(FlushStageAuthorizersCacheError::BadRequest(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(FlushStageAuthorizersCacheError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(FlushStageAuthorizersCacheError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(FlushStageAuthorizersCacheError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for FlushStageAuthorizersCacheError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
FlushStageAuthorizersCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
FlushStageAuthorizersCacheError::NotFound(ref cause) => write!(f, "{}", cause),
FlushStageAuthorizersCacheError::TooManyRequests(ref cause) => write!(f, "{}", cause),
FlushStageAuthorizersCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for FlushStageAuthorizersCacheError {}
#[derive(Debug, PartialEq)]
pub enum FlushStageCacheError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl FlushStageCacheError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<FlushStageCacheError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(FlushStageCacheError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(FlushStageCacheError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(FlushStageCacheError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(FlushStageCacheError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for FlushStageCacheError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
FlushStageCacheError::BadRequest(ref cause) => write!(f, "{}", cause),
FlushStageCacheError::NotFound(ref cause) => write!(f, "{}", cause),
FlushStageCacheError::TooManyRequests(ref cause) => write!(f, "{}", cause),
FlushStageCacheError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for FlushStageCacheError {}
#[derive(Debug, PartialEq)]
pub enum GenerateClientCertificateError {
LimitExceeded(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GenerateClientCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GenerateClientCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"LimitExceededException" => {
return RusotoError::Service(GenerateClientCertificateError::LimitExceeded(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(GenerateClientCertificateError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GenerateClientCertificateError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GenerateClientCertificateError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GenerateClientCertificateError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GenerateClientCertificateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GenerateClientCertificateError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GenerateClientCertificateError {}
#[derive(Debug, PartialEq)]
pub enum GetAccountError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetAccountError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetAccountError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetAccountError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAccountError::NotFound(ref cause) => write!(f, "{}", cause),
GetAccountError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetAccountError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAccountError {}
#[derive(Debug, PartialEq)]
pub enum GetApiKeyError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetApiKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetApiKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetApiKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetApiKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetApiKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
GetApiKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetApiKeyError {}
#[derive(Debug, PartialEq)]
pub enum GetApiKeysError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetApiKeysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiKeysError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetApiKeysError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetApiKeysError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetApiKeysError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetApiKeysError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetApiKeysError::BadRequest(ref cause) => write!(f, "{}", cause),
GetApiKeysError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetApiKeysError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetApiKeysError {}
#[derive(Debug, PartialEq)]
pub enum GetAuthorizerError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetAuthorizerError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAuthorizerError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAuthorizerError::NotFound(ref cause) => write!(f, "{}", cause),
GetAuthorizerError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetAuthorizerError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAuthorizerError {}
#[derive(Debug, PartialEq)]
pub enum GetAuthorizersError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetAuthorizersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetAuthorizersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetAuthorizersError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetAuthorizersError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetAuthorizersError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetAuthorizersError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetAuthorizersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetAuthorizersError::BadRequest(ref cause) => write!(f, "{}", cause),
GetAuthorizersError::NotFound(ref cause) => write!(f, "{}", cause),
GetAuthorizersError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetAuthorizersError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetAuthorizersError {}
#[derive(Debug, PartialEq)]
pub enum GetBasePathMappingError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetBasePathMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBasePathMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetBasePathMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetBasePathMappingError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetBasePathMappingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetBasePathMappingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetBasePathMappingError::NotFound(ref cause) => write!(f, "{}", cause),
GetBasePathMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetBasePathMappingError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetBasePathMappingError {}
#[derive(Debug, PartialEq)]
pub enum GetBasePathMappingsError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetBasePathMappingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBasePathMappingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetBasePathMappingsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetBasePathMappingsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetBasePathMappingsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetBasePathMappingsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetBasePathMappingsError::NotFound(ref cause) => write!(f, "{}", cause),
GetBasePathMappingsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetBasePathMappingsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetBasePathMappingsError {}
#[derive(Debug, PartialEq)]
pub enum GetClientCertificateError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetClientCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetClientCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetClientCertificateError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetClientCertificateError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetClientCertificateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetClientCertificateError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetClientCertificateError::NotFound(ref cause) => write!(f, "{}", cause),
GetClientCertificateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetClientCertificateError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetClientCertificateError {}
#[derive(Debug, PartialEq)]
pub enum GetClientCertificatesError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetClientCertificatesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetClientCertificatesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetClientCertificatesError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetClientCertificatesError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetClientCertificatesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetClientCertificatesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetClientCertificatesError::BadRequest(ref cause) => write!(f, "{}", cause),
GetClientCertificatesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetClientCertificatesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetClientCertificatesError {}
#[derive(Debug, PartialEq)]
pub enum GetDeploymentError {
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetDeploymentError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetDeploymentError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDeploymentError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDeploymentError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDeploymentError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDeploymentError::NotFound(ref cause) => write!(f, "{}", cause),
GetDeploymentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetDeploymentError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDeploymentError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDeploymentError {}
#[derive(Debug, PartialEq)]
pub enum GetDeploymentsError {
BadRequest(String),
ServiceUnavailable(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDeploymentsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDeploymentsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDeploymentsError::BadRequest(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetDeploymentsError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDeploymentsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDeploymentsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDeploymentsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDeploymentsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetDeploymentsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetDeploymentsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDeploymentsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDeploymentsError {}
#[derive(Debug, PartialEq)]
pub enum GetDocumentationPartError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDocumentationPartError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentationPartError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetDocumentationPartError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDocumentationPartError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDocumentationPartError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDocumentationPartError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDocumentationPartError::NotFound(ref cause) => write!(f, "{}", cause),
GetDocumentationPartError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDocumentationPartError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDocumentationPartError {}
#[derive(Debug, PartialEq)]
pub enum GetDocumentationPartsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDocumentationPartsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentationPartsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDocumentationPartsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetDocumentationPartsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDocumentationPartsError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDocumentationPartsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDocumentationPartsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDocumentationPartsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetDocumentationPartsError::NotFound(ref cause) => write!(f, "{}", cause),
GetDocumentationPartsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDocumentationPartsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDocumentationPartsError {}
#[derive(Debug, PartialEq)]
pub enum GetDocumentationVersionError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDocumentationVersionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentationVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetDocumentationVersionError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDocumentationVersionError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDocumentationVersionError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDocumentationVersionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDocumentationVersionError::NotFound(ref cause) => write!(f, "{}", cause),
GetDocumentationVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDocumentationVersionError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDocumentationVersionError {}
#[derive(Debug, PartialEq)]
pub enum GetDocumentationVersionsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDocumentationVersionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentationVersionsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDocumentationVersionsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetDocumentationVersionsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDocumentationVersionsError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDocumentationVersionsError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDocumentationVersionsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDocumentationVersionsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetDocumentationVersionsError::NotFound(ref cause) => write!(f, "{}", cause),
GetDocumentationVersionsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDocumentationVersionsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDocumentationVersionsError {}
#[derive(Debug, PartialEq)]
pub enum GetDomainNameError {
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDomainNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDomainNameError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetDomainNameError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(GetDomainNameError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDomainNameError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDomainNameError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDomainNameError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDomainNameError::NotFound(ref cause) => write!(f, "{}", cause),
GetDomainNameError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
GetDomainNameError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDomainNameError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDomainNameError {}
#[derive(Debug, PartialEq)]
pub enum GetDomainNamesError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetDomainNamesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDomainNamesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetDomainNamesError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDomainNamesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetDomainNamesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetDomainNamesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetDomainNamesError::BadRequest(ref cause) => write!(f, "{}", cause),
GetDomainNamesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetDomainNamesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetDomainNamesError {}
#[derive(Debug, PartialEq)]
pub enum GetExportError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetExportError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetExportError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetExportError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(GetExportError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetExportError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetExportError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetExportError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetExportError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetExportError::BadRequest(ref cause) => write!(f, "{}", cause),
GetExportError::Conflict(ref cause) => write!(f, "{}", cause),
GetExportError::NotFound(ref cause) => write!(f, "{}", cause),
GetExportError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetExportError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetExportError {}
#[derive(Debug, PartialEq)]
pub enum GetGatewayResponseError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetGatewayResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGatewayResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetGatewayResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetGatewayResponseError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetGatewayResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetGatewayResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetGatewayResponseError::NotFound(ref cause) => write!(f, "{}", cause),
GetGatewayResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetGatewayResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetGatewayResponseError {}
#[derive(Debug, PartialEq)]
pub enum GetGatewayResponsesError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetGatewayResponsesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetGatewayResponsesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetGatewayResponsesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetGatewayResponsesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetGatewayResponsesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetGatewayResponsesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetGatewayResponsesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetGatewayResponsesError::BadRequest(ref cause) => write!(f, "{}", cause),
GetGatewayResponsesError::NotFound(ref cause) => write!(f, "{}", cause),
GetGatewayResponsesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetGatewayResponsesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetGatewayResponsesError {}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetIntegrationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntegrationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetIntegrationError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetIntegrationError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetIntegrationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetIntegrationError::NotFound(ref cause) => write!(f, "{}", cause),
GetIntegrationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetIntegrationError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetIntegrationError {}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationResponseError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetIntegrationResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntegrationResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetIntegrationResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetIntegrationResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetIntegrationResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetIntegrationResponseError::NotFound(ref cause) => write!(f, "{}", cause),
GetIntegrationResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetIntegrationResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetIntegrationResponseError {}
#[derive(Debug, PartialEq)]
pub enum GetMethodError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetMethodError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMethodError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetMethodError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetMethodError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetMethodError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetMethodError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetMethodError::NotFound(ref cause) => write!(f, "{}", cause),
GetMethodError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetMethodError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetMethodError {}
#[derive(Debug, PartialEq)]
pub enum GetMethodResponseError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetMethodResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetMethodResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetMethodResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetMethodResponseError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetMethodResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetMethodResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetMethodResponseError::NotFound(ref cause) => write!(f, "{}", cause),
GetMethodResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetMethodResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetMethodResponseError {}
#[derive(Debug, PartialEq)]
pub enum GetModelError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetModelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetModelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetModelError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetModelError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetModelError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetModelError::NotFound(ref cause) => write!(f, "{}", cause),
GetModelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetModelError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetModelError {}
#[derive(Debug, PartialEq)]
pub enum GetModelTemplateError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetModelTemplateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetModelTemplateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetModelTemplateError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetModelTemplateError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetModelTemplateError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetModelTemplateError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetModelTemplateError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetModelTemplateError::BadRequest(ref cause) => write!(f, "{}", cause),
GetModelTemplateError::NotFound(ref cause) => write!(f, "{}", cause),
GetModelTemplateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetModelTemplateError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetModelTemplateError {}
#[derive(Debug, PartialEq)]
pub enum GetModelsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetModelsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetModelsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetModelsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetModelsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetModelsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetModelsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetModelsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetModelsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetModelsError::NotFound(ref cause) => write!(f, "{}", cause),
GetModelsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetModelsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetModelsError {}
#[derive(Debug, PartialEq)]
pub enum GetRequestValidatorError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetRequestValidatorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRequestValidatorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetRequestValidatorError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRequestValidatorError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetRequestValidatorError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRequestValidatorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRequestValidatorError::NotFound(ref cause) => write!(f, "{}", cause),
GetRequestValidatorError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetRequestValidatorError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRequestValidatorError {}
#[derive(Debug, PartialEq)]
pub enum GetRequestValidatorsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetRequestValidatorsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRequestValidatorsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRequestValidatorsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetRequestValidatorsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRequestValidatorsError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(GetRequestValidatorsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRequestValidatorsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRequestValidatorsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetRequestValidatorsError::NotFound(ref cause) => write!(f, "{}", cause),
GetRequestValidatorsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetRequestValidatorsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRequestValidatorsError {}
#[derive(Debug, PartialEq)]
pub enum GetResourceError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetResourceError::NotFound(ref cause) => write!(f, "{}", cause),
GetResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetResourceError {}
#[derive(Debug, PartialEq)]
pub enum GetResourcesError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetResourcesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourcesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetResourcesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetResourcesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetResourcesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetResourcesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetResourcesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetResourcesError::BadRequest(ref cause) => write!(f, "{}", cause),
GetResourcesError::NotFound(ref cause) => write!(f, "{}", cause),
GetResourcesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetResourcesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetResourcesError {}
#[derive(Debug, PartialEq)]
pub enum GetRestApiError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetRestApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRestApiError::NotFound(ref cause) => write!(f, "{}", cause),
GetRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRestApiError {}
#[derive(Debug, PartialEq)]
pub enum GetRestApisError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetRestApisError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRestApisError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRestApisError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRestApisError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetRestApisError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetRestApisError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetRestApisError::BadRequest(ref cause) => write!(f, "{}", cause),
GetRestApisError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetRestApisError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetRestApisError {}
#[derive(Debug, PartialEq)]
pub enum GetSdkError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetSdkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSdkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetSdkError::BadRequest(err.msg))
}
"ConflictException" => return RusotoError::Service(GetSdkError::Conflict(err.msg)),
"NotFoundException" => return RusotoError::Service(GetSdkError::NotFound(err.msg)),
"TooManyRequestsException" => {
return RusotoError::Service(GetSdkError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetSdkError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetSdkError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetSdkError::BadRequest(ref cause) => write!(f, "{}", cause),
GetSdkError::Conflict(ref cause) => write!(f, "{}", cause),
GetSdkError::NotFound(ref cause) => write!(f, "{}", cause),
GetSdkError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetSdkError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetSdkError {}
#[derive(Debug, PartialEq)]
pub enum GetSdkTypeError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetSdkTypeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSdkTypeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetSdkTypeError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetSdkTypeError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetSdkTypeError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetSdkTypeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetSdkTypeError::NotFound(ref cause) => write!(f, "{}", cause),
GetSdkTypeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetSdkTypeError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetSdkTypeError {}
#[derive(Debug, PartialEq)]
pub enum GetSdkTypesError {
TooManyRequests(String),
Unauthorized(String),
}
impl GetSdkTypesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSdkTypesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"TooManyRequestsException" => {
return RusotoError::Service(GetSdkTypesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetSdkTypesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetSdkTypesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetSdkTypesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetSdkTypesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetSdkTypesError {}
#[derive(Debug, PartialEq)]
pub enum GetStageError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetStageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetStageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetStageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetStageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetStageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetStageError::NotFound(ref cause) => write!(f, "{}", cause),
GetStageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetStageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetStageError {}
#[derive(Debug, PartialEq)]
pub enum GetStagesError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetStagesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetStagesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetStagesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetStagesError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetStagesError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetStagesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetStagesError::NotFound(ref cause) => write!(f, "{}", cause),
GetStagesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetStagesError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetStagesError {}
#[derive(Debug, PartialEq)]
pub enum GetTagsError {
BadRequest(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetTagsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetTagsError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(GetTagsError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetTagsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetTagsError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetTagsError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetTagsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetTagsError::BadRequest(ref cause) => write!(f, "{}", cause),
GetTagsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
GetTagsError::NotFound(ref cause) => write!(f, "{}", cause),
GetTagsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetTagsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetTagsError {}
#[derive(Debug, PartialEq)]
pub enum GetUsageError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetUsageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUsageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUsageError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUsageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUsageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetUsageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUsageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUsageError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUsageError::NotFound(ref cause) => write!(f, "{}", cause),
GetUsageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetUsageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUsageError {}
#[derive(Debug, PartialEq)]
pub enum GetUsagePlanError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetUsagePlanError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUsagePlanError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUsagePlanError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUsagePlanError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUsagePlanError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetUsagePlanError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUsagePlanError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUsagePlanError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUsagePlanError::NotFound(ref cause) => write!(f, "{}", cause),
GetUsagePlanError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetUsagePlanError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUsagePlanError {}
#[derive(Debug, PartialEq)]
pub enum GetUsagePlanKeyError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetUsagePlanKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUsagePlanKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUsagePlanKeyError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUsagePlanKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUsagePlanKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetUsagePlanKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUsagePlanKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUsagePlanKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeyError::NotFound(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUsagePlanKeyError {}
#[derive(Debug, PartialEq)]
pub enum GetUsagePlanKeysError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetUsagePlanKeysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUsagePlanKeysError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUsagePlanKeysError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUsagePlanKeysError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUsagePlanKeysError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetUsagePlanKeysError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUsagePlanKeysError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUsagePlanKeysError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeysError::NotFound(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeysError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetUsagePlanKeysError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUsagePlanKeysError {}
#[derive(Debug, PartialEq)]
pub enum GetUsagePlansError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetUsagePlansError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetUsagePlansError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetUsagePlansError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(GetUsagePlansError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetUsagePlansError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetUsagePlansError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetUsagePlansError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetUsagePlansError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetUsagePlansError::BadRequest(ref cause) => write!(f, "{}", cause),
GetUsagePlansError::Conflict(ref cause) => write!(f, "{}", cause),
GetUsagePlansError::NotFound(ref cause) => write!(f, "{}", cause),
GetUsagePlansError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetUsagePlansError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetUsagePlansError {}
#[derive(Debug, PartialEq)]
pub enum GetVpcLinkError {
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetVpcLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVpcLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetVpcLinkError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetVpcLinkError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetVpcLinkError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVpcLinkError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVpcLinkError::NotFound(ref cause) => write!(f, "{}", cause),
GetVpcLinkError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetVpcLinkError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetVpcLinkError {}
#[derive(Debug, PartialEq)]
pub enum GetVpcLinksError {
BadRequest(String),
TooManyRequests(String),
Unauthorized(String),
}
impl GetVpcLinksError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetVpcLinksError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetVpcLinksError::BadRequest(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetVpcLinksError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(GetVpcLinksError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for GetVpcLinksError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
GetVpcLinksError::BadRequest(ref cause) => write!(f, "{}", cause),
GetVpcLinksError::TooManyRequests(ref cause) => write!(f, "{}", cause),
GetVpcLinksError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for GetVpcLinksError {}
#[derive(Debug, PartialEq)]
pub enum ImportApiKeysError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ImportApiKeysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportApiKeysError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ImportApiKeysError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(ImportApiKeysError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ImportApiKeysError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ImportApiKeysError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ImportApiKeysError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ImportApiKeysError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ImportApiKeysError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ImportApiKeysError::BadRequest(ref cause) => write!(f, "{}", cause),
ImportApiKeysError::Conflict(ref cause) => write!(f, "{}", cause),
ImportApiKeysError::LimitExceeded(ref cause) => write!(f, "{}", cause),
ImportApiKeysError::NotFound(ref cause) => write!(f, "{}", cause),
ImportApiKeysError::TooManyRequests(ref cause) => write!(f, "{}", cause),
ImportApiKeysError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ImportApiKeysError {}
#[derive(Debug, PartialEq)]
pub enum ImportDocumentationPartsError {
BadRequest(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ImportDocumentationPartsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportDocumentationPartsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ImportDocumentationPartsError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ImportDocumentationPartsError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ImportDocumentationPartsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ImportDocumentationPartsError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(ImportDocumentationPartsError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ImportDocumentationPartsError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ImportDocumentationPartsError::BadRequest(ref cause) => write!(f, "{}", cause),
ImportDocumentationPartsError::LimitExceeded(ref cause) => write!(f, "{}", cause),
ImportDocumentationPartsError::NotFound(ref cause) => write!(f, "{}", cause),
ImportDocumentationPartsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
ImportDocumentationPartsError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ImportDocumentationPartsError {}
#[derive(Debug, PartialEq)]
pub enum ImportRestApiError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
TooManyRequests(String),
Unauthorized(String),
}
impl ImportRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ImportRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ImportRestApiError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(ImportRestApiError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(ImportRestApiError::LimitExceeded(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ImportRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(ImportRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ImportRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ImportRestApiError::BadRequest(ref cause) => write!(f, "{}", cause),
ImportRestApiError::Conflict(ref cause) => write!(f, "{}", cause),
ImportRestApiError::LimitExceeded(ref cause) => write!(f, "{}", cause),
ImportRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
ImportRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ImportRestApiError {}
#[derive(Debug, PartialEq)]
pub enum PutGatewayResponseError {
BadRequest(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutGatewayResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutGatewayResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutGatewayResponseError::BadRequest(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutGatewayResponseError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutGatewayResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutGatewayResponseError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(PutGatewayResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutGatewayResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutGatewayResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
PutGatewayResponseError::LimitExceeded(ref cause) => write!(f, "{}", cause),
PutGatewayResponseError::NotFound(ref cause) => write!(f, "{}", cause),
PutGatewayResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutGatewayResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutGatewayResponseError {}
#[derive(Debug, PartialEq)]
pub enum PutIntegrationError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutIntegrationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutIntegrationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutIntegrationError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutIntegrationError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutIntegrationError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(PutIntegrationError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutIntegrationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutIntegrationError::BadRequest(ref cause) => write!(f, "{}", cause),
PutIntegrationError::Conflict(ref cause) => write!(f, "{}", cause),
PutIntegrationError::NotFound(ref cause) => write!(f, "{}", cause),
PutIntegrationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutIntegrationError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutIntegrationError {}
#[derive(Debug, PartialEq)]
pub enum PutIntegrationResponseError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutIntegrationResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutIntegrationResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutIntegrationResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutIntegrationResponseError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutIntegrationResponseError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(PutIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutIntegrationResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(PutIntegrationResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutIntegrationResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutIntegrationResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
PutIntegrationResponseError::Conflict(ref cause) => write!(f, "{}", cause),
PutIntegrationResponseError::LimitExceeded(ref cause) => write!(f, "{}", cause),
PutIntegrationResponseError::NotFound(ref cause) => write!(f, "{}", cause),
PutIntegrationResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutIntegrationResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutIntegrationResponseError {}
#[derive(Debug, PartialEq)]
pub enum PutMethodError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutMethodError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutMethodError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutMethodError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutMethodError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutMethodError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutMethodError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutMethodError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(PutMethodError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutMethodError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutMethodError::BadRequest(ref cause) => write!(f, "{}", cause),
PutMethodError::Conflict(ref cause) => write!(f, "{}", cause),
PutMethodError::LimitExceeded(ref cause) => write!(f, "{}", cause),
PutMethodError::NotFound(ref cause) => write!(f, "{}", cause),
PutMethodError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutMethodError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutMethodError {}
#[derive(Debug, PartialEq)]
pub enum PutMethodResponseError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutMethodResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutMethodResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutMethodResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutMethodResponseError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutMethodResponseError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutMethodResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutMethodResponseError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(PutMethodResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutMethodResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutMethodResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
PutMethodResponseError::Conflict(ref cause) => write!(f, "{}", cause),
PutMethodResponseError::LimitExceeded(ref cause) => write!(f, "{}", cause),
PutMethodResponseError::NotFound(ref cause) => write!(f, "{}", cause),
PutMethodResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutMethodResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutMethodResponseError {}
#[derive(Debug, PartialEq)]
pub enum PutRestApiError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl PutRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<PutRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(PutRestApiError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(PutRestApiError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(PutRestApiError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(PutRestApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(PutRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(PutRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for PutRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
PutRestApiError::BadRequest(ref cause) => write!(f, "{}", cause),
PutRestApiError::Conflict(ref cause) => write!(f, "{}", cause),
PutRestApiError::LimitExceeded(ref cause) => write!(f, "{}", cause),
PutRestApiError::NotFound(ref cause) => write!(f, "{}", cause),
PutRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
PutRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for PutRestApiError {}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TagResourceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(TagResourceError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TagResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(TagResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(TagResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
TagResourceError::Conflict(ref cause) => write!(f, "{}", cause),
TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
TagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
TagResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagResourceError {}
#[derive(Debug, PartialEq)]
pub enum TestInvokeAuthorizerError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl TestInvokeAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestInvokeAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TestInvokeAuthorizerError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TestInvokeAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(TestInvokeAuthorizerError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(TestInvokeAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TestInvokeAuthorizerError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TestInvokeAuthorizerError::BadRequest(ref cause) => write!(f, "{}", cause),
TestInvokeAuthorizerError::NotFound(ref cause) => write!(f, "{}", cause),
TestInvokeAuthorizerError::TooManyRequests(ref cause) => write!(f, "{}", cause),
TestInvokeAuthorizerError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TestInvokeAuthorizerError {}
#[derive(Debug, PartialEq)]
pub enum TestInvokeMethodError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl TestInvokeMethodError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestInvokeMethodError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TestInvokeMethodError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TestInvokeMethodError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(TestInvokeMethodError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(TestInvokeMethodError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TestInvokeMethodError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TestInvokeMethodError::BadRequest(ref cause) => write!(f, "{}", cause),
TestInvokeMethodError::NotFound(ref cause) => write!(f, "{}", cause),
TestInvokeMethodError::TooManyRequests(ref cause) => write!(f, "{}", cause),
TestInvokeMethodError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TestInvokeMethodError {}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UntagResourceError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UntagResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UntagResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UntagResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagResourceError::Conflict(ref cause) => write!(f, "{}", cause),
UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
UntagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UntagResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UpdateAccountError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateAccountError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAccountError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateAccountError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAccountError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateAccountError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateAccountError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateAccountError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateAccountError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateAccountError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateAccountError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateAccountError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateAccountError {}
#[derive(Debug, PartialEq)]
pub enum UpdateApiKeyError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateApiKeyError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApiKeyError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateApiKeyError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateApiKeyError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateApiKeyError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateApiKeyError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateApiKeyError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateApiKeyError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateApiKeyError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateApiKeyError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateApiKeyError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateApiKeyError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateApiKeyError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateApiKeyError {}
#[derive(Debug, PartialEq)]
pub enum UpdateAuthorizerError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateAuthorizerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAuthorizerError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateAuthorizerError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateAuthorizerError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateAuthorizerError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateAuthorizerError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateAuthorizerError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateAuthorizerError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateAuthorizerError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateAuthorizerError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateAuthorizerError {}
#[derive(Debug, PartialEq)]
pub enum UpdateBasePathMappingError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateBasePathMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBasePathMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateBasePathMappingError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateBasePathMappingError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateBasePathMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateBasePathMappingError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateBasePathMappingError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateBasePathMappingError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateBasePathMappingError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateBasePathMappingError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateBasePathMappingError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateBasePathMappingError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateBasePathMappingError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateBasePathMappingError {}
#[derive(Debug, PartialEq)]
pub enum UpdateClientCertificateError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateClientCertificateError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateClientCertificateError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateClientCertificateError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateClientCertificateError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateClientCertificateError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateClientCertificateError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateClientCertificateError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateClientCertificateError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateClientCertificateError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateClientCertificateError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateClientCertificateError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateClientCertificateError {}
#[derive(Debug, PartialEq)]
pub enum UpdateDeploymentError {
BadRequest(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDeploymentError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDeploymentError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateDeploymentError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDeploymentError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateDeploymentError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDeploymentError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateDeploymentError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateDeploymentError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateDeploymentError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateDeploymentError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateDeploymentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateDeploymentError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateDeploymentError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateDeploymentError {}
#[derive(Debug, PartialEq)]
pub enum UpdateDocumentationPartError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDocumentationPartError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDocumentationPartError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateDocumentationPartError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateDocumentationPartError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateDocumentationPartError::LimitExceeded(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDocumentationPartError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDocumentationPartError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateDocumentationPartError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateDocumentationPartError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateDocumentationPartError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateDocumentationPartError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateDocumentationPartError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateDocumentationPartError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateDocumentationPartError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateDocumentationPartError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateDocumentationPartError {}
#[derive(Debug, PartialEq)]
pub enum UpdateDocumentationVersionError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDocumentationVersionError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateDocumentationVersionError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateDocumentationVersionError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(UpdateDocumentationVersionError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDocumentationVersionError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDocumentationVersionError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateDocumentationVersionError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateDocumentationVersionError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateDocumentationVersionError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateDocumentationVersionError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateDocumentationVersionError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateDocumentationVersionError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateDocumentationVersionError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateDocumentationVersionError {}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainNameError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateDomainNameError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDomainNameError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateDomainNameError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateDomainNameError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDomainNameError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDomainNameError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateDomainNameError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateDomainNameError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateDomainNameError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateDomainNameError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateDomainNameError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateDomainNameError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateDomainNameError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateDomainNameError {}
#[derive(Debug, PartialEq)]
pub enum UpdateGatewayResponseError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateGatewayResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGatewayResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateGatewayResponseError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateGatewayResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateGatewayResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateGatewayResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateGatewayResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateGatewayResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateGatewayResponseError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateGatewayResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateGatewayResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateGatewayResponseError {}
#[derive(Debug, PartialEq)]
pub enum UpdateIntegrationError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateIntegrationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateIntegrationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateIntegrationError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateIntegrationError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateIntegrationError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateIntegrationError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateIntegrationError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateIntegrationError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateIntegrationError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateIntegrationError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateIntegrationError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateIntegrationError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateIntegrationError {}
#[derive(Debug, PartialEq)]
pub enum UpdateIntegrationResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateIntegrationResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateIntegrationResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateIntegrationResponseError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(UpdateIntegrationResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateIntegrationResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateIntegrationResponseError::Unauthorized(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateIntegrationResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateIntegrationResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateIntegrationResponseError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateIntegrationResponseError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateIntegrationResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateIntegrationResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateIntegrationResponseError {}
#[derive(Debug, PartialEq)]
pub enum UpdateMethodError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateMethodError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateMethodError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateMethodError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateMethodError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateMethodError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateMethodError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateMethodError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateMethodError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateMethodError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateMethodError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateMethodError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateMethodError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateMethodError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateMethodError {}
#[derive(Debug, PartialEq)]
pub enum UpdateMethodResponseError {
BadRequest(String),
Conflict(String),
LimitExceeded(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateMethodResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateMethodResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateMethodResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateMethodResponseError::Conflict(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateMethodResponseError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateMethodResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateMethodResponseError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateMethodResponseError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateMethodResponseError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateMethodResponseError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateMethodResponseError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateMethodResponseError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateMethodResponseError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateMethodResponseError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateMethodResponseError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateMethodResponseError {}
#[derive(Debug, PartialEq)]
pub enum UpdateModelError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateModelError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateModelError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateModelError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateModelError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateModelError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateModelError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateModelError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateModelError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateModelError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateModelError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateModelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateModelError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateModelError {}
#[derive(Debug, PartialEq)]
pub enum UpdateRequestValidatorError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateRequestValidatorError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRequestValidatorError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRequestValidatorError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRequestValidatorError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateRequestValidatorError::TooManyRequests(
err.msg,
))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateRequestValidatorError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateRequestValidatorError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateRequestValidatorError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateRequestValidatorError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateRequestValidatorError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateRequestValidatorError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateRequestValidatorError {}
#[derive(Debug, PartialEq)]
pub enum UpdateResourceError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateResourceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateResourceError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateResourceError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateResourceError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateResourceError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateResourceError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateResourceError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateResourceError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateResourceError {}
#[derive(Debug, PartialEq)]
pub enum UpdateRestApiError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateRestApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRestApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRestApiError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateRestApiError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRestApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateRestApiError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateRestApiError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateRestApiError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateRestApiError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateRestApiError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateRestApiError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateRestApiError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateRestApiError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateRestApiError {}
#[derive(Debug, PartialEq)]
pub enum UpdateStageError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateStageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateStageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateStageError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateStageError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateStageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateStageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateStageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateStageError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateStageError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateStageError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateStageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateStageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateStageError {}
#[derive(Debug, PartialEq)]
pub enum UpdateUsageError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateUsageError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUsageError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateUsageError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateUsageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUsageError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateUsageError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateUsageError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateUsageError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateUsageError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateUsageError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateUsageError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateUsageError {}
#[derive(Debug, PartialEq)]
pub enum UpdateUsagePlanError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateUsagePlanError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUsagePlanError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateUsagePlanError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateUsagePlanError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateUsagePlanError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateUsagePlanError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateUsagePlanError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateUsagePlanError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateUsagePlanError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateUsagePlanError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateUsagePlanError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateUsagePlanError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateUsagePlanError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateUsagePlanError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVpcLinkError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
Unauthorized(String),
}
impl UpdateVpcLinkError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVpcLinkError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVpcLinkError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateVpcLinkError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVpcLinkError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateVpcLinkError::TooManyRequests(err.msg))
}
"UnauthorizedException" => {
return RusotoError::Service(UpdateVpcLinkError::Unauthorized(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVpcLinkError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVpcLinkError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVpcLinkError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVpcLinkError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVpcLinkError::TooManyRequests(ref cause) => write!(f, "{}", cause),
UpdateVpcLinkError::Unauthorized(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVpcLinkError {}
#[async_trait]
pub trait ApiGateway {
async fn create_api_key(
&self,
input: CreateApiKeyRequest,
) -> Result<ApiKey, RusotoError<CreateApiKeyError>>;
async fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> Result<Authorizer, RusotoError<CreateAuthorizerError>>;
async fn create_base_path_mapping(
&self,
input: CreateBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<CreateBasePathMappingError>>;
async fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> Result<Deployment, RusotoError<CreateDeploymentError>>;
async fn create_documentation_part(
&self,
input: CreateDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<CreateDocumentationPartError>>;
async fn create_documentation_version(
&self,
input: CreateDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<CreateDocumentationVersionError>>;
async fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> Result<DomainName, RusotoError<CreateDomainNameError>>;
async fn create_model(
&self,
input: CreateModelRequest,
) -> Result<Model, RusotoError<CreateModelError>>;
async fn create_request_validator(
&self,
input: CreateRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<CreateRequestValidatorError>>;
async fn create_resource(
&self,
input: CreateResourceRequest,
) -> Result<Resource, RusotoError<CreateResourceError>>;
async fn create_rest_api(
&self,
input: CreateRestApiRequest,
) -> Result<RestApi, RusotoError<CreateRestApiError>>;
async fn create_stage(
&self,
input: CreateStageRequest,
) -> Result<Stage, RusotoError<CreateStageError>>;
async fn create_usage_plan(
&self,
input: CreateUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<CreateUsagePlanError>>;
async fn create_usage_plan_key(
&self,
input: CreateUsagePlanKeyRequest,
) -> Result<UsagePlanKey, RusotoError<CreateUsagePlanKeyError>>;
async fn create_vpc_link(
&self,
input: CreateVpcLinkRequest,
) -> Result<VpcLink, RusotoError<CreateVpcLinkError>>;
async fn delete_api_key(
&self,
input: DeleteApiKeyRequest,
) -> Result<(), RusotoError<DeleteApiKeyError>>;
async fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> Result<(), RusotoError<DeleteAuthorizerError>>;
async fn delete_base_path_mapping(
&self,
input: DeleteBasePathMappingRequest,
) -> Result<(), RusotoError<DeleteBasePathMappingError>>;
async fn delete_client_certificate(
&self,
input: DeleteClientCertificateRequest,
) -> Result<(), RusotoError<DeleteClientCertificateError>>;
async fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> Result<(), RusotoError<DeleteDeploymentError>>;
async fn delete_documentation_part(
&self,
input: DeleteDocumentationPartRequest,
) -> Result<(), RusotoError<DeleteDocumentationPartError>>;
async fn delete_documentation_version(
&self,
input: DeleteDocumentationVersionRequest,
) -> Result<(), RusotoError<DeleteDocumentationVersionError>>;
async fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> Result<(), RusotoError<DeleteDomainNameError>>;
async fn delete_gateway_response(
&self,
input: DeleteGatewayResponseRequest,
) -> Result<(), RusotoError<DeleteGatewayResponseError>>;
async fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> Result<(), RusotoError<DeleteIntegrationError>>;
async fn delete_integration_response(
&self,
input: DeleteIntegrationResponseRequest,
) -> Result<(), RusotoError<DeleteIntegrationResponseError>>;
async fn delete_method(
&self,
input: DeleteMethodRequest,
) -> Result<(), RusotoError<DeleteMethodError>>;
async fn delete_method_response(
&self,
input: DeleteMethodResponseRequest,
) -> Result<(), RusotoError<DeleteMethodResponseError>>;
async fn delete_model(
&self,
input: DeleteModelRequest,
) -> Result<(), RusotoError<DeleteModelError>>;
async fn delete_request_validator(
&self,
input: DeleteRequestValidatorRequest,
) -> Result<(), RusotoError<DeleteRequestValidatorError>>;
async fn delete_resource(
&self,
input: DeleteResourceRequest,
) -> Result<(), RusotoError<DeleteResourceError>>;
async fn delete_rest_api(
&self,
input: DeleteRestApiRequest,
) -> Result<(), RusotoError<DeleteRestApiError>>;
async fn delete_stage(
&self,
input: DeleteStageRequest,
) -> Result<(), RusotoError<DeleteStageError>>;
async fn delete_usage_plan(
&self,
input: DeleteUsagePlanRequest,
) -> Result<(), RusotoError<DeleteUsagePlanError>>;
async fn delete_usage_plan_key(
&self,
input: DeleteUsagePlanKeyRequest,
) -> Result<(), RusotoError<DeleteUsagePlanKeyError>>;
async fn delete_vpc_link(
&self,
input: DeleteVpcLinkRequest,
) -> Result<(), RusotoError<DeleteVpcLinkError>>;
async fn flush_stage_authorizers_cache(
&self,
input: FlushStageAuthorizersCacheRequest,
) -> Result<(), RusotoError<FlushStageAuthorizersCacheError>>;
async fn flush_stage_cache(
&self,
input: FlushStageCacheRequest,
) -> Result<(), RusotoError<FlushStageCacheError>>;
async fn generate_client_certificate(
&self,
input: GenerateClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<GenerateClientCertificateError>>;
async fn get_account(&self) -> Result<Account, RusotoError<GetAccountError>>;
async fn get_api_key(
&self,
input: GetApiKeyRequest,
) -> Result<ApiKey, RusotoError<GetApiKeyError>>;
async fn get_api_keys(
&self,
input: GetApiKeysRequest,
) -> Result<ApiKeys, RusotoError<GetApiKeysError>>;
async fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> Result<Authorizer, RusotoError<GetAuthorizerError>>;
async fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> Result<Authorizers, RusotoError<GetAuthorizersError>>;
async fn get_base_path_mapping(
&self,
input: GetBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<GetBasePathMappingError>>;
async fn get_base_path_mappings(
&self,
input: GetBasePathMappingsRequest,
) -> Result<BasePathMappings, RusotoError<GetBasePathMappingsError>>;
async fn get_client_certificate(
&self,
input: GetClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<GetClientCertificateError>>;
async fn get_client_certificates(
&self,
input: GetClientCertificatesRequest,
) -> Result<ClientCertificates, RusotoError<GetClientCertificatesError>>;
async fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> Result<Deployment, RusotoError<GetDeploymentError>>;
async fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> Result<Deployments, RusotoError<GetDeploymentsError>>;
async fn get_documentation_part(
&self,
input: GetDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<GetDocumentationPartError>>;
async fn get_documentation_parts(
&self,
input: GetDocumentationPartsRequest,
) -> Result<DocumentationParts, RusotoError<GetDocumentationPartsError>>;
async fn get_documentation_version(
&self,
input: GetDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<GetDocumentationVersionError>>;
async fn get_documentation_versions(
&self,
input: GetDocumentationVersionsRequest,
) -> Result<DocumentationVersions, RusotoError<GetDocumentationVersionsError>>;
async fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> Result<DomainName, RusotoError<GetDomainNameError>>;
async fn get_domain_names(
&self,
input: GetDomainNamesRequest,
) -> Result<DomainNames, RusotoError<GetDomainNamesError>>;
async fn get_export(
&self,
input: GetExportRequest,
) -> Result<ExportResponse, RusotoError<GetExportError>>;
async fn get_gateway_response(
&self,
input: GetGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<GetGatewayResponseError>>;
async fn get_gateway_responses(
&self,
input: GetGatewayResponsesRequest,
) -> Result<GatewayResponses, RusotoError<GetGatewayResponsesError>>;
async fn get_integration(
&self,
input: GetIntegrationRequest,
) -> Result<Integration, RusotoError<GetIntegrationError>>;
async fn get_integration_response(
&self,
input: GetIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<GetIntegrationResponseError>>;
async fn get_method(
&self,
input: GetMethodRequest,
) -> Result<Method, RusotoError<GetMethodError>>;
async fn get_method_response(
&self,
input: GetMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<GetMethodResponseError>>;
async fn get_model(&self, input: GetModelRequest) -> Result<Model, RusotoError<GetModelError>>;
async fn get_model_template(
&self,
input: GetModelTemplateRequest,
) -> Result<Template, RusotoError<GetModelTemplateError>>;
async fn get_models(
&self,
input: GetModelsRequest,
) -> Result<Models, RusotoError<GetModelsError>>;
async fn get_request_validator(
&self,
input: GetRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<GetRequestValidatorError>>;
async fn get_request_validators(
&self,
input: GetRequestValidatorsRequest,
) -> Result<RequestValidators, RusotoError<GetRequestValidatorsError>>;
async fn get_resource(
&self,
input: GetResourceRequest,
) -> Result<Resource, RusotoError<GetResourceError>>;
async fn get_resources(
&self,
input: GetResourcesRequest,
) -> Result<Resources, RusotoError<GetResourcesError>>;
async fn get_rest_api(
&self,
input: GetRestApiRequest,
) -> Result<RestApi, RusotoError<GetRestApiError>>;
async fn get_rest_apis(
&self,
input: GetRestApisRequest,
) -> Result<RestApis, RusotoError<GetRestApisError>>;
async fn get_sdk(&self, input: GetSdkRequest) -> Result<SdkResponse, RusotoError<GetSdkError>>;
async fn get_sdk_type(
&self,
input: GetSdkTypeRequest,
) -> Result<SdkType, RusotoError<GetSdkTypeError>>;
async fn get_sdk_types(
&self,
input: GetSdkTypesRequest,
) -> Result<SdkTypes, RusotoError<GetSdkTypesError>>;
async fn get_stage(&self, input: GetStageRequest) -> Result<Stage, RusotoError<GetStageError>>;
async fn get_stages(
&self,
input: GetStagesRequest,
) -> Result<Stages, RusotoError<GetStagesError>>;
async fn get_tags(&self, input: GetTagsRequest) -> Result<Tags, RusotoError<GetTagsError>>;
async fn get_usage(&self, input: GetUsageRequest) -> Result<Usage, RusotoError<GetUsageError>>;
async fn get_usage_plan(
&self,
input: GetUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<GetUsagePlanError>>;
async fn get_usage_plan_key(
&self,
input: GetUsagePlanKeyRequest,
) -> Result<UsagePlanKey, RusotoError<GetUsagePlanKeyError>>;
async fn get_usage_plan_keys(
&self,
input: GetUsagePlanKeysRequest,
) -> Result<UsagePlanKeys, RusotoError<GetUsagePlanKeysError>>;
async fn get_usage_plans(
&self,
input: GetUsagePlansRequest,
) -> Result<UsagePlans, RusotoError<GetUsagePlansError>>;
async fn get_vpc_link(
&self,
input: GetVpcLinkRequest,
) -> Result<VpcLink, RusotoError<GetVpcLinkError>>;
async fn get_vpc_links(
&self,
input: GetVpcLinksRequest,
) -> Result<VpcLinks, RusotoError<GetVpcLinksError>>;
async fn import_api_keys(
&self,
input: ImportApiKeysRequest,
) -> Result<ApiKeyIds, RusotoError<ImportApiKeysError>>;
async fn import_documentation_parts(
&self,
input: ImportDocumentationPartsRequest,
) -> Result<DocumentationPartIds, RusotoError<ImportDocumentationPartsError>>;
async fn import_rest_api(
&self,
input: ImportRestApiRequest,
) -> Result<RestApi, RusotoError<ImportRestApiError>>;
async fn put_gateway_response(
&self,
input: PutGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<PutGatewayResponseError>>;
async fn put_integration(
&self,
input: PutIntegrationRequest,
) -> Result<Integration, RusotoError<PutIntegrationError>>;
async fn put_integration_response(
&self,
input: PutIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<PutIntegrationResponseError>>;
async fn put_method(
&self,
input: PutMethodRequest,
) -> Result<Method, RusotoError<PutMethodError>>;
async fn put_method_response(
&self,
input: PutMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<PutMethodResponseError>>;
async fn put_rest_api(
&self,
input: PutRestApiRequest,
) -> Result<RestApi, RusotoError<PutRestApiError>>;
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>>;
async fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> Result<TestInvokeAuthorizerResponse, RusotoError<TestInvokeAuthorizerError>>;
async fn test_invoke_method(
&self,
input: TestInvokeMethodRequest,
) -> Result<TestInvokeMethodResponse, RusotoError<TestInvokeMethodError>>;
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>>;
async fn update_account(
&self,
input: UpdateAccountRequest,
) -> Result<Account, RusotoError<UpdateAccountError>>;
async fn update_api_key(
&self,
input: UpdateApiKeyRequest,
) -> Result<ApiKey, RusotoError<UpdateApiKeyError>>;
async fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> Result<Authorizer, RusotoError<UpdateAuthorizerError>>;
async fn update_base_path_mapping(
&self,
input: UpdateBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<UpdateBasePathMappingError>>;
async fn update_client_certificate(
&self,
input: UpdateClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<UpdateClientCertificateError>>;
async fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> Result<Deployment, RusotoError<UpdateDeploymentError>>;
async fn update_documentation_part(
&self,
input: UpdateDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<UpdateDocumentationPartError>>;
async fn update_documentation_version(
&self,
input: UpdateDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<UpdateDocumentationVersionError>>;
async fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> Result<DomainName, RusotoError<UpdateDomainNameError>>;
async fn update_gateway_response(
&self,
input: UpdateGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<UpdateGatewayResponseError>>;
async fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> Result<Integration, RusotoError<UpdateIntegrationError>>;
async fn update_integration_response(
&self,
input: UpdateIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<UpdateIntegrationResponseError>>;
async fn update_method(
&self,
input: UpdateMethodRequest,
) -> Result<Method, RusotoError<UpdateMethodError>>;
async fn update_method_response(
&self,
input: UpdateMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<UpdateMethodResponseError>>;
async fn update_model(
&self,
input: UpdateModelRequest,
) -> Result<Model, RusotoError<UpdateModelError>>;
async fn update_request_validator(
&self,
input: UpdateRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<UpdateRequestValidatorError>>;
async fn update_resource(
&self,
input: UpdateResourceRequest,
) -> Result<Resource, RusotoError<UpdateResourceError>>;
async fn update_rest_api(
&self,
input: UpdateRestApiRequest,
) -> Result<RestApi, RusotoError<UpdateRestApiError>>;
async fn update_stage(
&self,
input: UpdateStageRequest,
) -> Result<Stage, RusotoError<UpdateStageError>>;
async fn update_usage(
&self,
input: UpdateUsageRequest,
) -> Result<Usage, RusotoError<UpdateUsageError>>;
async fn update_usage_plan(
&self,
input: UpdateUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<UpdateUsagePlanError>>;
async fn update_vpc_link(
&self,
input: UpdateVpcLinkRequest,
) -> Result<VpcLink, RusotoError<UpdateVpcLinkError>>;
}
#[derive(Clone)]
pub struct ApiGatewayClient {
client: Client,
region: region::Region,
}
impl ApiGatewayClient {
pub fn new(region: region::Region) -> ApiGatewayClient {
ApiGatewayClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ApiGatewayClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
ApiGatewayClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> ApiGatewayClient {
ApiGatewayClient { client, region }
}
}
#[async_trait]
impl ApiGateway for ApiGatewayClient {
async fn create_api_key(
&self,
input: CreateApiKeyRequest,
) -> Result<ApiKey, RusotoError<CreateApiKeyError>> {
let request_uri = "/apikeys";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateApiKeyError::from_response(response))
}
}
async fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> Result<Authorizer, RusotoError<CreateAuthorizerError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Authorizer, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateAuthorizerError::from_response(response))
}
}
async fn create_base_path_mapping(
&self,
input: CreateBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<CreateBasePathMappingError>> {
let request_uri = format!(
"/domainnames/{domain_name}/basepathmappings",
domain_name = input.domain_name
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<BasePathMapping, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateBasePathMappingError::from_response(response))
}
}
async fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> Result<Deployment, RusotoError<CreateDeploymentError>> {
let request_uri = format!(
"/restapis/{restapi_id}/deployments",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Deployment, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateDeploymentError::from_response(response))
}
}
async fn create_documentation_part(
&self,
input: CreateDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<CreateDocumentationPartError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateDocumentationPartError::from_response(response))
}
}
async fn create_documentation_version(
&self,
input: CreateDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<CreateDocumentationVersionError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/versions",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateDocumentationVersionError::from_response(response))
}
}
async fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> Result<DomainName, RusotoError<CreateDomainNameError>> {
let request_uri = "/domainnames";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<DomainName, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateDomainNameError::from_response(response))
}
}
async fn create_model(
&self,
input: CreateModelRequest,
) -> Result<Model, RusotoError<CreateModelError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateModelError::from_response(response))
}
}
async fn create_request_validator(
&self,
input: CreateRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<CreateRequestValidatorError>> {
let request_uri = format!(
"/restapis/{restapi_id}/requestvalidators",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateRequestValidatorError::from_response(response))
}
}
async fn create_resource(
&self,
input: CreateResourceRequest,
) -> Result<Resource, RusotoError<CreateResourceError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{parent_id}",
parent_id = input.parent_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Resource, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateResourceError::from_response(response))
}
}
async fn create_rest_api(
&self,
input: CreateRestApiRequest,
) -> Result<RestApi, RusotoError<CreateRestApiError>> {
let request_uri = "/restapis";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateRestApiError::from_response(response))
}
}
async fn create_stage(
&self,
input: CreateStageRequest,
) -> Result<Stage, RusotoError<CreateStageError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateStageError::from_response(response))
}
}
async fn create_usage_plan(
&self,
input: CreateUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<CreateUsagePlanError>> {
let request_uri = "/usageplans";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlan, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateUsagePlanError::from_response(response))
}
}
async fn create_usage_plan_key(
&self,
input: CreateUsagePlanKeyRequest,
) -> Result<UsagePlanKey, RusotoError<CreateUsagePlanKeyError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/keys",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlanKey, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateUsagePlanKeyError::from_response(response))
}
}
async fn create_vpc_link(
&self,
input: CreateVpcLinkRequest,
) -> Result<VpcLink, RusotoError<CreateVpcLinkError>> {
let request_uri = "/vpclinks";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVpcLinkError::from_response(response))
}
}
async fn delete_api_key(
&self,
input: DeleteApiKeyRequest,
) -> Result<(), RusotoError<DeleteApiKeyError>> {
let request_uri = format!("/apikeys/{api_key}", api_key = input.api_key);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteApiKeyError::from_response(response))
}
}
async fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> Result<(), RusotoError<DeleteAuthorizerError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers/{authorizer_id}",
authorizer_id = input.authorizer_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteAuthorizerError::from_response(response))
}
}
async fn delete_base_path_mapping(
&self,
input: DeleteBasePathMappingRequest,
) -> Result<(), RusotoError<DeleteBasePathMappingError>> {
let request_uri = format!(
"/domainnames/{domain_name}/basepathmappings/{base_path}",
base_path = input.base_path,
domain_name = input.domain_name
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteBasePathMappingError::from_response(response))
}
}
async fn delete_client_certificate(
&self,
input: DeleteClientCertificateRequest,
) -> Result<(), RusotoError<DeleteClientCertificateError>> {
let request_uri = format!(
"/clientcertificates/{clientcertificate_id}",
clientcertificate_id = input.client_certificate_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteClientCertificateError::from_response(response))
}
}
async fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> Result<(), RusotoError<DeleteDeploymentError>> {
let request_uri = format!(
"/restapis/{restapi_id}/deployments/{deployment_id}",
deployment_id = input.deployment_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteDeploymentError::from_response(response))
}
}
async fn delete_documentation_part(
&self,
input: DeleteDocumentationPartRequest,
) -> Result<(), RusotoError<DeleteDocumentationPartError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts/{part_id}",
part_id = input.documentation_part_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteDocumentationPartError::from_response(response))
}
}
async fn delete_documentation_version(
&self,
input: DeleteDocumentationVersionRequest,
) -> Result<(), RusotoError<DeleteDocumentationVersionError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/versions/{doc_version}",
doc_version = input.documentation_version,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteDocumentationVersionError::from_response(response))
}
}
async fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> Result<(), RusotoError<DeleteDomainNameError>> {
let request_uri = format!(
"/domainnames/{domain_name}",
domain_name = input.domain_name
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteDomainNameError::from_response(response))
}
}
async fn delete_gateway_response(
&self,
input: DeleteGatewayResponseRequest,
) -> Result<(), RusotoError<DeleteGatewayResponseError>> {
let request_uri = format!(
"/restapis/{restapi_id}/gatewayresponses/{response_type}",
response_type = input.response_type,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteGatewayResponseError::from_response(response))
}
}
async fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> Result<(), RusotoError<DeleteIntegrationError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteIntegrationError::from_response(response))
}
}
async fn delete_integration_response(
&self,
input: DeleteIntegrationResponseRequest,
) -> Result<(), RusotoError<DeleteIntegrationResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteIntegrationResponseError::from_response(response))
}
}
async fn delete_method(
&self,
input: DeleteMethodRequest,
) -> Result<(), RusotoError<DeleteMethodError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMethodError::from_response(response))
}
}
async fn delete_method_response(
&self,
input: DeleteMethodResponseRequest,
) -> Result<(), RusotoError<DeleteMethodResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMethodResponseError::from_response(response))
}
}
async fn delete_model(
&self,
input: DeleteModelRequest,
) -> Result<(), RusotoError<DeleteModelError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models/{model_name}",
model_name = input.model_name,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteModelError::from_response(response))
}
}
async fn delete_request_validator(
&self,
input: DeleteRequestValidatorRequest,
) -> Result<(), RusotoError<DeleteRequestValidatorError>> {
let request_uri = format!(
"/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}",
requestvalidator_id = input.request_validator_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteRequestValidatorError::from_response(response))
}
}
async fn delete_resource(
&self,
input: DeleteResourceRequest,
) -> Result<(), RusotoError<DeleteResourceError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}",
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteResourceError::from_response(response))
}
}
async fn delete_rest_api(
&self,
input: DeleteRestApiRequest,
) -> Result<(), RusotoError<DeleteRestApiError>> {
let request_uri = format!("/restapis/{restapi_id}", restapi_id = input.rest_api_id);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteRestApiError::from_response(response))
}
}
async fn delete_stage(
&self,
input: DeleteStageRequest,
) -> Result<(), RusotoError<DeleteStageError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}",
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteStageError::from_response(response))
}
}
async fn delete_usage_plan(
&self,
input: DeleteUsagePlanRequest,
) -> Result<(), RusotoError<DeleteUsagePlanError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteUsagePlanError::from_response(response))
}
}
async fn delete_usage_plan_key(
&self,
input: DeleteUsagePlanKeyRequest,
) -> Result<(), RusotoError<DeleteUsagePlanKeyError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/keys/{key_id}",
key_id = input.key_id,
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteUsagePlanKeyError::from_response(response))
}
}
async fn delete_vpc_link(
&self,
input: DeleteVpcLinkRequest,
) -> Result<(), RusotoError<DeleteVpcLinkError>> {
let request_uri = format!("/vpclinks/{vpclink_id}", vpclink_id = input.vpc_link_id);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVpcLinkError::from_response(response))
}
}
async fn flush_stage_authorizers_cache(
&self,
input: FlushStageAuthorizersCacheRequest,
) -> Result<(), RusotoError<FlushStageAuthorizersCacheError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}/cache/authorizers",
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(FlushStageAuthorizersCacheError::from_response(response))
}
}
async fn flush_stage_cache(
&self,
input: FlushStageCacheRequest,
) -> Result<(), RusotoError<FlushStageCacheError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}/cache/data",
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 202 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(FlushStageCacheError::from_response(response))
}
}
async fn generate_client_certificate(
&self,
input: GenerateClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<GenerateClientCertificateError>> {
let request_uri = "/clientcertificates";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GenerateClientCertificateError::from_response(response))
}
}
async fn get_account(&self) -> Result<Account, RusotoError<GetAccountError>> {
let request_uri = "/account";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Account, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAccountError::from_response(response))
}
}
async fn get_api_key(
&self,
input: GetApiKeyRequest,
) -> Result<ApiKey, RusotoError<GetApiKeyError>> {
let request_uri = format!("/apikeys/{api_key}", api_key = input.api_key);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.include_value {
params.put("includeValue", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetApiKeyError::from_response(response))
}
}
async fn get_api_keys(
&self,
input: GetApiKeysRequest,
) -> Result<ApiKeys, RusotoError<GetApiKeysError>> {
let request_uri = "/apikeys";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.customer_id {
params.put("customerId", x);
}
if let Some(ref x) = input.include_values {
params.put("includeValues", x);
}
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.name_query {
params.put("name", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKeys, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetApiKeysError::from_response(response))
}
}
async fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> Result<Authorizer, RusotoError<GetAuthorizerError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers/{authorizer_id}",
authorizer_id = input.authorizer_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Authorizer, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAuthorizerError::from_response(response))
}
}
async fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> Result<Authorizers, RusotoError<GetAuthorizersError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Authorizers, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetAuthorizersError::from_response(response))
}
}
async fn get_base_path_mapping(
&self,
input: GetBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<GetBasePathMappingError>> {
let request_uri = format!(
"/domainnames/{domain_name}/basepathmappings/{base_path}",
base_path = input.base_path,
domain_name = input.domain_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<BasePathMapping, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetBasePathMappingError::from_response(response))
}
}
async fn get_base_path_mappings(
&self,
input: GetBasePathMappingsRequest,
) -> Result<BasePathMappings, RusotoError<GetBasePathMappingsError>> {
let request_uri = format!(
"/domainnames/{domain_name}/basepathmappings",
domain_name = input.domain_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BasePathMappings, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetBasePathMappingsError::from_response(response))
}
}
async fn get_client_certificate(
&self,
input: GetClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<GetClientCertificateError>> {
let request_uri = format!(
"/clientcertificates/{clientcertificate_id}",
clientcertificate_id = input.client_certificate_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetClientCertificateError::from_response(response))
}
}
async fn get_client_certificates(
&self,
input: GetClientCertificatesRequest,
) -> Result<ClientCertificates, RusotoError<GetClientCertificatesError>> {
let request_uri = "/clientcertificates";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificates, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetClientCertificatesError::from_response(response))
}
}
async fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> Result<Deployment, RusotoError<GetDeploymentError>> {
let request_uri = format!(
"/restapis/{restapi_id}/deployments/{deployment_id}",
deployment_id = input.deployment_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.embed {
for item in x.iter() {
params.put("embed", item);
}
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Deployment, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDeploymentError::from_response(response))
}
}
async fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> Result<Deployments, RusotoError<GetDeploymentsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/deployments",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Deployments, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDeploymentsError::from_response(response))
}
}
async fn get_documentation_part(
&self,
input: GetDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<GetDocumentationPartError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts/{part_id}",
part_id = input.documentation_part_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDocumentationPartError::from_response(response))
}
}
async fn get_documentation_parts(
&self,
input: GetDocumentationPartsRequest,
) -> Result<DocumentationParts, RusotoError<GetDocumentationPartsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.location_status {
params.put("locationStatus", x);
}
if let Some(ref x) = input.name_query {
params.put("name", x);
}
if let Some(ref x) = input.path {
params.put("path", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
if let Some(ref x) = input.type_ {
params.put("type", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationParts, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDocumentationPartsError::from_response(response))
}
}
async fn get_documentation_version(
&self,
input: GetDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<GetDocumentationVersionError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/versions/{doc_version}",
doc_version = input.documentation_version,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDocumentationVersionError::from_response(response))
}
}
async fn get_documentation_versions(
&self,
input: GetDocumentationVersionsRequest,
) -> Result<DocumentationVersions, RusotoError<GetDocumentationVersionsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/versions",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersions, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDocumentationVersionsError::from_response(response))
}
}
async fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> Result<DomainName, RusotoError<GetDomainNameError>> {
let request_uri = format!(
"/domainnames/{domain_name}",
domain_name = input.domain_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<DomainName, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDomainNameError::from_response(response))
}
}
async fn get_domain_names(
&self,
input: GetDomainNamesRequest,
) -> Result<DomainNames, RusotoError<GetDomainNamesError>> {
let request_uri = "/domainnames";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<DomainNames, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetDomainNamesError::from_response(response))
}
}
async fn get_export(
&self,
input: GetExportRequest,
) -> Result<ExportResponse, RusotoError<GetExportError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}/exports/{export_type}",
export_type = input.export_type,
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
if let Some(ref accepts) = input.accepts {
request.add_header("Accept", &accepts.to_string());
}
let mut params = Params::new();
if let Some(ref x) = input.parameters {
for (key, val) in x.iter() {
params.put(key, val);
}
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let mut result = ExportResponse::default();
result.body = Some(response.body);
if let Some(content_disposition) = response.headers.get("Content-Disposition") {
let value = content_disposition.to_owned();
result.content_disposition = Some(value)
};
if let Some(content_type) = response.headers.get("Content-Type") {
let value = content_type.to_owned();
result.content_type = Some(value)
};
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetExportError::from_response(response))
}
}
async fn get_gateway_response(
&self,
input: GetGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<GetGatewayResponseError>> {
let request_uri = format!(
"/restapis/{restapi_id}/gatewayresponses/{response_type}",
response_type = input.response_type,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GatewayResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetGatewayResponseError::from_response(response))
}
}
async fn get_gateway_responses(
&self,
input: GetGatewayResponsesRequest,
) -> Result<GatewayResponses, RusotoError<GetGatewayResponsesError>> {
let request_uri = format!(
"/restapis/{restapi_id}/gatewayresponses",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GatewayResponses, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetGatewayResponsesError::from_response(response))
}
}
async fn get_integration(
&self,
input: GetIntegrationRequest,
) -> Result<Integration, RusotoError<GetIntegrationError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Integration, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetIntegrationError::from_response(response))
}
}
async fn get_integration_response(
&self,
input: GetIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<GetIntegrationResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetIntegrationResponseError::from_response(response))
}
}
async fn get_method(
&self,
input: GetMethodRequest,
) -> Result<Method, RusotoError<GetMethodError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetMethodError::from_response(response))
}
}
async fn get_method_response(
&self,
input: GetMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<GetMethodResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<MethodResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetMethodResponseError::from_response(response))
}
}
async fn get_model(&self, input: GetModelRequest) -> Result<Model, RusotoError<GetModelError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models/{model_name}",
model_name = input.model_name,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.flatten {
params.put("flatten", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetModelError::from_response(response))
}
}
async fn get_model_template(
&self,
input: GetModelTemplateRequest,
) -> Result<Template, RusotoError<GetModelTemplateError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models/{model_name}/default_template",
model_name = input.model_name,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Template, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetModelTemplateError::from_response(response))
}
}
async fn get_models(
&self,
input: GetModelsRequest,
) -> Result<Models, RusotoError<GetModelsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Models, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetModelsError::from_response(response))
}
}
async fn get_request_validator(
&self,
input: GetRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<GetRequestValidatorError>> {
let request_uri = format!(
"/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}",
requestvalidator_id = input.request_validator_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRequestValidatorError::from_response(response))
}
}
async fn get_request_validators(
&self,
input: GetRequestValidatorsRequest,
) -> Result<RequestValidators, RusotoError<GetRequestValidatorsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/requestvalidators",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidators, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRequestValidatorsError::from_response(response))
}
}
async fn get_resource(
&self,
input: GetResourceRequest,
) -> Result<Resource, RusotoError<GetResourceError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}",
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.embed {
for item in x.iter() {
params.put("embed", item);
}
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Resource, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetResourceError::from_response(response))
}
}
async fn get_resources(
&self,
input: GetResourcesRequest,
) -> Result<Resources, RusotoError<GetResourcesError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.embed {
for item in x.iter() {
params.put("embed", item);
}
}
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Resources, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetResourcesError::from_response(response))
}
}
async fn get_rest_api(
&self,
input: GetRestApiRequest,
) -> Result<RestApi, RusotoError<GetRestApiError>> {
let request_uri = format!("/restapis/{restapi_id}", restapi_id = input.rest_api_id);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRestApiError::from_response(response))
}
}
async fn get_rest_apis(
&self,
input: GetRestApisRequest,
) -> Result<RestApis, RusotoError<GetRestApisError>> {
let request_uri = "/restapis";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApis, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetRestApisError::from_response(response))
}
}
async fn get_sdk(&self, input: GetSdkRequest) -> Result<SdkResponse, RusotoError<GetSdkError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}/sdks/{sdk_type}",
restapi_id = input.rest_api_id,
sdk_type = input.sdk_type,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.parameters {
for (key, val) in x.iter() {
params.put(key, val);
}
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let mut result = SdkResponse::default();
result.body = Some(response.body);
if let Some(content_disposition) = response.headers.get("Content-Disposition") {
let value = content_disposition.to_owned();
result.content_disposition = Some(value)
};
if let Some(content_type) = response.headers.get("Content-Type") {
let value = content_type.to_owned();
result.content_type = Some(value)
};
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetSdkError::from_response(response))
}
}
async fn get_sdk_type(
&self,
input: GetSdkTypeRequest,
) -> Result<SdkType, RusotoError<GetSdkTypeError>> {
let request_uri = format!("/sdktypes/{sdktype_id}", sdktype_id = input.id);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<SdkType, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetSdkTypeError::from_response(response))
}
}
async fn get_sdk_types(
&self,
input: GetSdkTypesRequest,
) -> Result<SdkTypes, RusotoError<GetSdkTypesError>> {
let request_uri = "/sdktypes";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<SdkTypes, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetSdkTypesError::from_response(response))
}
}
async fn get_stage(&self, input: GetStageRequest) -> Result<Stage, RusotoError<GetStageError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}",
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetStageError::from_response(response))
}
}
async fn get_stages(
&self,
input: GetStagesRequest,
) -> Result<Stages, RusotoError<GetStagesError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.deployment_id {
params.put("deploymentId", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Stages, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetStagesError::from_response(response))
}
}
async fn get_tags(&self, input: GetTagsRequest) -> Result<Tags, RusotoError<GetTagsError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Tags, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetTagsError::from_response(response))
}
}
async fn get_usage(&self, input: GetUsageRequest) -> Result<Usage, RusotoError<GetUsageError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/usage",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
params.put("endDate", &input.end_date);
if let Some(ref x) = input.key_id {
params.put("keyId", x);
}
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
params.put("startDate", &input.start_date);
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Usage, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUsageError::from_response(response))
}
}
async fn get_usage_plan(
&self,
input: GetUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<GetUsagePlanError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlan, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUsagePlanError::from_response(response))
}
}
async fn get_usage_plan_key(
&self,
input: GetUsagePlanKeyRequest,
) -> Result<UsagePlanKey, RusotoError<GetUsagePlanKeyError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/keys/{key_id}",
key_id = input.key_id,
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlanKey, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUsagePlanKeyError::from_response(response))
}
}
async fn get_usage_plan_keys(
&self,
input: GetUsagePlanKeysRequest,
) -> Result<UsagePlanKeys, RusotoError<GetUsagePlanKeysError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/keys",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.name_query {
params.put("name", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlanKeys, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUsagePlanKeysError::from_response(response))
}
}
async fn get_usage_plans(
&self,
input: GetUsagePlansRequest,
) -> Result<UsagePlans, RusotoError<GetUsagePlansError>> {
let request_uri = "/usageplans";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.key_id {
params.put("keyId", x);
}
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlans, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetUsagePlansError::from_response(response))
}
}
async fn get_vpc_link(
&self,
input: GetVpcLinkRequest,
) -> Result<VpcLink, RusotoError<GetVpcLinkError>> {
let request_uri = format!("/vpclinks/{vpclink_id}", vpclink_id = input.vpc_link_id);
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVpcLinkError::from_response(response))
}
}
async fn get_vpc_links(
&self,
input: GetVpcLinksRequest,
) -> Result<VpcLinks, RusotoError<GetVpcLinksError>> {
let request_uri = "/vpclinks";
let mut request = SignedRequest::new("GET", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.position {
params.put("position", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLinks, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(GetVpcLinksError::from_response(response))
}
}
async fn import_api_keys(
&self,
input: ImportApiKeysRequest,
) -> Result<ApiKeyIds, RusotoError<ImportApiKeysError>> {
let request_uri = "/apikeys";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(input.body.to_owned());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.fail_on_warnings {
params.put("failonwarnings", x);
}
params.put("format", &input.format);
params.put("mode", "import");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKeyIds, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ImportApiKeysError::from_response(response))
}
}
async fn import_documentation_parts(
&self,
input: ImportDocumentationPartsRequest,
) -> Result<DocumentationPartIds, RusotoError<ImportDocumentationPartsError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts",
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(input.body.to_owned());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.fail_on_warnings {
params.put("failonwarnings", x);
}
if let Some(ref x) = input.mode {
params.put("mode", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPartIds, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ImportDocumentationPartsError::from_response(response))
}
}
async fn import_rest_api(
&self,
input: ImportRestApiRequest,
) -> Result<RestApi, RusotoError<ImportRestApiError>> {
let request_uri = "/restapis";
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(input.body.to_owned());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.fail_on_warnings {
params.put("failonwarnings", x);
}
if let Some(ref x) = input.parameters {
for (key, val) in x.iter() {
params.put(key, val);
}
}
params.put("mode", "import");
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ImportRestApiError::from_response(response))
}
}
async fn put_gateway_response(
&self,
input: PutGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<PutGatewayResponseError>> {
let request_uri = format!(
"/restapis/{restapi_id}/gatewayresponses/{response_type}",
response_type = input.response_type,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GatewayResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutGatewayResponseError::from_response(response))
}
}
async fn put_integration(
&self,
input: PutIntegrationRequest,
) -> Result<Integration, RusotoError<PutIntegrationError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Integration, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutIntegrationError::from_response(response))
}
}
async fn put_integration_response(
&self,
input: PutIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<PutIntegrationResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutIntegrationResponseError::from_response(response))
}
}
async fn put_method(
&self,
input: PutMethodRequest,
) -> Result<Method, RusotoError<PutMethodError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutMethodError::from_response(response))
}
}
async fn put_method_response(
&self,
input: PutMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<PutMethodResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<MethodResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutMethodResponseError::from_response(response))
}
}
async fn put_rest_api(
&self,
input: PutRestApiRequest,
) -> Result<RestApi, RusotoError<PutRestApiError>> {
let request_uri = format!("/restapis/{restapi_id}", restapi_id = input.rest_api_id);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(input.body.to_owned());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.fail_on_warnings {
params.put("failonwarnings", x);
}
if let Some(ref x) = input.mode {
params.put("mode", x);
}
if let Some(ref x) = input.parameters {
for (key, val) in x.iter() {
params.put(key, val);
}
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(PutRestApiError::from_response(response))
}
}
async fn tag_resource(
&self,
input: TagResourceRequest,
) -> Result<(), RusotoError<TagResourceError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("PUT", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagResourceError::from_response(response))
}
}
async fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> Result<TestInvokeAuthorizerResponse, RusotoError<TestInvokeAuthorizerError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers/{authorizer_id}",
authorizer_id = input.authorizer_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestInvokeAuthorizerResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TestInvokeAuthorizerError::from_response(response))
}
}
async fn test_invoke_method(
&self,
input: TestInvokeMethodRequest,
) -> Result<TestInvokeMethodResponse, RusotoError<TestInvokeMethodError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("POST", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestInvokeMethodResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TestInvokeMethodError::from_response(response))
}
}
async fn untag_resource(
&self,
input: UntagResourceRequest,
) -> Result<(), RusotoError<UntagResourceError>> {
let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
let mut request = SignedRequest::new("DELETE", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
for item in input.tag_keys.iter() {
params.put("tagKeys", item);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 204 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = ::std::mem::drop(response);
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagResourceError::from_response(response))
}
}
async fn update_account(
&self,
input: UpdateAccountRequest,
) -> Result<Account, RusotoError<UpdateAccountError>> {
let request_uri = "/account";
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Account, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateAccountError::from_response(response))
}
}
async fn update_api_key(
&self,
input: UpdateApiKeyRequest,
) -> Result<ApiKey, RusotoError<UpdateApiKeyError>> {
let request_uri = format!("/apikeys/{api_key}", api_key = input.api_key);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateApiKeyError::from_response(response))
}
}
async fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> Result<Authorizer, RusotoError<UpdateAuthorizerError>> {
let request_uri = format!(
"/restapis/{restapi_id}/authorizers/{authorizer_id}",
authorizer_id = input.authorizer_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Authorizer, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateAuthorizerError::from_response(response))
}
}
async fn update_base_path_mapping(
&self,
input: UpdateBasePathMappingRequest,
) -> Result<BasePathMapping, RusotoError<UpdateBasePathMappingError>> {
let request_uri = format!(
"/domainnames/{domain_name}/basepathmappings/{base_path}",
base_path = input.base_path,
domain_name = input.domain_name
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<BasePathMapping, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateBasePathMappingError::from_response(response))
}
}
async fn update_client_certificate(
&self,
input: UpdateClientCertificateRequest,
) -> Result<ClientCertificate, RusotoError<UpdateClientCertificateError>> {
let request_uri = format!(
"/clientcertificates/{clientcertificate_id}",
clientcertificate_id = input.client_certificate_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateClientCertificateError::from_response(response))
}
}
async fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> Result<Deployment, RusotoError<UpdateDeploymentError>> {
let request_uri = format!(
"/restapis/{restapi_id}/deployments/{deployment_id}",
deployment_id = input.deployment_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Deployment, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateDeploymentError::from_response(response))
}
}
async fn update_documentation_part(
&self,
input: UpdateDocumentationPartRequest,
) -> Result<DocumentationPart, RusotoError<UpdateDocumentationPartError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/parts/{part_id}",
part_id = input.documentation_part_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateDocumentationPartError::from_response(response))
}
}
async fn update_documentation_version(
&self,
input: UpdateDocumentationVersionRequest,
) -> Result<DocumentationVersion, RusotoError<UpdateDocumentationVersionError>> {
let request_uri = format!(
"/restapis/{restapi_id}/documentation/versions/{doc_version}",
doc_version = input.documentation_version,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateDocumentationVersionError::from_response(response))
}
}
async fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> Result<DomainName, RusotoError<UpdateDomainNameError>> {
let request_uri = format!(
"/domainnames/{domain_name}",
domain_name = input.domain_name
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<DomainName, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateDomainNameError::from_response(response))
}
}
async fn update_gateway_response(
&self,
input: UpdateGatewayResponseRequest,
) -> Result<GatewayResponse, RusotoError<UpdateGatewayResponseError>> {
let request_uri = format!(
"/restapis/{restapi_id}/gatewayresponses/{response_type}",
response_type = input.response_type,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<GatewayResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateGatewayResponseError::from_response(response))
}
}
async fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> Result<Integration, RusotoError<UpdateIntegrationError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Integration, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateIntegrationError::from_response(response))
}
}
async fn update_integration_response(
&self,
input: UpdateIntegrationResponseRequest,
) -> Result<IntegrationResponse, RusotoError<UpdateIntegrationResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateIntegrationResponseError::from_response(response))
}
}
async fn update_method(
&self,
input: UpdateMethodRequest,
) -> Result<Method, RusotoError<UpdateMethodError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}",
http_method = input.http_method,
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateMethodError::from_response(response))
}
}
async fn update_method_response(
&self,
input: UpdateMethodResponseRequest,
) -> Result<MethodResponse, RusotoError<UpdateMethodResponseError>> {
let request_uri = format!("/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/responses/{status_code}", http_method = input.http_method, resource_id = input.resource_id, restapi_id = input.rest_api_id, status_code = input.status_code);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 201 {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<MethodResponse, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateMethodResponseError::from_response(response))
}
}
async fn update_model(
&self,
input: UpdateModelRequest,
) -> Result<Model, RusotoError<UpdateModelError>> {
let request_uri = format!(
"/restapis/{restapi_id}/models/{model_name}",
model_name = input.model_name,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateModelError::from_response(response))
}
}
async fn update_request_validator(
&self,
input: UpdateRequestValidatorRequest,
) -> Result<RequestValidator, RusotoError<UpdateRequestValidatorError>> {
let request_uri = format!(
"/restapis/{restapi_id}/requestvalidators/{requestvalidator_id}",
requestvalidator_id = input.request_validator_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateRequestValidatorError::from_response(response))
}
}
async fn update_resource(
&self,
input: UpdateResourceRequest,
) -> Result<Resource, RusotoError<UpdateResourceError>> {
let request_uri = format!(
"/restapis/{restapi_id}/resources/{resource_id}",
resource_id = input.resource_id,
restapi_id = input.rest_api_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Resource, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateResourceError::from_response(response))
}
}
async fn update_rest_api(
&self,
input: UpdateRestApiRequest,
) -> Result<RestApi, RusotoError<UpdateRestApiError>> {
let request_uri = format!("/restapis/{restapi_id}", restapi_id = input.rest_api_id);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateRestApiError::from_response(response))
}
}
async fn update_stage(
&self,
input: UpdateStageRequest,
) -> Result<Stage, RusotoError<UpdateStageError>> {
let request_uri = format!(
"/restapis/{restapi_id}/stages/{stage_name}",
restapi_id = input.rest_api_id,
stage_name = input.stage_name
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateStageError::from_response(response))
}
}
async fn update_usage(
&self,
input: UpdateUsageRequest,
) -> Result<Usage, RusotoError<UpdateUsageError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}/keys/{key_id}/usage",
key_id = input.key_id,
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response).deserialize::<Usage, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateUsageError::from_response(response))
}
}
async fn update_usage_plan(
&self,
input: UpdateUsagePlanRequest,
) -> Result<UsagePlan, RusotoError<UpdateUsagePlanError>> {
let request_uri = format!(
"/usageplans/{usageplan_id}",
usageplan_id = input.usage_plan_id
);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<UsagePlan, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateUsagePlanError::from_response(response))
}
}
async fn update_vpc_link(
&self,
input: UpdateVpcLinkRequest,
) -> Result<VpcLink, RusotoError<UpdateVpcLinkError>> {
let request_uri = format!("/vpclinks/{vpclink_id}", vpclink_id = input.vpc_link_id);
let mut request = SignedRequest::new("PATCH", "apigateway", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.is_success() {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVpcLinkError::from_response(response))
}
}
}