use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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)]
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)]
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)]
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)]
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)]
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)]
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)]
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 = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
pub struct DeleteApiKeyRequest {
#[serde(rename = "apiKey")]
pub api_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAuthorizerRequest {
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBasePathMappingRequest {
#[serde(rename = "basePath")]
pub base_path: String,
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteClientCertificateRequest {
#[serde(rename = "clientCertificateId")]
pub client_certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDeploymentRequest {
#[serde(rename = "deploymentId")]
pub deployment_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct DeleteDocumentationVersionRequest {
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDomainNameRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteGatewayResponseRequest {
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
pub struct DeleteModelRequest {
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct DeleteResourceRequest {
#[serde(rename = "resourceId")]
pub resource_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRestApiRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteStageRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUsagePlanKeyRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteUsagePlanRequest {
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteVpcLinkRequest {
#[serde(rename = "vpcLinkId")]
pub vpc_link_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, 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)]
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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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 = "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 = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct 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>>,
}
#[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)]
pub struct FlushStageAuthorizersCacheRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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(test, 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(test, 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)]
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)]
pub struct GetAccountRequest {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
pub struct GetAuthorizerRequest {
#[serde(rename = "authorizerId")]
pub authorizer_id: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct GetBasePathMappingRequest {
#[serde(rename = "basePath")]
pub base_path: String,
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct GetClientCertificateRequest {
#[serde(rename = "clientCertificateId")]
pub client_certificate_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
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)]
pub struct GetDocumentationVersionRequest {
#[serde(rename = "documentationVersion")]
pub documentation_version: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct GetDomainNameRequest {
#[serde(rename = "domainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
pub struct GetGatewayResponseRequest {
#[serde(rename = "responseType")]
pub response_type: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
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)]
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)]
pub struct GetModelTemplateRequest {
#[serde(rename = "modelName")]
pub model_name: String,
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
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)]
pub struct GetRestApiRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
pub struct GetSdkTypeRequest {
#[serde(rename = "id")]
pub id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct GetStageRequest {
#[serde(rename = "restApiId")]
pub rest_api_id: String,
#[serde(rename = "stageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
pub struct GetUsagePlanKeyRequest {
#[serde(rename = "keyId")]
pub key_id: String,
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
pub struct GetUsagePlanRequest {
#[serde(rename = "usagePlanId")]
pub usage_plan_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
pub struct GetVpcLinkRequest {
#[serde(rename = "vpcLinkId")]
pub vpc_link_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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)]
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)]
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)]
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)]
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)]
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)]
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)]
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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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)]
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(test, 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)]
pub struct TagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: ::std::collections::HashMap<String, String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct 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(test, 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)]
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(test, 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)]
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(test, 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)]
pub struct UntagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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)]
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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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(test, 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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateApiKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApiKeyError {
fn description(&self) -> &str {
match *self {
CreateApiKeyError::BadRequest(ref cause) => cause,
CreateApiKeyError::Conflict(ref cause) => cause,
CreateApiKeyError::LimitExceeded(ref cause) => cause,
CreateApiKeyError::NotFound(ref cause) => cause,
CreateApiKeyError::TooManyRequests(ref cause) => cause,
CreateApiKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateAuthorizerError {
fn description(&self) -> &str {
match *self {
CreateAuthorizerError::BadRequest(ref cause) => cause,
CreateAuthorizerError::LimitExceeded(ref cause) => cause,
CreateAuthorizerError::NotFound(ref cause) => cause,
CreateAuthorizerError::TooManyRequests(ref cause) => cause,
CreateAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateBasePathMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateBasePathMappingError {
fn description(&self) -> &str {
match *self {
CreateBasePathMappingError::BadRequest(ref cause) => cause,
CreateBasePathMappingError::Conflict(ref cause) => cause,
CreateBasePathMappingError::NotFound(ref cause) => cause,
CreateBasePathMappingError::TooManyRequests(ref cause) => cause,
CreateBasePathMappingError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDeploymentError {
fn description(&self) -> &str {
match *self {
CreateDeploymentError::BadRequest(ref cause) => cause,
CreateDeploymentError::Conflict(ref cause) => cause,
CreateDeploymentError::LimitExceeded(ref cause) => cause,
CreateDeploymentError::NotFound(ref cause) => cause,
CreateDeploymentError::ServiceUnavailable(ref cause) => cause,
CreateDeploymentError::TooManyRequests(ref cause) => cause,
CreateDeploymentError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDocumentationPartError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDocumentationPartError {
fn description(&self) -> &str {
match *self {
CreateDocumentationPartError::BadRequest(ref cause) => cause,
CreateDocumentationPartError::Conflict(ref cause) => cause,
CreateDocumentationPartError::LimitExceeded(ref cause) => cause,
CreateDocumentationPartError::NotFound(ref cause) => cause,
CreateDocumentationPartError::TooManyRequests(ref cause) => cause,
CreateDocumentationPartError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDocumentationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDocumentationVersionError {
fn description(&self) -> &str {
match *self {
CreateDocumentationVersionError::BadRequest(ref cause) => cause,
CreateDocumentationVersionError::Conflict(ref cause) => cause,
CreateDocumentationVersionError::LimitExceeded(ref cause) => cause,
CreateDocumentationVersionError::NotFound(ref cause) => cause,
CreateDocumentationVersionError::TooManyRequests(ref cause) => cause,
CreateDocumentationVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDomainNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDomainNameError {
fn description(&self) -> &str {
match *self {
CreateDomainNameError::BadRequest(ref cause) => cause,
CreateDomainNameError::Conflict(ref cause) => cause,
CreateDomainNameError::TooManyRequests(ref cause) => cause,
CreateDomainNameError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateModelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateModelError {
fn description(&self) -> &str {
match *self {
CreateModelError::BadRequest(ref cause) => cause,
CreateModelError::Conflict(ref cause) => cause,
CreateModelError::LimitExceeded(ref cause) => cause,
CreateModelError::NotFound(ref cause) => cause,
CreateModelError::TooManyRequests(ref cause) => cause,
CreateModelError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRequestValidatorError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRequestValidatorError {
fn description(&self) -> &str {
match *self {
CreateRequestValidatorError::BadRequest(ref cause) => cause,
CreateRequestValidatorError::LimitExceeded(ref cause) => cause,
CreateRequestValidatorError::NotFound(ref cause) => cause,
CreateRequestValidatorError::TooManyRequests(ref cause) => cause,
CreateRequestValidatorError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateResourceError {
fn description(&self) -> &str {
match *self {
CreateResourceError::BadRequest(ref cause) => cause,
CreateResourceError::Conflict(ref cause) => cause,
CreateResourceError::LimitExceeded(ref cause) => cause,
CreateResourceError::NotFound(ref cause) => cause,
CreateResourceError::TooManyRequests(ref cause) => cause,
CreateResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRestApiError {
fn description(&self) -> &str {
match *self {
CreateRestApiError::BadRequest(ref cause) => cause,
CreateRestApiError::LimitExceeded(ref cause) => cause,
CreateRestApiError::TooManyRequests(ref cause) => cause,
CreateRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateStageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateStageError {
fn description(&self) -> &str {
match *self {
CreateStageError::BadRequest(ref cause) => cause,
CreateStageError::Conflict(ref cause) => cause,
CreateStageError::LimitExceeded(ref cause) => cause,
CreateStageError::NotFound(ref cause) => cause,
CreateStageError::TooManyRequests(ref cause) => cause,
CreateStageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUsagePlanError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUsagePlanError {
fn description(&self) -> &str {
match *self {
CreateUsagePlanError::BadRequest(ref cause) => cause,
CreateUsagePlanError::Conflict(ref cause) => cause,
CreateUsagePlanError::LimitExceeded(ref cause) => cause,
CreateUsagePlanError::NotFound(ref cause) => cause,
CreateUsagePlanError::TooManyRequests(ref cause) => cause,
CreateUsagePlanError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateUsagePlanKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateUsagePlanKeyError {
fn description(&self) -> &str {
match *self {
CreateUsagePlanKeyError::BadRequest(ref cause) => cause,
CreateUsagePlanKeyError::Conflict(ref cause) => cause,
CreateUsagePlanKeyError::NotFound(ref cause) => cause,
CreateUsagePlanKeyError::TooManyRequests(ref cause) => cause,
CreateUsagePlanKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateVpcLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateVpcLinkError {
fn description(&self) -> &str {
match *self {
CreateVpcLinkError::BadRequest(ref cause) => cause,
CreateVpcLinkError::TooManyRequests(ref cause) => cause,
CreateVpcLinkError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteApiKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApiKeyError {
fn description(&self) -> &str {
match *self {
DeleteApiKeyError::NotFound(ref cause) => cause,
DeleteApiKeyError::TooManyRequests(ref cause) => cause,
DeleteApiKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteAuthorizerError {
fn description(&self) -> &str {
match *self {
DeleteAuthorizerError::BadRequest(ref cause) => cause,
DeleteAuthorizerError::Conflict(ref cause) => cause,
DeleteAuthorizerError::NotFound(ref cause) => cause,
DeleteAuthorizerError::TooManyRequests(ref cause) => cause,
DeleteAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBasePathMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBasePathMappingError {
fn description(&self) -> &str {
match *self {
DeleteBasePathMappingError::BadRequest(ref cause) => cause,
DeleteBasePathMappingError::Conflict(ref cause) => cause,
DeleteBasePathMappingError::NotFound(ref cause) => cause,
DeleteBasePathMappingError::TooManyRequests(ref cause) => cause,
DeleteBasePathMappingError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteClientCertificateError {
fn description(&self) -> &str {
match *self {
DeleteClientCertificateError::BadRequest(ref cause) => cause,
DeleteClientCertificateError::NotFound(ref cause) => cause,
DeleteClientCertificateError::TooManyRequests(ref cause) => cause,
DeleteClientCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDeploymentError {
fn description(&self) -> &str {
match *self {
DeleteDeploymentError::BadRequest(ref cause) => cause,
DeleteDeploymentError::NotFound(ref cause) => cause,
DeleteDeploymentError::TooManyRequests(ref cause) => cause,
DeleteDeploymentError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDocumentationPartError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDocumentationPartError {
fn description(&self) -> &str {
match *self {
DeleteDocumentationPartError::BadRequest(ref cause) => cause,
DeleteDocumentationPartError::Conflict(ref cause) => cause,
DeleteDocumentationPartError::NotFound(ref cause) => cause,
DeleteDocumentationPartError::TooManyRequests(ref cause) => cause,
DeleteDocumentationPartError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDocumentationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDocumentationVersionError {
fn description(&self) -> &str {
match *self {
DeleteDocumentationVersionError::BadRequest(ref cause) => cause,
DeleteDocumentationVersionError::Conflict(ref cause) => cause,
DeleteDocumentationVersionError::NotFound(ref cause) => cause,
DeleteDocumentationVersionError::TooManyRequests(ref cause) => cause,
DeleteDocumentationVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDomainNameError {
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() {
"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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDomainNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDomainNameError {
fn description(&self) -> &str {
match *self {
DeleteDomainNameError::NotFound(ref cause) => cause,
DeleteDomainNameError::TooManyRequests(ref cause) => cause,
DeleteDomainNameError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteGatewayResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteGatewayResponseError {
fn description(&self) -> &str {
match *self {
DeleteGatewayResponseError::BadRequest(ref cause) => cause,
DeleteGatewayResponseError::Conflict(ref cause) => cause,
DeleteGatewayResponseError::NotFound(ref cause) => cause,
DeleteGatewayResponseError::TooManyRequests(ref cause) => cause,
DeleteGatewayResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteIntegrationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIntegrationError {
fn description(&self) -> &str {
match *self {
DeleteIntegrationError::Conflict(ref cause) => cause,
DeleteIntegrationError::NotFound(ref cause) => cause,
DeleteIntegrationError::TooManyRequests(ref cause) => cause,
DeleteIntegrationError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteIntegrationResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteIntegrationResponseError {
fn description(&self) -> &str {
match *self {
DeleteIntegrationResponseError::BadRequest(ref cause) => cause,
DeleteIntegrationResponseError::Conflict(ref cause) => cause,
DeleteIntegrationResponseError::NotFound(ref cause) => cause,
DeleteIntegrationResponseError::TooManyRequests(ref cause) => cause,
DeleteIntegrationResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteMethodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteMethodError {
fn description(&self) -> &str {
match *self {
DeleteMethodError::Conflict(ref cause) => cause,
DeleteMethodError::NotFound(ref cause) => cause,
DeleteMethodError::TooManyRequests(ref cause) => cause,
DeleteMethodError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteMethodResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteMethodResponseError {
fn description(&self) -> &str {
match *self {
DeleteMethodResponseError::BadRequest(ref cause) => cause,
DeleteMethodResponseError::Conflict(ref cause) => cause,
DeleteMethodResponseError::NotFound(ref cause) => cause,
DeleteMethodResponseError::TooManyRequests(ref cause) => cause,
DeleteMethodResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteModelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteModelError {
fn description(&self) -> &str {
match *self {
DeleteModelError::BadRequest(ref cause) => cause,
DeleteModelError::Conflict(ref cause) => cause,
DeleteModelError::NotFound(ref cause) => cause,
DeleteModelError::TooManyRequests(ref cause) => cause,
DeleteModelError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRequestValidatorError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRequestValidatorError {
fn description(&self) -> &str {
match *self {
DeleteRequestValidatorError::BadRequest(ref cause) => cause,
DeleteRequestValidatorError::Conflict(ref cause) => cause,
DeleteRequestValidatorError::NotFound(ref cause) => cause,
DeleteRequestValidatorError::TooManyRequests(ref cause) => cause,
DeleteRequestValidatorError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteResourceError {
fn description(&self) -> &str {
match *self {
DeleteResourceError::BadRequest(ref cause) => cause,
DeleteResourceError::Conflict(ref cause) => cause,
DeleteResourceError::NotFound(ref cause) => cause,
DeleteResourceError::TooManyRequests(ref cause) => cause,
DeleteResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRestApiError {
fn description(&self) -> &str {
match *self {
DeleteRestApiError::BadRequest(ref cause) => cause,
DeleteRestApiError::NotFound(ref cause) => cause,
DeleteRestApiError::TooManyRequests(ref cause) => cause,
DeleteRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteStageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteStageError {
fn description(&self) -> &str {
match *self {
DeleteStageError::BadRequest(ref cause) => cause,
DeleteStageError::NotFound(ref cause) => cause,
DeleteStageError::TooManyRequests(ref cause) => cause,
DeleteStageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUsagePlanError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUsagePlanError {
fn description(&self) -> &str {
match *self {
DeleteUsagePlanError::BadRequest(ref cause) => cause,
DeleteUsagePlanError::NotFound(ref cause) => cause,
DeleteUsagePlanError::TooManyRequests(ref cause) => cause,
DeleteUsagePlanError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteUsagePlanKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteUsagePlanKeyError {
fn description(&self) -> &str {
match *self {
DeleteUsagePlanKeyError::BadRequest(ref cause) => cause,
DeleteUsagePlanKeyError::Conflict(ref cause) => cause,
DeleteUsagePlanKeyError::NotFound(ref cause) => cause,
DeleteUsagePlanKeyError::TooManyRequests(ref cause) => cause,
DeleteUsagePlanKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteVpcLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVpcLinkError {
fn description(&self) -> &str {
match *self {
DeleteVpcLinkError::BadRequest(ref cause) => cause,
DeleteVpcLinkError::NotFound(ref cause) => cause,
DeleteVpcLinkError::TooManyRequests(ref cause) => cause,
DeleteVpcLinkError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for FlushStageAuthorizersCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for FlushStageAuthorizersCacheError {
fn description(&self) -> &str {
match *self {
FlushStageAuthorizersCacheError::BadRequest(ref cause) => cause,
FlushStageAuthorizersCacheError::NotFound(ref cause) => cause,
FlushStageAuthorizersCacheError::TooManyRequests(ref cause) => cause,
FlushStageAuthorizersCacheError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for FlushStageCacheError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for FlushStageCacheError {
fn description(&self) -> &str {
match *self {
FlushStageCacheError::BadRequest(ref cause) => cause,
FlushStageCacheError::NotFound(ref cause) => cause,
FlushStageCacheError::TooManyRequests(ref cause) => cause,
FlushStageCacheError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GenerateClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GenerateClientCertificateError {
fn description(&self) -> &str {
match *self {
GenerateClientCertificateError::LimitExceeded(ref cause) => cause,
GenerateClientCertificateError::TooManyRequests(ref cause) => cause,
GenerateClientCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAccountError {
fn description(&self) -> &str {
match *self {
GetAccountError::NotFound(ref cause) => cause,
GetAccountError::TooManyRequests(ref cause) => cause,
GetAccountError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApiKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApiKeyError {
fn description(&self) -> &str {
match *self {
GetApiKeyError::NotFound(ref cause) => cause,
GetApiKeyError::TooManyRequests(ref cause) => cause,
GetApiKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApiKeysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApiKeysError {
fn description(&self) -> &str {
match *self {
GetApiKeysError::BadRequest(ref cause) => cause,
GetApiKeysError::TooManyRequests(ref cause) => cause,
GetApiKeysError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAuthorizerError {
fn description(&self) -> &str {
match *self {
GetAuthorizerError::NotFound(ref cause) => cause,
GetAuthorizerError::TooManyRequests(ref cause) => cause,
GetAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetAuthorizersError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetAuthorizersError {
fn description(&self) -> &str {
match *self {
GetAuthorizersError::BadRequest(ref cause) => cause,
GetAuthorizersError::NotFound(ref cause) => cause,
GetAuthorizersError::TooManyRequests(ref cause) => cause,
GetAuthorizersError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetBasePathMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetBasePathMappingError {
fn description(&self) -> &str {
match *self {
GetBasePathMappingError::NotFound(ref cause) => cause,
GetBasePathMappingError::TooManyRequests(ref cause) => cause,
GetBasePathMappingError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetBasePathMappingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetBasePathMappingsError {
fn description(&self) -> &str {
match *self {
GetBasePathMappingsError::NotFound(ref cause) => cause,
GetBasePathMappingsError::TooManyRequests(ref cause) => cause,
GetBasePathMappingsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetClientCertificateError {
fn description(&self) -> &str {
match *self {
GetClientCertificateError::NotFound(ref cause) => cause,
GetClientCertificateError::TooManyRequests(ref cause) => cause,
GetClientCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetClientCertificatesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetClientCertificatesError {
fn description(&self) -> &str {
match *self {
GetClientCertificatesError::BadRequest(ref cause) => cause,
GetClientCertificatesError::TooManyRequests(ref cause) => cause,
GetClientCertificatesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeploymentError {
fn description(&self) -> &str {
match *self {
GetDeploymentError::NotFound(ref cause) => cause,
GetDeploymentError::ServiceUnavailable(ref cause) => cause,
GetDeploymentError::TooManyRequests(ref cause) => cause,
GetDeploymentError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDeploymentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDeploymentsError {
fn description(&self) -> &str {
match *self {
GetDeploymentsError::BadRequest(ref cause) => cause,
GetDeploymentsError::ServiceUnavailable(ref cause) => cause,
GetDeploymentsError::TooManyRequests(ref cause) => cause,
GetDeploymentsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDocumentationPartError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDocumentationPartError {
fn description(&self) -> &str {
match *self {
GetDocumentationPartError::NotFound(ref cause) => cause,
GetDocumentationPartError::TooManyRequests(ref cause) => cause,
GetDocumentationPartError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDocumentationPartsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDocumentationPartsError {
fn description(&self) -> &str {
match *self {
GetDocumentationPartsError::BadRequest(ref cause) => cause,
GetDocumentationPartsError::NotFound(ref cause) => cause,
GetDocumentationPartsError::TooManyRequests(ref cause) => cause,
GetDocumentationPartsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDocumentationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDocumentationVersionError {
fn description(&self) -> &str {
match *self {
GetDocumentationVersionError::NotFound(ref cause) => cause,
GetDocumentationVersionError::TooManyRequests(ref cause) => cause,
GetDocumentationVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDocumentationVersionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDocumentationVersionsError {
fn description(&self) -> &str {
match *self {
GetDocumentationVersionsError::BadRequest(ref cause) => cause,
GetDocumentationVersionsError::NotFound(ref cause) => cause,
GetDocumentationVersionsError::TooManyRequests(ref cause) => cause,
GetDocumentationVersionsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDomainNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDomainNameError {
fn description(&self) -> &str {
match *self {
GetDomainNameError::NotFound(ref cause) => cause,
GetDomainNameError::ServiceUnavailable(ref cause) => cause,
GetDomainNameError::TooManyRequests(ref cause) => cause,
GetDomainNameError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetDomainNamesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetDomainNamesError {
fn description(&self) -> &str {
match *self {
GetDomainNamesError::BadRequest(ref cause) => cause,
GetDomainNamesError::TooManyRequests(ref cause) => cause,
GetDomainNamesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetExportError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetExportError {
fn description(&self) -> &str {
match *self {
GetExportError::BadRequest(ref cause) => cause,
GetExportError::Conflict(ref cause) => cause,
GetExportError::NotFound(ref cause) => cause,
GetExportError::TooManyRequests(ref cause) => cause,
GetExportError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGatewayResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGatewayResponseError {
fn description(&self) -> &str {
match *self {
GetGatewayResponseError::NotFound(ref cause) => cause,
GetGatewayResponseError::TooManyRequests(ref cause) => cause,
GetGatewayResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetGatewayResponsesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetGatewayResponsesError {
fn description(&self) -> &str {
match *self {
GetGatewayResponsesError::BadRequest(ref cause) => cause,
GetGatewayResponsesError::NotFound(ref cause) => cause,
GetGatewayResponsesError::TooManyRequests(ref cause) => cause,
GetGatewayResponsesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIntegrationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIntegrationError {
fn description(&self) -> &str {
match *self {
GetIntegrationError::NotFound(ref cause) => cause,
GetIntegrationError::TooManyRequests(ref cause) => cause,
GetIntegrationError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIntegrationResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIntegrationResponseError {
fn description(&self) -> &str {
match *self {
GetIntegrationResponseError::NotFound(ref cause) => cause,
GetIntegrationResponseError::TooManyRequests(ref cause) => cause,
GetIntegrationResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetMethodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMethodError {
fn description(&self) -> &str {
match *self {
GetMethodError::NotFound(ref cause) => cause,
GetMethodError::TooManyRequests(ref cause) => cause,
GetMethodError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetMethodResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetMethodResponseError {
fn description(&self) -> &str {
match *self {
GetMethodResponseError::NotFound(ref cause) => cause,
GetMethodResponseError::TooManyRequests(ref cause) => cause,
GetMethodResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetModelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetModelError {
fn description(&self) -> &str {
match *self {
GetModelError::NotFound(ref cause) => cause,
GetModelError::TooManyRequests(ref cause) => cause,
GetModelError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetModelTemplateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetModelTemplateError {
fn description(&self) -> &str {
match *self {
GetModelTemplateError::BadRequest(ref cause) => cause,
GetModelTemplateError::NotFound(ref cause) => cause,
GetModelTemplateError::TooManyRequests(ref cause) => cause,
GetModelTemplateError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetModelsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetModelsError {
fn description(&self) -> &str {
match *self {
GetModelsError::BadRequest(ref cause) => cause,
GetModelsError::NotFound(ref cause) => cause,
GetModelsError::TooManyRequests(ref cause) => cause,
GetModelsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRequestValidatorError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRequestValidatorError {
fn description(&self) -> &str {
match *self {
GetRequestValidatorError::NotFound(ref cause) => cause,
GetRequestValidatorError::TooManyRequests(ref cause) => cause,
GetRequestValidatorError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRequestValidatorsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRequestValidatorsError {
fn description(&self) -> &str {
match *self {
GetRequestValidatorsError::BadRequest(ref cause) => cause,
GetRequestValidatorsError::NotFound(ref cause) => cause,
GetRequestValidatorsError::TooManyRequests(ref cause) => cause,
GetRequestValidatorsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetResourceError {
fn description(&self) -> &str {
match *self {
GetResourceError::NotFound(ref cause) => cause,
GetResourceError::TooManyRequests(ref cause) => cause,
GetResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetResourcesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetResourcesError {
fn description(&self) -> &str {
match *self {
GetResourcesError::BadRequest(ref cause) => cause,
GetResourcesError::NotFound(ref cause) => cause,
GetResourcesError::TooManyRequests(ref cause) => cause,
GetResourcesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRestApiError {
fn description(&self) -> &str {
match *self {
GetRestApiError::NotFound(ref cause) => cause,
GetRestApiError::TooManyRequests(ref cause) => cause,
GetRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRestApisError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRestApisError {
fn description(&self) -> &str {
match *self {
GetRestApisError::BadRequest(ref cause) => cause,
GetRestApisError::TooManyRequests(ref cause) => cause,
GetRestApisError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSdkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSdkError {
fn description(&self) -> &str {
match *self {
GetSdkError::BadRequest(ref cause) => cause,
GetSdkError::Conflict(ref cause) => cause,
GetSdkError::NotFound(ref cause) => cause,
GetSdkError::TooManyRequests(ref cause) => cause,
GetSdkError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSdkTypeError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSdkTypeError {
fn description(&self) -> &str {
match *self {
GetSdkTypeError::NotFound(ref cause) => cause,
GetSdkTypeError::TooManyRequests(ref cause) => cause,
GetSdkTypeError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetSdkTypesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetSdkTypesError {
fn description(&self) -> &str {
match *self {
GetSdkTypesError::TooManyRequests(ref cause) => cause,
GetSdkTypesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetStageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetStageError {
fn description(&self) -> &str {
match *self {
GetStageError::NotFound(ref cause) => cause,
GetStageError::TooManyRequests(ref cause) => cause,
GetStageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetStagesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetStagesError {
fn description(&self) -> &str {
match *self {
GetStagesError::NotFound(ref cause) => cause,
GetStagesError::TooManyRequests(ref cause) => cause,
GetStagesError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetTagsError {
fn description(&self) -> &str {
match *self {
GetTagsError::BadRequest(ref cause) => cause,
GetTagsError::LimitExceeded(ref cause) => cause,
GetTagsError::NotFound(ref cause) => cause,
GetTagsError::TooManyRequests(ref cause) => cause,
GetTagsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUsageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUsageError {
fn description(&self) -> &str {
match *self {
GetUsageError::BadRequest(ref cause) => cause,
GetUsageError::NotFound(ref cause) => cause,
GetUsageError::TooManyRequests(ref cause) => cause,
GetUsageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUsagePlanError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUsagePlanError {
fn description(&self) -> &str {
match *self {
GetUsagePlanError::BadRequest(ref cause) => cause,
GetUsagePlanError::NotFound(ref cause) => cause,
GetUsagePlanError::TooManyRequests(ref cause) => cause,
GetUsagePlanError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUsagePlanKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUsagePlanKeyError {
fn description(&self) -> &str {
match *self {
GetUsagePlanKeyError::BadRequest(ref cause) => cause,
GetUsagePlanKeyError::NotFound(ref cause) => cause,
GetUsagePlanKeyError::TooManyRequests(ref cause) => cause,
GetUsagePlanKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUsagePlanKeysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUsagePlanKeysError {
fn description(&self) -> &str {
match *self {
GetUsagePlanKeysError::BadRequest(ref cause) => cause,
GetUsagePlanKeysError::NotFound(ref cause) => cause,
GetUsagePlanKeysError::TooManyRequests(ref cause) => cause,
GetUsagePlanKeysError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetUsagePlansError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetUsagePlansError {
fn description(&self) -> &str {
match *self {
GetUsagePlansError::BadRequest(ref cause) => cause,
GetUsagePlansError::Conflict(ref cause) => cause,
GetUsagePlansError::NotFound(ref cause) => cause,
GetUsagePlansError::TooManyRequests(ref cause) => cause,
GetUsagePlansError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetVpcLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetVpcLinkError {
fn description(&self) -> &str {
match *self {
GetVpcLinkError::NotFound(ref cause) => cause,
GetVpcLinkError::TooManyRequests(ref cause) => cause,
GetVpcLinkError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetVpcLinksError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetVpcLinksError {
fn description(&self) -> &str {
match *self {
GetVpcLinksError::BadRequest(ref cause) => cause,
GetVpcLinksError::TooManyRequests(ref cause) => cause,
GetVpcLinksError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ImportApiKeysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ImportApiKeysError {
fn description(&self) -> &str {
match *self {
ImportApiKeysError::BadRequest(ref cause) => cause,
ImportApiKeysError::Conflict(ref cause) => cause,
ImportApiKeysError::LimitExceeded(ref cause) => cause,
ImportApiKeysError::NotFound(ref cause) => cause,
ImportApiKeysError::TooManyRequests(ref cause) => cause,
ImportApiKeysError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ImportDocumentationPartsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ImportDocumentationPartsError {
fn description(&self) -> &str {
match *self {
ImportDocumentationPartsError::BadRequest(ref cause) => cause,
ImportDocumentationPartsError::LimitExceeded(ref cause) => cause,
ImportDocumentationPartsError::NotFound(ref cause) => cause,
ImportDocumentationPartsError::TooManyRequests(ref cause) => cause,
ImportDocumentationPartsError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ImportRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ImportRestApiError {
fn description(&self) -> &str {
match *self {
ImportRestApiError::BadRequest(ref cause) => cause,
ImportRestApiError::Conflict(ref cause) => cause,
ImportRestApiError::LimitExceeded(ref cause) => cause,
ImportRestApiError::TooManyRequests(ref cause) => cause,
ImportRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutGatewayResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutGatewayResponseError {
fn description(&self) -> &str {
match *self {
PutGatewayResponseError::BadRequest(ref cause) => cause,
PutGatewayResponseError::LimitExceeded(ref cause) => cause,
PutGatewayResponseError::NotFound(ref cause) => cause,
PutGatewayResponseError::TooManyRequests(ref cause) => cause,
PutGatewayResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutIntegrationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutIntegrationError {
fn description(&self) -> &str {
match *self {
PutIntegrationError::BadRequest(ref cause) => cause,
PutIntegrationError::Conflict(ref cause) => cause,
PutIntegrationError::NotFound(ref cause) => cause,
PutIntegrationError::TooManyRequests(ref cause) => cause,
PutIntegrationError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutIntegrationResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutIntegrationResponseError {
fn description(&self) -> &str {
match *self {
PutIntegrationResponseError::BadRequest(ref cause) => cause,
PutIntegrationResponseError::Conflict(ref cause) => cause,
PutIntegrationResponseError::LimitExceeded(ref cause) => cause,
PutIntegrationResponseError::NotFound(ref cause) => cause,
PutIntegrationResponseError::TooManyRequests(ref cause) => cause,
PutIntegrationResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutMethodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutMethodError {
fn description(&self) -> &str {
match *self {
PutMethodError::BadRequest(ref cause) => cause,
PutMethodError::Conflict(ref cause) => cause,
PutMethodError::LimitExceeded(ref cause) => cause,
PutMethodError::NotFound(ref cause) => cause,
PutMethodError::TooManyRequests(ref cause) => cause,
PutMethodError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutMethodResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutMethodResponseError {
fn description(&self) -> &str {
match *self {
PutMethodResponseError::BadRequest(ref cause) => cause,
PutMethodResponseError::Conflict(ref cause) => cause,
PutMethodResponseError::LimitExceeded(ref cause) => cause,
PutMethodResponseError::NotFound(ref cause) => cause,
PutMethodResponseError::TooManyRequests(ref cause) => cause,
PutMethodResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for PutRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for PutRestApiError {
fn description(&self) -> &str {
match *self {
PutRestApiError::BadRequest(ref cause) => cause,
PutRestApiError::Conflict(ref cause) => cause,
PutRestApiError::LimitExceeded(ref cause) => cause,
PutRestApiError::NotFound(ref cause) => cause,
PutRestApiError::TooManyRequests(ref cause) => cause,
PutRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::BadRequest(ref cause) => cause,
TagResourceError::Conflict(ref cause) => cause,
TagResourceError::LimitExceeded(ref cause) => cause,
TagResourceError::NotFound(ref cause) => cause,
TagResourceError::TooManyRequests(ref cause) => cause,
TagResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TestInvokeAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestInvokeAuthorizerError {
fn description(&self) -> &str {
match *self {
TestInvokeAuthorizerError::BadRequest(ref cause) => cause,
TestInvokeAuthorizerError::NotFound(ref cause) => cause,
TestInvokeAuthorizerError::TooManyRequests(ref cause) => cause,
TestInvokeAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TestInvokeMethodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TestInvokeMethodError {
fn description(&self) -> &str {
match *self {
TestInvokeMethodError::BadRequest(ref cause) => cause,
TestInvokeMethodError::NotFound(ref cause) => cause,
TestInvokeMethodError::TooManyRequests(ref cause) => cause,
TestInvokeMethodError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::BadRequest(ref cause) => cause,
UntagResourceError::Conflict(ref cause) => cause,
UntagResourceError::NotFound(ref cause) => cause,
UntagResourceError::TooManyRequests(ref cause) => cause,
UntagResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAccountError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAccountError {
fn description(&self) -> &str {
match *self {
UpdateAccountError::BadRequest(ref cause) => cause,
UpdateAccountError::NotFound(ref cause) => cause,
UpdateAccountError::TooManyRequests(ref cause) => cause,
UpdateAccountError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateApiKeyError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApiKeyError {
fn description(&self) -> &str {
match *self {
UpdateApiKeyError::BadRequest(ref cause) => cause,
UpdateApiKeyError::Conflict(ref cause) => cause,
UpdateApiKeyError::NotFound(ref cause) => cause,
UpdateApiKeyError::TooManyRequests(ref cause) => cause,
UpdateApiKeyError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateAuthorizerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateAuthorizerError {
fn description(&self) -> &str {
match *self {
UpdateAuthorizerError::BadRequest(ref cause) => cause,
UpdateAuthorizerError::NotFound(ref cause) => cause,
UpdateAuthorizerError::TooManyRequests(ref cause) => cause,
UpdateAuthorizerError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateBasePathMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateBasePathMappingError {
fn description(&self) -> &str {
match *self {
UpdateBasePathMappingError::BadRequest(ref cause) => cause,
UpdateBasePathMappingError::Conflict(ref cause) => cause,
UpdateBasePathMappingError::NotFound(ref cause) => cause,
UpdateBasePathMappingError::TooManyRequests(ref cause) => cause,
UpdateBasePathMappingError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateClientCertificateError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateClientCertificateError {
fn description(&self) -> &str {
match *self {
UpdateClientCertificateError::BadRequest(ref cause) => cause,
UpdateClientCertificateError::NotFound(ref cause) => cause,
UpdateClientCertificateError::TooManyRequests(ref cause) => cause,
UpdateClientCertificateError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDeploymentError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDeploymentError {
fn description(&self) -> &str {
match *self {
UpdateDeploymentError::BadRequest(ref cause) => cause,
UpdateDeploymentError::NotFound(ref cause) => cause,
UpdateDeploymentError::ServiceUnavailable(ref cause) => cause,
UpdateDeploymentError::TooManyRequests(ref cause) => cause,
UpdateDeploymentError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDocumentationPartError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDocumentationPartError {
fn description(&self) -> &str {
match *self {
UpdateDocumentationPartError::BadRequest(ref cause) => cause,
UpdateDocumentationPartError::Conflict(ref cause) => cause,
UpdateDocumentationPartError::LimitExceeded(ref cause) => cause,
UpdateDocumentationPartError::NotFound(ref cause) => cause,
UpdateDocumentationPartError::TooManyRequests(ref cause) => cause,
UpdateDocumentationPartError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDocumentationVersionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDocumentationVersionError {
fn description(&self) -> &str {
match *self {
UpdateDocumentationVersionError::BadRequest(ref cause) => cause,
UpdateDocumentationVersionError::Conflict(ref cause) => cause,
UpdateDocumentationVersionError::NotFound(ref cause) => cause,
UpdateDocumentationVersionError::TooManyRequests(ref cause) => cause,
UpdateDocumentationVersionError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDomainNameError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDomainNameError {
fn description(&self) -> &str {
match *self {
UpdateDomainNameError::BadRequest(ref cause) => cause,
UpdateDomainNameError::Conflict(ref cause) => cause,
UpdateDomainNameError::NotFound(ref cause) => cause,
UpdateDomainNameError::TooManyRequests(ref cause) => cause,
UpdateDomainNameError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateGatewayResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateGatewayResponseError {
fn description(&self) -> &str {
match *self {
UpdateGatewayResponseError::BadRequest(ref cause) => cause,
UpdateGatewayResponseError::NotFound(ref cause) => cause,
UpdateGatewayResponseError::TooManyRequests(ref cause) => cause,
UpdateGatewayResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateIntegrationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateIntegrationError {
fn description(&self) -> &str {
match *self {
UpdateIntegrationError::BadRequest(ref cause) => cause,
UpdateIntegrationError::Conflict(ref cause) => cause,
UpdateIntegrationError::NotFound(ref cause) => cause,
UpdateIntegrationError::TooManyRequests(ref cause) => cause,
UpdateIntegrationError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateIntegrationResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateIntegrationResponseError {
fn description(&self) -> &str {
match *self {
UpdateIntegrationResponseError::BadRequest(ref cause) => cause,
UpdateIntegrationResponseError::Conflict(ref cause) => cause,
UpdateIntegrationResponseError::NotFound(ref cause) => cause,
UpdateIntegrationResponseError::TooManyRequests(ref cause) => cause,
UpdateIntegrationResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateMethodError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMethodError {
fn description(&self) -> &str {
match *self {
UpdateMethodError::BadRequest(ref cause) => cause,
UpdateMethodError::Conflict(ref cause) => cause,
UpdateMethodError::NotFound(ref cause) => cause,
UpdateMethodError::TooManyRequests(ref cause) => cause,
UpdateMethodError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateMethodResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateMethodResponseError {
fn description(&self) -> &str {
match *self {
UpdateMethodResponseError::BadRequest(ref cause) => cause,
UpdateMethodResponseError::Conflict(ref cause) => cause,
UpdateMethodResponseError::LimitExceeded(ref cause) => cause,
UpdateMethodResponseError::NotFound(ref cause) => cause,
UpdateMethodResponseError::TooManyRequests(ref cause) => cause,
UpdateMethodResponseError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateModelError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateModelError {
fn description(&self) -> &str {
match *self {
UpdateModelError::BadRequest(ref cause) => cause,
UpdateModelError::Conflict(ref cause) => cause,
UpdateModelError::NotFound(ref cause) => cause,
UpdateModelError::TooManyRequests(ref cause) => cause,
UpdateModelError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRequestValidatorError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRequestValidatorError {
fn description(&self) -> &str {
match *self {
UpdateRequestValidatorError::BadRequest(ref cause) => cause,
UpdateRequestValidatorError::NotFound(ref cause) => cause,
UpdateRequestValidatorError::TooManyRequests(ref cause) => cause,
UpdateRequestValidatorError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateResourceError {
fn description(&self) -> &str {
match *self {
UpdateResourceError::BadRequest(ref cause) => cause,
UpdateResourceError::Conflict(ref cause) => cause,
UpdateResourceError::NotFound(ref cause) => cause,
UpdateResourceError::TooManyRequests(ref cause) => cause,
UpdateResourceError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRestApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRestApiError {
fn description(&self) -> &str {
match *self {
UpdateRestApiError::BadRequest(ref cause) => cause,
UpdateRestApiError::Conflict(ref cause) => cause,
UpdateRestApiError::NotFound(ref cause) => cause,
UpdateRestApiError::TooManyRequests(ref cause) => cause,
UpdateRestApiError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateStageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateStageError {
fn description(&self) -> &str {
match *self {
UpdateStageError::BadRequest(ref cause) => cause,
UpdateStageError::Conflict(ref cause) => cause,
UpdateStageError::NotFound(ref cause) => cause,
UpdateStageError::TooManyRequests(ref cause) => cause,
UpdateStageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUsageError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUsageError {
fn description(&self) -> &str {
match *self {
UpdateUsageError::BadRequest(ref cause) => cause,
UpdateUsageError::NotFound(ref cause) => cause,
UpdateUsageError::TooManyRequests(ref cause) => cause,
UpdateUsageError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateUsagePlanError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateUsagePlanError {
fn description(&self) -> &str {
match *self {
UpdateUsagePlanError::BadRequest(ref cause) => cause,
UpdateUsagePlanError::Conflict(ref cause) => cause,
UpdateUsagePlanError::NotFound(ref cause) => cause,
UpdateUsagePlanError::TooManyRequests(ref cause) => cause,
UpdateUsagePlanError::Unauthorized(ref cause) => cause,
}
}
}
#[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),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateVpcLinkError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateVpcLinkError {
fn description(&self) -> &str {
match *self {
UpdateVpcLinkError::BadRequest(ref cause) => cause,
UpdateVpcLinkError::Conflict(ref cause) => cause,
UpdateVpcLinkError::NotFound(ref cause) => cause,
UpdateVpcLinkError::TooManyRequests(ref cause) => cause,
UpdateVpcLinkError::Unauthorized(ref cause) => cause,
}
}
}
pub trait ApiGateway {
fn create_api_key(&self, input: CreateApiKeyRequest)
-> RusotoFuture<ApiKey, CreateApiKeyError>;
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<Authorizer, CreateAuthorizerError>;
fn create_base_path_mapping(
&self,
input: CreateBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, CreateBasePathMappingError>;
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<Deployment, CreateDeploymentError>;
fn create_documentation_part(
&self,
input: CreateDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, CreateDocumentationPartError>;
fn create_documentation_version(
&self,
input: CreateDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, CreateDocumentationVersionError>;
fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> RusotoFuture<DomainName, CreateDomainNameError>;
fn create_model(&self, input: CreateModelRequest) -> RusotoFuture<Model, CreateModelError>;
fn create_request_validator(
&self,
input: CreateRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, CreateRequestValidatorError>;
fn create_resource(
&self,
input: CreateResourceRequest,
) -> RusotoFuture<Resource, CreateResourceError>;
fn create_rest_api(
&self,
input: CreateRestApiRequest,
) -> RusotoFuture<RestApi, CreateRestApiError>;
fn create_stage(&self, input: CreateStageRequest) -> RusotoFuture<Stage, CreateStageError>;
fn create_usage_plan(
&self,
input: CreateUsagePlanRequest,
) -> RusotoFuture<UsagePlan, CreateUsagePlanError>;
fn create_usage_plan_key(
&self,
input: CreateUsagePlanKeyRequest,
) -> RusotoFuture<UsagePlanKey, CreateUsagePlanKeyError>;
fn create_vpc_link(
&self,
input: CreateVpcLinkRequest,
) -> RusotoFuture<VpcLink, CreateVpcLinkError>;
fn delete_api_key(&self, input: DeleteApiKeyRequest) -> RusotoFuture<(), DeleteApiKeyError>;
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<(), DeleteAuthorizerError>;
fn delete_base_path_mapping(
&self,
input: DeleteBasePathMappingRequest,
) -> RusotoFuture<(), DeleteBasePathMappingError>;
fn delete_client_certificate(
&self,
input: DeleteClientCertificateRequest,
) -> RusotoFuture<(), DeleteClientCertificateError>;
fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> RusotoFuture<(), DeleteDeploymentError>;
fn delete_documentation_part(
&self,
input: DeleteDocumentationPartRequest,
) -> RusotoFuture<(), DeleteDocumentationPartError>;
fn delete_documentation_version(
&self,
input: DeleteDocumentationVersionRequest,
) -> RusotoFuture<(), DeleteDocumentationVersionError>;
fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> RusotoFuture<(), DeleteDomainNameError>;
fn delete_gateway_response(
&self,
input: DeleteGatewayResponseRequest,
) -> RusotoFuture<(), DeleteGatewayResponseError>;
fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> RusotoFuture<(), DeleteIntegrationError>;
fn delete_integration_response(
&self,
input: DeleteIntegrationResponseRequest,
) -> RusotoFuture<(), DeleteIntegrationResponseError>;
fn delete_method(&self, input: DeleteMethodRequest) -> RusotoFuture<(), DeleteMethodError>;
fn delete_method_response(
&self,
input: DeleteMethodResponseRequest,
) -> RusotoFuture<(), DeleteMethodResponseError>;
fn delete_model(&self, input: DeleteModelRequest) -> RusotoFuture<(), DeleteModelError>;
fn delete_request_validator(
&self,
input: DeleteRequestValidatorRequest,
) -> RusotoFuture<(), DeleteRequestValidatorError>;
fn delete_resource(
&self,
input: DeleteResourceRequest,
) -> RusotoFuture<(), DeleteResourceError>;
fn delete_rest_api(&self, input: DeleteRestApiRequest) -> RusotoFuture<(), DeleteRestApiError>;
fn delete_stage(&self, input: DeleteStageRequest) -> RusotoFuture<(), DeleteStageError>;
fn delete_usage_plan(
&self,
input: DeleteUsagePlanRequest,
) -> RusotoFuture<(), DeleteUsagePlanError>;
fn delete_usage_plan_key(
&self,
input: DeleteUsagePlanKeyRequest,
) -> RusotoFuture<(), DeleteUsagePlanKeyError>;
fn delete_vpc_link(&self, input: DeleteVpcLinkRequest) -> RusotoFuture<(), DeleteVpcLinkError>;
fn flush_stage_authorizers_cache(
&self,
input: FlushStageAuthorizersCacheRequest,
) -> RusotoFuture<(), FlushStageAuthorizersCacheError>;
fn flush_stage_cache(
&self,
input: FlushStageCacheRequest,
) -> RusotoFuture<(), FlushStageCacheError>;
fn generate_client_certificate(
&self,
input: GenerateClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, GenerateClientCertificateError>;
fn get_account(&self) -> RusotoFuture<Account, GetAccountError>;
fn get_api_key(&self, input: GetApiKeyRequest) -> RusotoFuture<ApiKey, GetApiKeyError>;
fn get_api_keys(&self, input: GetApiKeysRequest) -> RusotoFuture<ApiKeys, GetApiKeysError>;
fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> RusotoFuture<Authorizer, GetAuthorizerError>;
fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> RusotoFuture<Authorizers, GetAuthorizersError>;
fn get_base_path_mapping(
&self,
input: GetBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, GetBasePathMappingError>;
fn get_base_path_mappings(
&self,
input: GetBasePathMappingsRequest,
) -> RusotoFuture<BasePathMappings, GetBasePathMappingsError>;
fn get_client_certificate(
&self,
input: GetClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, GetClientCertificateError>;
fn get_client_certificates(
&self,
input: GetClientCertificatesRequest,
) -> RusotoFuture<ClientCertificates, GetClientCertificatesError>;
fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> RusotoFuture<Deployment, GetDeploymentError>;
fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> RusotoFuture<Deployments, GetDeploymentsError>;
fn get_documentation_part(
&self,
input: GetDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, GetDocumentationPartError>;
fn get_documentation_parts(
&self,
input: GetDocumentationPartsRequest,
) -> RusotoFuture<DocumentationParts, GetDocumentationPartsError>;
fn get_documentation_version(
&self,
input: GetDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, GetDocumentationVersionError>;
fn get_documentation_versions(
&self,
input: GetDocumentationVersionsRequest,
) -> RusotoFuture<DocumentationVersions, GetDocumentationVersionsError>;
fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> RusotoFuture<DomainName, GetDomainNameError>;
fn get_domain_names(
&self,
input: GetDomainNamesRequest,
) -> RusotoFuture<DomainNames, GetDomainNamesError>;
fn get_export(&self, input: GetExportRequest) -> RusotoFuture<ExportResponse, GetExportError>;
fn get_gateway_response(
&self,
input: GetGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, GetGatewayResponseError>;
fn get_gateway_responses(
&self,
input: GetGatewayResponsesRequest,
) -> RusotoFuture<GatewayResponses, GetGatewayResponsesError>;
fn get_integration(
&self,
input: GetIntegrationRequest,
) -> RusotoFuture<Integration, GetIntegrationError>;
fn get_integration_response(
&self,
input: GetIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, GetIntegrationResponseError>;
fn get_method(&self, input: GetMethodRequest) -> RusotoFuture<Method, GetMethodError>;
fn get_method_response(
&self,
input: GetMethodResponseRequest,
) -> RusotoFuture<MethodResponse, GetMethodResponseError>;
fn get_model(&self, input: GetModelRequest) -> RusotoFuture<Model, GetModelError>;
fn get_model_template(
&self,
input: GetModelTemplateRequest,
) -> RusotoFuture<Template, GetModelTemplateError>;
fn get_models(&self, input: GetModelsRequest) -> RusotoFuture<Models, GetModelsError>;
fn get_request_validator(
&self,
input: GetRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, GetRequestValidatorError>;
fn get_request_validators(
&self,
input: GetRequestValidatorsRequest,
) -> RusotoFuture<RequestValidators, GetRequestValidatorsError>;
fn get_resource(&self, input: GetResourceRequest) -> RusotoFuture<Resource, GetResourceError>;
fn get_resources(
&self,
input: GetResourcesRequest,
) -> RusotoFuture<Resources, GetResourcesError>;
fn get_rest_api(&self, input: GetRestApiRequest) -> RusotoFuture<RestApi, GetRestApiError>;
fn get_rest_apis(&self, input: GetRestApisRequest) -> RusotoFuture<RestApis, GetRestApisError>;
fn get_sdk(&self, input: GetSdkRequest) -> RusotoFuture<SdkResponse, GetSdkError>;
fn get_sdk_type(&self, input: GetSdkTypeRequest) -> RusotoFuture<SdkType, GetSdkTypeError>;
fn get_sdk_types(&self, input: GetSdkTypesRequest) -> RusotoFuture<SdkTypes, GetSdkTypesError>;
fn get_stage(&self, input: GetStageRequest) -> RusotoFuture<Stage, GetStageError>;
fn get_stages(&self, input: GetStagesRequest) -> RusotoFuture<Stages, GetStagesError>;
fn get_tags(&self, input: GetTagsRequest) -> RusotoFuture<Tags, GetTagsError>;
fn get_usage(&self, input: GetUsageRequest) -> RusotoFuture<Usage, GetUsageError>;
fn get_usage_plan(
&self,
input: GetUsagePlanRequest,
) -> RusotoFuture<UsagePlan, GetUsagePlanError>;
fn get_usage_plan_key(
&self,
input: GetUsagePlanKeyRequest,
) -> RusotoFuture<UsagePlanKey, GetUsagePlanKeyError>;
fn get_usage_plan_keys(
&self,
input: GetUsagePlanKeysRequest,
) -> RusotoFuture<UsagePlanKeys, GetUsagePlanKeysError>;
fn get_usage_plans(
&self,
input: GetUsagePlansRequest,
) -> RusotoFuture<UsagePlans, GetUsagePlansError>;
fn get_vpc_link(&self, input: GetVpcLinkRequest) -> RusotoFuture<VpcLink, GetVpcLinkError>;
fn get_vpc_links(&self, input: GetVpcLinksRequest) -> RusotoFuture<VpcLinks, GetVpcLinksError>;
fn import_api_keys(
&self,
input: ImportApiKeysRequest,
) -> RusotoFuture<ApiKeyIds, ImportApiKeysError>;
fn import_documentation_parts(
&self,
input: ImportDocumentationPartsRequest,
) -> RusotoFuture<DocumentationPartIds, ImportDocumentationPartsError>;
fn import_rest_api(
&self,
input: ImportRestApiRequest,
) -> RusotoFuture<RestApi, ImportRestApiError>;
fn put_gateway_response(
&self,
input: PutGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, PutGatewayResponseError>;
fn put_integration(
&self,
input: PutIntegrationRequest,
) -> RusotoFuture<Integration, PutIntegrationError>;
fn put_integration_response(
&self,
input: PutIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, PutIntegrationResponseError>;
fn put_method(&self, input: PutMethodRequest) -> RusotoFuture<Method, PutMethodError>;
fn put_method_response(
&self,
input: PutMethodResponseRequest,
) -> RusotoFuture<MethodResponse, PutMethodResponseError>;
fn put_rest_api(&self, input: PutRestApiRequest) -> RusotoFuture<RestApi, PutRestApiError>;
fn tag_resource(&self, input: TagResourceRequest) -> RusotoFuture<(), TagResourceError>;
fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> RusotoFuture<TestInvokeAuthorizerResponse, TestInvokeAuthorizerError>;
fn test_invoke_method(
&self,
input: TestInvokeMethodRequest,
) -> RusotoFuture<TestInvokeMethodResponse, TestInvokeMethodError>;
fn untag_resource(&self, input: UntagResourceRequest) -> RusotoFuture<(), UntagResourceError>;
fn update_account(
&self,
input: UpdateAccountRequest,
) -> RusotoFuture<Account, UpdateAccountError>;
fn update_api_key(&self, input: UpdateApiKeyRequest)
-> RusotoFuture<ApiKey, UpdateApiKeyError>;
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<Authorizer, UpdateAuthorizerError>;
fn update_base_path_mapping(
&self,
input: UpdateBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, UpdateBasePathMappingError>;
fn update_client_certificate(
&self,
input: UpdateClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, UpdateClientCertificateError>;
fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> RusotoFuture<Deployment, UpdateDeploymentError>;
fn update_documentation_part(
&self,
input: UpdateDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, UpdateDocumentationPartError>;
fn update_documentation_version(
&self,
input: UpdateDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, UpdateDocumentationVersionError>;
fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> RusotoFuture<DomainName, UpdateDomainNameError>;
fn update_gateway_response(
&self,
input: UpdateGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, UpdateGatewayResponseError>;
fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> RusotoFuture<Integration, UpdateIntegrationError>;
fn update_integration_response(
&self,
input: UpdateIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, UpdateIntegrationResponseError>;
fn update_method(&self, input: UpdateMethodRequest) -> RusotoFuture<Method, UpdateMethodError>;
fn update_method_response(
&self,
input: UpdateMethodResponseRequest,
) -> RusotoFuture<MethodResponse, UpdateMethodResponseError>;
fn update_model(&self, input: UpdateModelRequest) -> RusotoFuture<Model, UpdateModelError>;
fn update_request_validator(
&self,
input: UpdateRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, UpdateRequestValidatorError>;
fn update_resource(
&self,
input: UpdateResourceRequest,
) -> RusotoFuture<Resource, UpdateResourceError>;
fn update_rest_api(
&self,
input: UpdateRestApiRequest,
) -> RusotoFuture<RestApi, UpdateRestApiError>;
fn update_stage(&self, input: UpdateStageRequest) -> RusotoFuture<Stage, UpdateStageError>;
fn update_usage(&self, input: UpdateUsageRequest) -> RusotoFuture<Usage, UpdateUsageError>;
fn update_usage_plan(
&self,
input: UpdateUsagePlanRequest,
) -> RusotoFuture<UsagePlan, UpdateUsagePlanError>;
fn update_vpc_link(
&self,
input: UpdateVpcLinkRequest,
) -> RusotoFuture<VpcLink, 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,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
ApiGatewayClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl ApiGateway for ApiGatewayClient {
fn create_api_key(
&self,
input: CreateApiKeyRequest,
) -> RusotoFuture<ApiKey, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateApiKeyError::from_response(response))),
)
}
})
}
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<Authorizer, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Authorizer, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAuthorizerError::from_response(response))),
)
}
})
}
fn create_base_path_mapping(
&self,
input: CreateBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BasePathMapping, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateBasePathMappingError::from_response(response))
}),
)
}
})
}
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<Deployment, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Deployment, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDeploymentError::from_response(response))),
)
}
})
}
fn create_documentation_part(
&self,
input: CreateDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDocumentationPartError::from_response(response))
}))
}
})
}
fn create_documentation_version(
&self,
input: CreateDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDocumentationVersionError::from_response(response))
}))
}
})
}
fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> RusotoFuture<DomainName, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DomainName, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDomainNameError::from_response(response))),
)
}
})
}
fn create_model(&self, input: CreateModelRequest) -> RusotoFuture<Model, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateModelError::from_response(response))),
)
}
})
}
fn create_request_validator(
&self,
input: CreateRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateRequestValidatorError::from_response(response))
}),
)
}
})
}
fn create_resource(
&self,
input: CreateResourceRequest,
) -> RusotoFuture<Resource, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Resource, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateResourceError::from_response(response))),
)
}
})
}
fn create_rest_api(
&self,
input: CreateRestApiRequest,
) -> RusotoFuture<RestApi, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateRestApiError::from_response(response))),
)
}
})
}
fn create_stage(&self, input: CreateStageRequest) -> RusotoFuture<Stage, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateStageError::from_response(response))),
)
}
})
}
fn create_usage_plan(
&self,
input: CreateUsagePlanRequest,
) -> RusotoFuture<UsagePlan, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlan, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateUsagePlanError::from_response(response))),
)
}
})
}
fn create_usage_plan_key(
&self,
input: CreateUsagePlanKeyRequest,
) -> RusotoFuture<UsagePlanKey, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlanKey, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateUsagePlanKeyError::from_response(response))),
)
}
})
}
fn create_vpc_link(
&self,
input: CreateVpcLinkRequest,
) -> RusotoFuture<VpcLink, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateVpcLinkError::from_response(response))),
)
}
})
}
fn delete_api_key(&self, input: DeleteApiKeyRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteApiKeyError::from_response(response))),
)
}
})
}
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteAuthorizerError::from_response(response))),
)
}
})
}
fn delete_base_path_mapping(
&self,
input: DeleteBasePathMappingRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteBasePathMappingError::from_response(response))
}),
)
}
})
}
fn delete_client_certificate(
&self,
input: DeleteClientCertificateRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteClientCertificateError::from_response(response))
}))
}
})
}
fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDeploymentError::from_response(response))),
)
}
})
}
fn delete_documentation_part(
&self,
input: DeleteDocumentationPartRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDocumentationPartError::from_response(response))
}))
}
})
}
fn delete_documentation_version(
&self,
input: DeleteDocumentationVersionRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDocumentationVersionError::from_response(response))
}))
}
})
}
fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteDomainNameError::from_response(response))),
)
}
})
}
fn delete_gateway_response(
&self,
input: DeleteGatewayResponseRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteGatewayResponseError::from_response(response))
}),
)
}
})
}
fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteIntegrationError::from_response(response))),
)
}
})
}
fn delete_integration_response(
&self,
input: DeleteIntegrationResponseRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteIntegrationResponseError::from_response(response))
}))
}
})
}
fn delete_method(&self, input: DeleteMethodRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteMethodError::from_response(response))),
)
}
})
}
fn delete_method_response(
&self,
input: DeleteMethodResponseRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteMethodResponseError::from_response(response))
}),
)
}
})
}
fn delete_model(&self, input: DeleteModelRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteModelError::from_response(response))),
)
}
})
}
fn delete_request_validator(
&self,
input: DeleteRequestValidatorRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteRequestValidatorError::from_response(response))
}),
)
}
})
}
fn delete_resource(
&self,
input: DeleteResourceRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteResourceError::from_response(response))),
)
}
})
}
fn delete_rest_api(&self, input: DeleteRestApiRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteRestApiError::from_response(response))),
)
}
})
}
fn delete_stage(&self, input: DeleteStageRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteStageError::from_response(response))),
)
}
})
}
fn delete_usage_plan(
&self,
input: DeleteUsagePlanRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUsagePlanError::from_response(response))),
)
}
})
}
fn delete_usage_plan_key(
&self,
input: DeleteUsagePlanKeyRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteUsagePlanKeyError::from_response(response))),
)
}
})
}
fn delete_vpc_link(&self, input: DeleteVpcLinkRequest) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteVpcLinkError::from_response(response))),
)
}
})
}
fn flush_stage_authorizers_cache(
&self,
input: FlushStageAuthorizersCacheRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(FlushStageAuthorizersCacheError::from_response(response))
}))
}
})
}
fn flush_stage_cache(
&self,
input: FlushStageCacheRequest,
) -> RusotoFuture<(), 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 202 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(FlushStageCacheError::from_response(response))),
)
}
})
}
fn generate_client_certificate(
&self,
input: GenerateClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GenerateClientCertificateError::from_response(response))
}))
}
})
}
fn get_account(&self) -> RusotoFuture<Account, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Account, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAccountError::from_response(response))),
)
}
})
}
fn get_api_key(&self, input: GetApiKeyRequest) -> RusotoFuture<ApiKey, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApiKeyError::from_response(response))),
)
}
})
}
fn get_api_keys(&self, input: GetApiKeysRequest) -> RusotoFuture<ApiKeys, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKeys, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApiKeysError::from_response(response))),
)
}
})
}
fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> RusotoFuture<Authorizer, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Authorizer, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAuthorizerError::from_response(response))),
)
}
})
}
fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> RusotoFuture<Authorizers, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Authorizers, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAuthorizersError::from_response(response))),
)
}
})
}
fn get_base_path_mapping(
&self,
input: GetBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BasePathMapping, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetBasePathMappingError::from_response(response))),
)
}
})
}
fn get_base_path_mappings(
&self,
input: GetBasePathMappingsRequest,
) -> RusotoFuture<BasePathMappings, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BasePathMappings, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetBasePathMappingsError::from_response(response))
}),
)
}
})
}
fn get_client_certificate(
&self,
input: GetClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetClientCertificateError::from_response(response))
}),
)
}
})
}
fn get_client_certificates(
&self,
input: GetClientCertificatesRequest,
) -> RusotoFuture<ClientCertificates, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificates, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetClientCertificatesError::from_response(response))
}),
)
}
})
}
fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> RusotoFuture<Deployment, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Deployment, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeploymentError::from_response(response))),
)
}
})
}
fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> RusotoFuture<Deployments, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Deployments, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeploymentsError::from_response(response))),
)
}
})
}
fn get_documentation_part(
&self,
input: GetDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDocumentationPartError::from_response(response))
}),
)
}
})
}
fn get_documentation_parts(
&self,
input: GetDocumentationPartsRequest,
) -> RusotoFuture<DocumentationParts, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationParts, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetDocumentationPartsError::from_response(response))
}),
)
}
})
}
fn get_documentation_version(
&self,
input: GetDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetDocumentationVersionError::from_response(response))
}))
}
})
}
fn get_documentation_versions(
&self,
input: GetDocumentationVersionsRequest,
) -> RusotoFuture<DocumentationVersions, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersions, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetDocumentationVersionsError::from_response(response))
}))
}
})
}
fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> RusotoFuture<DomainName, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DomainName, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDomainNameError::from_response(response))),
)
}
})
}
fn get_domain_names(
&self,
input: GetDomainNamesRequest,
) -> RusotoFuture<DomainNames, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DomainNames, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDomainNamesError::from_response(response))),
)
}
})
}
fn get_export(&self, input: GetExportRequest) -> RusotoFuture<ExportResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
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 {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetExportError::from_response(response))),
)
}
})
}
fn get_gateway_response(
&self,
input: GetGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GatewayResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetGatewayResponseError::from_response(response))),
)
}
})
}
fn get_gateway_responses(
&self,
input: GetGatewayResponsesRequest,
) -> RusotoFuture<GatewayResponses, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GatewayResponses, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetGatewayResponsesError::from_response(response))
}),
)
}
})
}
fn get_integration(
&self,
input: GetIntegrationRequest,
) -> RusotoFuture<Integration, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Integration, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetIntegrationError::from_response(response))),
)
}
})
}
fn get_integration_response(
&self,
input: GetIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetIntegrationResponseError::from_response(response))
}),
)
}
})
}
fn get_method(&self, input: GetMethodRequest) -> RusotoFuture<Method, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetMethodError::from_response(response))),
)
}
})
}
fn get_method_response(
&self,
input: GetMethodResponseRequest,
) -> RusotoFuture<MethodResponse, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<MethodResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetMethodResponseError::from_response(response))),
)
}
})
}
fn get_model(&self, input: GetModelRequest) -> RusotoFuture<Model, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetModelError::from_response(response))),
)
}
})
}
fn get_model_template(
&self,
input: GetModelTemplateRequest,
) -> RusotoFuture<Template, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Template, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetModelTemplateError::from_response(response))),
)
}
})
}
fn get_models(&self, input: GetModelsRequest) -> RusotoFuture<Models, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Models, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetModelsError::from_response(response))),
)
}
})
}
fn get_request_validator(
&self,
input: GetRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetRequestValidatorError::from_response(response))
}),
)
}
})
}
fn get_request_validators(
&self,
input: GetRequestValidatorsRequest,
) -> RusotoFuture<RequestValidators, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidators, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetRequestValidatorsError::from_response(response))
}),
)
}
})
}
fn get_resource(&self, input: GetResourceRequest) -> RusotoFuture<Resource, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Resource, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetResourceError::from_response(response))),
)
}
})
}
fn get_resources(
&self,
input: GetResourcesRequest,
) -> RusotoFuture<Resources, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Resources, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetResourcesError::from_response(response))),
)
}
})
}
fn get_rest_api(&self, input: GetRestApiRequest) -> RusotoFuture<RestApi, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRestApiError::from_response(response))),
)
}
})
}
fn get_rest_apis(&self, input: GetRestApisRequest) -> RusotoFuture<RestApis, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RestApis, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRestApisError::from_response(response))),
)
}
})
}
fn get_sdk(&self, input: GetSdkRequest) -> RusotoFuture<SdkResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
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 {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSdkError::from_response(response))),
)
}
})
}
fn get_sdk_type(&self, input: GetSdkTypeRequest) -> RusotoFuture<SdkType, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<SdkType, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSdkTypeError::from_response(response))),
)
}
})
}
fn get_sdk_types(&self, input: GetSdkTypesRequest) -> RusotoFuture<SdkTypes, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<SdkTypes, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetSdkTypesError::from_response(response))),
)
}
})
}
fn get_stage(&self, input: GetStageRequest) -> RusotoFuture<Stage, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetStageError::from_response(response))),
)
}
})
}
fn get_stages(&self, input: GetStagesRequest) -> RusotoFuture<Stages, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Stages, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetStagesError::from_response(response))),
)
}
})
}
fn get_tags(&self, input: GetTagsRequest) -> RusotoFuture<Tags, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Tags, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetTagsError::from_response(response))),
)
}
})
}
fn get_usage(&self, input: GetUsageRequest) -> RusotoFuture<Usage, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Usage, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUsageError::from_response(response))),
)
}
})
}
fn get_usage_plan(
&self,
input: GetUsagePlanRequest,
) -> RusotoFuture<UsagePlan, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlan, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUsagePlanError::from_response(response))),
)
}
})
}
fn get_usage_plan_key(
&self,
input: GetUsagePlanKeyRequest,
) -> RusotoFuture<UsagePlanKey, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlanKey, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUsagePlanKeyError::from_response(response))),
)
}
})
}
fn get_usage_plan_keys(
&self,
input: GetUsagePlanKeysRequest,
) -> RusotoFuture<UsagePlanKeys, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlanKeys, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUsagePlanKeysError::from_response(response))),
)
}
})
}
fn get_usage_plans(
&self,
input: GetUsagePlansRequest,
) -> RusotoFuture<UsagePlans, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlans, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetUsagePlansError::from_response(response))),
)
}
})
}
fn get_vpc_link(&self, input: GetVpcLinkRequest) -> RusotoFuture<VpcLink, 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());
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetVpcLinkError::from_response(response))),
)
}
})
}
fn get_vpc_links(&self, input: GetVpcLinksRequest) -> RusotoFuture<VpcLinks, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<VpcLinks, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetVpcLinksError::from_response(response))),
)
}
})
}
fn import_api_keys(
&self,
input: ImportApiKeysRequest,
) -> RusotoFuture<ApiKeyIds, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ApiKeyIds, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ImportApiKeysError::from_response(response))),
)
}
})
}
fn import_documentation_parts(
&self,
input: ImportDocumentationPartsRequest,
) -> RusotoFuture<DocumentationPartIds, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPartIds, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ImportDocumentationPartsError::from_response(response))
}))
}
})
}
fn import_rest_api(
&self,
input: ImportRestApiRequest,
) -> RusotoFuture<RestApi, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ImportRestApiError::from_response(response))),
)
}
})
}
fn put_gateway_response(
&self,
input: PutGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GatewayResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutGatewayResponseError::from_response(response))),
)
}
})
}
fn put_integration(
&self,
input: PutIntegrationRequest,
) -> RusotoFuture<Integration, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Integration, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutIntegrationError::from_response(response))),
)
}
})
}
fn put_integration_response(
&self,
input: PutIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(PutIntegrationResponseError::from_response(response))
}),
)
}
})
}
fn put_method(&self, input: PutMethodRequest) -> RusotoFuture<Method, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutMethodError::from_response(response))),
)
}
})
}
fn put_method_response(
&self,
input: PutMethodResponseRequest,
) -> RusotoFuture<MethodResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<MethodResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutMethodResponseError::from_response(response))),
)
}
})
}
fn put_rest_api(&self, input: PutRestApiRequest) -> RusotoFuture<RestApi, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(PutRestApiError::from_response(response))),
)
}
})
}
fn tag_resource(&self, input: TagResourceRequest) -> RusotoFuture<(), 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn test_invoke_authorizer(
&self,
input: TestInvokeAuthorizerRequest,
) -> RusotoFuture<TestInvokeAuthorizerResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestInvokeAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(TestInvokeAuthorizerError::from_response(response))
}),
)
}
})
}
fn test_invoke_method(
&self,
input: TestInvokeMethodRequest,
) -> RusotoFuture<TestInvokeMethodResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TestInvokeMethodResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TestInvokeMethodError::from_response(response))),
)
}
})
}
fn untag_resource(&self, input: UntagResourceRequest) -> RusotoFuture<(), 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 204 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = ::std::mem::drop(response);
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_account(
&self,
input: UpdateAccountRequest,
) -> RusotoFuture<Account, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Account, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAccountError::from_response(response))),
)
}
})
}
fn update_api_key(
&self,
input: UpdateApiKeyRequest,
) -> RusotoFuture<ApiKey, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<ApiKey, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateApiKeyError::from_response(response))),
)
}
})
}
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<Authorizer, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Authorizer, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAuthorizerError::from_response(response))),
)
}
})
}
fn update_base_path_mapping(
&self,
input: UpdateBasePathMappingRequest,
) -> RusotoFuture<BasePathMapping, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<BasePathMapping, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateBasePathMappingError::from_response(response))
}),
)
}
})
}
fn update_client_certificate(
&self,
input: UpdateClientCertificateRequest,
) -> RusotoFuture<ClientCertificate, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ClientCertificate, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateClientCertificateError::from_response(response))
}))
}
})
}
fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> RusotoFuture<Deployment, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Deployment, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDeploymentError::from_response(response))),
)
}
})
}
fn update_documentation_part(
&self,
input: UpdateDocumentationPartRequest,
) -> RusotoFuture<DocumentationPart, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationPart, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDocumentationPartError::from_response(response))
}))
}
})
}
fn update_documentation_version(
&self,
input: UpdateDocumentationVersionRequest,
) -> RusotoFuture<DocumentationVersion, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DocumentationVersion, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDocumentationVersionError::from_response(response))
}))
}
})
}
fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> RusotoFuture<DomainName, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DomainName, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDomainNameError::from_response(response))),
)
}
})
}
fn update_gateway_response(
&self,
input: UpdateGatewayResponseRequest,
) -> RusotoFuture<GatewayResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GatewayResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateGatewayResponseError::from_response(response))
}),
)
}
})
}
fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> RusotoFuture<Integration, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Integration, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateIntegrationError::from_response(response))),
)
}
})
}
fn update_integration_response(
&self,
input: UpdateIntegrationResponseRequest,
) -> RusotoFuture<IntegrationResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<IntegrationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateIntegrationResponseError::from_response(response))
}))
}
})
}
fn update_method(&self, input: UpdateMethodRequest) -> RusotoFuture<Method, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Method, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateMethodError::from_response(response))),
)
}
})
}
fn update_method_response(
&self,
input: UpdateMethodResponseRequest,
) -> RusotoFuture<MethodResponse, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.as_u16() == 201 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<MethodResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateMethodResponseError::from_response(response))
}),
)
}
})
}
fn update_model(&self, input: UpdateModelRequest) -> RusotoFuture<Model, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Model, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateModelError::from_response(response))),
)
}
})
}
fn update_request_validator(
&self,
input: UpdateRequestValidatorRequest,
) -> RusotoFuture<RequestValidator, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<RequestValidator, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateRequestValidatorError::from_response(response))
}),
)
}
})
}
fn update_resource(
&self,
input: UpdateResourceRequest,
) -> RusotoFuture<Resource, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<Resource, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateResourceError::from_response(response))),
)
}
})
}
fn update_rest_api(
&self,
input: UpdateRestApiRequest,
) -> RusotoFuture<RestApi, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<RestApi, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateRestApiError::from_response(response))),
)
}
})
}
fn update_stage(&self, input: UpdateStageRequest) -> RusotoFuture<Stage, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Stage, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateStageError::from_response(response))),
)
}
})
}
fn update_usage(&self, input: UpdateUsageRequest) -> RusotoFuture<Usage, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<Usage, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateUsageError::from_response(response))),
)
}
})
}
fn update_usage_plan(
&self,
input: UpdateUsagePlanRequest,
) -> RusotoFuture<UsagePlan, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UsagePlan, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateUsagePlanError::from_response(response))),
)
}
})
}
fn update_vpc_link(
&self,
input: UpdateVpcLinkRequest,
) -> RusotoFuture<VpcLink, 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);
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
let result =
proto::json::ResponsePayload::new(&response).deserialize::<VpcLink, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateVpcLinkError::from_response(response))),
)
}
})
}
}