use std::error::Error;
use std::fmt;
use async_trait::async_trait;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError};
use rusoto_core::param::{Params, ServiceParams};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
#[allow(unused_imports)]
use serde::{Deserialize, Serialize};
use serde_json;
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AccessLog {
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<FileAccessLog>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudMapInstanceAttribute {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct AwsCloudMapServiceDiscovery {
#[serde(rename = "attributes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attributes: Option<Vec<AwsCloudMapInstanceAttribute>>,
#[serde(rename = "namespaceName")]
pub namespace_name: String,
#[serde(rename = "serviceName")]
pub service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Backend {
#[serde(rename = "virtualService")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_service: Option<VirtualServiceBackend>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct BackendDefaults {
#[serde(rename = "clientPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_policy: Option<ClientPolicy>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ClientPolicy {
#[serde(rename = "tls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tls: Option<ClientPolicyTls>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ClientPolicyTls {
#[serde(rename = "enforce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enforce: Option<bool>,
#[serde(rename = "ports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ports: Option<Vec<i64>>,
#[serde(rename = "validation")]
pub validation: TlsValidationContext,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateGatewayRouteInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: GatewayRouteSpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateGatewayRouteOutput {
#[serde(rename = "gatewayRoute")]
pub gateway_route: GatewayRouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateMeshInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "spec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub spec: Option<MeshSpec>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateMeshOutput {
#[serde(rename = "mesh")]
pub mesh: MeshData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateRouteInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "spec")]
pub spec: RouteSpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateRouteOutput {
#[serde(rename = "route")]
pub route: RouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVirtualGatewayInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualGatewaySpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVirtualGatewayOutput {
#[serde(rename = "virtualGateway")]
pub virtual_gateway: VirtualGatewayData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVirtualNodeInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualNodeSpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVirtualNodeOutput {
#[serde(rename = "virtualNode")]
pub virtual_node: VirtualNodeData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVirtualRouterInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualRouterSpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVirtualRouterOutput {
#[serde(rename = "virtualRouter")]
pub virtual_router: VirtualRouterData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct CreateVirtualServiceInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualServiceSpec,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<TagRef>>,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct CreateVirtualServiceOutput {
#[serde(rename = "virtualService")]
pub virtual_service: VirtualServiceData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteGatewayRouteInput {
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteGatewayRouteOutput {
#[serde(rename = "gatewayRoute")]
pub gateway_route: GatewayRouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteMeshInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteMeshOutput {
#[serde(rename = "mesh")]
pub mesh: MeshData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteRouteInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteRouteOutput {
#[serde(rename = "route")]
pub route: RouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVirtualGatewayInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteVirtualGatewayOutput {
#[serde(rename = "virtualGateway")]
pub virtual_gateway: VirtualGatewayData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVirtualNodeInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteVirtualNodeOutput {
#[serde(rename = "virtualNode")]
pub virtual_node: VirtualNodeData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVirtualRouterInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteVirtualRouterOutput {
#[serde(rename = "virtualRouter")]
pub virtual_router: VirtualRouterData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DeleteVirtualServiceInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DeleteVirtualServiceOutput {
#[serde(rename = "virtualService")]
pub virtual_service: VirtualServiceData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeGatewayRouteInput {
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeGatewayRouteOutput {
#[serde(rename = "gatewayRoute")]
pub gateway_route: GatewayRouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeMeshInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeMeshOutput {
#[serde(rename = "mesh")]
pub mesh: MeshData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeRouteInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeRouteOutput {
#[serde(rename = "route")]
pub route: RouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeVirtualGatewayInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeVirtualGatewayOutput {
#[serde(rename = "virtualGateway")]
pub virtual_gateway: VirtualGatewayData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeVirtualNodeInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeVirtualNodeOutput {
#[serde(rename = "virtualNode")]
pub virtual_node: VirtualNodeData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeVirtualRouterInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeVirtualRouterOutput {
#[serde(rename = "virtualRouter")]
pub virtual_router: VirtualRouterData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct DescribeVirtualServiceInput {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct DescribeVirtualServiceOutput {
#[serde(rename = "virtualService")]
pub virtual_service: VirtualServiceData,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct DnsServiceDiscovery {
#[serde(rename = "hostname")]
pub hostname: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Duration {
#[serde(rename = "unit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub unit: Option<String>,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct EgressFilter {
#[serde(rename = "type")]
pub type_: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct FileAccessLog {
#[serde(rename = "path")]
pub path: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GatewayRouteData {
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: GatewayRouteSpec,
#[serde(rename = "status")]
pub status: GatewayRouteStatus,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GatewayRouteRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GatewayRouteSpec {
#[serde(rename = "grpcRoute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc_route: Option<GrpcGatewayRoute>,
#[serde(rename = "http2Route")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_2_route: Option<HttpGatewayRoute>,
#[serde(rename = "httpRoute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_route: Option<HttpGatewayRoute>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct GatewayRouteStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GatewayRouteTarget {
#[serde(rename = "virtualService")]
pub virtual_service: GatewayRouteVirtualService,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GatewayRouteVirtualService {
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcGatewayRoute {
#[serde(rename = "action")]
pub action: GrpcGatewayRouteAction,
#[serde(rename = "match")]
pub route_match: Option<GrpcGatewayRouteMatch>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcGatewayRouteAction {
#[serde(rename = "target")]
pub target: GatewayRouteTarget,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcGatewayRouteMatch {
#[serde(rename = "serviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRetryPolicy {
#[serde(rename = "grpcRetryEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc_retry_events: Option<Vec<String>>,
#[serde(rename = "httpRetryEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_retry_events: Option<Vec<String>>,
#[serde(rename = "maxRetries")]
pub max_retries: i64,
#[serde(rename = "perRetryTimeout")]
pub per_retry_timeout: Duration,
#[serde(rename = "tcpRetryEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tcp_retry_events: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRoute {
#[serde(rename = "action")]
pub action: GrpcRouteAction,
#[serde(rename = "match")]
pub route_match: Option<GrpcRouteMatch>,
#[serde(rename = "retryPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retry_policy: Option<GrpcRetryPolicy>,
#[serde(rename = "timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<GrpcTimeout>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRouteAction {
#[serde(rename = "weightedTargets")]
pub weighted_targets: Vec<WeightedTarget>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRouteMatch {
#[serde(rename = "metadata")]
#[serde(skip_serializing_if = "Option::is_none")]
pub metadata: Option<Vec<GrpcRouteMetadata>>,
#[serde(rename = "methodName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method_name: Option<String>,
#[serde(rename = "serviceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_name: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRouteMetadata {
#[serde(rename = "invert")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invert: Option<bool>,
#[serde(rename = "match")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_match: Option<GrpcRouteMetadataMatchMethod>,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcRouteMetadataMatchMethod {
#[serde(rename = "exact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exact: Option<String>,
#[serde(rename = "prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
#[serde(rename = "range")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range: Option<MatchRange>,
#[serde(rename = "regex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regex: Option<String>,
#[serde(rename = "suffix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub suffix: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct GrpcTimeout {
#[serde(rename = "idle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle: Option<Duration>,
#[serde(rename = "perRequest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub per_request: Option<Duration>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HeaderMatchMethod {
#[serde(rename = "exact")]
#[serde(skip_serializing_if = "Option::is_none")]
pub exact: Option<String>,
#[serde(rename = "prefix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub prefix: Option<String>,
#[serde(rename = "range")]
#[serde(skip_serializing_if = "Option::is_none")]
pub range: Option<MatchRange>,
#[serde(rename = "regex")]
#[serde(skip_serializing_if = "Option::is_none")]
pub regex: Option<String>,
#[serde(rename = "suffix")]
#[serde(skip_serializing_if = "Option::is_none")]
pub suffix: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HealthCheckPolicy {
#[serde(rename = "healthyThreshold")]
pub healthy_threshold: i64,
#[serde(rename = "intervalMillis")]
pub interval_millis: i64,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "port")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<i64>,
#[serde(rename = "protocol")]
pub protocol: String,
#[serde(rename = "timeoutMillis")]
pub timeout_millis: i64,
#[serde(rename = "unhealthyThreshold")]
pub unhealthy_threshold: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpGatewayRoute {
#[serde(rename = "action")]
pub action: HttpGatewayRouteAction,
#[serde(rename = "match")]
pub route_match: Option<HttpGatewayRouteMatch>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpGatewayRouteAction {
#[serde(rename = "target")]
pub target: GatewayRouteTarget,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpGatewayRouteMatch {
#[serde(rename = "prefix")]
pub prefix: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpRetryPolicy {
#[serde(rename = "httpRetryEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_retry_events: Option<Vec<String>>,
#[serde(rename = "maxRetries")]
pub max_retries: i64,
#[serde(rename = "perRetryTimeout")]
pub per_retry_timeout: Duration,
#[serde(rename = "tcpRetryEvents")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tcp_retry_events: Option<Vec<String>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpRoute {
#[serde(rename = "action")]
pub action: HttpRouteAction,
#[serde(rename = "match")]
pub route_match: Option<HttpRouteMatch>,
#[serde(rename = "retryPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub retry_policy: Option<HttpRetryPolicy>,
#[serde(rename = "timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<HttpTimeout>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpRouteAction {
#[serde(rename = "weightedTargets")]
pub weighted_targets: Vec<WeightedTarget>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpRouteHeader {
#[serde(rename = "invert")]
#[serde(skip_serializing_if = "Option::is_none")]
pub invert: Option<bool>,
#[serde(rename = "match")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_match: Option<HeaderMatchMethod>,
#[serde(rename = "name")]
pub name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpRouteMatch {
#[serde(rename = "headers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub headers: Option<Vec<HttpRouteHeader>>,
#[serde(rename = "method")]
#[serde(skip_serializing_if = "Option::is_none")]
pub method: Option<String>,
#[serde(rename = "prefix")]
pub prefix: String,
#[serde(rename = "scheme")]
#[serde(skip_serializing_if = "Option::is_none")]
pub scheme: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct HttpTimeout {
#[serde(rename = "idle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle: Option<Duration>,
#[serde(rename = "perRequest")]
#[serde(skip_serializing_if = "Option::is_none")]
pub per_request: Option<Duration>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListGatewayRoutesInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListGatewayRoutesOutput {
#[serde(rename = "gatewayRoutes")]
pub gateway_routes: Vec<GatewayRouteRef>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListMeshesInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListMeshesOutput {
#[serde(rename = "meshes")]
pub meshes: Vec<MeshRef>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListRoutesInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListRoutesOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "routes")]
pub routes: Vec<RouteRef>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListTagsForResourceInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "resourceArn")]
pub resource_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListTagsForResourceOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "tags")]
pub tags: Vec<TagRef>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVirtualGatewaysInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVirtualGatewaysOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualGateways")]
pub virtual_gateways: Vec<VirtualGatewayRef>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVirtualNodesInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVirtualNodesOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualNodes")]
pub virtual_nodes: Vec<VirtualNodeRef>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVirtualRoutersInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVirtualRoutersOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualRouters")]
pub virtual_routers: Vec<VirtualRouterRef>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct ListVirtualServicesInput {
#[serde(rename = "limit")]
#[serde(skip_serializing_if = "Option::is_none")]
pub limit: Option<i64>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ListVirtualServicesOutput {
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualServices")]
pub virtual_services: Vec<VirtualServiceRef>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Listener {
#[serde(rename = "connectionPool")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_pool: Option<VirtualNodeConnectionPool>,
#[serde(rename = "healthCheck")]
#[serde(skip_serializing_if = "Option::is_none")]
pub health_check: Option<HealthCheckPolicy>,
#[serde(rename = "outlierDetection")]
#[serde(skip_serializing_if = "Option::is_none")]
pub outlier_detection: Option<OutlierDetection>,
#[serde(rename = "portMapping")]
pub port_mapping: PortMapping,
#[serde(rename = "timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<ListenerTimeout>,
#[serde(rename = "tls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tls: Option<ListenerTls>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ListenerTimeout {
#[serde(rename = "grpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc: Option<GrpcTimeout>,
#[serde(rename = "http")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http: Option<HttpTimeout>,
#[serde(rename = "http2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_2: Option<HttpTimeout>,
#[serde(rename = "tcp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tcp: Option<TcpTimeout>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ListenerTls {
#[serde(rename = "certificate")]
pub certificate: ListenerTlsCertificate,
#[serde(rename = "mode")]
pub mode: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ListenerTlsAcmCertificate {
#[serde(rename = "certificateArn")]
pub certificate_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ListenerTlsCertificate {
#[serde(rename = "acm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acm: Option<ListenerTlsAcmCertificate>,
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<ListenerTlsFileCertificate>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ListenerTlsFileCertificate {
#[serde(rename = "certificateChain")]
pub certificate_chain: String,
#[serde(rename = "privateKey")]
pub private_key: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Logging {
#[serde(rename = "accessLog")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log: Option<AccessLog>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct MatchRange {
#[serde(rename = "end")]
pub end: i64,
#[serde(rename = "start")]
pub start: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MeshData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: MeshSpec,
#[serde(rename = "status")]
pub status: MeshStatus,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MeshRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct MeshSpec {
#[serde(rename = "egressFilter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub egress_filter: Option<EgressFilter>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct MeshStatus {
#[serde(rename = "status")]
#[serde(skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct OutlierDetection {
#[serde(rename = "baseEjectionDuration")]
pub base_ejection_duration: Duration,
#[serde(rename = "interval")]
pub interval: Duration,
#[serde(rename = "maxEjectionPercent")]
pub max_ejection_percent: i64,
#[serde(rename = "maxServerErrors")]
pub max_server_errors: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct PortMapping {
#[serde(rename = "port")]
pub port: i64,
#[serde(rename = "protocol")]
pub protocol: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct ResourceMetadata {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "uid")]
pub uid: String,
#[serde(rename = "version")]
pub version: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RouteData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "spec")]
pub spec: RouteSpec,
#[serde(rename = "status")]
pub status: RouteStatus,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RouteRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct RouteSpec {
#[serde(rename = "grpcRoute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc_route: Option<GrpcRoute>,
#[serde(rename = "http2Route")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_2_route: Option<HttpRoute>,
#[serde(rename = "httpRoute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_route: Option<HttpRoute>,
#[serde(rename = "priority")]
#[serde(skip_serializing_if = "Option::is_none")]
pub priority: Option<i64>,
#[serde(rename = "tcpRoute")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tcp_route: Option<TcpRoute>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct RouteStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct ServiceDiscovery {
#[serde(rename = "awsCloudMap")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_cloud_map: Option<AwsCloudMapServiceDiscovery>,
#[serde(rename = "dns")]
#[serde(skip_serializing_if = "Option::is_none")]
pub dns: Option<DnsServiceDiscovery>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TagRef {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
pub value: String,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct TagResourceInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: Vec<TagRef>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct TagResourceOutput {}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TcpRoute {
#[serde(rename = "action")]
pub action: TcpRouteAction,
#[serde(rename = "timeout")]
#[serde(skip_serializing_if = "Option::is_none")]
pub timeout: Option<TcpTimeout>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TcpRouteAction {
#[serde(rename = "weightedTargets")]
pub weighted_targets: Vec<WeightedTarget>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TcpTimeout {
#[serde(rename = "idle")]
#[serde(skip_serializing_if = "Option::is_none")]
pub idle: Option<Duration>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TlsValidationContext {
#[serde(rename = "trust")]
pub trust: TlsValidationContextTrust,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TlsValidationContextAcmTrust {
#[serde(rename = "certificateAuthorityArns")]
pub certificate_authority_arns: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TlsValidationContextFileTrust {
#[serde(rename = "certificateChain")]
pub certificate_chain: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct TlsValidationContextTrust {
#[serde(rename = "acm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acm: Option<TlsValidationContextAcmTrust>,
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<TlsValidationContextFileTrust>,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UntagResourceInput {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UntagResourceOutput {}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateGatewayRouteInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "gatewayRouteName")]
pub gateway_route_name: String,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: GatewayRouteSpec,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateGatewayRouteOutput {
#[serde(rename = "gatewayRoute")]
pub gateway_route: GatewayRouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateMeshInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "spec")]
#[serde(skip_serializing_if = "Option::is_none")]
pub spec: Option<MeshSpec>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateMeshOutput {
#[serde(rename = "mesh")]
pub mesh: MeshData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateRouteInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "routeName")]
pub route_name: String,
#[serde(rename = "spec")]
pub spec: RouteSpec,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateRouteOutput {
#[serde(rename = "route")]
pub route: RouteData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVirtualGatewayInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualGatewaySpec,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVirtualGatewayOutput {
#[serde(rename = "virtualGateway")]
pub virtual_gateway: VirtualGatewayData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVirtualNodeInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualNodeSpec,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVirtualNodeOutput {
#[serde(rename = "virtualNode")]
pub virtual_node: VirtualNodeData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVirtualRouterInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualRouterSpec,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVirtualRouterOutput {
#[serde(rename = "virtualRouter")]
pub virtual_router: VirtualRouterData,
}
#[derive(Clone, Debug, Default, PartialEq, Serialize)]
#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
pub struct UpdateVirtualServiceInput {
#[serde(rename = "clientToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_token: Option<String>,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mesh_owner: Option<String>,
#[serde(rename = "spec")]
pub spec: VirtualServiceSpec,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct UpdateVirtualServiceOutput {
#[serde(rename = "virtualService")]
pub virtual_service: VirtualServiceData,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayAccessLog {
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<VirtualGatewayFileAccessLog>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayBackendDefaults {
#[serde(rename = "clientPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_policy: Option<VirtualGatewayClientPolicy>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayClientPolicy {
#[serde(rename = "tls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tls: Option<VirtualGatewayClientPolicyTls>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayClientPolicyTls {
#[serde(rename = "enforce")]
#[serde(skip_serializing_if = "Option::is_none")]
pub enforce: Option<bool>,
#[serde(rename = "ports")]
#[serde(skip_serializing_if = "Option::is_none")]
pub ports: Option<Vec<i64>>,
#[serde(rename = "validation")]
pub validation: VirtualGatewayTlsValidationContext,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayConnectionPool {
#[serde(rename = "grpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc: Option<VirtualGatewayGrpcConnectionPool>,
#[serde(rename = "http")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http: Option<VirtualGatewayHttpConnectionPool>,
#[serde(rename = "http2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_2: Option<VirtualGatewayHttp2ConnectionPool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualGatewayData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: VirtualGatewaySpec,
#[serde(rename = "status")]
pub status: VirtualGatewayStatus,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayFileAccessLog {
#[serde(rename = "path")]
pub path: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayGrpcConnectionPool {
#[serde(rename = "maxRequests")]
pub max_requests: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayHealthCheckPolicy {
#[serde(rename = "healthyThreshold")]
pub healthy_threshold: i64,
#[serde(rename = "intervalMillis")]
pub interval_millis: i64,
#[serde(rename = "path")]
#[serde(skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
#[serde(rename = "port")]
#[serde(skip_serializing_if = "Option::is_none")]
pub port: Option<i64>,
#[serde(rename = "protocol")]
pub protocol: String,
#[serde(rename = "timeoutMillis")]
pub timeout_millis: i64,
#[serde(rename = "unhealthyThreshold")]
pub unhealthy_threshold: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayHttp2ConnectionPool {
#[serde(rename = "maxRequests")]
pub max_requests: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayHttpConnectionPool {
#[serde(rename = "maxConnections")]
pub max_connections: i64,
#[serde(rename = "maxPendingRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_pending_requests: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayListener {
#[serde(rename = "connectionPool")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_pool: Option<VirtualGatewayConnectionPool>,
#[serde(rename = "healthCheck")]
#[serde(skip_serializing_if = "Option::is_none")]
pub health_check: Option<VirtualGatewayHealthCheckPolicy>,
#[serde(rename = "portMapping")]
pub port_mapping: VirtualGatewayPortMapping,
#[serde(rename = "tls")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tls: Option<VirtualGatewayListenerTls>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayListenerTls {
#[serde(rename = "certificate")]
pub certificate: VirtualGatewayListenerTlsCertificate,
#[serde(rename = "mode")]
pub mode: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayListenerTlsAcmCertificate {
#[serde(rename = "certificateArn")]
pub certificate_arn: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayListenerTlsCertificate {
#[serde(rename = "acm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acm: Option<VirtualGatewayListenerTlsAcmCertificate>,
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<VirtualGatewayListenerTlsFileCertificate>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayListenerTlsFileCertificate {
#[serde(rename = "certificateChain")]
pub certificate_chain: String,
#[serde(rename = "privateKey")]
pub private_key: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayLogging {
#[serde(rename = "accessLog")]
#[serde(skip_serializing_if = "Option::is_none")]
pub access_log: Option<VirtualGatewayAccessLog>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayPortMapping {
#[serde(rename = "port")]
pub port: i64,
#[serde(rename = "protocol")]
pub protocol: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualGatewayRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualGatewayName")]
pub virtual_gateway_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewaySpec {
#[serde(rename = "backendDefaults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backend_defaults: Option<VirtualGatewayBackendDefaults>,
#[serde(rename = "listeners")]
pub listeners: Vec<VirtualGatewayListener>,
#[serde(rename = "logging")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging: Option<VirtualGatewayLogging>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualGatewayStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayTlsValidationContext {
#[serde(rename = "trust")]
pub trust: VirtualGatewayTlsValidationContextTrust,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayTlsValidationContextAcmTrust {
#[serde(rename = "certificateAuthorityArns")]
pub certificate_authority_arns: Vec<String>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayTlsValidationContextFileTrust {
#[serde(rename = "certificateChain")]
pub certificate_chain: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualGatewayTlsValidationContextTrust {
#[serde(rename = "acm")]
#[serde(skip_serializing_if = "Option::is_none")]
pub acm: Option<VirtualGatewayTlsValidationContextAcmTrust>,
#[serde(rename = "file")]
#[serde(skip_serializing_if = "Option::is_none")]
pub file: Option<VirtualGatewayTlsValidationContextFileTrust>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeConnectionPool {
#[serde(rename = "grpc")]
#[serde(skip_serializing_if = "Option::is_none")]
pub grpc: Option<VirtualNodeGrpcConnectionPool>,
#[serde(rename = "http")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http: Option<VirtualNodeHttpConnectionPool>,
#[serde(rename = "http2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub http_2: Option<VirtualNodeHttp2ConnectionPool>,
#[serde(rename = "tcp")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tcp: Option<VirtualNodeTcpConnectionPool>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualNodeData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: VirtualNodeSpec,
#[serde(rename = "status")]
pub status: VirtualNodeStatus,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeGrpcConnectionPool {
#[serde(rename = "maxRequests")]
pub max_requests: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeHttp2ConnectionPool {
#[serde(rename = "maxRequests")]
pub max_requests: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeHttpConnectionPool {
#[serde(rename = "maxConnections")]
pub max_connections: i64,
#[serde(rename = "maxPendingRequests")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_pending_requests: Option<i64>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualNodeRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeServiceProvider {
#[serde(rename = "virtualNodeName")]
pub virtual_node_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeSpec {
#[serde(rename = "backendDefaults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backend_defaults: Option<BackendDefaults>,
#[serde(rename = "backends")]
#[serde(skip_serializing_if = "Option::is_none")]
pub backends: Option<Vec<Backend>>,
#[serde(rename = "listeners")]
#[serde(skip_serializing_if = "Option::is_none")]
pub listeners: Option<Vec<Listener>>,
#[serde(rename = "logging")]
#[serde(skip_serializing_if = "Option::is_none")]
pub logging: Option<Logging>,
#[serde(rename = "serviceDiscovery")]
#[serde(skip_serializing_if = "Option::is_none")]
pub service_discovery: Option<ServiceDiscovery>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualNodeStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualNodeTcpConnectionPool {
#[serde(rename = "maxConnections")]
pub max_connections: i64,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualRouterData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: VirtualRouterSpec,
#[serde(rename = "status")]
pub status: VirtualRouterStatus,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualRouterListener {
#[serde(rename = "portMapping")]
pub port_mapping: PortMapping,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualRouterRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualRouterServiceProvider {
#[serde(rename = "virtualRouterName")]
pub virtual_router_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualRouterSpec {
#[serde(rename = "listeners")]
#[serde(skip_serializing_if = "Option::is_none")]
pub listeners: Option<Vec<VirtualRouterListener>>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualRouterStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualServiceBackend {
#[serde(rename = "clientPolicy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub client_policy: Option<ClientPolicy>,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualServiceData {
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "metadata")]
pub metadata: ResourceMetadata,
#[serde(rename = "spec")]
pub spec: VirtualServiceSpec,
#[serde(rename = "status")]
pub status: VirtualServiceStatus,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualServiceProvider {
#[serde(rename = "virtualNode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_node: Option<VirtualNodeServiceProvider>,
#[serde(rename = "virtualRouter")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_router: Option<VirtualRouterServiceProvider>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualServiceRef {
#[serde(rename = "arn")]
pub arn: String,
#[serde(rename = "createdAt")]
pub created_at: f64,
#[serde(rename = "lastUpdatedAt")]
pub last_updated_at: f64,
#[serde(rename = "meshName")]
pub mesh_name: String,
#[serde(rename = "meshOwner")]
pub mesh_owner: String,
#[serde(rename = "resourceOwner")]
pub resource_owner: String,
#[serde(rename = "version")]
pub version: i64,
#[serde(rename = "virtualServiceName")]
pub virtual_service_name: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct VirtualServiceSpec {
#[serde(rename = "provider")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider: Option<VirtualServiceProvider>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
pub struct VirtualServiceStatus {
#[serde(rename = "status")]
pub status: String,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct WeightedTarget {
#[serde(rename = "virtualNode")]
pub virtual_node: String,
#[serde(rename = "weight")]
pub weight: i64,
}
#[derive(Debug, PartialEq)]
pub enum CreateGatewayRouteError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateGatewayRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateGatewayRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateGatewayRouteError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateGatewayRouteError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateGatewayRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateGatewayRouteError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateGatewayRouteError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateGatewayRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateGatewayRouteError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateGatewayRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateGatewayRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateGatewayRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::Conflict(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::NotFound(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateGatewayRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateGatewayRouteError {}
#[derive(Debug, PartialEq)]
pub enum CreateMeshError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateMeshError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateMeshError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateMeshError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateMeshError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateMeshError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateMeshError::InternalServerError(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateMeshError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateMeshError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateMeshError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateMeshError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateMeshError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateMeshError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateMeshError::Conflict(ref cause) => write!(f, "{}", cause),
CreateMeshError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateMeshError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateMeshError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateMeshError::NotFound(ref cause) => write!(f, "{}", cause),
CreateMeshError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateMeshError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateMeshError {}
#[derive(Debug, PartialEq)]
pub enum CreateRouteError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(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))
}
"ForbiddenException" => {
return RusotoError::Service(CreateRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateRouteError::InternalServerError(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(CreateRouteError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateRouteError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateRouteError::Conflict(ref cause) => write!(f, "{}", cause),
CreateRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateRouteError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateRouteError::NotFound(ref cause) => write!(f, "{}", cause),
CreateRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateRouteError {}
#[derive(Debug, PartialEq)]
pub enum CreateVirtualGatewayError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateVirtualGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVirtualGatewayError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateVirtualGatewayError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateVirtualGatewayError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVirtualGatewayError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateVirtualGatewayError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateVirtualGatewayError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateVirtualGatewayError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateVirtualGatewayError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateVirtualGatewayError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVirtualGatewayError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVirtualGatewayError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::Conflict(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::NotFound(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVirtualGatewayError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVirtualGatewayError {}
#[derive(Debug, PartialEq)]
pub enum CreateVirtualNodeError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateVirtualNodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVirtualNodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateVirtualNodeError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateVirtualNodeError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVirtualNodeError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateVirtualNodeError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateVirtualNodeError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateVirtualNodeError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateVirtualNodeError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateVirtualNodeError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVirtualNodeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVirtualNodeError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::Conflict(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::NotFound(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVirtualNodeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVirtualNodeError {}
#[derive(Debug, PartialEq)]
pub enum CreateVirtualRouterError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateVirtualRouterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVirtualRouterError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateVirtualRouterError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateVirtualRouterError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVirtualRouterError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateVirtualRouterError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateVirtualRouterError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateVirtualRouterError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateVirtualRouterError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateVirtualRouterError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVirtualRouterError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVirtualRouterError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::Conflict(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::NotFound(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVirtualRouterError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVirtualRouterError {}
#[derive(Debug, PartialEq)]
pub enum CreateVirtualServiceError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl CreateVirtualServiceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateVirtualServiceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(CreateVirtualServiceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(CreateVirtualServiceError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(CreateVirtualServiceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(CreateVirtualServiceError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(CreateVirtualServiceError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(CreateVirtualServiceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(CreateVirtualServiceError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(CreateVirtualServiceError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for CreateVirtualServiceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
CreateVirtualServiceError::BadRequest(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::Conflict(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::Forbidden(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::InternalServerError(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::NotFound(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
CreateVirtualServiceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for CreateVirtualServiceError {}
#[derive(Debug, PartialEq)]
pub enum DeleteGatewayRouteError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteGatewayRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteGatewayRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteGatewayRouteError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteGatewayRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteGatewayRouteError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteGatewayRouteError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteGatewayRouteError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteGatewayRouteError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteGatewayRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteGatewayRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteGatewayRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteGatewayRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteGatewayRouteError {}
#[derive(Debug, PartialEq)]
pub enum DeleteMeshError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteMeshError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteMeshError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteMeshError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteMeshError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteMeshError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteMeshError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteMeshError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteMeshError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteMeshError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteMeshError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteMeshError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteMeshError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteMeshError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteMeshError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteMeshError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteMeshError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteMeshError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteMeshError {}
#[derive(Debug, PartialEq)]
pub enum DeleteRouteError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(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() {
"BadRequestException" => {
return RusotoError::Service(DeleteRouteError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteRouteError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DeleteRouteError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteRouteError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteRouteError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteRouteError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteRouteError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteRouteError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualGatewayError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteVirtualGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualGatewayError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVirtualGatewayError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVirtualGatewayError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteVirtualGatewayError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVirtualGatewayError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteVirtualGatewayError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteVirtualGatewayError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteVirtualGatewayError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVirtualGatewayError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVirtualGatewayError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVirtualGatewayError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVirtualGatewayError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualNodeError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteVirtualNodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualNodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVirtualNodeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVirtualNodeError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteVirtualNodeError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVirtualNodeError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteVirtualNodeError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteVirtualNodeError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteVirtualNodeError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVirtualNodeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVirtualNodeError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVirtualNodeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVirtualNodeError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualRouterError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteVirtualRouterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualRouterError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVirtualRouterError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVirtualRouterError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteVirtualRouterError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVirtualRouterError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteVirtualRouterError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteVirtualRouterError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteVirtualRouterError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVirtualRouterError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVirtualRouterError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVirtualRouterError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVirtualRouterError {}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualServiceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ResourceInUse(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DeleteVirtualServiceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualServiceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DeleteVirtualServiceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DeleteVirtualServiceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DeleteVirtualServiceError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DeleteVirtualServiceError::NotFound(err.msg))
}
"ResourceInUseException" => {
return RusotoError::Service(DeleteVirtualServiceError::ResourceInUse(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DeleteVirtualServiceError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DeleteVirtualServiceError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DeleteVirtualServiceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DeleteVirtualServiceError::BadRequest(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::Forbidden(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::InternalServerError(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::NotFound(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::ResourceInUse(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DeleteVirtualServiceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DeleteVirtualServiceError {}
#[derive(Debug, PartialEq)]
pub enum DescribeGatewayRouteError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeGatewayRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeGatewayRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeGatewayRouteError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeGatewayRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeGatewayRouteError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DescribeGatewayRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeGatewayRouteError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeGatewayRouteError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeGatewayRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeGatewayRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeGatewayRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeGatewayRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeGatewayRouteError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeGatewayRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeGatewayRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeGatewayRouteError {}
#[derive(Debug, PartialEq)]
pub enum DescribeMeshError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeMeshError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeMeshError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeMeshError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeMeshError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeMeshError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DescribeMeshError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeMeshError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeMeshError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeMeshError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeMeshError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeMeshError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeMeshError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeMeshError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeMeshError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeMeshError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeMeshError {}
#[derive(Debug, PartialEq)]
pub enum DescribeRouteError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeRouteError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeRouteError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(DescribeRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeRouteError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeRouteError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeRouteError {}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualGatewayError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeVirtualGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualGatewayError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeVirtualGatewayError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeVirtualGatewayError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeVirtualGatewayError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DescribeVirtualGatewayError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeVirtualGatewayError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeVirtualGatewayError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeVirtualGatewayError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeVirtualGatewayError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeVirtualGatewayError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeVirtualGatewayError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeVirtualGatewayError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeVirtualGatewayError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeVirtualGatewayError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeVirtualGatewayError {}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualNodeError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeVirtualNodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualNodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeVirtualNodeError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeVirtualNodeError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeVirtualNodeError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DescribeVirtualNodeError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeVirtualNodeError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeVirtualNodeError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeVirtualNodeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeVirtualNodeError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeVirtualNodeError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeVirtualNodeError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeVirtualNodeError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeVirtualNodeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeVirtualNodeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeVirtualNodeError {}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualRouterError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeVirtualRouterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualRouterError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeVirtualRouterError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeVirtualRouterError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeVirtualRouterError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DescribeVirtualRouterError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeVirtualRouterError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeVirtualRouterError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeVirtualRouterError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeVirtualRouterError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeVirtualRouterError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeVirtualRouterError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeVirtualRouterError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeVirtualRouterError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeVirtualRouterError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeVirtualRouterError {}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualServiceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl DescribeVirtualServiceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualServiceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(DescribeVirtualServiceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(DescribeVirtualServiceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(DescribeVirtualServiceError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(DescribeVirtualServiceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(DescribeVirtualServiceError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(DescribeVirtualServiceError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for DescribeVirtualServiceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
DescribeVirtualServiceError::BadRequest(ref cause) => write!(f, "{}", cause),
DescribeVirtualServiceError::Forbidden(ref cause) => write!(f, "{}", cause),
DescribeVirtualServiceError::InternalServerError(ref cause) => write!(f, "{}", cause),
DescribeVirtualServiceError::NotFound(ref cause) => write!(f, "{}", cause),
DescribeVirtualServiceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
DescribeVirtualServiceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for DescribeVirtualServiceError {}
#[derive(Debug, PartialEq)]
pub enum ListGatewayRoutesError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListGatewayRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListGatewayRoutesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListGatewayRoutesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListGatewayRoutesError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListGatewayRoutesError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListGatewayRoutesError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListGatewayRoutesError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListGatewayRoutesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListGatewayRoutesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListGatewayRoutesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListGatewayRoutesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListGatewayRoutesError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListGatewayRoutesError::NotFound(ref cause) => write!(f, "{}", cause),
ListGatewayRoutesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListGatewayRoutesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListGatewayRoutesError {}
#[derive(Debug, PartialEq)]
pub enum ListMeshesError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListMeshesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListMeshesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListMeshesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListMeshesError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListMeshesError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListMeshesError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListMeshesError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListMeshesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListMeshesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListMeshesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListMeshesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListMeshesError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListMeshesError::NotFound(ref cause) => write!(f, "{}", cause),
ListMeshesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListMeshesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListMeshesError {}
#[derive(Debug, PartialEq)]
pub enum ListRoutesError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListRoutesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRoutesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListRoutesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListRoutesError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListRoutesError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(ListRoutesError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListRoutesError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListRoutesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListRoutesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListRoutesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListRoutesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListRoutesError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListRoutesError::NotFound(ref cause) => write!(f, "{}", cause),
ListRoutesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListRoutesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListRoutesError {}
#[derive(Debug, PartialEq)]
pub enum ListTagsForResourceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListTagsForResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListTagsForResourceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListTagsForResourceError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListTagsForResourceError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListTagsForResourceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListTagsForResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListTagsForResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListTagsForResourceError {}
#[derive(Debug, PartialEq)]
pub enum ListVirtualGatewaysError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListVirtualGatewaysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVirtualGatewaysError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVirtualGatewaysError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVirtualGatewaysError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListVirtualGatewaysError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListVirtualGatewaysError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVirtualGatewaysError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListVirtualGatewaysError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVirtualGatewaysError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVirtualGatewaysError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVirtualGatewaysError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVirtualGatewaysError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListVirtualGatewaysError::NotFound(ref cause) => write!(f, "{}", cause),
ListVirtualGatewaysError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVirtualGatewaysError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVirtualGatewaysError {}
#[derive(Debug, PartialEq)]
pub enum ListVirtualNodesError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListVirtualNodesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVirtualNodesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVirtualNodesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVirtualNodesError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListVirtualNodesError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListVirtualNodesError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVirtualNodesError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListVirtualNodesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVirtualNodesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVirtualNodesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVirtualNodesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVirtualNodesError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListVirtualNodesError::NotFound(ref cause) => write!(f, "{}", cause),
ListVirtualNodesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVirtualNodesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVirtualNodesError {}
#[derive(Debug, PartialEq)]
pub enum ListVirtualRoutersError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListVirtualRoutersError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVirtualRoutersError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVirtualRoutersError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVirtualRoutersError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListVirtualRoutersError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListVirtualRoutersError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVirtualRoutersError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListVirtualRoutersError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVirtualRoutersError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVirtualRoutersError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVirtualRoutersError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVirtualRoutersError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListVirtualRoutersError::NotFound(ref cause) => write!(f, "{}", cause),
ListVirtualRoutersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVirtualRoutersError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVirtualRoutersError {}
#[derive(Debug, PartialEq)]
pub enum ListVirtualServicesError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl ListVirtualServicesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListVirtualServicesError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(ListVirtualServicesError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(ListVirtualServicesError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(ListVirtualServicesError::InternalServerError(
err.msg,
))
}
"NotFoundException" => {
return RusotoError::Service(ListVirtualServicesError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(ListVirtualServicesError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(ListVirtualServicesError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for ListVirtualServicesError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ListVirtualServicesError::BadRequest(ref cause) => write!(f, "{}", cause),
ListVirtualServicesError::Forbidden(ref cause) => write!(f, "{}", cause),
ListVirtualServicesError::InternalServerError(ref cause) => write!(f, "{}", cause),
ListVirtualServicesError::NotFound(ref cause) => write!(f, "{}", cause),
ListVirtualServicesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
ListVirtualServicesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for ListVirtualServicesError {}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
TooManyTags(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(TagResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(TagResourceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(TagResourceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(TagResourceError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(TagResourceError::TooManyRequests(err.msg))
}
"TooManyTagsException" => {
return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for TagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
TagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
TagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
TagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
TagResourceError::TooManyTags(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for TagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
BadRequest(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UntagResourceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UntagResourceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UntagResourceError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UntagResourceError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UntagResourceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
UntagResourceError::Forbidden(ref cause) => write!(f, "{}", cause),
UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
UntagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UntagResourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UntagResourceError {}
#[derive(Debug, PartialEq)]
pub enum UpdateGatewayRouteError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateGatewayRouteError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateGatewayRouteError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateGatewayRouteError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateGatewayRouteError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateGatewayRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateGatewayRouteError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateGatewayRouteError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateGatewayRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateGatewayRouteError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateGatewayRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateGatewayRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateGatewayRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateGatewayRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateGatewayRouteError {}
#[derive(Debug, PartialEq)]
pub enum UpdateMeshError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateMeshError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateMeshError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateMeshError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateMeshError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateMeshError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateMeshError::InternalServerError(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateMeshError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateMeshError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateMeshError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateMeshError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateMeshError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateMeshError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateMeshError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateMeshError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateMeshError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateMeshError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateMeshError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateMeshError {}
#[derive(Debug, PartialEq)]
pub enum UpdateRouteError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(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))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateRouteError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateRouteError::InternalServerError(err.msg))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateRouteError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateRouteError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateRouteError::ServiceUnavailable(err.msg))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateRouteError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateRouteError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateRouteError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateRouteError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateRouteError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateRouteError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateRouteError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateRouteError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateRouteError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateRouteError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateRouteError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVirtualGatewayError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateVirtualGatewayError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVirtualGatewayError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVirtualGatewayError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateVirtualGatewayError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVirtualGatewayError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateVirtualGatewayError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateVirtualGatewayError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVirtualGatewayError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateVirtualGatewayError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateVirtualGatewayError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVirtualGatewayError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVirtualGatewayError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVirtualGatewayError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVirtualGatewayError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVirtualNodeError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateVirtualNodeError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVirtualNodeError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVirtualNodeError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateVirtualNodeError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVirtualNodeError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateVirtualNodeError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateVirtualNodeError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVirtualNodeError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateVirtualNodeError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateVirtualNodeError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVirtualNodeError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVirtualNodeError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVirtualNodeError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVirtualNodeError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVirtualRouterError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateVirtualRouterError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVirtualRouterError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVirtualRouterError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateVirtualRouterError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVirtualRouterError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateVirtualRouterError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateVirtualRouterError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVirtualRouterError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateVirtualRouterError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateVirtualRouterError::TooManyRequests(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVirtualRouterError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVirtualRouterError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVirtualRouterError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVirtualRouterError {}
#[derive(Debug, PartialEq)]
pub enum UpdateVirtualServiceError {
BadRequest(String),
Conflict(String),
Forbidden(String),
InternalServerError(String),
LimitExceeded(String),
NotFound(String),
ServiceUnavailable(String),
TooManyRequests(String),
}
impl UpdateVirtualServiceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateVirtualServiceError> {
if let Some(err) = proto::json::Error::parse_rest(&res) {
match err.typ.as_str() {
"BadRequestException" => {
return RusotoError::Service(UpdateVirtualServiceError::BadRequest(err.msg))
}
"ConflictException" => {
return RusotoError::Service(UpdateVirtualServiceError::Conflict(err.msg))
}
"ForbiddenException" => {
return RusotoError::Service(UpdateVirtualServiceError::Forbidden(err.msg))
}
"InternalServerErrorException" => {
return RusotoError::Service(UpdateVirtualServiceError::InternalServerError(
err.msg,
))
}
"LimitExceededException" => {
return RusotoError::Service(UpdateVirtualServiceError::LimitExceeded(err.msg))
}
"NotFoundException" => {
return RusotoError::Service(UpdateVirtualServiceError::NotFound(err.msg))
}
"ServiceUnavailableException" => {
return RusotoError::Service(UpdateVirtualServiceError::ServiceUnavailable(
err.msg,
))
}
"TooManyRequestsException" => {
return RusotoError::Service(UpdateVirtualServiceError::TooManyRequests(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
RusotoError::Unknown(res)
}
}
impl fmt::Display for UpdateVirtualServiceError {
#[allow(unused_variables)]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
UpdateVirtualServiceError::BadRequest(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::Conflict(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::Forbidden(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::InternalServerError(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::NotFound(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
UpdateVirtualServiceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
}
}
}
impl Error for UpdateVirtualServiceError {}
#[async_trait]
pub trait AppMesh {
async fn create_gateway_route(
&self,
input: CreateGatewayRouteInput,
) -> Result<CreateGatewayRouteOutput, RusotoError<CreateGatewayRouteError>>;
async fn create_mesh(
&self,
input: CreateMeshInput,
) -> Result<CreateMeshOutput, RusotoError<CreateMeshError>>;
async fn create_route(
&self,
input: CreateRouteInput,
) -> Result<CreateRouteOutput, RusotoError<CreateRouteError>>;
async fn create_virtual_gateway(
&self,
input: CreateVirtualGatewayInput,
) -> Result<CreateVirtualGatewayOutput, RusotoError<CreateVirtualGatewayError>>;
async fn create_virtual_node(
&self,
input: CreateVirtualNodeInput,
) -> Result<CreateVirtualNodeOutput, RusotoError<CreateVirtualNodeError>>;
async fn create_virtual_router(
&self,
input: CreateVirtualRouterInput,
) -> Result<CreateVirtualRouterOutput, RusotoError<CreateVirtualRouterError>>;
async fn create_virtual_service(
&self,
input: CreateVirtualServiceInput,
) -> Result<CreateVirtualServiceOutput, RusotoError<CreateVirtualServiceError>>;
async fn delete_gateway_route(
&self,
input: DeleteGatewayRouteInput,
) -> Result<DeleteGatewayRouteOutput, RusotoError<DeleteGatewayRouteError>>;
async fn delete_mesh(
&self,
input: DeleteMeshInput,
) -> Result<DeleteMeshOutput, RusotoError<DeleteMeshError>>;
async fn delete_route(
&self,
input: DeleteRouteInput,
) -> Result<DeleteRouteOutput, RusotoError<DeleteRouteError>>;
async fn delete_virtual_gateway(
&self,
input: DeleteVirtualGatewayInput,
) -> Result<DeleteVirtualGatewayOutput, RusotoError<DeleteVirtualGatewayError>>;
async fn delete_virtual_node(
&self,
input: DeleteVirtualNodeInput,
) -> Result<DeleteVirtualNodeOutput, RusotoError<DeleteVirtualNodeError>>;
async fn delete_virtual_router(
&self,
input: DeleteVirtualRouterInput,
) -> Result<DeleteVirtualRouterOutput, RusotoError<DeleteVirtualRouterError>>;
async fn delete_virtual_service(
&self,
input: DeleteVirtualServiceInput,
) -> Result<DeleteVirtualServiceOutput, RusotoError<DeleteVirtualServiceError>>;
async fn describe_gateway_route(
&self,
input: DescribeGatewayRouteInput,
) -> Result<DescribeGatewayRouteOutput, RusotoError<DescribeGatewayRouteError>>;
async fn describe_mesh(
&self,
input: DescribeMeshInput,
) -> Result<DescribeMeshOutput, RusotoError<DescribeMeshError>>;
async fn describe_route(
&self,
input: DescribeRouteInput,
) -> Result<DescribeRouteOutput, RusotoError<DescribeRouteError>>;
async fn describe_virtual_gateway(
&self,
input: DescribeVirtualGatewayInput,
) -> Result<DescribeVirtualGatewayOutput, RusotoError<DescribeVirtualGatewayError>>;
async fn describe_virtual_node(
&self,
input: DescribeVirtualNodeInput,
) -> Result<DescribeVirtualNodeOutput, RusotoError<DescribeVirtualNodeError>>;
async fn describe_virtual_router(
&self,
input: DescribeVirtualRouterInput,
) -> Result<DescribeVirtualRouterOutput, RusotoError<DescribeVirtualRouterError>>;
async fn describe_virtual_service(
&self,
input: DescribeVirtualServiceInput,
) -> Result<DescribeVirtualServiceOutput, RusotoError<DescribeVirtualServiceError>>;
async fn list_gateway_routes(
&self,
input: ListGatewayRoutesInput,
) -> Result<ListGatewayRoutesOutput, RusotoError<ListGatewayRoutesError>>;
async fn list_meshes(
&self,
input: ListMeshesInput,
) -> Result<ListMeshesOutput, RusotoError<ListMeshesError>>;
async fn list_routes(
&self,
input: ListRoutesInput,
) -> Result<ListRoutesOutput, RusotoError<ListRoutesError>>;
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>>;
async fn list_virtual_gateways(
&self,
input: ListVirtualGatewaysInput,
) -> Result<ListVirtualGatewaysOutput, RusotoError<ListVirtualGatewaysError>>;
async fn list_virtual_nodes(
&self,
input: ListVirtualNodesInput,
) -> Result<ListVirtualNodesOutput, RusotoError<ListVirtualNodesError>>;
async fn list_virtual_routers(
&self,
input: ListVirtualRoutersInput,
) -> Result<ListVirtualRoutersOutput, RusotoError<ListVirtualRoutersError>>;
async fn list_virtual_services(
&self,
input: ListVirtualServicesInput,
) -> Result<ListVirtualServicesOutput, RusotoError<ListVirtualServicesError>>;
async fn tag_resource(
&self,
input: TagResourceInput,
) -> Result<TagResourceOutput, RusotoError<TagResourceError>>;
async fn untag_resource(
&self,
input: UntagResourceInput,
) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>>;
async fn update_gateway_route(
&self,
input: UpdateGatewayRouteInput,
) -> Result<UpdateGatewayRouteOutput, RusotoError<UpdateGatewayRouteError>>;
async fn update_mesh(
&self,
input: UpdateMeshInput,
) -> Result<UpdateMeshOutput, RusotoError<UpdateMeshError>>;
async fn update_route(
&self,
input: UpdateRouteInput,
) -> Result<UpdateRouteOutput, RusotoError<UpdateRouteError>>;
async fn update_virtual_gateway(
&self,
input: UpdateVirtualGatewayInput,
) -> Result<UpdateVirtualGatewayOutput, RusotoError<UpdateVirtualGatewayError>>;
async fn update_virtual_node(
&self,
input: UpdateVirtualNodeInput,
) -> Result<UpdateVirtualNodeOutput, RusotoError<UpdateVirtualNodeError>>;
async fn update_virtual_router(
&self,
input: UpdateVirtualRouterInput,
) -> Result<UpdateVirtualRouterOutput, RusotoError<UpdateVirtualRouterError>>;
async fn update_virtual_service(
&self,
input: UpdateVirtualServiceInput,
) -> Result<UpdateVirtualServiceOutput, RusotoError<UpdateVirtualServiceError>>;
}
#[derive(Clone)]
pub struct AppMeshClient {
client: Client,
region: region::Region,
}
impl AppMeshClient {
pub fn new(region: region::Region) -> AppMeshClient {
AppMeshClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> AppMeshClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
D: DispatchSignedRequest + Send + Sync + 'static,
{
AppMeshClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
pub fn new_with_client(client: Client, region: region::Region) -> AppMeshClient {
AppMeshClient { client, region }
}
}
#[async_trait]
impl AppMesh for AppMeshClient {
#[allow(unused_mut)]
async fn create_gateway_route(
&self,
input: CreateGatewayRouteInput,
) -> Result<CreateGatewayRouteOutput, RusotoError<CreateGatewayRouteError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateway/{virtual_gateway_name}/gatewayRoutes",
mesh_name = input.mesh_name,
virtual_gateway_name = input.virtual_gateway_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateGatewayRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateGatewayRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_mesh(
&self,
input: CreateMeshInput,
) -> Result<CreateMeshOutput, RusotoError<CreateMeshError>> {
let request_uri = "/v20190125/meshes";
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateMeshOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateMeshError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_route(
&self,
input: CreateRouteInput,
) -> Result<CreateRouteOutput, RusotoError<CreateRouteError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouter/{virtual_router_name}/routes",
mesh_name = input.mesh_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_virtual_gateway(
&self,
input: CreateVirtualGatewayInput,
) -> Result<CreateVirtualGatewayOutput, RusotoError<CreateVirtualGatewayError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateways",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVirtualGatewayOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVirtualGatewayError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_virtual_node(
&self,
input: CreateVirtualNodeInput,
) -> Result<CreateVirtualNodeOutput, RusotoError<CreateVirtualNodeError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualNodes",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVirtualNodeOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVirtualNodeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_virtual_router(
&self,
input: CreateVirtualRouterInput,
) -> Result<CreateVirtualRouterOutput, RusotoError<CreateVirtualRouterError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouters",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVirtualRouterOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVirtualRouterError::from_response(response))
}
}
#[allow(unused_mut)]
async fn create_virtual_service(
&self,
input: CreateVirtualServiceInput,
) -> Result<CreateVirtualServiceOutput, RusotoError<CreateVirtualServiceError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualServices",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<CreateVirtualServiceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(CreateVirtualServiceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_gateway_route(
&self,
input: DeleteGatewayRouteInput,
) -> Result<DeleteGatewayRouteOutput, RusotoError<DeleteGatewayRouteError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}/virtualGateway/{virtual_gateway_name}/gatewayRoutes/{gateway_route_name}", gateway_route_name = input.gateway_route_name, mesh_name = input.mesh_name, virtual_gateway_name = input.virtual_gateway_name);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteGatewayRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteGatewayRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_mesh(
&self,
input: DeleteMeshInput,
) -> Result<DeleteMeshOutput, RusotoError<DeleteMeshError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}", mesh_name = input.mesh_name);
let mut request = SignedRequest::new("DELETE", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteMeshOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteMeshError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_route(
&self,
input: DeleteRouteInput,
) -> Result<DeleteRouteOutput, RusotoError<DeleteRouteError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouter/{virtual_router_name}/routes/{route_name}",
mesh_name = input.mesh_name,
route_name = input.route_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_virtual_gateway(
&self,
input: DeleteVirtualGatewayInput,
) -> Result<DeleteVirtualGatewayOutput, RusotoError<DeleteVirtualGatewayError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateways/{virtual_gateway_name}",
mesh_name = input.mesh_name,
virtual_gateway_name = input.virtual_gateway_name
);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVirtualGatewayOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVirtualGatewayError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_virtual_node(
&self,
input: DeleteVirtualNodeInput,
) -> Result<DeleteVirtualNodeOutput, RusotoError<DeleteVirtualNodeError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualNodes/{virtual_node_name}",
mesh_name = input.mesh_name,
virtual_node_name = input.virtual_node_name
);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVirtualNodeOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVirtualNodeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_virtual_router(
&self,
input: DeleteVirtualRouterInput,
) -> Result<DeleteVirtualRouterOutput, RusotoError<DeleteVirtualRouterError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouters/{virtual_router_name}",
mesh_name = input.mesh_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVirtualRouterOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVirtualRouterError::from_response(response))
}
}
#[allow(unused_mut)]
async fn delete_virtual_service(
&self,
input: DeleteVirtualServiceInput,
) -> Result<DeleteVirtualServiceOutput, RusotoError<DeleteVirtualServiceError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualServices/{virtual_service_name}",
mesh_name = input.mesh_name,
virtual_service_name = input.virtual_service_name
);
let mut request = SignedRequest::new("DELETE", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVirtualServiceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DeleteVirtualServiceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_gateway_route(
&self,
input: DescribeGatewayRouteInput,
) -> Result<DescribeGatewayRouteOutput, RusotoError<DescribeGatewayRouteError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}/virtualGateway/{virtual_gateway_name}/gatewayRoutes/{gateway_route_name}", gateway_route_name = input.gateway_route_name, mesh_name = input.mesh_name, virtual_gateway_name = input.virtual_gateway_name);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeGatewayRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeGatewayRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_mesh(
&self,
input: DescribeMeshInput,
) -> Result<DescribeMeshOutput, RusotoError<DescribeMeshError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}", mesh_name = input.mesh_name);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeMeshOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeMeshError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_route(
&self,
input: DescribeRouteInput,
) -> Result<DescribeRouteOutput, RusotoError<DescribeRouteError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouter/{virtual_router_name}/routes/{route_name}",
mesh_name = input.mesh_name,
route_name = input.route_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_virtual_gateway(
&self,
input: DescribeVirtualGatewayInput,
) -> Result<DescribeVirtualGatewayOutput, RusotoError<DescribeVirtualGatewayError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateways/{virtual_gateway_name}",
mesh_name = input.mesh_name,
virtual_gateway_name = input.virtual_gateway_name
);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeVirtualGatewayOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeVirtualGatewayError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_virtual_node(
&self,
input: DescribeVirtualNodeInput,
) -> Result<DescribeVirtualNodeOutput, RusotoError<DescribeVirtualNodeError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualNodes/{virtual_node_name}",
mesh_name = input.mesh_name,
virtual_node_name = input.virtual_node_name
);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeVirtualNodeOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeVirtualNodeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_virtual_router(
&self,
input: DescribeVirtualRouterInput,
) -> Result<DescribeVirtualRouterOutput, RusotoError<DescribeVirtualRouterError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouters/{virtual_router_name}",
mesh_name = input.mesh_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeVirtualRouterOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeVirtualRouterError::from_response(response))
}
}
#[allow(unused_mut)]
async fn describe_virtual_service(
&self,
input: DescribeVirtualServiceInput,
) -> Result<DescribeVirtualServiceOutput, RusotoError<DescribeVirtualServiceError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualServices/{virtual_service_name}",
mesh_name = input.mesh_name,
virtual_service_name = input.virtual_service_name
);
let mut request = SignedRequest::new("GET", "appmesh", &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.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeVirtualServiceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(DescribeVirtualServiceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_gateway_routes(
&self,
input: ListGatewayRoutesInput,
) -> Result<ListGatewayRoutesOutput, RusotoError<ListGatewayRoutesError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateway/{virtual_gateway_name}/gatewayRoutes",
mesh_name = input.mesh_name,
virtual_gateway_name = input.virtual_gateway_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListGatewayRoutesOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListGatewayRoutesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_meshes(
&self,
input: ListMeshesInput,
) -> Result<ListMeshesOutput, RusotoError<ListMeshesError>> {
let request_uri = "/v20190125/meshes";
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListMeshesOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListMeshesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_routes(
&self,
input: ListRoutesInput,
) -> Result<ListRoutesOutput, RusotoError<ListRoutesError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouter/{virtual_router_name}/routes",
mesh_name = input.mesh_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListRoutesOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListRoutesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_tags_for_resource(
&self,
input: ListTagsForResourceInput,
) -> Result<ListTagsForResourceOutput, RusotoError<ListTagsForResourceError>> {
let request_uri = "/v20190125/tags";
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListTagsForResourceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListTagsForResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_virtual_gateways(
&self,
input: ListVirtualGatewaysInput,
) -> Result<ListVirtualGatewaysOutput, RusotoError<ListVirtualGatewaysError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateways",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVirtualGatewaysOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVirtualGatewaysError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_virtual_nodes(
&self,
input: ListVirtualNodesInput,
) -> Result<ListVirtualNodesOutput, RusotoError<ListVirtualNodesError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualNodes",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVirtualNodesOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVirtualNodesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_virtual_routers(
&self,
input: ListVirtualRoutersInput,
) -> Result<ListVirtualRoutersOutput, RusotoError<ListVirtualRoutersError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouters",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVirtualRoutersOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVirtualRoutersError::from_response(response))
}
}
#[allow(unused_mut)]
async fn list_virtual_services(
&self,
input: ListVirtualServicesInput,
) -> Result<ListVirtualServicesOutput, RusotoError<ListVirtualServicesError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualServices",
mesh_name = input.mesh_name
);
let mut request = SignedRequest::new("GET", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let mut params = Params::new();
if let Some(ref x) = input.limit {
params.put("limit", x);
}
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
if let Some(ref x) = input.next_token {
params.put("nextToken", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<ListVirtualServicesOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(ListVirtualServicesError::from_response(response))
}
}
#[allow(unused_mut)]
async fn tag_resource(
&self,
input: TagResourceInput,
) -> Result<TagResourceOutput, RusotoError<TagResourceError>> {
let request_uri = "/v20190125/tag";
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(TagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn untag_resource(
&self,
input: UntagResourceInput,
) -> Result<UntagResourceOutput, RusotoError<UntagResourceError>> {
let request_uri = "/v20190125/untag";
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
params.put("resourceArn", &input.resource_arn);
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UntagResourceError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_gateway_route(
&self,
input: UpdateGatewayRouteInput,
) -> Result<UpdateGatewayRouteOutput, RusotoError<UpdateGatewayRouteError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}/virtualGateway/{virtual_gateway_name}/gatewayRoutes/{gateway_route_name}", gateway_route_name = input.gateway_route_name, mesh_name = input.mesh_name, virtual_gateway_name = input.virtual_gateway_name);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateGatewayRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateGatewayRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_mesh(
&self,
input: UpdateMeshInput,
) -> Result<UpdateMeshOutput, RusotoError<UpdateMeshError>> {
let request_uri = format!("/v20190125/meshes/{mesh_name}", mesh_name = input.mesh_name);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateMeshOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateMeshError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_route(
&self,
input: UpdateRouteInput,
) -> Result<UpdateRouteOutput, RusotoError<UpdateRouteError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouter/{virtual_router_name}/routes/{route_name}",
mesh_name = input.mesh_name,
route_name = input.route_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateRouteOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateRouteError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_virtual_gateway(
&self,
input: UpdateVirtualGatewayInput,
) -> Result<UpdateVirtualGatewayOutput, RusotoError<UpdateVirtualGatewayError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualGateways/{virtual_gateway_name}",
mesh_name = input.mesh_name,
virtual_gateway_name = input.virtual_gateway_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVirtualGatewayOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVirtualGatewayError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_virtual_node(
&self,
input: UpdateVirtualNodeInput,
) -> Result<UpdateVirtualNodeOutput, RusotoError<UpdateVirtualNodeError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualNodes/{virtual_node_name}",
mesh_name = input.mesh_name,
virtual_node_name = input.virtual_node_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVirtualNodeOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVirtualNodeError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_virtual_router(
&self,
input: UpdateVirtualRouterInput,
) -> Result<UpdateVirtualRouterOutput, RusotoError<UpdateVirtualRouterError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualRouters/{virtual_router_name}",
mesh_name = input.mesh_name,
virtual_router_name = input.virtual_router_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVirtualRouterOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVirtualRouterError::from_response(response))
}
}
#[allow(unused_mut)]
async fn update_virtual_service(
&self,
input: UpdateVirtualServiceInput,
) -> Result<UpdateVirtualServiceOutput, RusotoError<UpdateVirtualServiceError>> {
let request_uri = format!(
"/v20190125/meshes/{mesh_name}/virtualServices/{virtual_service_name}",
mesh_name = input.mesh_name,
virtual_service_name = input.virtual_service_name
);
let mut request = SignedRequest::new("PUT", "appmesh", &self.region, &request_uri);
request.set_content_type("application/x-amz-json-1.1".to_owned());
let encoded = Some(serde_json::to_vec(&input).unwrap());
request.set_payload(encoded);
let mut params = Params::new();
if let Some(ref x) = input.mesh_owner {
params.put("meshOwner", x);
}
request.set_params(params);
let mut response = self
.client
.sign_and_dispatch(request)
.await
.map_err(RusotoError::from)?;
if response.status.as_u16() == 200 {
let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
let result = proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateVirtualServiceOutput, _>()?;
Ok(result)
} else {
let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
Err(UpdateVirtualServiceError::from_response(response))
}
}
}