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, Serialize, Deserialize)]
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 Api {
#[serde(rename = "ApiEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_endpoint: Option<String>,
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: 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 = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ProtocolType")]
pub protocol_type: String,
#[serde(rename = "RouteSelectionExpression")]
pub route_selection_expression: 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 ApiMapping {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ApiMappingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_id: Option<String>,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "Stage")]
pub stage: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Authorizer {
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_type: Option<String>,
#[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<Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateApiMappingRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "Stage")]
pub stage: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateApiMappingResponse {
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiMappingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_id: Option<String>,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "Stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateApiRequest {
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "ProtocolType")]
pub protocol_type: String,
#[serde(rename = "RouteSelectionExpression")]
pub route_selection_expression: 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 CreateApiResponse {
#[serde(rename = "ApiEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_endpoint: Option<String>,
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: 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 = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ProtocolType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol_type: Option<String>,
#[serde(rename = "RouteSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_selection_expression: Option<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, Serialize)]
pub struct CreateAuthorizerRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
pub authorizer_type: String,
#[serde(rename = "AuthorizerUri")]
pub authorizer_uri: String,
#[serde(rename = "IdentitySource")]
pub identity_source: Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateAuthorizerResponse {
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_type: Option<String>,
#[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<Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDeploymentRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: 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 CreateDeploymentResponse {
#[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 = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status_message: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDomainNameRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDomainNameResponse {
#[serde(rename = "ApiMappingSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_selection_expression: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateIntegrationRequest {
#[serde(rename = "ApiId")]
pub api_id: 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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationType")]
pub integration_type: String,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateIntegrationResponse {
#[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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_id: Option<String>,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_selection_expression: Option<String>,
#[serde(rename = "IntegrationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_type: Option<String>,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateIntegrationResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "IntegrationResponseKey")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateIntegrationResponseResponse {
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_id: Option<String>,
#[serde(rename = "IntegrationResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateModelRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[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 = "Name")]
pub name: String,
#[serde(rename = "Schema")]
pub schema: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateModelResponse {
#[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 = "ModelId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_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, Serialize)]
pub struct CreateRouteRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteKey")]
pub route_key: String,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateRouteResponse {
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_id: Option<String>,
#[serde(rename = "RouteKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_key: Option<String>,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateRouteResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
pub route_id: String,
#[serde(rename = "RouteResponseKey")]
pub route_response_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateRouteResponseResponse {
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_id: Option<String>,
#[serde(rename = "RouteResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateStageRequest {
#[serde(rename = "AccessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ClientCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_certificate_id: Option<String>,
#[serde(rename = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
pub stage_name: 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 CreateStageResponse {
#[serde(rename = "AccessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[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 = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "LastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<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, Serialize)]
pub struct DeleteApiMappingRequest {
#[serde(rename = "ApiMappingId")]
pub api_mapping_id: String,
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteApiRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteAuthorizerRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "AuthorizerId")]
pub authorizer_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDeploymentRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "DeploymentId")]
pub deployment_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 DeleteIntegrationRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteIntegrationResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "IntegrationResponseId")]
pub integration_response_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteModelRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ModelId")]
pub model_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRouteRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "RouteId")]
pub route_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteRouteResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "RouteId")]
pub route_id: String,
#[serde(rename = "RouteResponseId")]
pub route_response_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteStageRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "StageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Deployment {
#[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 = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status_message: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DomainName {
#[serde(rename = "ApiMappingSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_selection_expression: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct DomainNameConfiguration {
#[serde(rename = "ApiGatewayDomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_gateway_domain_name: Option<String>,
#[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 = "EndpointType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub endpoint_type: Option<String>,
#[serde(rename = "HostedZoneId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub hosted_zone_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetApiMappingRequest {
#[serde(rename = "ApiMappingId")]
pub api_mapping_id: String,
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetApiMappingResponse {
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiMappingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_id: Option<String>,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "Stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetApiMappingsRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetApiMappingsResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<ApiMapping>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetApiRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetApiResponse {
#[serde(rename = "ApiEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_endpoint: Option<String>,
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: 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 = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ProtocolType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol_type: Option<String>,
#[serde(rename = "RouteSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_selection_expression: Option<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, Serialize)]
pub struct GetApisRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetApisResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Api>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAuthorizerRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "AuthorizerId")]
pub authorizer_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAuthorizerResponse {
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_type: Option<String>,
#[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<Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetAuthorizersRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetAuthorizersResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Authorizer>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeploymentRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "DeploymentId")]
pub deployment_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeploymentResponse {
#[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 = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status_message: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDeploymentsRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDeploymentsResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Deployment>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDomainNameRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDomainNameResponse {
#[serde(rename = "ApiMappingSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_selection_expression: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetDomainNamesRequest {
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetDomainNamesResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<DomainName>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIntegrationRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIntegrationResponse {
#[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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_id: Option<String>,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_selection_expression: Option<String>,
#[serde(rename = "IntegrationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_type: Option<String>,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIntegrationResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "IntegrationResponseId")]
pub integration_response_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIntegrationResponseResponse {
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_id: Option<String>,
#[serde(rename = "IntegrationResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIntegrationResponsesRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIntegrationResponsesResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<IntegrationResponse>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetIntegrationsRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetIntegrationsResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Integration>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetModelRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ModelId")]
pub model_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetModelResponse {
#[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 = "ModelId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_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, Serialize)]
pub struct GetModelTemplateRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ModelId")]
pub model_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetModelTemplateResponse {
#[serde(rename = "Value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetModelsRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetModelsResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Model>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRouteRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "RouteId")]
pub route_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRouteResponse {
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_id: Option<String>,
#[serde(rename = "RouteKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_key: Option<String>,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRouteResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "RouteId")]
pub route_id: String,
#[serde(rename = "RouteResponseId")]
pub route_response_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRouteResponseResponse {
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_id: Option<String>,
#[serde(rename = "RouteResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRouteResponsesRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "RouteId")]
pub route_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRouteResponsesResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<RouteResponse>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetRoutesRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetRoutesResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Route>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct GetStageRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "StageName")]
pub stage_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetStageResponse {
#[serde(rename = "AccessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[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 = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "LastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<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, Serialize)]
pub struct GetStagesRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "MaxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<String>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct GetStagesResponse {
#[serde(rename = "Items")]
#[serde(skip_serializing_if = "Option::is_none")]
pub items: Option<Vec<Stage>>,
#[serde(rename = "NextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Integration {
#[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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_id: Option<String>,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_selection_expression: Option<String>,
#[serde(rename = "IntegrationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_type: Option<String>,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct IntegrationResponse {
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_id: Option<String>,
#[serde(rename = "IntegrationResponseKey")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: 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 = "ModelId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_id: Option<String>,
#[serde(rename = "Name")]
pub name: String,
#[serde(rename = "Schema")]
#[serde(skip_serializing_if = "Option::is_none")]
pub schema: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct ParameterConstraints {
#[serde(rename = "Required")]
#[serde(skip_serializing_if = "Option::is_none")]
pub required: Option<bool>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Route {
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_id: Option<String>,
#[serde(rename = "RouteKey")]
pub route_key: String,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct RouteResponse {
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_id: Option<String>,
#[serde(rename = "RouteResponseKey")]
pub route_response_key: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RouteSettings {
#[serde(rename = "DataTraceEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub data_trace_enabled: Option<bool>,
#[serde(rename = "DetailedMetricsEnabled")]
#[serde(skip_serializing_if = "Option::is_none")]
pub detailed_metrics_enabled: Option<bool>,
#[serde(rename = "LoggingLevel")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging_level: Option<String>,
#[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>,
}
#[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 = "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 = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "LastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
pub stage_name: 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, Serialize)]
pub struct UpdateApiMappingRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ApiMappingId")]
pub api_mapping_id: String,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "DomainName")]
pub domain_name: 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 UpdateApiMappingResponse {
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiMappingId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_id: Option<String>,
#[serde(rename = "ApiMappingKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_key: Option<String>,
#[serde(rename = "Stage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateApiRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "RouteSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_selection_expression: 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 UpdateApiResponse {
#[serde(rename = "ApiEndpoint")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_endpoint: Option<String>,
#[serde(rename = "ApiId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_id: Option<String>,
#[serde(rename = "ApiKeySelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_key_selection_expression: 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 = "DisableSchemaValidation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub disable_schema_validation: Option<bool>,
#[serde(rename = "Name")]
#[serde(skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "ProtocolType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub protocol_type: Option<String>,
#[serde(rename = "RouteSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_selection_expression: Option<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, Serialize)]
pub struct UpdateAuthorizerRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerId")]
pub authorizer_id: String,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_type: Option<String>,
#[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<Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateAuthorizerResponse {
#[serde(rename = "AuthorizerCredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_credentials_arn: Option<String>,
#[serde(rename = "AuthorizerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_id: Option<String>,
#[serde(rename = "AuthorizerResultTtlInSeconds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_result_ttl_in_seconds: Option<i64>,
#[serde(rename = "AuthorizerType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub authorizer_type: Option<String>,
#[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<Vec<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_arns: Option<Vec<String>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDeploymentRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "DeploymentId")]
pub deployment_id: String,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDeploymentResponse {
#[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 = "DeploymentStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status: Option<String>,
#[serde(rename = "DeploymentStatusMessage")]
#[serde(skip_serializing_if = "Option::is_none")]
pub deployment_status_message: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDomainNameRequest {
#[serde(rename = "DomainName")]
pub domain_name: String,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDomainNameResponse {
#[serde(rename = "ApiMappingSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub api_mapping_selection_expression: Option<String>,
#[serde(rename = "DomainName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name: Option<String>,
#[serde(rename = "DomainNameConfigurations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub domain_name_configurations: Option<Vec<DomainNameConfiguration>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateIntegrationRequest {
#[serde(rename = "ApiId")]
pub api_id: 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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_type: Option<String>,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateIntegrationResponse {
#[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 = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "CredentialsArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub credentials_arn: Option<String>,
#[serde(rename = "Description")]
#[serde(skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "IntegrationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_id: Option<String>,
#[serde(rename = "IntegrationMethod")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_method: Option<String>,
#[serde(rename = "IntegrationResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_selection_expression: Option<String>,
#[serde(rename = "IntegrationType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_type: Option<String>,
#[serde(rename = "IntegrationUri")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_uri: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
#[serde(rename = "TimeoutInMillis")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout_in_millis: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateIntegrationResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationId")]
pub integration_id: String,
#[serde(rename = "IntegrationResponseId")]
pub integration_response_id: String,
#[serde(rename = "IntegrationResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateIntegrationResponseResponse {
#[serde(rename = "ContentHandlingStrategy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub content_handling_strategy: Option<String>,
#[serde(rename = "IntegrationResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_id: Option<String>,
#[serde(rename = "IntegrationResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub integration_response_key: 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 = "TemplateSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub template_selection_expression: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateModelRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[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 = "ModelId")]
pub model_id: 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 UpdateModelResponse {
#[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 = "ModelId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_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, Serialize)]
pub struct UpdateRouteRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
pub route_id: String,
#[serde(rename = "RouteKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_key: Option<String>,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRouteResponse {
#[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 = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_id: Option<String>,
#[serde(rename = "RouteKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_key: Option<String>,
#[serde(rename = "RouteResponseSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_selection_expression: Option<String>,
#[serde(rename = "Target")]
#[serde(skip_serializing_if = "Option::is_none")]
pub target: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateRouteResponseRequest {
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteId")]
pub route_id: String,
#[serde(rename = "RouteResponseId")]
pub route_response_id: String,
#[serde(rename = "RouteResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateRouteResponseResponse {
#[serde(rename = "ModelSelectionExpression")]
#[serde(skip_serializing_if = "Option::is_none")]
pub model_selection_expression: Option<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, ParameterConstraints>>,
#[serde(rename = "RouteResponseId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_id: Option<String>,
#[serde(rename = "RouteResponseKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_response_key: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateStageRequest {
#[serde(rename = "AccessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[serde(rename = "ApiId")]
pub api_id: String,
#[serde(rename = "ClientCertificateId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_certificate_id: Option<String>,
#[serde(rename = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
pub stage_name: 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 UpdateStageResponse {
#[serde(rename = "AccessLogSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log_settings: Option<AccessLogSettings>,
#[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 = "DefaultRouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub default_route_settings: Option<RouteSettings>,
#[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 = "LastUpdatedDate")]
#[serde(skip_serializing_if = "Option::is_none")]
pub last_updated_date: Option<f64>,
#[serde(rename = "RouteSettings")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_settings: Option<::std::collections::HashMap<String, RouteSettings>>,
#[serde(rename = "StageName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_name: Option<String>,
#[serde(rename = "StageVariables")]
#[serde(skip_serializing_if = "Option::is_none")]
pub stage_variables: Option<::std::collections::HashMap<String, String>>,
}
#[derive(Debug, PartialEq)]
pub enum CreateApiError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateApiError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateApiError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateApiError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApiError {
fn description(&self) -> &str {
match *self {
CreateApiError::BadRequest(ref cause) => cause,
CreateApiError::Conflict(ref cause) => cause,
CreateApiError::NotFound(ref cause) => cause,
CreateApiError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateApiMappingError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateApiMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateApiMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateApiMappingError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateApiMappingError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateApiMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateApiMappingError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateApiMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateApiMappingError {
fn description(&self) -> &str {
match *self {
CreateApiMappingError::BadRequest(ref cause) => cause,
CreateApiMappingError::Conflict(ref cause) => cause,
CreateApiMappingError::NotFound(ref cause) => cause,
CreateApiMappingError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateAuthorizerError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"ConflictException" => {
return RusotoError::Service(CreateAuthorizerError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateAuthorizerError::TooManyRequests(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::Conflict(ref cause) => cause,
CreateAuthorizerError::NotFound(ref cause) => cause,
CreateAuthorizerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDeploymentError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(CreateDeploymentError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDeploymentError::TooManyRequests(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::NotFound(ref cause) => cause,
CreateDeploymentError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDomainNameError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(CreateDomainNameError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateDomainNameError::TooManyRequests(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::NotFound(ref cause) => cause,
CreateDomainNameError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateIntegrationError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateIntegrationError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIntegrationError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateIntegrationError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateIntegrationError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateIntegrationError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateIntegrationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateIntegrationError {
fn description(&self) -> &str {
match *self {
CreateIntegrationError::BadRequest(ref cause) => cause,
CreateIntegrationError::Conflict(ref cause) => cause,
CreateIntegrationError::NotFound(ref cause) => cause,
CreateIntegrationError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateIntegrationResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateIntegrationResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateIntegrationResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateIntegrationResponseError::BadRequest(
err.msg,
))
}
"ConflictException" => {
return RusotoError::Service(CreateIntegrationResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateIntegrationResponseError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateIntegrationResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateIntegrationResponseError {
fn description(&self) -> &str {
match *self {
CreateIntegrationResponseError::BadRequest(ref cause) => cause,
CreateIntegrationResponseError::Conflict(ref cause) => cause,
CreateIntegrationResponseError::NotFound(ref cause) => cause,
CreateIntegrationResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateModelError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(CreateModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateModelError::TooManyRequests(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::NotFound(ref cause) => cause,
CreateModelError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRouteError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRouteError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateRouteError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateRouteError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRouteError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRouteError {
fn description(&self) -> &str {
match *self {
CreateRouteError::BadRequest(ref cause) => cause,
CreateRouteError::Conflict(ref cause) => cause,
CreateRouteError::NotFound(ref cause) => cause,
CreateRouteError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateRouteResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl CreateRouteResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateRouteResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateRouteResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateRouteResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateRouteResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateRouteResponseError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateRouteResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateRouteResponseError {
fn description(&self) -> &str {
match *self {
CreateRouteResponseError::BadRequest(ref cause) => cause,
CreateRouteResponseError::Conflict(ref cause) => cause,
CreateRouteResponseError::NotFound(ref cause) => cause,
CreateRouteResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateStageError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(CreateStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateStageError::TooManyRequests(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::NotFound(ref cause) => cause,
CreateStageError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApiError {
NotFound(String),
TooManyRequests(String),
}
impl DeleteApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(DeleteApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteApiError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApiError {
fn description(&self) -> &str {
match *self {
DeleteApiError::NotFound(ref cause) => cause,
DeleteApiError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteApiMappingError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl DeleteApiMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteApiMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteApiMappingError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteApiMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteApiMappingError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteApiMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteApiMappingError {
fn description(&self) -> &str {
match *self {
DeleteApiMappingError::BadRequest(ref cause) => cause,
DeleteApiMappingError::NotFound(ref cause) => cause,
DeleteApiMappingError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteAuthorizerError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteAuthorizerError::TooManyRequests(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::NotFound(ref cause) => cause,
DeleteAuthorizerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDeploymentError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteDeploymentError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteDeploymentError::TooManyRequests(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::NotFound(ref cause) => cause,
DeleteDeploymentError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDomainNameError {
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIntegrationError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteIntegrationError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteIntegrationError::TooManyRequests(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::NotFound(ref cause) => cause,
DeleteIntegrationError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteIntegrationResponseError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteIntegrationResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteIntegrationResponseError::TooManyRequests(
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::NotFound(ref cause) => cause,
DeleteIntegrationResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteModelError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteModelError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteModelError::TooManyRequests(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::NotFound(ref cause) => cause,
DeleteModelError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRouteError {
NotFound(String),
TooManyRequests(String),
}
impl DeleteRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(DeleteRouteError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRouteError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRouteError {
fn description(&self) -> &str {
match *self {
DeleteRouteError::NotFound(ref cause) => cause,
DeleteRouteError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteRouteResponseError {
NotFound(String),
TooManyRequests(String),
}
impl DeleteRouteResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRouteResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(DeleteRouteResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteRouteResponseError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteRouteResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteRouteResponseError {
fn description(&self) -> &str {
match *self {
DeleteRouteResponseError::NotFound(ref cause) => cause,
DeleteRouteResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteStageError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(DeleteStageError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteStageError::TooManyRequests(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::NotFound(ref cause) => cause,
DeleteStageError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetApiError {
NotFound(String),
TooManyRequests(String),
}
impl GetApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => return RusotoError::Service(GetApiError::NotFound(err.msg)),
"TooManyRequestsException" => {
return RusotoError::Service(GetApiError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApiError {
fn description(&self) -> &str {
match *self {
GetApiError::NotFound(ref cause) => cause,
GetApiError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetApiMappingError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetApiMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetApiMappingError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetApiMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetApiMappingError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApiMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApiMappingError {
fn description(&self) -> &str {
match *self {
GetApiMappingError::BadRequest(ref cause) => cause,
GetApiMappingError::NotFound(ref cause) => cause,
GetApiMappingError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetApiMappingsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetApiMappingsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApiMappingsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetApiMappingsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetApiMappingsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetApiMappingsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApiMappingsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApiMappingsError {
fn description(&self) -> &str {
match *self {
GetApiMappingsError::BadRequest(ref cause) => cause,
GetApiMappingsError::NotFound(ref cause) => cause,
GetApiMappingsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetApisError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetApisError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetApisError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetApisError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetApisError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetApisError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetApisError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetApisError {
fn description(&self) -> &str {
match *self {
GetApisError::BadRequest(ref cause) => cause,
GetApisError::NotFound(ref cause) => cause,
GetApisError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAuthorizerError {
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetAuthorizersError {
BadRequest(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeploymentError {
NotFound(String),
TooManyRequests(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))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDeploymentError::TooManyRequests(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::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDeploymentsError {
BadRequest(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(GetDeploymentsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDeploymentsError::TooManyRequests(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::NotFound(ref cause) => cause,
GetDeploymentsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDomainNameError {
NotFound(String),
TooManyRequests(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))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDomainNameError::TooManyRequests(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::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetDomainNamesError {
BadRequest(String),
NotFound(String),
TooManyRequests(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))
}
"NotFoundException" => {
return RusotoError::Service(GetDomainNamesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetDomainNamesError::TooManyRequests(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::NotFound(ref cause) => cause,
GetDomainNamesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationError {
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationResponseError {
NotFound(String),
TooManyRequests(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,
))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationResponsesError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetIntegrationResponsesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntegrationResponsesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetIntegrationResponsesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetIntegrationResponsesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetIntegrationResponsesError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIntegrationResponsesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIntegrationResponsesError {
fn description(&self) -> &str {
match *self {
GetIntegrationResponsesError::BadRequest(ref cause) => cause,
GetIntegrationResponsesError::NotFound(ref cause) => cause,
GetIntegrationResponsesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetIntegrationsError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetIntegrationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetIntegrationsError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetIntegrationsError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetIntegrationsError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetIntegrationsError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetIntegrationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetIntegrationsError {
fn description(&self) -> &str {
match *self {
GetIntegrationsError::BadRequest(ref cause) => cause,
GetIntegrationsError::NotFound(ref cause) => cause,
GetIntegrationsError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetModelError {
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetModelTemplateError {
NotFound(String),
TooManyRequests(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() {
"NotFoundException" => {
return RusotoError::Service(GetModelTemplateError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetModelTemplateError::TooManyRequests(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::NotFound(ref cause) => cause,
GetModelTemplateError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetModelsError {
BadRequest(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRouteError {
NotFound(String),
TooManyRequests(String),
}
impl GetRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetRouteError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRouteError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRouteError {
fn description(&self) -> &str {
match *self {
GetRouteError::NotFound(ref cause) => cause,
GetRouteError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRouteResponseError {
NotFound(String),
TooManyRequests(String),
}
impl GetRouteResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRouteResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"NotFoundException" => {
return RusotoError::Service(GetRouteResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRouteResponseError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRouteResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRouteResponseError {
fn description(&self) -> &str {
match *self {
GetRouteResponseError::NotFound(ref cause) => cause,
GetRouteResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRouteResponsesError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetRouteResponsesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRouteResponsesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRouteResponsesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetRouteResponsesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRouteResponsesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRouteResponsesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRouteResponsesError {
fn description(&self) -> &str {
match *self {
GetRouteResponsesError::BadRequest(ref cause) => cause,
GetRouteResponsesError::NotFound(ref cause) => cause,
GetRouteResponsesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetRoutesError {
BadRequest(String),
NotFound(String),
TooManyRequests(String),
}
impl GetRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetRoutesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(GetRoutesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetRoutesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetRoutesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for GetRoutesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for GetRoutesError {
fn description(&self) -> &str {
match *self {
GetRoutesError::BadRequest(ref cause) => cause,
GetRoutesError::NotFound(ref cause) => cause,
GetRoutesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetStageError {
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum GetStagesError {
BadRequest(String),
NotFound(String),
TooManyRequests(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() {
"BadRequestException" => {
return RusotoError::Service(GetStagesError::BadRequest(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(GetStagesError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(GetStagesError::TooManyRequests(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::BadRequest(ref cause) => cause,
GetStagesError::NotFound(ref cause) => cause,
GetStagesError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApiError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl UpdateApiError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApiError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateApiError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateApiError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateApiError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateApiError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateApiError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApiError {
fn description(&self) -> &str {
match *self {
UpdateApiError::BadRequest(ref cause) => cause,
UpdateApiError::Conflict(ref cause) => cause,
UpdateApiError::NotFound(ref cause) => cause,
UpdateApiError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateApiMappingError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl UpdateApiMappingError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateApiMappingError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateApiMappingError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateApiMappingError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateApiMappingError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateApiMappingError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateApiMappingError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateApiMappingError {
fn description(&self) -> &str {
match *self {
UpdateApiMappingError::BadRequest(ref cause) => cause,
UpdateApiMappingError::Conflict(ref cause) => cause,
UpdateApiMappingError::NotFound(ref cause) => cause,
UpdateApiMappingError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateAuthorizerError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"ConflictException" => {
return RusotoError::Service(UpdateAuthorizerError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateAuthorizerError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateAuthorizerError::TooManyRequests(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::Conflict(ref cause) => cause,
UpdateAuthorizerError::NotFound(ref cause) => cause,
UpdateAuthorizerError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDeploymentError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"ConflictException" => {
return RusotoError::Service(UpdateDeploymentError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateDeploymentError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateDeploymentError::TooManyRequests(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::Conflict(ref cause) => cause,
UpdateDeploymentError::NotFound(ref cause) => cause,
UpdateDeploymentError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDomainNameError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateIntegrationError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateIntegrationResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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,
))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateModelError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRouteError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl UpdateRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRouteError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateRouteError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRouteError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRouteError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRouteError {
fn description(&self) -> &str {
match *self {
UpdateRouteError::BadRequest(ref cause) => cause,
UpdateRouteError::Conflict(ref cause) => cause,
UpdateRouteError::NotFound(ref cause) => cause,
UpdateRouteError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateRouteResponseError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(String),
}
impl UpdateRouteResponseError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRouteResponseError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateRouteResponseError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateRouteResponseError::Conflict(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRouteResponseError::NotFound(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateRouteResponseError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateRouteResponseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateRouteResponseError {
fn description(&self) -> &str {
match *self {
UpdateRouteResponseError::BadRequest(ref cause) => cause,
UpdateRouteResponseError::Conflict(ref cause) => cause,
UpdateRouteResponseError::NotFound(ref cause) => cause,
UpdateRouteResponseError::TooManyRequests(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateStageError {
BadRequest(String),
Conflict(String),
NotFound(String),
TooManyRequests(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))
}
"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,
}
}
}
pub trait ApiGatewayV2 {
fn create_api(
&self,
input: CreateApiRequest,
) -> RusotoFuture<CreateApiResponse, CreateApiError>;
fn create_api_mapping(
&self,
input: CreateApiMappingRequest,
) -> RusotoFuture<CreateApiMappingResponse, CreateApiMappingError>;
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<CreateAuthorizerResponse, CreateAuthorizerError>;
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<CreateDeploymentResponse, CreateDeploymentError>;
fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> RusotoFuture<CreateDomainNameResponse, CreateDomainNameError>;
fn create_integration(
&self,
input: CreateIntegrationRequest,
) -> RusotoFuture<CreateIntegrationResponse, CreateIntegrationError>;
fn create_integration_response(
&self,
input: CreateIntegrationResponseRequest,
) -> RusotoFuture<CreateIntegrationResponseResponse, CreateIntegrationResponseError>;
fn create_model(
&self,
input: CreateModelRequest,
) -> RusotoFuture<CreateModelResponse, CreateModelError>;
fn create_route(
&self,
input: CreateRouteRequest,
) -> RusotoFuture<CreateRouteResponse, CreateRouteError>;
fn create_route_response(
&self,
input: CreateRouteResponseRequest,
) -> RusotoFuture<CreateRouteResponseResponse, CreateRouteResponseError>;
fn create_stage(
&self,
input: CreateStageRequest,
) -> RusotoFuture<CreateStageResponse, CreateStageError>;
fn delete_api(&self, input: DeleteApiRequest) -> RusotoFuture<(), DeleteApiError>;
fn delete_api_mapping(
&self,
input: DeleteApiMappingRequest,
) -> RusotoFuture<(), DeleteApiMappingError>;
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<(), DeleteAuthorizerError>;
fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> RusotoFuture<(), DeleteDeploymentError>;
fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> RusotoFuture<(), DeleteDomainNameError>;
fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> RusotoFuture<(), DeleteIntegrationError>;
fn delete_integration_response(
&self,
input: DeleteIntegrationResponseRequest,
) -> RusotoFuture<(), DeleteIntegrationResponseError>;
fn delete_model(&self, input: DeleteModelRequest) -> RusotoFuture<(), DeleteModelError>;
fn delete_route(&self, input: DeleteRouteRequest) -> RusotoFuture<(), DeleteRouteError>;
fn delete_route_response(
&self,
input: DeleteRouteResponseRequest,
) -> RusotoFuture<(), DeleteRouteResponseError>;
fn delete_stage(&self, input: DeleteStageRequest) -> RusotoFuture<(), DeleteStageError>;
fn get_api(&self, input: GetApiRequest) -> RusotoFuture<GetApiResponse, GetApiError>;
fn get_api_mapping(
&self,
input: GetApiMappingRequest,
) -> RusotoFuture<GetApiMappingResponse, GetApiMappingError>;
fn get_api_mappings(
&self,
input: GetApiMappingsRequest,
) -> RusotoFuture<GetApiMappingsResponse, GetApiMappingsError>;
fn get_apis(&self, input: GetApisRequest) -> RusotoFuture<GetApisResponse, GetApisError>;
fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> RusotoFuture<GetAuthorizerResponse, GetAuthorizerError>;
fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> RusotoFuture<GetAuthorizersResponse, GetAuthorizersError>;
fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> RusotoFuture<GetDeploymentResponse, GetDeploymentError>;
fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> RusotoFuture<GetDeploymentsResponse, GetDeploymentsError>;
fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> RusotoFuture<GetDomainNameResponse, GetDomainNameError>;
fn get_domain_names(
&self,
input: GetDomainNamesRequest,
) -> RusotoFuture<GetDomainNamesResponse, GetDomainNamesError>;
fn get_integration(
&self,
input: GetIntegrationRequest,
) -> RusotoFuture<GetIntegrationResponse, GetIntegrationError>;
fn get_integration_response(
&self,
input: GetIntegrationResponseRequest,
) -> RusotoFuture<GetIntegrationResponseResponse, GetIntegrationResponseError>;
fn get_integration_responses(
&self,
input: GetIntegrationResponsesRequest,
) -> RusotoFuture<GetIntegrationResponsesResponse, GetIntegrationResponsesError>;
fn get_integrations(
&self,
input: GetIntegrationsRequest,
) -> RusotoFuture<GetIntegrationsResponse, GetIntegrationsError>;
fn get_model(&self, input: GetModelRequest) -> RusotoFuture<GetModelResponse, GetModelError>;
fn get_model_template(
&self,
input: GetModelTemplateRequest,
) -> RusotoFuture<GetModelTemplateResponse, GetModelTemplateError>;
fn get_models(
&self,
input: GetModelsRequest,
) -> RusotoFuture<GetModelsResponse, GetModelsError>;
fn get_route(&self, input: GetRouteRequest) -> RusotoFuture<GetRouteResponse, GetRouteError>;
fn get_route_response(
&self,
input: GetRouteResponseRequest,
) -> RusotoFuture<GetRouteResponseResponse, GetRouteResponseError>;
fn get_route_responses(
&self,
input: GetRouteResponsesRequest,
) -> RusotoFuture<GetRouteResponsesResponse, GetRouteResponsesError>;
fn get_routes(
&self,
input: GetRoutesRequest,
) -> RusotoFuture<GetRoutesResponse, GetRoutesError>;
fn get_stage(&self, input: GetStageRequest) -> RusotoFuture<GetStageResponse, GetStageError>;
fn get_stages(
&self,
input: GetStagesRequest,
) -> RusotoFuture<GetStagesResponse, GetStagesError>;
fn update_api(
&self,
input: UpdateApiRequest,
) -> RusotoFuture<UpdateApiResponse, UpdateApiError>;
fn update_api_mapping(
&self,
input: UpdateApiMappingRequest,
) -> RusotoFuture<UpdateApiMappingResponse, UpdateApiMappingError>;
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<UpdateAuthorizerResponse, UpdateAuthorizerError>;
fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> RusotoFuture<UpdateDeploymentResponse, UpdateDeploymentError>;
fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> RusotoFuture<UpdateDomainNameResponse, UpdateDomainNameError>;
fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> RusotoFuture<UpdateIntegrationResponse, UpdateIntegrationError>;
fn update_integration_response(
&self,
input: UpdateIntegrationResponseRequest,
) -> RusotoFuture<UpdateIntegrationResponseResponse, UpdateIntegrationResponseError>;
fn update_model(
&self,
input: UpdateModelRequest,
) -> RusotoFuture<UpdateModelResponse, UpdateModelError>;
fn update_route(
&self,
input: UpdateRouteRequest,
) -> RusotoFuture<UpdateRouteResponse, UpdateRouteError>;
fn update_route_response(
&self,
input: UpdateRouteResponseRequest,
) -> RusotoFuture<UpdateRouteResponseResponse, UpdateRouteResponseError>;
fn update_stage(
&self,
input: UpdateStageRequest,
) -> RusotoFuture<UpdateStageResponse, UpdateStageError>;
}
#[derive(Clone)]
pub struct ApiGatewayV2Client {
client: Client,
region: region::Region,
}
impl ApiGatewayV2Client {
pub fn new(region: region::Region) -> ApiGatewayV2Client {
ApiGatewayV2Client {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> ApiGatewayV2Client
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
ApiGatewayV2Client {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl ApiGatewayV2 for ApiGatewayV2Client {
fn create_api(
&self,
input: CreateApiRequest,
) -> RusotoFuture<CreateApiResponse, CreateApiError> {
let request_uri = "/v2/apis";
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::<CreateApiResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateApiError::from_response(response))),
)
}
})
}
fn create_api_mapping(
&self,
input: CreateApiMappingRequest,
) -> RusotoFuture<CreateApiMappingResponse, CreateApiMappingError> {
let request_uri = format!(
"/v2/domainnames/{domain_name}/apimappings",
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::<CreateApiMappingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateApiMappingError::from_response(response))),
)
}
})
}
fn create_authorizer(
&self,
input: CreateAuthorizerRequest,
) -> RusotoFuture<CreateAuthorizerResponse, CreateAuthorizerError> {
let request_uri = format!("/v2/apis/{api_id}/authorizers", api_id = input.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::<CreateAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateAuthorizerError::from_response(response))),
)
}
})
}
fn create_deployment(
&self,
input: CreateDeploymentRequest,
) -> RusotoFuture<CreateDeploymentResponse, CreateDeploymentError> {
let request_uri = format!("/v2/apis/{api_id}/deployments", api_id = input.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::<CreateDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDeploymentError::from_response(response))),
)
}
})
}
fn create_domain_name(
&self,
input: CreateDomainNameRequest,
) -> RusotoFuture<CreateDomainNameResponse, CreateDomainNameError> {
let request_uri = "/v2/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::<CreateDomainNameResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateDomainNameError::from_response(response))),
)
}
})
}
fn create_integration(
&self,
input: CreateIntegrationRequest,
) -> RusotoFuture<CreateIntegrationResponse, CreateIntegrationError> {
let request_uri = format!("/v2/apis/{api_id}/integrations", api_id = input.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::<CreateIntegrationResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateIntegrationError::from_response(response))),
)
}
})
}
fn create_integration_response(
&self,
input: CreateIntegrationResponseRequest,
) -> RusotoFuture<CreateIntegrationResponseResponse, CreateIntegrationResponseError> {
let request_uri = format!(
"/v2/apis/{api_id}/integrations/{integration_id}/integrationresponses",
api_id = input.api_id,
integration_id = input.integration_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::<CreateIntegrationResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateIntegrationResponseError::from_response(response))
}))
}
})
}
fn create_model(
&self,
input: CreateModelRequest,
) -> RusotoFuture<CreateModelResponse, CreateModelError> {
let request_uri = format!("/v2/apis/{api_id}/models", api_id = input.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::<CreateModelResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateModelError::from_response(response))),
)
}
})
}
fn create_route(
&self,
input: CreateRouteRequest,
) -> RusotoFuture<CreateRouteResponse, CreateRouteError> {
let request_uri = format!("/v2/apis/{api_id}/routes", api_id = input.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::<CreateRouteResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateRouteError::from_response(response))),
)
}
})
}
fn create_route_response(
&self,
input: CreateRouteResponseRequest,
) -> RusotoFuture<CreateRouteResponseResponse, CreateRouteResponseError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}/routeresponses",
api_id = input.api_id,
route_id = input.route_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::<CreateRouteResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(CreateRouteResponseError::from_response(response))
}),
)
}
})
}
fn create_stage(
&self,
input: CreateStageRequest,
) -> RusotoFuture<CreateStageResponse, CreateStageError> {
let request_uri = format!("/v2/apis/{api_id}/stages", api_id = input.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::<CreateStageResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateStageError::from_response(response))),
)
}
})
}
fn delete_api(&self, input: DeleteApiRequest) -> RusotoFuture<(), DeleteApiError> {
let request_uri = format!("/v2/apis/{api_id}", api_id = input.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(DeleteApiError::from_response(response))),
)
}
})
}
fn delete_api_mapping(
&self,
input: DeleteApiMappingRequest,
) -> RusotoFuture<(), DeleteApiMappingError> {
let request_uri = format!(
"/v2/domainnames/{domain_name}/apimappings/{api_mapping_id}",
api_mapping_id = input.api_mapping_id,
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() == 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(DeleteApiMappingError::from_response(response))),
)
}
})
}
fn delete_authorizer(
&self,
input: DeleteAuthorizerRequest,
) -> RusotoFuture<(), DeleteAuthorizerError> {
let request_uri = format!(
"/v2/apis/{api_id}/authorizers/{authorizer_id}",
api_id = input.api_id,
authorizer_id = input.authorizer_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(DeleteAuthorizerError::from_response(response))),
)
}
})
}
fn delete_deployment(
&self,
input: DeleteDeploymentRequest,
) -> RusotoFuture<(), DeleteDeploymentError> {
let request_uri = format!(
"/v2/apis/{api_id}/deployments/{deployment_id}",
api_id = input.api_id,
deployment_id = input.deployment_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(DeleteDeploymentError::from_response(response))),
)
}
})
}
fn delete_domain_name(
&self,
input: DeleteDomainNameRequest,
) -> RusotoFuture<(), DeleteDomainNameError> {
let request_uri = format!(
"/v2/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() == 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(DeleteDomainNameError::from_response(response))),
)
}
})
}
fn delete_integration(
&self,
input: DeleteIntegrationRequest,
) -> RusotoFuture<(), DeleteIntegrationError> {
let request_uri = format!(
"/v2/apis/{api_id}/integrations/{integration_id}",
api_id = input.api_id,
integration_id = input.integration_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!("/v2/apis/{api_id}/integrations/{integration_id}/integrationresponses/{integration_response_id}", api_id = input.api_id, integration_id = input.integration_id, integration_response_id = input.integration_response_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(DeleteIntegrationResponseError::from_response(response))
}))
}
})
}
fn delete_model(&self, input: DeleteModelRequest) -> RusotoFuture<(), DeleteModelError> {
let request_uri = format!(
"/v2/apis/{api_id}/models/{model_id}",
api_id = input.api_id,
model_id = input.model_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(DeleteModelError::from_response(response))),
)
}
})
}
fn delete_route(&self, input: DeleteRouteRequest) -> RusotoFuture<(), DeleteRouteError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}",
api_id = input.api_id,
route_id = input.route_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(DeleteRouteError::from_response(response))),
)
}
})
}
fn delete_route_response(
&self,
input: DeleteRouteResponseRequest,
) -> RusotoFuture<(), DeleteRouteResponseError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}/routeresponses/{route_response_id}",
api_id = input.api_id,
route_id = input.route_id,
route_response_id = input.route_response_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(DeleteRouteResponseError::from_response(response))
}),
)
}
})
}
fn delete_stage(&self, input: DeleteStageRequest) -> RusotoFuture<(), DeleteStageError> {
let request_uri = format!(
"/v2/apis/{api_id}/stages/{stage_name}",
api_id = input.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() == 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(DeleteStageError::from_response(response))),
)
}
})
}
fn get_api(&self, input: GetApiRequest) -> RusotoFuture<GetApiResponse, GetApiError> {
let request_uri = format!("/v2/apis/{api_id}", api_id = input.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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetApiResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApiError::from_response(response))),
)
}
})
}
fn get_api_mapping(
&self,
input: GetApiMappingRequest,
) -> RusotoFuture<GetApiMappingResponse, GetApiMappingError> {
let request_uri = format!(
"/v2/domainnames/{domain_name}/apimappings/{api_mapping_id}",
api_mapping_id = input.api_mapping_id,
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetApiMappingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApiMappingError::from_response(response))),
)
}
})
}
fn get_api_mappings(
&self,
input: GetApiMappingsRequest,
) -> RusotoFuture<GetApiMappingsResponse, GetApiMappingsError> {
let request_uri = format!(
"/v2/domainnames/{domain_name}/apimappings",
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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetApiMappingsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApiMappingsError::from_response(response))),
)
}
})
}
fn get_apis(&self, input: GetApisRequest) -> RusotoFuture<GetApisResponse, GetApisError> {
let request_uri = "/v2/apis";
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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetApisResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetApisError::from_response(response))),
)
}
})
}
fn get_authorizer(
&self,
input: GetAuthorizerRequest,
) -> RusotoFuture<GetAuthorizerResponse, GetAuthorizerError> {
let request_uri = format!(
"/v2/apis/{api_id}/authorizers/{authorizer_id}",
api_id = input.api_id,
authorizer_id = input.authorizer_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::<GetAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAuthorizerError::from_response(response))),
)
}
})
}
fn get_authorizers(
&self,
input: GetAuthorizersRequest,
) -> RusotoFuture<GetAuthorizersResponse, GetAuthorizersError> {
let request_uri = format!("/v2/apis/{api_id}/authorizers", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetAuthorizersResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetAuthorizersError::from_response(response))),
)
}
})
}
fn get_deployment(
&self,
input: GetDeploymentRequest,
) -> RusotoFuture<GetDeploymentResponse, GetDeploymentError> {
let request_uri = format!(
"/v2/apis/{api_id}/deployments/{deployment_id}",
api_id = input.api_id,
deployment_id = input.deployment_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::<GetDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeploymentError::from_response(response))),
)
}
})
}
fn get_deployments(
&self,
input: GetDeploymentsRequest,
) -> RusotoFuture<GetDeploymentsResponse, GetDeploymentsError> {
let request_uri = format!("/v2/apis/{api_id}/deployments", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDeploymentsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDeploymentsError::from_response(response))),
)
}
})
}
fn get_domain_name(
&self,
input: GetDomainNameRequest,
) -> RusotoFuture<GetDomainNameResponse, GetDomainNameError> {
let request_uri = format!(
"/v2/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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDomainNameResponse, _>()?;
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<GetDomainNamesResponse, GetDomainNamesError> {
let request_uri = "/v2/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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetDomainNamesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetDomainNamesError::from_response(response))),
)
}
})
}
fn get_integration(
&self,
input: GetIntegrationRequest,
) -> RusotoFuture<GetIntegrationResponse, GetIntegrationError> {
let request_uri = format!(
"/v2/apis/{api_id}/integrations/{integration_id}",
api_id = input.api_id,
integration_id = input.integration_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::<GetIntegrationResponse, _>()?;
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<GetIntegrationResponseResponse, GetIntegrationResponseError> {
let request_uri = format!("/v2/apis/{api_id}/integrations/{integration_id}/integrationresponses/{integration_response_id}", api_id = input.api_id, integration_id = input.integration_id, integration_response_id = input.integration_response_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::<GetIntegrationResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(GetIntegrationResponseError::from_response(response))
}),
)
}
})
}
fn get_integration_responses(
&self,
input: GetIntegrationResponsesRequest,
) -> RusotoFuture<GetIntegrationResponsesResponse, GetIntegrationResponsesError> {
let request_uri = format!(
"/v2/apis/{api_id}/integrations/{integration_id}/integrationresponses",
api_id = input.api_id,
integration_id = input.integration_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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetIntegrationResponsesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(GetIntegrationResponsesError::from_response(response))
}))
}
})
}
fn get_integrations(
&self,
input: GetIntegrationsRequest,
) -> RusotoFuture<GetIntegrationsResponse, GetIntegrationsError> {
let request_uri = format!("/v2/apis/{api_id}/integrations", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetIntegrationsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetIntegrationsError::from_response(response))),
)
}
})
}
fn get_model(&self, input: GetModelRequest) -> RusotoFuture<GetModelResponse, GetModelError> {
let request_uri = format!(
"/v2/apis/{api_id}/models/{model_id}",
api_id = input.api_id,
model_id = input.model_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::<GetModelResponse, _>()?;
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<GetModelTemplateResponse, GetModelTemplateError> {
let request_uri = format!(
"/v2/apis/{api_id}/models/{model_id}/template",
api_id = input.api_id,
model_id = input.model_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::<GetModelTemplateResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetModelTemplateError::from_response(response))),
)
}
})
}
fn get_models(
&self,
input: GetModelsRequest,
) -> RusotoFuture<GetModelsResponse, GetModelsError> {
let request_uri = format!("/v2/apis/{api_id}/models", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetModelsResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetModelsError::from_response(response))),
)
}
})
}
fn get_route(&self, input: GetRouteRequest) -> RusotoFuture<GetRouteResponse, GetRouteError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}",
api_id = input.api_id,
route_id = input.route_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::<GetRouteResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRouteError::from_response(response))),
)
}
})
}
fn get_route_response(
&self,
input: GetRouteResponseRequest,
) -> RusotoFuture<GetRouteResponseResponse, GetRouteResponseError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}/routeresponses/{route_response_id}",
api_id = input.api_id,
route_id = input.route_id,
route_response_id = input.route_response_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::<GetRouteResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRouteResponseError::from_response(response))),
)
}
})
}
fn get_route_responses(
&self,
input: GetRouteResponsesRequest,
) -> RusotoFuture<GetRouteResponsesResponse, GetRouteResponsesError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}/routeresponses",
api_id = input.api_id,
route_id = input.route_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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetRouteResponsesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRouteResponsesError::from_response(response))),
)
}
})
}
fn get_routes(
&self,
input: GetRoutesRequest,
) -> RusotoFuture<GetRoutesResponse, GetRoutesError> {
let request_uri = format!("/v2/apis/{api_id}/routes", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetRoutesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetRoutesError::from_response(response))),
)
}
})
}
fn get_stage(&self, input: GetStageRequest) -> RusotoFuture<GetStageResponse, GetStageError> {
let request_uri = format!(
"/v2/apis/{api_id}/stages/{stage_name}",
api_id = input.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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetStageResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetStageError::from_response(response))),
)
}
})
}
fn get_stages(
&self,
input: GetStagesRequest,
) -> RusotoFuture<GetStagesResponse, GetStagesError> {
let request_uri = format!("/v2/apis/{api_id}/stages", api_id = input.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.max_results {
params.put("maxResults", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
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 result = proto::json::ResponsePayload::new(&response)
.deserialize::<GetStagesResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(GetStagesError::from_response(response))),
)
}
})
}
fn update_api(
&self,
input: UpdateApiRequest,
) -> RusotoFuture<UpdateApiResponse, UpdateApiError> {
let request_uri = format!("/v2/apis/{api_id}", api_id = input.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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateApiResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateApiError::from_response(response))),
)
}
})
}
fn update_api_mapping(
&self,
input: UpdateApiMappingRequest,
) -> RusotoFuture<UpdateApiMappingResponse, UpdateApiMappingError> {
let request_uri = format!(
"/v2/domainnames/{domain_name}/apimappings/{api_mapping_id}",
api_mapping_id = input.api_mapping_id,
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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateApiMappingResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateApiMappingError::from_response(response))),
)
}
})
}
fn update_authorizer(
&self,
input: UpdateAuthorizerRequest,
) -> RusotoFuture<UpdateAuthorizerResponse, UpdateAuthorizerError> {
let request_uri = format!(
"/v2/apis/{api_id}/authorizers/{authorizer_id}",
api_id = input.api_id,
authorizer_id = input.authorizer_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateAuthorizerResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateAuthorizerError::from_response(response))),
)
}
})
}
fn update_deployment(
&self,
input: UpdateDeploymentRequest,
) -> RusotoFuture<UpdateDeploymentResponse, UpdateDeploymentError> {
let request_uri = format!(
"/v2/apis/{api_id}/deployments/{deployment_id}",
api_id = input.api_id,
deployment_id = input.deployment_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDeploymentResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDeploymentError::from_response(response))),
)
}
})
}
fn update_domain_name(
&self,
input: UpdateDomainNameRequest,
) -> RusotoFuture<UpdateDomainNameResponse, UpdateDomainNameError> {
let request_uri = format!(
"/v2/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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDomainNameResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateDomainNameError::from_response(response))),
)
}
})
}
fn update_integration(
&self,
input: UpdateIntegrationRequest,
) -> RusotoFuture<UpdateIntegrationResponse, UpdateIntegrationError> {
let request_uri = format!(
"/v2/apis/{api_id}/integrations/{integration_id}",
api_id = input.api_id,
integration_id = input.integration_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateIntegrationResponse, _>()?;
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<UpdateIntegrationResponseResponse, UpdateIntegrationResponseError> {
let request_uri = format!("/v2/apis/{api_id}/integrations/{integration_id}/integrationresponses/{integration_response_id}", api_id = input.api_id, integration_id = input.integration_id, integration_response_id = input.integration_response_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateIntegrationResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateIntegrationResponseError::from_response(response))
}))
}
})
}
fn update_model(
&self,
input: UpdateModelRequest,
) -> RusotoFuture<UpdateModelResponse, UpdateModelError> {
let request_uri = format!(
"/v2/apis/{api_id}/models/{model_id}",
api_id = input.api_id,
model_id = input.model_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateModelResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateModelError::from_response(response))),
)
}
})
}
fn update_route(
&self,
input: UpdateRouteRequest,
) -> RusotoFuture<UpdateRouteResponse, UpdateRouteError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}",
api_id = input.api_id,
route_id = input.route_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRouteResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateRouteError::from_response(response))),
)
}
})
}
fn update_route_response(
&self,
input: UpdateRouteResponseRequest,
) -> RusotoFuture<UpdateRouteResponseResponse, UpdateRouteResponseError> {
let request_uri = format!(
"/v2/apis/{api_id}/routes/{route_id}/routeresponses/{route_response_id}",
api_id = input.api_id,
route_id = input.route_id,
route_response_id = input.route_response_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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRouteResponseResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(UpdateRouteResponseError::from_response(response))
}),
)
}
})
}
fn update_stage(
&self,
input: UpdateStageRequest,
) -> RusotoFuture<UpdateStageResponse, UpdateStageError> {
let request_uri = format!(
"/v2/apis/{api_id}/stages/{stage_name}",
api_id = input.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.as_u16() == 200 {
Box::new(response.buffer().from_err().and_then(|response| {
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateStageResponse, _>()?;
Ok(result)
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateStageError::from_response(response))),
)
}
})
}
}