use std::error::Error;
use std::fmt;
#[allow(warnings)]
use futures::future;
use futures::Future;
use rusoto_core::credential::ProvideAwsCredentials;
use rusoto_core::region;
use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
use rusoto_core::{Client, RusotoError, RusotoFuture};
use rusoto_core::proto;
use rusoto_core::signature::SignedRequest;
use serde_json;
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AcceptDirectConnectGatewayAssociationProposalRequest {
#[serde(rename = "associatedGatewayOwnerAccount")]
pub associated_gateway_owner_account: String,
#[serde(rename = "directConnectGatewayId")]
pub direct_connect_gateway_id: String,
#[serde(rename = "overrideAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub override_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "proposalId")]
pub proposal_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AcceptDirectConnectGatewayAssociationProposalResult {
#[serde(rename = "directConnectGatewayAssociation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AllocateConnectionOnInterconnectRequest {
#[serde(rename = "bandwidth")]
pub bandwidth: String,
#[serde(rename = "connectionName")]
pub connection_name: String,
#[serde(rename = "interconnectId")]
pub interconnect_id: String,
#[serde(rename = "ownerAccount")]
pub owner_account: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AllocateHostedConnectionRequest {
#[serde(rename = "bandwidth")]
pub bandwidth: String,
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "connectionName")]
pub connection_name: String,
#[serde(rename = "ownerAccount")]
pub owner_account: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AllocatePrivateVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newPrivateVirtualInterfaceAllocation")]
pub new_private_virtual_interface_allocation: NewPrivateVirtualInterfaceAllocation,
#[serde(rename = "ownerAccount")]
pub owner_account: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AllocatePublicVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newPublicVirtualInterfaceAllocation")]
pub new_public_virtual_interface_allocation: NewPublicVirtualInterfaceAllocation,
#[serde(rename = "ownerAccount")]
pub owner_account: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AllocateTransitVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newTransitVirtualInterfaceAllocation")]
pub new_transit_virtual_interface_allocation: NewTransitVirtualInterfaceAllocation,
#[serde(rename = "ownerAccount")]
pub owner_account: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AllocateTransitVirtualInterfaceResult {
#[serde(rename = "virtualInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface: Option<VirtualInterface>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateConnectionWithLagRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "lagId")]
pub lag_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateHostedConnectionRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "parentConnectionId")]
pub parent_connection_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct AssociateVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct AssociatedGateway {
#[serde(rename = "id")]
#[serde(skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "ownerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "type")]
#[serde(skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct BGPPeer {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "awsDeviceV2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device_v2: Option<String>,
#[serde(rename = "bgpPeerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bgp_peer_id: Option<String>,
#[serde(rename = "bgpPeerState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bgp_peer_state: Option<String>,
#[serde(rename = "bgpStatus")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bgp_status: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmConnectionRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmConnectionResponse {
#[serde(rename = "connectionState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmPrivateVirtualInterfaceRequest {
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmPrivateVirtualInterfaceResponse {
#[serde(rename = "virtualInterfaceState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmPublicVirtualInterfaceRequest {
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmPublicVirtualInterfaceResponse {
#[serde(rename = "virtualInterfaceState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct ConfirmTransitVirtualInterfaceRequest {
#[serde(rename = "directConnectGatewayId")]
pub direct_connect_gateway_id: String,
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ConfirmTransitVirtualInterfaceResponse {
#[serde(rename = "virtualInterfaceState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Connection {
#[serde(rename = "awsDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device: Option<String>,
#[serde(rename = "awsDeviceV2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device_v2: Option<String>,
#[serde(rename = "bandwidth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bandwidth: Option<String>,
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "connectionName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_name: Option<String>,
#[serde(rename = "connectionState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_state: Option<String>,
#[serde(rename = "hasLogicalRedundancy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_logical_redundancy: Option<String>,
#[serde(rename = "jumboFrameCapable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jumbo_frame_capable: Option<bool>,
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
#[serde(rename = "loaIssueTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_issue_time: Option<f64>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "ownerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account: Option<String>,
#[serde(rename = "partnerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub partner_name: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "vlan")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vlan: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Connections {
#[serde(rename = "connections")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connections: Option<Vec<Connection>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateBGPPeerRequest {
#[serde(rename = "newBGPPeer")]
#[serde(skip_serializing_if = "Option::is_none")]
pub new_bgp_peer: Option<NewBGPPeer>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateBGPPeerResponse {
#[serde(rename = "virtualInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface: Option<VirtualInterface>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateConnectionRequest {
#[serde(rename = "bandwidth")]
pub bandwidth: String,
#[serde(rename = "connectionName")]
pub connection_name: String,
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
#[serde(rename = "location")]
pub location: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectConnectGatewayAssociationProposalRequest {
#[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "directConnectGatewayId")]
pub direct_connect_gateway_id: String,
#[serde(rename = "directConnectGatewayOwnerAccount")]
pub direct_connect_gateway_owner_account: String,
#[serde(rename = "gatewayId")]
pub gateway_id: String,
#[serde(rename = "removeAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectConnectGatewayAssociationProposalResult {
#[serde(rename = "directConnectGatewayAssociationProposal")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association_proposal:
Option<DirectConnectGatewayAssociationProposal>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectConnectGatewayAssociationRequest {
#[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "directConnectGatewayId")]
pub direct_connect_gateway_id: String,
#[serde(rename = "gatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub gateway_id: Option<String>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectConnectGatewayAssociationResult {
#[serde(rename = "directConnectGatewayAssociation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateDirectConnectGatewayRequest {
#[serde(rename = "amazonSideAsn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_side_asn: Option<i64>,
#[serde(rename = "directConnectGatewayName")]
pub direct_connect_gateway_name: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateDirectConnectGatewayResult {
#[serde(rename = "directConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway: Option<DirectConnectGateway>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateInterconnectRequest {
#[serde(rename = "bandwidth")]
pub bandwidth: String,
#[serde(rename = "interconnectName")]
pub interconnect_name: String,
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
#[serde(rename = "location")]
pub location: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateLagRequest {
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "connectionsBandwidth")]
pub connections_bandwidth: String,
#[serde(rename = "lagName")]
pub lag_name: String,
#[serde(rename = "location")]
pub location: String,
#[serde(rename = "numberOfConnections")]
pub number_of_connections: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePrivateVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newPrivateVirtualInterface")]
pub new_private_virtual_interface: NewPrivateVirtualInterface,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreatePublicVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newPublicVirtualInterface")]
pub new_public_virtual_interface: NewPublicVirtualInterface,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct CreateTransitVirtualInterfaceRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "newTransitVirtualInterface")]
pub new_transit_virtual_interface: NewTransitVirtualInterface,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct CreateTransitVirtualInterfaceResult {
#[serde(rename = "virtualInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface: Option<VirtualInterface>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteBGPPeerRequest {
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "bgpPeerId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bgp_peer_id: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteBGPPeerResponse {
#[serde(rename = "virtualInterface")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface: Option<VirtualInterface>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteConnectionRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectConnectGatewayAssociationProposalRequest {
#[serde(rename = "proposalId")]
pub proposal_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectConnectGatewayAssociationProposalResult {
#[serde(rename = "directConnectGatewayAssociationProposal")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association_proposal:
Option<DirectConnectGatewayAssociationProposal>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectConnectGatewayAssociationRequest {
#[serde(rename = "associationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectConnectGatewayAssociationResult {
#[serde(rename = "directConnectGatewayAssociation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteDirectConnectGatewayRequest {
#[serde(rename = "directConnectGatewayId")]
pub direct_connect_gateway_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteDirectConnectGatewayResult {
#[serde(rename = "directConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway: Option<DirectConnectGateway>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteInterconnectRequest {
#[serde(rename = "interconnectId")]
pub interconnect_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteInterconnectResponse {
#[serde(rename = "interconnectState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnect_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteLagRequest {
#[serde(rename = "lagId")]
pub lag_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DeleteVirtualInterfaceRequest {
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DeleteVirtualInterfaceResponse {
#[serde(rename = "virtualInterfaceState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeConnectionLoaRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "loaContentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_content_type: Option<String>,
#[serde(rename = "providerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeConnectionLoaResponse {
#[serde(rename = "loa")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa: Option<Loa>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeConnectionsOnInterconnectRequest {
#[serde(rename = "interconnectId")]
pub interconnect_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeConnectionsRequest {
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectConnectGatewayAssociationProposalsRequest {
#[serde(rename = "associatedGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_gateway_id: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "proposalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proposal_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDirectConnectGatewayAssociationProposalsResult {
#[serde(rename = "directConnectGatewayAssociationProposals")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association_proposals:
Option<Vec<DirectConnectGatewayAssociationProposal>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectConnectGatewayAssociationsRequest {
#[serde(rename = "associatedGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_gateway_id: Option<String>,
#[serde(rename = "associationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDirectConnectGatewayAssociationsResult {
#[serde(rename = "directConnectGatewayAssociations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_associations: Option<Vec<DirectConnectGatewayAssociation>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectConnectGatewayAttachmentsRequest {
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDirectConnectGatewayAttachmentsResult {
#[serde(rename = "directConnectGatewayAttachments")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_attachments: Option<Vec<DirectConnectGatewayAttachment>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeDirectConnectGatewaysRequest {
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "maxResults")]
#[serde(skip_serializing_if = "Option::is_none")]
pub max_results: Option<i64>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeDirectConnectGatewaysResult {
#[serde(rename = "directConnectGateways")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateways: Option<Vec<DirectConnectGateway>>,
#[serde(rename = "nextToken")]
#[serde(skip_serializing_if = "Option::is_none")]
pub next_token: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeHostedConnectionsRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInterconnectLoaRequest {
#[serde(rename = "interconnectId")]
pub interconnect_id: String,
#[serde(rename = "loaContentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_content_type: Option<String>,
#[serde(rename = "providerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeInterconnectLoaResponse {
#[serde(rename = "loa")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa: Option<Loa>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeInterconnectsRequest {
#[serde(rename = "interconnectId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnect_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeLagsRequest {
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeLoaRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "loaContentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_content_type: Option<String>,
#[serde(rename = "providerName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub provider_name: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeTagsRequest {
#[serde(rename = "resourceArns")]
pub resource_arns: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DescribeTagsResponse {
#[serde(rename = "resourceTags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_tags: Option<Vec<ResourceTag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DescribeVirtualInterfacesRequest {
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectConnectGateway {
#[serde(rename = "amazonSideAsn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_side_asn: Option<i64>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "directConnectGatewayName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_name: Option<String>,
#[serde(rename = "directConnectGatewayState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_state: Option<String>,
#[serde(rename = "ownerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account: Option<String>,
#[serde(rename = "stateChangeError")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_change_error: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectConnectGatewayAssociation {
#[serde(rename = "allowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "associatedGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_gateway: Option<AssociatedGateway>,
#[serde(rename = "associationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "associationState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_state: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "directConnectGatewayOwnerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_owner_account: Option<String>,
#[serde(rename = "stateChangeError")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_change_error: Option<String>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
#[serde(rename = "virtualGatewayOwnerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_owner_account: Option<String>,
#[serde(rename = "virtualGatewayRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectConnectGatewayAssociationProposal {
#[serde(rename = "associatedGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub associated_gateway: Option<AssociatedGateway>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "directConnectGatewayOwnerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_owner_account: Option<String>,
#[serde(rename = "existingAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub existing_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "proposalId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proposal_id: Option<String>,
#[serde(rename = "proposalState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub proposal_state: Option<String>,
#[serde(rename = "requestedAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub requested_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct DirectConnectGatewayAttachment {
#[serde(rename = "attachmentState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attachment_state: Option<String>,
#[serde(rename = "attachmentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub attachment_type: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "stateChangeError")]
#[serde(skip_serializing_if = "Option::is_none")]
pub state_change_error: Option<String>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
#[serde(rename = "virtualInterfaceOwnerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_owner_account: Option<String>,
#[serde(rename = "virtualInterfaceRegion")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct DisassociateConnectionFromLagRequest {
#[serde(rename = "connectionId")]
pub connection_id: String,
#[serde(rename = "lagId")]
pub lag_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Interconnect {
#[serde(rename = "awsDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device: Option<String>,
#[serde(rename = "awsDeviceV2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device_v2: Option<String>,
#[serde(rename = "bandwidth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bandwidth: Option<String>,
#[serde(rename = "hasLogicalRedundancy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_logical_redundancy: Option<String>,
#[serde(rename = "interconnectId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnect_id: Option<String>,
#[serde(rename = "interconnectName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnect_name: Option<String>,
#[serde(rename = "interconnectState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnect_state: Option<String>,
#[serde(rename = "jumboFrameCapable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jumbo_frame_capable: Option<bool>,
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
#[serde(rename = "loaIssueTime")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_issue_time: Option<f64>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Interconnects {
#[serde(rename = "interconnects")]
#[serde(skip_serializing_if = "Option::is_none")]
pub interconnects: Option<Vec<Interconnect>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Lag {
#[serde(rename = "allowsHostedConnections")]
#[serde(skip_serializing_if = "Option::is_none")]
pub allows_hosted_connections: Option<bool>,
#[serde(rename = "awsDevice")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device: Option<String>,
#[serde(rename = "awsDeviceV2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device_v2: Option<String>,
#[serde(rename = "connections")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connections: Option<Vec<Connection>>,
#[serde(rename = "connectionsBandwidth")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connections_bandwidth: Option<String>,
#[serde(rename = "hasLogicalRedundancy")]
#[serde(skip_serializing_if = "Option::is_none")]
pub has_logical_redundancy: Option<String>,
#[serde(rename = "jumboFrameCapable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jumbo_frame_capable: Option<bool>,
#[serde(rename = "lagId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_id: Option<String>,
#[serde(rename = "lagName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_name: Option<String>,
#[serde(rename = "lagState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_state: Option<String>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "minimumLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_links: Option<i64>,
#[serde(rename = "numberOfConnections")]
#[serde(skip_serializing_if = "Option::is_none")]
pub number_of_connections: Option<i64>,
#[serde(rename = "ownerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Lags {
#[serde(rename = "lags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lags: Option<Vec<Lag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Loa {
#[serde(rename = "loaContent")]
#[serde(
deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
default
)]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_content: Option<bytes::Bytes>,
#[serde(rename = "loaContentType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub loa_content_type: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Location {
#[serde(rename = "availablePortSpeeds")]
#[serde(skip_serializing_if = "Option::is_none")]
pub available_port_speeds: Option<Vec<String>>,
#[serde(rename = "locationCode")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location_code: Option<String>,
#[serde(rename = "locationName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location_name: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct Locations {
#[serde(rename = "locations")]
#[serde(skip_serializing_if = "Option::is_none")]
pub locations: Option<Vec<Location>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewBGPPeer {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewPrivateVirtualInterface {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
pub asn: i64,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
#[serde(rename = "virtualInterfaceName")]
pub virtual_interface_name: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewPrivateVirtualInterfaceAllocation {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
pub asn: i64,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "virtualInterfaceName")]
pub virtual_interface_name: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewPublicVirtualInterface {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
pub asn: i64,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "routeFilterPrefixes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "virtualInterfaceName")]
pub virtual_interface_name: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewPublicVirtualInterfaceAllocation {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
pub asn: i64,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "routeFilterPrefixes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "virtualInterfaceName")]
pub virtual_interface_name: String,
#[serde(rename = "vlan")]
pub vlan: i64,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewTransitVirtualInterface {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "virtualInterfaceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_name: Option<String>,
#[serde(rename = "vlan")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vlan: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct NewTransitVirtualInterfaceAllocation {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "virtualInterfaceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_name: Option<String>,
#[serde(rename = "vlan")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vlan: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct ResourceTag {
#[serde(rename = "resourceArn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub resource_arn: Option<String>,
#[serde(rename = "tags")]
#[serde(skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<Tag>>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct RouteFilterPrefix {
#[serde(rename = "cidr")]
#[serde(skip_serializing_if = "Option::is_none")]
pub cidr: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Tag {
#[serde(rename = "key")]
pub key: String,
#[serde(rename = "value")]
#[serde(skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct TagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tags")]
pub tags: Vec<Tag>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct TagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UntagResourceRequest {
#[serde(rename = "resourceArn")]
pub resource_arn: String,
#[serde(rename = "tagKeys")]
pub tag_keys: Vec<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UntagResourceResponse {}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateDirectConnectGatewayAssociationRequest {
#[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "associationId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub association_id: Option<String>,
#[serde(rename = "removeAllowedPrefixesToDirectConnectGateway")]
#[serde(skip_serializing_if = "Option::is_none")]
pub remove_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct UpdateDirectConnectGatewayAssociationResult {
#[serde(rename = "directConnectGatewayAssociation")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateLagRequest {
#[serde(rename = "lagId")]
pub lag_id: String,
#[serde(rename = "lagName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub lag_name: Option<String>,
#[serde(rename = "minimumLinks")]
#[serde(skip_serializing_if = "Option::is_none")]
pub minimum_links: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub struct UpdateVirtualInterfaceAttributesRequest {
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "virtualInterfaceId")]
pub virtual_interface_id: String,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VirtualGateway {
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
#[serde(rename = "virtualGatewayState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_state: Option<String>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VirtualGateways {
#[serde(rename = "virtualGateways")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateways: Option<Vec<VirtualGateway>>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VirtualInterface {
#[serde(rename = "addressFamily")]
#[serde(skip_serializing_if = "Option::is_none")]
pub address_family: Option<String>,
#[serde(rename = "amazonAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_address: Option<String>,
#[serde(rename = "amazonSideAsn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub amazon_side_asn: Option<i64>,
#[serde(rename = "asn")]
#[serde(skip_serializing_if = "Option::is_none")]
pub asn: Option<i64>,
#[serde(rename = "authKey")]
#[serde(skip_serializing_if = "Option::is_none")]
pub auth_key: Option<String>,
#[serde(rename = "awsDeviceV2")]
#[serde(skip_serializing_if = "Option::is_none")]
pub aws_device_v2: Option<String>,
#[serde(rename = "bgpPeers")]
#[serde(skip_serializing_if = "Option::is_none")]
pub bgp_peers: Option<Vec<BGPPeer>>,
#[serde(rename = "connectionId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub connection_id: Option<String>,
#[serde(rename = "customerAddress")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_address: Option<String>,
#[serde(rename = "customerRouterConfig")]
#[serde(skip_serializing_if = "Option::is_none")]
pub customer_router_config: Option<String>,
#[serde(rename = "directConnectGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub direct_connect_gateway_id: Option<String>,
#[serde(rename = "jumboFrameCapable")]
#[serde(skip_serializing_if = "Option::is_none")]
pub jumbo_frame_capable: Option<bool>,
#[serde(rename = "location")]
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "mtu")]
#[serde(skip_serializing_if = "Option::is_none")]
pub mtu: Option<i64>,
#[serde(rename = "ownerAccount")]
#[serde(skip_serializing_if = "Option::is_none")]
pub owner_account: Option<String>,
#[serde(rename = "region")]
#[serde(skip_serializing_if = "Option::is_none")]
pub region: Option<String>,
#[serde(rename = "routeFilterPrefixes")]
#[serde(skip_serializing_if = "Option::is_none")]
pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
#[serde(rename = "virtualGatewayId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_gateway_id: Option<String>,
#[serde(rename = "virtualInterfaceId")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_id: Option<String>,
#[serde(rename = "virtualInterfaceName")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_name: Option<String>,
#[serde(rename = "virtualInterfaceState")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_state: Option<String>,
#[serde(rename = "virtualInterfaceType")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interface_type: Option<String>,
#[serde(rename = "vlan")]
#[serde(skip_serializing_if = "Option::is_none")]
pub vlan: Option<i64>,
}
#[derive(Default, Debug, Clone, PartialEq, Deserialize)]
#[cfg_attr(test, derive(Serialize))]
pub struct VirtualInterfaces {
#[serde(rename = "virtualInterfaces")]
#[serde(skip_serializing_if = "Option::is_none")]
pub virtual_interfaces: Option<Vec<VirtualInterface>>,
}
#[derive(Debug, PartialEq)]
pub enum AcceptDirectConnectGatewayAssociationProposalError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AcceptDirectConnectGatewayAssociationProposalError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AcceptDirectConnectGatewayAssociationProposalError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AcceptDirectConnectGatewayAssociationProposalError::DirectConnectClient(
err.msg,
),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AcceptDirectConnectGatewayAssociationProposalError::DirectConnectServer(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AcceptDirectConnectGatewayAssociationProposalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AcceptDirectConnectGatewayAssociationProposalError {
fn description(&self) -> &str {
match *self {
AcceptDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
cause
}
AcceptDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum AllocateConnectionOnInterconnectError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AllocateConnectionOnInterconnectError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AllocateConnectionOnInterconnectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AllocateConnectionOnInterconnectError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AllocateConnectionOnInterconnectError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AllocateConnectionOnInterconnectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AllocateConnectionOnInterconnectError {
fn description(&self) -> &str {
match *self {
AllocateConnectionOnInterconnectError::DirectConnectClient(ref cause) => cause,
AllocateConnectionOnInterconnectError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AllocateHostedConnectionError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AllocateHostedConnectionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AllocateHostedConnectionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AllocateHostedConnectionError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AllocateHostedConnectionError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AllocateHostedConnectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AllocateHostedConnectionError {
fn description(&self) -> &str {
match *self {
AllocateHostedConnectionError::DirectConnectClient(ref cause) => cause,
AllocateHostedConnectionError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AllocatePrivateVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AllocatePrivateVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AllocatePrivateVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AllocatePrivateVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AllocatePrivateVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AllocatePrivateVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AllocatePrivateVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
AllocatePrivateVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
AllocatePrivateVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AllocatePublicVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AllocatePublicVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AllocatePublicVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AllocatePublicVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AllocatePublicVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AllocatePublicVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AllocatePublicVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
AllocatePublicVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
AllocatePublicVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AllocateTransitVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AllocateTransitVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AllocateTransitVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AllocateTransitVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AllocateTransitVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AllocateTransitVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AllocateTransitVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
AllocateTransitVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
AllocateTransitVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateConnectionWithLagError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AssociateConnectionWithLagError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<AssociateConnectionWithLagError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AssociateConnectionWithLagError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AssociateConnectionWithLagError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateConnectionWithLagError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateConnectionWithLagError {
fn description(&self) -> &str {
match *self {
AssociateConnectionWithLagError::DirectConnectClient(ref cause) => cause,
AssociateConnectionWithLagError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateHostedConnectionError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AssociateHostedConnectionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateHostedConnectionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AssociateHostedConnectionError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AssociateHostedConnectionError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateHostedConnectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateHostedConnectionError {
fn description(&self) -> &str {
match *self {
AssociateHostedConnectionError::DirectConnectClient(ref cause) => cause,
AssociateHostedConnectionError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum AssociateVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl AssociateVirtualInterfaceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
AssociateVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
AssociateVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for AssociateVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for AssociateVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
AssociateVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
AssociateVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmConnectionError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl ConfirmConnectionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfirmConnectionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(ConfirmConnectionError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(ConfirmConnectionError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmConnectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmConnectionError {
fn description(&self) -> &str {
match *self {
ConfirmConnectionError::DirectConnectClient(ref cause) => cause,
ConfirmConnectionError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmPrivateVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl ConfirmPrivateVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ConfirmPrivateVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
ConfirmPrivateVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
ConfirmPrivateVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmPrivateVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmPrivateVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
ConfirmPrivateVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
ConfirmPrivateVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmPublicVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl ConfirmPublicVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ConfirmPublicVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
ConfirmPublicVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
ConfirmPublicVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmPublicVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmPublicVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
ConfirmPublicVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
ConfirmPublicVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum ConfirmTransitVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl ConfirmTransitVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<ConfirmTransitVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
ConfirmTransitVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
ConfirmTransitVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for ConfirmTransitVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for ConfirmTransitVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
ConfirmTransitVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
ConfirmTransitVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateBGPPeerError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateBGPPeerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBGPPeerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(CreateBGPPeerError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(CreateBGPPeerError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateBGPPeerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateBGPPeerError {
fn description(&self) -> &str {
match *self {
CreateBGPPeerError::DirectConnectClient(ref cause) => cause,
CreateBGPPeerError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateConnectionError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateConnectionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConnectionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(CreateConnectionError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(CreateConnectionError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateConnectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateConnectionError {
fn description(&self) -> &str {
match *self {
CreateConnectionError::DirectConnectClient(ref cause) => cause,
CreateConnectionError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectConnectGatewayError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateDirectConnectGatewayError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDirectConnectGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreateDirectConnectGatewayError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreateDirectConnectGatewayError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectConnectGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectConnectGatewayError {
fn description(&self) -> &str {
match *self {
CreateDirectConnectGatewayError::DirectConnectClient(ref cause) => cause,
CreateDirectConnectGatewayError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectConnectGatewayAssociationError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateDirectConnectGatewayAssociationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDirectConnectGatewayAssociationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreateDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreateDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectConnectGatewayAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectConnectGatewayAssociationError {
fn description(&self) -> &str {
match *self {
CreateDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => cause,
CreateDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateDirectConnectGatewayAssociationProposalError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateDirectConnectGatewayAssociationProposalError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateDirectConnectGatewayAssociationProposalError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreateDirectConnectGatewayAssociationProposalError::DirectConnectClient(
err.msg,
),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreateDirectConnectGatewayAssociationProposalError::DirectConnectServer(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateDirectConnectGatewayAssociationProposalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateDirectConnectGatewayAssociationProposalError {
fn description(&self) -> &str {
match *self {
CreateDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
cause
}
CreateDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateInterconnectError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateInterconnectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateInterconnectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(CreateInterconnectError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(CreateInterconnectError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateInterconnectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateInterconnectError {
fn description(&self) -> &str {
match *self {
CreateInterconnectError::DirectConnectClient(ref cause) => cause,
CreateInterconnectError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateLagError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateLagError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLagError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(CreateLagError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(CreateLagError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateLagError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateLagError {
fn description(&self) -> &str {
match *self {
CreateLagError::DirectConnectClient(ref cause) => cause,
CreateLagError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePrivateVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreatePrivateVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreatePrivateVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreatePrivateVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreatePrivateVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePrivateVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePrivateVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
CreatePrivateVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
CreatePrivateVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreatePublicVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreatePublicVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreatePublicVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreatePublicVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreatePublicVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreatePublicVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreatePublicVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
CreatePublicVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
CreatePublicVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum CreateTransitVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl CreateTransitVirtualInterfaceError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<CreateTransitVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
CreateTransitVirtualInterfaceError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
CreateTransitVirtualInterfaceError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for CreateTransitVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for CreateTransitVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
CreateTransitVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
CreateTransitVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteBGPPeerError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteBGPPeerError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBGPPeerError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DeleteBGPPeerError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(DeleteBGPPeerError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteBGPPeerError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteBGPPeerError {
fn description(&self) -> &str {
match *self {
DeleteBGPPeerError::DirectConnectClient(ref cause) => cause,
DeleteBGPPeerError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteConnectionError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteConnectionError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteConnectionError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DeleteConnectionError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DeleteConnectionError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteConnectionError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteConnectionError {
fn description(&self) -> &str {
match *self {
DeleteConnectionError::DirectConnectClient(ref cause) => cause,
DeleteConnectionError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectConnectGatewayError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteDirectConnectGatewayError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDirectConnectGatewayError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectConnectGatewayError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectConnectGatewayError {
fn description(&self) -> &str {
match *self {
DeleteDirectConnectGatewayError::DirectConnectClient(ref cause) => cause,
DeleteDirectConnectGatewayError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectConnectGatewayAssociationError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteDirectConnectGatewayAssociationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDirectConnectGatewayAssociationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectConnectGatewayAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectConnectGatewayAssociationError {
fn description(&self) -> &str {
match *self {
DeleteDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => cause,
DeleteDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteDirectConnectGatewayAssociationProposalError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteDirectConnectGatewayAssociationProposalError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DeleteDirectConnectGatewayAssociationProposalError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayAssociationProposalError::DirectConnectClient(
err.msg,
),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DeleteDirectConnectGatewayAssociationProposalError::DirectConnectServer(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteDirectConnectGatewayAssociationProposalError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteDirectConnectGatewayAssociationProposalError {
fn description(&self) -> &str {
match *self {
DeleteDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
cause
}
DeleteDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
cause
}
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteInterconnectError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteInterconnectError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteInterconnectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DeleteInterconnectError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DeleteInterconnectError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteInterconnectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteInterconnectError {
fn description(&self) -> &str {
match *self {
DeleteInterconnectError::DirectConnectClient(ref cause) => cause,
DeleteInterconnectError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteLagError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteLagError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLagError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DeleteLagError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(DeleteLagError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteLagError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteLagError {
fn description(&self) -> &str {
match *self {
DeleteLagError::DirectConnectClient(ref cause) => cause,
DeleteLagError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DeleteVirtualInterfaceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DeleteVirtualInterfaceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualInterfaceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DeleteVirtualInterfaceError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DeleteVirtualInterfaceError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DeleteVirtualInterfaceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DeleteVirtualInterfaceError {
fn description(&self) -> &str {
match *self {
DeleteVirtualInterfaceError::DirectConnectClient(ref cause) => cause,
DeleteVirtualInterfaceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConnectionLoaError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeConnectionLoaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConnectionLoaError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeConnectionLoaError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeConnectionLoaError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeConnectionLoaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConnectionLoaError {
fn description(&self) -> &str {
match *self {
DescribeConnectionLoaError::DirectConnectClient(ref cause) => cause,
DescribeConnectionLoaError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConnectionsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeConnectionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConnectionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeConnectionsError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeConnectionsError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeConnectionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConnectionsError {
fn description(&self) -> &str {
match *self {
DescribeConnectionsError::DirectConnectClient(ref cause) => cause,
DescribeConnectionsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeConnectionsOnInterconnectError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeConnectionsOnInterconnectError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeConnectionsOnInterconnectError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeConnectionsOnInterconnectError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeConnectionsOnInterconnectError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeConnectionsOnInterconnectError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeConnectionsOnInterconnectError {
fn description(&self) -> &str {
match *self {
DescribeConnectionsOnInterconnectError::DirectConnectClient(ref cause) => cause,
DescribeConnectionsOnInterconnectError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectConnectGatewayAssociationProposalsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeDirectConnectGatewayAssociationProposalsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDirectConnectGatewayAssociationProposalsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectClient(
err.msg,
),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectServer(
err.msg,
),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectConnectGatewayAssociationProposalsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectConnectGatewayAssociationProposalsError {
fn description(&self) -> &str {
match *self {
DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectClient(
ref cause,
) => cause,
DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectServer(
ref cause,
) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectConnectGatewayAssociationsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeDirectConnectGatewayAssociationsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDirectConnectGatewayAssociationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAssociationsError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAssociationsError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectConnectGatewayAssociationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectConnectGatewayAssociationsError {
fn description(&self) -> &str {
match *self {
DescribeDirectConnectGatewayAssociationsError::DirectConnectClient(ref cause) => cause,
DescribeDirectConnectGatewayAssociationsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectConnectGatewayAttachmentsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeDirectConnectGatewayAttachmentsError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDirectConnectGatewayAttachmentsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAttachmentsError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeDirectConnectGatewayAttachmentsError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectConnectGatewayAttachmentsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectConnectGatewayAttachmentsError {
fn description(&self) -> &str {
match *self {
DescribeDirectConnectGatewayAttachmentsError::DirectConnectClient(ref cause) => cause,
DescribeDirectConnectGatewayAttachmentsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeDirectConnectGatewaysError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeDirectConnectGatewaysError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DescribeDirectConnectGatewaysError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeDirectConnectGatewaysError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeDirectConnectGatewaysError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeDirectConnectGatewaysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeDirectConnectGatewaysError {
fn description(&self) -> &str {
match *self {
DescribeDirectConnectGatewaysError::DirectConnectClient(ref cause) => cause,
DescribeDirectConnectGatewaysError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeHostedConnectionsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeHostedConnectionsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHostedConnectionsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeHostedConnectionsError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeHostedConnectionsError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeHostedConnectionsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeHostedConnectionsError {
fn description(&self) -> &str {
match *self {
DescribeHostedConnectionsError::DirectConnectClient(ref cause) => cause,
DescribeHostedConnectionsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInterconnectLoaError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeInterconnectLoaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInterconnectLoaError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeInterconnectLoaError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeInterconnectLoaError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeInterconnectLoaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInterconnectLoaError {
fn description(&self) -> &str {
match *self {
DescribeInterconnectLoaError::DirectConnectClient(ref cause) => cause,
DescribeInterconnectLoaError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeInterconnectsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeInterconnectsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInterconnectsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeInterconnectsError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeInterconnectsError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeInterconnectsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeInterconnectsError {
fn description(&self) -> &str {
match *self {
DescribeInterconnectsError::DirectConnectClient(ref cause) => cause,
DescribeInterconnectsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLagsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeLagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeLagsError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeLagsError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeLagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLagsError {
fn description(&self) -> &str {
match *self {
DescribeLagsError::DirectConnectClient(ref cause) => cause,
DescribeLagsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLoaError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeLoaError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoaError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeLoaError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeLoaError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeLoaError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLoaError {
fn description(&self) -> &str {
match *self {
DescribeLoaError::DirectConnectClient(ref cause) => cause,
DescribeLoaError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeLocationsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeLocationsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeLocationsError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeLocationsError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeLocationsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeLocationsError {
fn description(&self) -> &str {
match *self {
DescribeLocationsError::DirectConnectClient(ref cause) => cause,
DescribeLocationsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeTagsError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeTagsError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeTagsError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeTagsError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeTagsError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeTagsError {
fn description(&self) -> &str {
match *self {
DescribeTagsError::DirectConnectClient(ref cause) => cause,
DescribeTagsError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualGatewaysError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeVirtualGatewaysError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualGatewaysError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(DescribeVirtualGatewaysError::DirectConnectClient(
err.msg,
))
}
"DirectConnectServerException" => {
return RusotoError::Service(DescribeVirtualGatewaysError::DirectConnectServer(
err.msg,
))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeVirtualGatewaysError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeVirtualGatewaysError {
fn description(&self) -> &str {
match *self {
DescribeVirtualGatewaysError::DirectConnectClient(ref cause) => cause,
DescribeVirtualGatewaysError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DescribeVirtualInterfacesError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DescribeVirtualInterfacesError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualInterfacesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DescribeVirtualInterfacesError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DescribeVirtualInterfacesError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DescribeVirtualInterfacesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DescribeVirtualInterfacesError {
fn description(&self) -> &str {
match *self {
DescribeVirtualInterfacesError::DirectConnectClient(ref cause) => cause,
DescribeVirtualInterfacesError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum DisassociateConnectionFromLagError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl DisassociateConnectionFromLagError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<DisassociateConnectionFromLagError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
DisassociateConnectionFromLagError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
DisassociateConnectionFromLagError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for DisassociateConnectionFromLagError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for DisassociateConnectionFromLagError {
fn description(&self) -> &str {
match *self {
DisassociateConnectionFromLagError::DirectConnectClient(ref cause) => cause,
DisassociateConnectionFromLagError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum TagResourceError {
DirectConnectClient(String),
DirectConnectServer(String),
DuplicateTagKeys(String),
TooManyTags(String),
}
impl TagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(TagResourceError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(TagResourceError::DirectConnectServer(err.msg))
}
"DuplicateTagKeysException" => {
return RusotoError::Service(TagResourceError::DuplicateTagKeys(err.msg))
}
"TooManyTagsException" => {
return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for TagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for TagResourceError {
fn description(&self) -> &str {
match *self {
TagResourceError::DirectConnectClient(ref cause) => cause,
TagResourceError::DirectConnectServer(ref cause) => cause,
TagResourceError::DuplicateTagKeys(ref cause) => cause,
TagResourceError::TooManyTags(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UntagResourceError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl UntagResourceError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(UntagResourceError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(UntagResourceError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UntagResourceError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UntagResourceError {
fn description(&self) -> &str {
match *self {
UntagResourceError::DirectConnectClient(ref cause) => cause,
UntagResourceError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateDirectConnectGatewayAssociationError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl UpdateDirectConnectGatewayAssociationError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateDirectConnectGatewayAssociationError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
UpdateDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
UpdateDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateDirectConnectGatewayAssociationError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateDirectConnectGatewayAssociationError {
fn description(&self) -> &str {
match *self {
UpdateDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => cause,
UpdateDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateLagError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl UpdateLagError {
pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLagError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(UpdateLagError::DirectConnectClient(err.msg))
}
"DirectConnectServerException" => {
return RusotoError::Service(UpdateLagError::DirectConnectServer(err.msg))
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateLagError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateLagError {
fn description(&self) -> &str {
match *self {
UpdateLagError::DirectConnectClient(ref cause) => cause,
UpdateLagError::DirectConnectServer(ref cause) => cause,
}
}
}
#[derive(Debug, PartialEq)]
pub enum UpdateVirtualInterfaceAttributesError {
DirectConnectClient(String),
DirectConnectServer(String),
}
impl UpdateVirtualInterfaceAttributesError {
pub fn from_response(
res: BufferedHttpResponse,
) -> RusotoError<UpdateVirtualInterfaceAttributesError> {
if let Some(err) = proto::json::Error::parse(&res) {
match err.typ.as_str() {
"DirectConnectClientException" => {
return RusotoError::Service(
UpdateVirtualInterfaceAttributesError::DirectConnectClient(err.msg),
)
}
"DirectConnectServerException" => {
return RusotoError::Service(
UpdateVirtualInterfaceAttributesError::DirectConnectServer(err.msg),
)
}
"ValidationException" => return RusotoError::Validation(err.msg),
_ => {}
}
}
return RusotoError::Unknown(res);
}
}
impl fmt::Display for UpdateVirtualInterfaceAttributesError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.description())
}
}
impl Error for UpdateVirtualInterfaceAttributesError {
fn description(&self) -> &str {
match *self {
UpdateVirtualInterfaceAttributesError::DirectConnectClient(ref cause) => cause,
UpdateVirtualInterfaceAttributesError::DirectConnectServer(ref cause) => cause,
}
}
}
pub trait DirectConnect {
fn accept_direct_connect_gateway_association_proposal(
&self,
input: AcceptDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
AcceptDirectConnectGatewayAssociationProposalResult,
AcceptDirectConnectGatewayAssociationProposalError,
>;
fn allocate_connection_on_interconnect(
&self,
input: AllocateConnectionOnInterconnectRequest,
) -> RusotoFuture<Connection, AllocateConnectionOnInterconnectError>;
fn allocate_hosted_connection(
&self,
input: AllocateHostedConnectionRequest,
) -> RusotoFuture<Connection, AllocateHostedConnectionError>;
fn allocate_private_virtual_interface(
&self,
input: AllocatePrivateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AllocatePrivateVirtualInterfaceError>;
fn allocate_public_virtual_interface(
&self,
input: AllocatePublicVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AllocatePublicVirtualInterfaceError>;
fn allocate_transit_virtual_interface(
&self,
input: AllocateTransitVirtualInterfaceRequest,
) -> RusotoFuture<AllocateTransitVirtualInterfaceResult, AllocateTransitVirtualInterfaceError>;
fn associate_connection_with_lag(
&self,
input: AssociateConnectionWithLagRequest,
) -> RusotoFuture<Connection, AssociateConnectionWithLagError>;
fn associate_hosted_connection(
&self,
input: AssociateHostedConnectionRequest,
) -> RusotoFuture<Connection, AssociateHostedConnectionError>;
fn associate_virtual_interface(
&self,
input: AssociateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AssociateVirtualInterfaceError>;
fn confirm_connection(
&self,
input: ConfirmConnectionRequest,
) -> RusotoFuture<ConfirmConnectionResponse, ConfirmConnectionError>;
fn confirm_private_virtual_interface(
&self,
input: ConfirmPrivateVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmPrivateVirtualInterfaceResponse, ConfirmPrivateVirtualInterfaceError>;
fn confirm_public_virtual_interface(
&self,
input: ConfirmPublicVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmPublicVirtualInterfaceResponse, ConfirmPublicVirtualInterfaceError>;
fn confirm_transit_virtual_interface(
&self,
input: ConfirmTransitVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmTransitVirtualInterfaceResponse, ConfirmTransitVirtualInterfaceError>;
fn create_bgp_peer(
&self,
input: CreateBGPPeerRequest,
) -> RusotoFuture<CreateBGPPeerResponse, CreateBGPPeerError>;
fn create_connection(
&self,
input: CreateConnectionRequest,
) -> RusotoFuture<Connection, CreateConnectionError>;
fn create_direct_connect_gateway(
&self,
input: CreateDirectConnectGatewayRequest,
) -> RusotoFuture<CreateDirectConnectGatewayResult, CreateDirectConnectGatewayError>;
fn create_direct_connect_gateway_association(
&self,
input: CreateDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
CreateDirectConnectGatewayAssociationResult,
CreateDirectConnectGatewayAssociationError,
>;
fn create_direct_connect_gateway_association_proposal(
&self,
input: CreateDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
CreateDirectConnectGatewayAssociationProposalResult,
CreateDirectConnectGatewayAssociationProposalError,
>;
fn create_interconnect(
&self,
input: CreateInterconnectRequest,
) -> RusotoFuture<Interconnect, CreateInterconnectError>;
fn create_lag(&self, input: CreateLagRequest) -> RusotoFuture<Lag, CreateLagError>;
fn create_private_virtual_interface(
&self,
input: CreatePrivateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, CreatePrivateVirtualInterfaceError>;
fn create_public_virtual_interface(
&self,
input: CreatePublicVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, CreatePublicVirtualInterfaceError>;
fn create_transit_virtual_interface(
&self,
input: CreateTransitVirtualInterfaceRequest,
) -> RusotoFuture<CreateTransitVirtualInterfaceResult, CreateTransitVirtualInterfaceError>;
fn delete_bgp_peer(
&self,
input: DeleteBGPPeerRequest,
) -> RusotoFuture<DeleteBGPPeerResponse, DeleteBGPPeerError>;
fn delete_connection(
&self,
input: DeleteConnectionRequest,
) -> RusotoFuture<Connection, DeleteConnectionError>;
fn delete_direct_connect_gateway(
&self,
input: DeleteDirectConnectGatewayRequest,
) -> RusotoFuture<DeleteDirectConnectGatewayResult, DeleteDirectConnectGatewayError>;
fn delete_direct_connect_gateway_association(
&self,
input: DeleteDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
DeleteDirectConnectGatewayAssociationResult,
DeleteDirectConnectGatewayAssociationError,
>;
fn delete_direct_connect_gateway_association_proposal(
&self,
input: DeleteDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
DeleteDirectConnectGatewayAssociationProposalResult,
DeleteDirectConnectGatewayAssociationProposalError,
>;
fn delete_interconnect(
&self,
input: DeleteInterconnectRequest,
) -> RusotoFuture<DeleteInterconnectResponse, DeleteInterconnectError>;
fn delete_lag(&self, input: DeleteLagRequest) -> RusotoFuture<Lag, DeleteLagError>;
fn delete_virtual_interface(
&self,
input: DeleteVirtualInterfaceRequest,
) -> RusotoFuture<DeleteVirtualInterfaceResponse, DeleteVirtualInterfaceError>;
fn describe_connection_loa(
&self,
input: DescribeConnectionLoaRequest,
) -> RusotoFuture<DescribeConnectionLoaResponse, DescribeConnectionLoaError>;
fn describe_connections(
&self,
input: DescribeConnectionsRequest,
) -> RusotoFuture<Connections, DescribeConnectionsError>;
fn describe_connections_on_interconnect(
&self,
input: DescribeConnectionsOnInterconnectRequest,
) -> RusotoFuture<Connections, DescribeConnectionsOnInterconnectError>;
fn describe_direct_connect_gateway_association_proposals(
&self,
input: DescribeDirectConnectGatewayAssociationProposalsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAssociationProposalsResult,
DescribeDirectConnectGatewayAssociationProposalsError,
>;
fn describe_direct_connect_gateway_associations(
&self,
input: DescribeDirectConnectGatewayAssociationsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAssociationsResult,
DescribeDirectConnectGatewayAssociationsError,
>;
fn describe_direct_connect_gateway_attachments(
&self,
input: DescribeDirectConnectGatewayAttachmentsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAttachmentsResult,
DescribeDirectConnectGatewayAttachmentsError,
>;
fn describe_direct_connect_gateways(
&self,
input: DescribeDirectConnectGatewaysRequest,
) -> RusotoFuture<DescribeDirectConnectGatewaysResult, DescribeDirectConnectGatewaysError>;
fn describe_hosted_connections(
&self,
input: DescribeHostedConnectionsRequest,
) -> RusotoFuture<Connections, DescribeHostedConnectionsError>;
fn describe_interconnect_loa(
&self,
input: DescribeInterconnectLoaRequest,
) -> RusotoFuture<DescribeInterconnectLoaResponse, DescribeInterconnectLoaError>;
fn describe_interconnects(
&self,
input: DescribeInterconnectsRequest,
) -> RusotoFuture<Interconnects, DescribeInterconnectsError>;
fn describe_lags(&self, input: DescribeLagsRequest) -> RusotoFuture<Lags, DescribeLagsError>;
fn describe_loa(&self, input: DescribeLoaRequest) -> RusotoFuture<Loa, DescribeLoaError>;
fn describe_locations(&self) -> RusotoFuture<Locations, DescribeLocationsError>;
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResponse, DescribeTagsError>;
fn describe_virtual_gateways(
&self,
) -> RusotoFuture<VirtualGateways, DescribeVirtualGatewaysError>;
fn describe_virtual_interfaces(
&self,
input: DescribeVirtualInterfacesRequest,
) -> RusotoFuture<VirtualInterfaces, DescribeVirtualInterfacesError>;
fn disassociate_connection_from_lag(
&self,
input: DisassociateConnectionFromLagRequest,
) -> RusotoFuture<Connection, DisassociateConnectionFromLagError>;
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError>;
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError>;
fn update_direct_connect_gateway_association(
&self,
input: UpdateDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
UpdateDirectConnectGatewayAssociationResult,
UpdateDirectConnectGatewayAssociationError,
>;
fn update_lag(&self, input: UpdateLagRequest) -> RusotoFuture<Lag, UpdateLagError>;
fn update_virtual_interface_attributes(
&self,
input: UpdateVirtualInterfaceAttributesRequest,
) -> RusotoFuture<VirtualInterface, UpdateVirtualInterfaceAttributesError>;
}
#[derive(Clone)]
pub struct DirectConnectClient {
client: Client,
region: region::Region,
}
impl DirectConnectClient {
pub fn new(region: region::Region) -> DirectConnectClient {
DirectConnectClient {
client: Client::shared(),
region,
}
}
pub fn new_with<P, D>(
request_dispatcher: D,
credentials_provider: P,
region: region::Region,
) -> DirectConnectClient
where
P: ProvideAwsCredentials + Send + Sync + 'static,
P::Future: Send,
D: DispatchSignedRequest + Send + Sync + 'static,
D::Future: Send,
{
DirectConnectClient {
client: Client::new_with(credentials_provider, request_dispatcher),
region,
}
}
}
impl DirectConnect for DirectConnectClient {
fn accept_direct_connect_gateway_association_proposal(
&self,
input: AcceptDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
AcceptDirectConnectGatewayAssociationProposalResult,
AcceptDirectConnectGatewayAssociationProposalError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.AcceptDirectConnectGatewayAssociationProposal",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AcceptDirectConnectGatewayAssociationProposalResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AcceptDirectConnectGatewayAssociationProposalError::from_response(response))
}))
}
})
}
fn allocate_connection_on_interconnect(
&self,
input: AllocateConnectionOnInterconnectRequest,
) -> RusotoFuture<Connection, AllocateConnectionOnInterconnectError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.AllocateConnectionOnInterconnect",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AllocateConnectionOnInterconnectError::from_response(
response,
))
}))
}
})
}
fn allocate_hosted_connection(
&self,
input: AllocateHostedConnectionRequest,
) -> RusotoFuture<Connection, AllocateHostedConnectionError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.AllocateHostedConnection");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AllocateHostedConnectionError::from_response(response))
}))
}
})
}
fn allocate_private_virtual_interface(
&self,
input: AllocatePrivateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AllocatePrivateVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.AllocatePrivateVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AllocatePrivateVirtualInterfaceError::from_response(
response,
))
}))
}
})
}
fn allocate_public_virtual_interface(
&self,
input: AllocatePublicVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AllocatePublicVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.AllocatePublicVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AllocatePublicVirtualInterfaceError::from_response(response))
}))
}
})
}
fn allocate_transit_virtual_interface(
&self,
input: AllocateTransitVirtualInterfaceRequest,
) -> RusotoFuture<AllocateTransitVirtualInterfaceResult, AllocateTransitVirtualInterfaceError>
{
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.AllocateTransitVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<AllocateTransitVirtualInterfaceResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AllocateTransitVirtualInterfaceError::from_response(
response,
))
}))
}
})
}
fn associate_connection_with_lag(
&self,
input: AssociateConnectionWithLagRequest,
) -> RusotoFuture<Connection, AssociateConnectionWithLagError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.AssociateConnectionWithLag");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateConnectionWithLagError::from_response(response))
}))
}
})
}
fn associate_hosted_connection(
&self,
input: AssociateHostedConnectionRequest,
) -> RusotoFuture<Connection, AssociateHostedConnectionError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.AssociateHostedConnection");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateHostedConnectionError::from_response(response))
}))
}
})
}
fn associate_virtual_interface(
&self,
input: AssociateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, AssociateVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.AssociateVirtualInterface");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(AssociateVirtualInterfaceError::from_response(response))
}))
}
})
}
fn confirm_connection(
&self,
input: ConfirmConnectionRequest,
) -> RusotoFuture<ConfirmConnectionResponse, ConfirmConnectionError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.ConfirmConnection");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmConnectionResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(ConfirmConnectionError::from_response(response))),
)
}
})
}
fn confirm_private_virtual_interface(
&self,
input: ConfirmPrivateVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmPrivateVirtualInterfaceResponse, ConfirmPrivateVirtualInterfaceError>
{
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.ConfirmPrivateVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmPrivateVirtualInterfaceResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ConfirmPrivateVirtualInterfaceError::from_response(response))
}))
}
})
}
fn confirm_public_virtual_interface(
&self,
input: ConfirmPublicVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmPublicVirtualInterfaceResponse, ConfirmPublicVirtualInterfaceError>
{
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.ConfirmPublicVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmPublicVirtualInterfaceResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ConfirmPublicVirtualInterfaceError::from_response(response))
}))
}
})
}
fn confirm_transit_virtual_interface(
&self,
input: ConfirmTransitVirtualInterfaceRequest,
) -> RusotoFuture<ConfirmTransitVirtualInterfaceResponse, ConfirmTransitVirtualInterfaceError>
{
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.ConfirmTransitVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<ConfirmTransitVirtualInterfaceResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(ConfirmTransitVirtualInterfaceError::from_response(response))
}))
}
})
}
fn create_bgp_peer(
&self,
input: CreateBGPPeerRequest,
) -> RusotoFuture<CreateBGPPeerResponse, CreateBGPPeerError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.CreateBGPPeer");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateBGPPeerResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateBGPPeerError::from_response(response))),
)
}
})
}
fn create_connection(
&self,
input: CreateConnectionRequest,
) -> RusotoFuture<Connection, CreateConnectionError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.CreateConnection");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateConnectionError::from_response(response))),
)
}
})
}
fn create_direct_connect_gateway(
&self,
input: CreateDirectConnectGatewayRequest,
) -> RusotoFuture<CreateDirectConnectGatewayResult, CreateDirectConnectGatewayError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.CreateDirectConnectGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDirectConnectGatewayResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDirectConnectGatewayError::from_response(response))
}))
}
})
}
fn create_direct_connect_gateway_association(
&self,
input: CreateDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
CreateDirectConnectGatewayAssociationResult,
CreateDirectConnectGatewayAssociationError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.CreateDirectConnectGatewayAssociation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDirectConnectGatewayAssociationResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDirectConnectGatewayAssociationError::from_response(
response,
))
}))
}
})
}
fn create_direct_connect_gateway_association_proposal(
&self,
input: CreateDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
CreateDirectConnectGatewayAssociationProposalResult,
CreateDirectConnectGatewayAssociationProposalError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.CreateDirectConnectGatewayAssociationProposal",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateDirectConnectGatewayAssociationProposalResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateDirectConnectGatewayAssociationProposalError::from_response(response))
}))
}
})
}
fn create_interconnect(
&self,
input: CreateInterconnectRequest,
) -> RusotoFuture<Interconnect, CreateInterconnectError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.CreateInterconnect");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Interconnect, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateInterconnectError::from_response(response))),
)
}
})
}
fn create_lag(&self, input: CreateLagRequest) -> RusotoFuture<Lag, CreateLagError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.CreateLag");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(CreateLagError::from_response(response))),
)
}
})
}
fn create_private_virtual_interface(
&self,
input: CreatePrivateVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, CreatePrivateVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.CreatePrivateVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreatePrivateVirtualInterfaceError::from_response(response))
}))
}
})
}
fn create_public_virtual_interface(
&self,
input: CreatePublicVirtualInterfaceRequest,
) -> RusotoFuture<VirtualInterface, CreatePublicVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.CreatePublicVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreatePublicVirtualInterfaceError::from_response(response))
}))
}
})
}
fn create_transit_virtual_interface(
&self,
input: CreateTransitVirtualInterfaceRequest,
) -> RusotoFuture<CreateTransitVirtualInterfaceResult, CreateTransitVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.CreateTransitVirtualInterface",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<CreateTransitVirtualInterfaceResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(CreateTransitVirtualInterfaceError::from_response(response))
}))
}
})
}
fn delete_bgp_peer(
&self,
input: DeleteBGPPeerRequest,
) -> RusotoFuture<DeleteBGPPeerResponse, DeleteBGPPeerError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteBGPPeer");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteBGPPeerResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteBGPPeerError::from_response(response))),
)
}
})
}
fn delete_connection(
&self,
input: DeleteConnectionRequest,
) -> RusotoFuture<Connection, DeleteConnectionError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteConnection");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteConnectionError::from_response(response))),
)
}
})
}
fn delete_direct_connect_gateway(
&self,
input: DeleteDirectConnectGatewayRequest,
) -> RusotoFuture<DeleteDirectConnectGatewayResult, DeleteDirectConnectGatewayError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteDirectConnectGateway");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDirectConnectGatewayResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDirectConnectGatewayError::from_response(response))
}))
}
})
}
fn delete_direct_connect_gateway_association(
&self,
input: DeleteDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
DeleteDirectConnectGatewayAssociationResult,
DeleteDirectConnectGatewayAssociationError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DeleteDirectConnectGatewayAssociation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDirectConnectGatewayAssociationResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDirectConnectGatewayAssociationError::from_response(
response,
))
}))
}
})
}
fn delete_direct_connect_gateway_association_proposal(
&self,
input: DeleteDirectConnectGatewayAssociationProposalRequest,
) -> RusotoFuture<
DeleteDirectConnectGatewayAssociationProposalResult,
DeleteDirectConnectGatewayAssociationProposalError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DeleteDirectConnectGatewayAssociationProposal",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteDirectConnectGatewayAssociationProposalResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DeleteDirectConnectGatewayAssociationProposalError::from_response(response))
}))
}
})
}
fn delete_interconnect(
&self,
input: DeleteInterconnectRequest,
) -> RusotoFuture<DeleteInterconnectResponse, DeleteInterconnectError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteInterconnect");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteInterconnectResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteInterconnectError::from_response(response))),
)
}
})
}
fn delete_lag(&self, input: DeleteLagRequest) -> RusotoFuture<Lag, DeleteLagError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteLag");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DeleteLagError::from_response(response))),
)
}
})
}
fn delete_virtual_interface(
&self,
input: DeleteVirtualInterfaceRequest,
) -> RusotoFuture<DeleteVirtualInterfaceResponse, DeleteVirtualInterfaceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DeleteVirtualInterface");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DeleteVirtualInterfaceResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DeleteVirtualInterfaceError::from_response(response))
}),
)
}
})
}
fn describe_connection_loa(
&self,
input: DescribeConnectionLoaRequest,
) -> RusotoFuture<DescribeConnectionLoaResponse, DescribeConnectionLoaError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeConnectionLoa");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeConnectionLoaResponse, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeConnectionLoaError::from_response(response))
}),
)
}
})
}
fn describe_connections(
&self,
input: DescribeConnectionsRequest,
) -> RusotoFuture<Connections, DescribeConnectionsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeConnections");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeConnectionsError::from_response(response))
}),
)
}
})
}
fn describe_connections_on_interconnect(
&self,
input: DescribeConnectionsOnInterconnectRequest,
) -> RusotoFuture<Connections, DescribeConnectionsOnInterconnectError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DescribeConnectionsOnInterconnect",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeConnectionsOnInterconnectError::from_response(
response,
))
}))
}
})
}
fn describe_direct_connect_gateway_association_proposals(
&self,
input: DescribeDirectConnectGatewayAssociationProposalsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAssociationProposalsResult,
DescribeDirectConnectGatewayAssociationProposalsError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DescribeDirectConnectGatewayAssociationProposals",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<DescribeDirectConnectGatewayAssociationProposalsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDirectConnectGatewayAssociationProposalsError::from_response(response))
}))
}
})
}
fn describe_direct_connect_gateway_associations(
&self,
input: DescribeDirectConnectGatewayAssociationsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAssociationsResult,
DescribeDirectConnectGatewayAssociationsError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DescribeDirectConnectGatewayAssociations",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDirectConnectGatewayAssociationsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDirectConnectGatewayAssociationsError::from_response(response))
}))
}
})
}
fn describe_direct_connect_gateway_attachments(
&self,
input: DescribeDirectConnectGatewayAttachmentsRequest,
) -> RusotoFuture<
DescribeDirectConnectGatewayAttachmentsResult,
DescribeDirectConnectGatewayAttachmentsError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DescribeDirectConnectGatewayAttachments",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDirectConnectGatewayAttachmentsResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDirectConnectGatewayAttachmentsError::from_response(
response,
))
}))
}
})
}
fn describe_direct_connect_gateways(
&self,
input: DescribeDirectConnectGatewaysRequest,
) -> RusotoFuture<DescribeDirectConnectGatewaysResult, DescribeDirectConnectGatewaysError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DescribeDirectConnectGateways",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeDirectConnectGatewaysResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeDirectConnectGatewaysError::from_response(response))
}))
}
})
}
fn describe_hosted_connections(
&self,
input: DescribeHostedConnectionsRequest,
) -> RusotoFuture<Connections, DescribeHostedConnectionsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeHostedConnections");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeHostedConnectionsError::from_response(response))
}))
}
})
}
fn describe_interconnect_loa(
&self,
input: DescribeInterconnectLoaRequest,
) -> RusotoFuture<DescribeInterconnectLoaResponse, DescribeInterconnectLoaError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeInterconnectLoa");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeInterconnectLoaResponse, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeInterconnectLoaError::from_response(response))
}))
}
})
}
fn describe_interconnects(
&self,
input: DescribeInterconnectsRequest,
) -> RusotoFuture<Interconnects, DescribeInterconnectsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeInterconnects");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Interconnects, _>()
}))
} else {
Box::new(
response.buffer().from_err().and_then(|response| {
Err(DescribeInterconnectsError::from_response(response))
}),
)
}
})
}
fn describe_lags(&self, input: DescribeLagsRequest) -> RusotoFuture<Lags, DescribeLagsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeLags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Lags, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeLagsError::from_response(response))),
)
}
})
}
fn describe_loa(&self, input: DescribeLoaRequest) -> RusotoFuture<Loa, DescribeLoaError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeLoa");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Loa, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeLoaError::from_response(response))),
)
}
})
}
fn describe_locations(&self) -> RusotoFuture<Locations, DescribeLocationsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeLocations");
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Locations, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeLocationsError::from_response(response))),
)
}
})
}
fn describe_tags(
&self,
input: DescribeTagsRequest,
) -> RusotoFuture<DescribeTagsResponse, DescribeTagsError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeTags");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<DescribeTagsResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(DescribeTagsError::from_response(response))),
)
}
})
}
fn describe_virtual_gateways(
&self,
) -> RusotoFuture<VirtualGateways, DescribeVirtualGatewaysError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeVirtualGateways");
request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<VirtualGateways, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeVirtualGatewaysError::from_response(response))
}))
}
})
}
fn describe_virtual_interfaces(
&self,
input: DescribeVirtualInterfacesRequest,
) -> RusotoFuture<VirtualInterfaces, DescribeVirtualInterfacesError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.DescribeVirtualInterfaces");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterfaces, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DescribeVirtualInterfacesError::from_response(response))
}))
}
})
}
fn disassociate_connection_from_lag(
&self,
input: DisassociateConnectionFromLagRequest,
) -> RusotoFuture<Connection, DisassociateConnectionFromLagError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.DisassociateConnectionFromLag",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(DisassociateConnectionFromLagError::from_response(response))
}))
}
})
}
fn tag_resource(
&self,
input: TagResourceRequest,
) -> RusotoFuture<TagResourceResponse, TagResourceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.TagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<TagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(TagResourceError::from_response(response))),
)
}
})
}
fn untag_resource(
&self,
input: UntagResourceRequest,
) -> RusotoFuture<UntagResourceResponse, UntagResourceError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.UntagResource");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UntagResourceResponse, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UntagResourceError::from_response(response))),
)
}
})
}
fn update_direct_connect_gateway_association(
&self,
input: UpdateDirectConnectGatewayAssociationRequest,
) -> RusotoFuture<
UpdateDirectConnectGatewayAssociationResult,
UpdateDirectConnectGatewayAssociationError,
> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.UpdateDirectConnectGatewayAssociation",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<UpdateDirectConnectGatewayAssociationResult, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateDirectConnectGatewayAssociationError::from_response(
response,
))
}))
}
})
}
fn update_lag(&self, input: UpdateLagRequest) -> RusotoFuture<Lag, UpdateLagError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header("x-amz-target", "OvertureService.UpdateLag");
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
}))
} else {
Box::new(
response
.buffer()
.from_err()
.and_then(|response| Err(UpdateLagError::from_response(response))),
)
}
})
}
fn update_virtual_interface_attributes(
&self,
input: UpdateVirtualInterfaceAttributesRequest,
) -> RusotoFuture<VirtualInterface, UpdateVirtualInterfaceAttributesError> {
let mut request = SignedRequest::new("POST", "directconnect", &self.region, "/");
request.set_content_type("application/x-amz-json-1.1".to_owned());
request.add_header(
"x-amz-target",
"OvertureService.UpdateVirtualInterfaceAttributes",
);
let encoded = serde_json::to_string(&input).unwrap();
request.set_payload(Some(encoded));
self.client.sign_and_dispatch(request, |response| {
if response.status.is_success() {
Box::new(response.buffer().from_err().and_then(|response| {
proto::json::ResponsePayload::new(&response)
.deserialize::<VirtualInterface, _>()
}))
} else {
Box::new(response.buffer().from_err().and_then(|response| {
Err(UpdateVirtualInterfaceAttributesError::from_response(
response,
))
}))
}
})
}
}