rusoto_directconnect/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl DirectConnectClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request =
31            SignedRequest::new(http_method, "directconnect", &self.region, request_uri);
32
33        request.set_content_type("application/x-amz-json-1.1".to_owned());
34
35        request
36    }
37
38    async fn sign_and_dispatch<E>(
39        &self,
40        request: SignedRequest,
41        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
42    ) -> Result<HttpResponse, RusotoError<E>> {
43        let mut response = self.client.sign_and_dispatch(request).await?;
44        if !response.status.is_success() {
45            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
46            return Err(from_response(response));
47        }
48
49        Ok(response)
50    }
51}
52
53use serde_json;
54#[derive(Clone, Debug, Default, PartialEq, Serialize)]
55#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
56pub struct AcceptDirectConnectGatewayAssociationProposalRequest {
57    /// <p>The ID of the AWS account that owns the virtual private gateway or transit gateway.</p>
58    #[serde(rename = "associatedGatewayOwnerAccount")]
59    pub associated_gateway_owner_account: String,
60    /// <p>The ID of the Direct Connect gateway.</p>
61    #[serde(rename = "directConnectGatewayId")]
62    pub direct_connect_gateway_id: String,
63    /// <p>Overrides the Amazon VPC prefixes advertised to the Direct Connect gateway.</p> <p>For information about how to set the prefixes, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/multi-account-associate-vgw.html#allowed-prefixes">Allowed Prefixes</a> in the <i>AWS Direct Connect User Guide</i>.</p>
64    #[serde(rename = "overrideAllowedPrefixesToDirectConnectGateway")]
65    #[serde(skip_serializing_if = "Option::is_none")]
66    pub override_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
67    /// <p>The ID of the request proposal.</p>
68    #[serde(rename = "proposalId")]
69    pub proposal_id: String,
70}
71
72#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
73#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
74pub struct AcceptDirectConnectGatewayAssociationProposalResult {
75    #[serde(rename = "directConnectGatewayAssociation")]
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
78}
79
80#[derive(Clone, Debug, Default, PartialEq, Serialize)]
81#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
82pub struct AllocateConnectionOnInterconnectRequest {
83    /// <p>The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those AWS Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection.</p>
84    #[serde(rename = "bandwidth")]
85    pub bandwidth: String,
86    /// <p>The name of the provisioned connection.</p>
87    #[serde(rename = "connectionName")]
88    pub connection_name: String,
89    /// <p>The ID of the interconnect on which the connection will be provisioned.</p>
90    #[serde(rename = "interconnectId")]
91    pub interconnect_id: String,
92    /// <p>The ID of the AWS account of the customer for whom the connection will be provisioned.</p>
93    #[serde(rename = "ownerAccount")]
94    pub owner_account: String,
95    /// <p>The dedicated VLAN provisioned to the connection.</p>
96    #[serde(rename = "vlan")]
97    pub vlan: i64,
98}
99
100#[derive(Clone, Debug, Default, PartialEq, Serialize)]
101#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
102pub struct AllocateHostedConnectionRequest {
103    /// <p>The bandwidth of the connection. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. Note that only those AWS Direct Connect Partners who have met specific requirements are allowed to create a 1Gbps, 2Gbps, 5Gbps or 10Gbps hosted connection. </p>
104    #[serde(rename = "bandwidth")]
105    pub bandwidth: String,
106    /// <p>The ID of the interconnect or LAG.</p>
107    #[serde(rename = "connectionId")]
108    pub connection_id: String,
109    /// <p>The name of the hosted connection.</p>
110    #[serde(rename = "connectionName")]
111    pub connection_name: String,
112    /// <p>The ID of the AWS account ID of the customer for the connection.</p>
113    #[serde(rename = "ownerAccount")]
114    pub owner_account: String,
115    /// <p>The tags associated with the connection.</p>
116    #[serde(rename = "tags")]
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub tags: Option<Vec<Tag>>,
119    /// <p>The dedicated VLAN provisioned to the hosted connection.</p>
120    #[serde(rename = "vlan")]
121    pub vlan: i64,
122}
123
124#[derive(Clone, Debug, Default, PartialEq, Serialize)]
125#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
126pub struct AllocatePrivateVirtualInterfaceRequest {
127    /// <p>The ID of the connection on which the private virtual interface is provisioned.</p>
128    #[serde(rename = "connectionId")]
129    pub connection_id: String,
130    /// <p>Information about the private virtual interface.</p>
131    #[serde(rename = "newPrivateVirtualInterfaceAllocation")]
132    pub new_private_virtual_interface_allocation: NewPrivateVirtualInterfaceAllocation,
133    /// <p>The ID of the AWS account that owns the virtual private interface.</p>
134    #[serde(rename = "ownerAccount")]
135    pub owner_account: String,
136}
137
138#[derive(Clone, Debug, Default, PartialEq, Serialize)]
139#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
140pub struct AllocatePublicVirtualInterfaceRequest {
141    /// <p>The ID of the connection on which the public virtual interface is provisioned.</p>
142    #[serde(rename = "connectionId")]
143    pub connection_id: String,
144    /// <p>Information about the public virtual interface.</p>
145    #[serde(rename = "newPublicVirtualInterfaceAllocation")]
146    pub new_public_virtual_interface_allocation: NewPublicVirtualInterfaceAllocation,
147    /// <p>The ID of the AWS account that owns the public virtual interface.</p>
148    #[serde(rename = "ownerAccount")]
149    pub owner_account: String,
150}
151
152#[derive(Clone, Debug, Default, PartialEq, Serialize)]
153#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
154pub struct AllocateTransitVirtualInterfaceRequest {
155    /// <p>The ID of the connection on which the transit virtual interface is provisioned.</p>
156    #[serde(rename = "connectionId")]
157    pub connection_id: String,
158    /// <p>Information about the transit virtual interface.</p>
159    #[serde(rename = "newTransitVirtualInterfaceAllocation")]
160    pub new_transit_virtual_interface_allocation: NewTransitVirtualInterfaceAllocation,
161    /// <p>The ID of the AWS account that owns the transit virtual interface.</p>
162    #[serde(rename = "ownerAccount")]
163    pub owner_account: String,
164}
165
166#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
167#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
168pub struct AllocateTransitVirtualInterfaceResult {
169    #[serde(rename = "virtualInterface")]
170    #[serde(skip_serializing_if = "Option::is_none")]
171    pub virtual_interface: Option<VirtualInterface>,
172}
173
174#[derive(Clone, Debug, Default, PartialEq, Serialize)]
175#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
176pub struct AssociateConnectionWithLagRequest {
177    /// <p>The ID of the connection.</p>
178    #[serde(rename = "connectionId")]
179    pub connection_id: String,
180    /// <p>The ID of the LAG with which to associate the connection.</p>
181    #[serde(rename = "lagId")]
182    pub lag_id: String,
183}
184
185#[derive(Clone, Debug, Default, PartialEq, Serialize)]
186#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
187pub struct AssociateHostedConnectionRequest {
188    /// <p>The ID of the hosted connection.</p>
189    #[serde(rename = "connectionId")]
190    pub connection_id: String,
191    /// <p>The ID of the interconnect or the LAG.</p>
192    #[serde(rename = "parentConnectionId")]
193    pub parent_connection_id: String,
194}
195
196#[derive(Clone, Debug, Default, PartialEq, Serialize)]
197#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
198pub struct AssociateVirtualInterfaceRequest {
199    /// <p>The ID of the LAG or connection.</p>
200    #[serde(rename = "connectionId")]
201    pub connection_id: String,
202    /// <p>The ID of the virtual interface.</p>
203    #[serde(rename = "virtualInterfaceId")]
204    pub virtual_interface_id: String,
205}
206
207/// <p>Information about the associated gateway.</p>
208#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
209#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
210pub struct AssociatedGateway {
211    /// <p>The ID of the associated gateway.</p>
212    #[serde(rename = "id")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub id: Option<String>,
215    /// <p>The ID of the AWS account that owns the associated virtual private gateway or transit gateway.</p>
216    #[serde(rename = "ownerAccount")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub owner_account: Option<String>,
219    /// <p>The Region where the associated gateway is located.</p>
220    #[serde(rename = "region")]
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub region: Option<String>,
223    /// <p>The type of associated gateway.</p>
224    #[serde(rename = "type")]
225    #[serde(skip_serializing_if = "Option::is_none")]
226    pub type_: Option<String>,
227}
228
229/// <p>Information about a BGP peer.</p>
230#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
231#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
232pub struct BGPPeer {
233    /// <p>The address family for the BGP peer.</p>
234    #[serde(rename = "addressFamily")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub address_family: Option<String>,
237    /// <p>The IP address assigned to the Amazon interface.</p>
238    #[serde(rename = "amazonAddress")]
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub amazon_address: Option<String>,
241    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p>
242    #[serde(rename = "asn")]
243    #[serde(skip_serializing_if = "Option::is_none")]
244    pub asn: Option<i64>,
245    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
246    #[serde(rename = "authKey")]
247    #[serde(skip_serializing_if = "Option::is_none")]
248    pub auth_key: Option<String>,
249    /// <p>The Direct Connect endpoint on which the BGP peer terminates.</p>
250    #[serde(rename = "awsDeviceV2")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    pub aws_device_v2: Option<String>,
253    /// <p>The ID of the BGP peer.</p>
254    #[serde(rename = "bgpPeerId")]
255    #[serde(skip_serializing_if = "Option::is_none")]
256    pub bgp_peer_id: Option<String>,
257    /// <p><p>The state of the BGP peer. The following are the possible values:</p> <ul> <li> <p> <code>verifying</code>: The BGP peering addresses or ASN require validation before the BGP peer can be created. This state applies only to public virtual interfaces.</p> </li> <li> <p> <code>pending</code>: The BGP peer is created, and remains in this state until it is ready to be established.</p> </li> <li> <p> <code>available</code>: The BGP peer is ready to be established.</p> </li> <li> <p> <code>deleting</code>: The BGP peer is being deleted.</p> </li> <li> <p> <code>deleted</code>: The BGP peer is deleted and cannot be established.</p> </li> </ul></p>
258    #[serde(rename = "bgpPeerState")]
259    #[serde(skip_serializing_if = "Option::is_none")]
260    pub bgp_peer_state: Option<String>,
261    /// <p><p>The status of the BGP peer. The following are the possible values:</p> <ul> <li> <p> <code>up</code>: The BGP peer is established. This state does not indicate the state of the routing function. Ensure that you are receiving routes over the BGP session.</p> </li> <li> <p> <code>down</code>: The BGP peer is down.</p> </li> <li> <p> <code>unknown</code>: The BGP peer status is not available.</p> </li> </ul></p>
262    #[serde(rename = "bgpStatus")]
263    #[serde(skip_serializing_if = "Option::is_none")]
264    pub bgp_status: Option<String>,
265    /// <p>The IP address assigned to the customer interface.</p>
266    #[serde(rename = "customerAddress")]
267    #[serde(skip_serializing_if = "Option::is_none")]
268    pub customer_address: Option<String>,
269}
270
271#[derive(Clone, Debug, Default, PartialEq, Serialize)]
272#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
273pub struct ConfirmConnectionRequest {
274    /// <p>The ID of the hosted connection.</p>
275    #[serde(rename = "connectionId")]
276    pub connection_id: String,
277}
278
279#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
280#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
281pub struct ConfirmConnectionResponse {
282    /// <p><p>The state of the connection. The following are the possible values:</p> <ul> <li> <p> <code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p> </li> <li> <p> <code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p> </li> <li> <p> <code>pending</code>: The connection has been approved and is being initialized.</p> </li> <li> <p> <code>available</code>: The network link is up and the connection is ready for use.</p> </li> <li> <p> <code>down</code>: The network link is down.</p> </li> <li> <p> <code>deleting</code>: The connection is being deleted.</p> </li> <li> <p> <code>deleted</code>: The connection has been deleted.</p> </li> <li> <p> <code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p> </li> <li> <p> <code>unknown</code>: The state of the connection is not available.</p> </li> </ul></p>
283    #[serde(rename = "connectionState")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub connection_state: Option<String>,
286}
287
288#[derive(Clone, Debug, Default, PartialEq, Serialize)]
289#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
290pub struct ConfirmPrivateVirtualInterfaceRequest {
291    /// <p>The ID of the Direct Connect gateway.</p>
292    #[serde(rename = "directConnectGatewayId")]
293    #[serde(skip_serializing_if = "Option::is_none")]
294    pub direct_connect_gateway_id: Option<String>,
295    /// <p>The ID of the virtual private gateway.</p>
296    #[serde(rename = "virtualGatewayId")]
297    #[serde(skip_serializing_if = "Option::is_none")]
298    pub virtual_gateway_id: Option<String>,
299    /// <p>The ID of the virtual interface.</p>
300    #[serde(rename = "virtualInterfaceId")]
301    pub virtual_interface_id: String,
302}
303
304#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
305#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
306pub struct ConfirmPrivateVirtualInterfaceResponse {
307    /// <p><p>The state of the virtual interface. The following are the possible values:</p> <ul> <li> <p> <code>confirming</code>: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.</p> </li> <li> <p> <code>verifying</code>: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.</p> </li> <li> <p> <code>pending</code>: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.</p> </li> <li> <p> <code>available</code>: A virtual interface that is able to forward traffic.</p> </li> <li> <p> <code>down</code>: A virtual interface that is BGP down.</p> </li> <li> <p> <code>deleting</code>: A virtual interface is in this state immediately after calling <a>DeleteVirtualInterface</a> until it can no longer forward traffic.</p> </li> <li> <p> <code>deleted</code>: A virtual interface that cannot forward traffic.</p> </li> <li> <p> <code>rejected</code>: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the <code>Confirming</code> state is deleted by the virtual interface owner, the virtual interface enters the <code>Rejected</code> state.</p> </li> <li> <p> <code>unknown</code>: The state of the virtual interface is not available.</p> </li> </ul></p>
308    #[serde(rename = "virtualInterfaceState")]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    pub virtual_interface_state: Option<String>,
311}
312
313#[derive(Clone, Debug, Default, PartialEq, Serialize)]
314#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
315pub struct ConfirmPublicVirtualInterfaceRequest {
316    /// <p>The ID of the virtual interface.</p>
317    #[serde(rename = "virtualInterfaceId")]
318    pub virtual_interface_id: String,
319}
320
321#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
322#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
323pub struct ConfirmPublicVirtualInterfaceResponse {
324    /// <p><p>The state of the virtual interface. The following are the possible values:</p> <ul> <li> <p> <code>confirming</code>: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.</p> </li> <li> <p> <code>verifying</code>: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.</p> </li> <li> <p> <code>pending</code>: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.</p> </li> <li> <p> <code>available</code>: A virtual interface that is able to forward traffic.</p> </li> <li> <p> <code>down</code>: A virtual interface that is BGP down.</p> </li> <li> <p> <code>deleting</code>: A virtual interface is in this state immediately after calling <a>DeleteVirtualInterface</a> until it can no longer forward traffic.</p> </li> <li> <p> <code>deleted</code>: A virtual interface that cannot forward traffic.</p> </li> <li> <p> <code>rejected</code>: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the <code>Confirming</code> state is deleted by the virtual interface owner, the virtual interface enters the <code>Rejected</code> state.</p> </li> <li> <p> <code>unknown</code>: The state of the virtual interface is not available.</p> </li> </ul></p>
325    #[serde(rename = "virtualInterfaceState")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub virtual_interface_state: Option<String>,
328}
329
330#[derive(Clone, Debug, Default, PartialEq, Serialize)]
331#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
332pub struct ConfirmTransitVirtualInterfaceRequest {
333    /// <p>The ID of the Direct Connect gateway.</p>
334    #[serde(rename = "directConnectGatewayId")]
335    pub direct_connect_gateway_id: String,
336    /// <p>The ID of the virtual interface.</p>
337    #[serde(rename = "virtualInterfaceId")]
338    pub virtual_interface_id: String,
339}
340
341#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
342#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
343pub struct ConfirmTransitVirtualInterfaceResponse {
344    /// <p><p>The state of the virtual interface. The following are the possible values:</p> <ul> <li> <p> <code>confirming</code>: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.</p> </li> <li> <p> <code>verifying</code>: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.</p> </li> <li> <p> <code>pending</code>: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.</p> </li> <li> <p> <code>available</code>: A virtual interface that is able to forward traffic.</p> </li> <li> <p> <code>down</code>: A virtual interface that is BGP down.</p> </li> <li> <p> <code>deleting</code>: A virtual interface is in this state immediately after calling <a>DeleteVirtualInterface</a> until it can no longer forward traffic.</p> </li> <li> <p> <code>deleted</code>: A virtual interface that cannot forward traffic.</p> </li> <li> <p> <code>rejected</code>: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the <code>Confirming</code> state is deleted by the virtual interface owner, the virtual interface enters the <code>Rejected</code> state.</p> </li> <li> <p> <code>unknown</code>: The state of the virtual interface is not available.</p> </li> </ul></p>
345    #[serde(rename = "virtualInterfaceState")]
346    #[serde(skip_serializing_if = "Option::is_none")]
347    pub virtual_interface_state: Option<String>,
348}
349
350/// <p>Information about an AWS Direct Connect connection.</p>
351#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
352#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
353pub struct Connection {
354    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
355    #[serde(rename = "awsDevice")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    pub aws_device: Option<String>,
358    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
359    #[serde(rename = "awsDeviceV2")]
360    #[serde(skip_serializing_if = "Option::is_none")]
361    pub aws_device_v2: Option<String>,
362    /// <p>The bandwidth of the connection.</p>
363    #[serde(rename = "bandwidth")]
364    #[serde(skip_serializing_if = "Option::is_none")]
365    pub bandwidth: Option<String>,
366    /// <p>The ID of the connection.</p>
367    #[serde(rename = "connectionId")]
368    #[serde(skip_serializing_if = "Option::is_none")]
369    pub connection_id: Option<String>,
370    /// <p>The name of the connection.</p>
371    #[serde(rename = "connectionName")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub connection_name: Option<String>,
374    /// <p><p>The state of the connection. The following are the possible values:</p> <ul> <li> <p> <code>ordering</code>: The initial state of a hosted connection provisioned on an interconnect. The connection stays in the ordering state until the owner of the hosted connection confirms or declines the connection order.</p> </li> <li> <p> <code>requested</code>: The initial state of a standard connection. The connection stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p> </li> <li> <p> <code>pending</code>: The connection has been approved and is being initialized.</p> </li> <li> <p> <code>available</code>: The network link is up and the connection is ready for use.</p> </li> <li> <p> <code>down</code>: The network link is down.</p> </li> <li> <p> <code>deleting</code>: The connection is being deleted.</p> </li> <li> <p> <code>deleted</code>: The connection has been deleted.</p> </li> <li> <p> <code>rejected</code>: A hosted connection in the <code>ordering</code> state enters the <code>rejected</code> state if it is deleted by the customer.</p> </li> <li> <p> <code>unknown</code>: The state of the connection is not available.</p> </li> </ul></p>
375    #[serde(rename = "connectionState")]
376    #[serde(skip_serializing_if = "Option::is_none")]
377    pub connection_state: Option<String>,
378    /// <p>Indicates whether the connection supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
379    #[serde(rename = "hasLogicalRedundancy")]
380    #[serde(skip_serializing_if = "Option::is_none")]
381    pub has_logical_redundancy: Option<String>,
382    /// <p>Indicates whether jumbo frames (9001 MTU) are supported.</p>
383    #[serde(rename = "jumboFrameCapable")]
384    #[serde(skip_serializing_if = "Option::is_none")]
385    pub jumbo_frame_capable: Option<bool>,
386    /// <p>The ID of the LAG.</p>
387    #[serde(rename = "lagId")]
388    #[serde(skip_serializing_if = "Option::is_none")]
389    pub lag_id: Option<String>,
390    /// <p>The time of the most recent call to <a>DescribeLoa</a> for this connection.</p>
391    #[serde(rename = "loaIssueTime")]
392    #[serde(skip_serializing_if = "Option::is_none")]
393    pub loa_issue_time: Option<f64>,
394    /// <p>The location of the connection.</p>
395    #[serde(rename = "location")]
396    #[serde(skip_serializing_if = "Option::is_none")]
397    pub location: Option<String>,
398    /// <p>The ID of the AWS account that owns the connection.</p>
399    #[serde(rename = "ownerAccount")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub owner_account: Option<String>,
402    /// <p>The name of the AWS Direct Connect service provider associated with the connection.</p>
403    #[serde(rename = "partnerName")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub partner_name: Option<String>,
406    /// <p>The name of the service provider associated with the connection.</p>
407    #[serde(rename = "providerName")]
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub provider_name: Option<String>,
410    /// <p>The AWS Region where the connection is located.</p>
411    #[serde(rename = "region")]
412    #[serde(skip_serializing_if = "Option::is_none")]
413    pub region: Option<String>,
414    /// <p>The tags associated with the connection.</p>
415    #[serde(rename = "tags")]
416    #[serde(skip_serializing_if = "Option::is_none")]
417    pub tags: Option<Vec<Tag>>,
418    /// <p>The ID of the VLAN.</p>
419    #[serde(rename = "vlan")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub vlan: Option<i64>,
422}
423
424#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
425#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
426pub struct Connections {
427    /// <p>The connections.</p>
428    #[serde(rename = "connections")]
429    #[serde(skip_serializing_if = "Option::is_none")]
430    pub connections: Option<Vec<Connection>>,
431}
432
433#[derive(Clone, Debug, Default, PartialEq, Serialize)]
434#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
435pub struct CreateBGPPeerRequest {
436    /// <p>Information about the BGP peer.</p>
437    #[serde(rename = "newBGPPeer")]
438    #[serde(skip_serializing_if = "Option::is_none")]
439    pub new_bgp_peer: Option<NewBGPPeer>,
440    /// <p>The ID of the virtual interface.</p>
441    #[serde(rename = "virtualInterfaceId")]
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub virtual_interface_id: Option<String>,
444}
445
446#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
447#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
448pub struct CreateBGPPeerResponse {
449    /// <p>The virtual interface.</p>
450    #[serde(rename = "virtualInterface")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub virtual_interface: Option<VirtualInterface>,
453}
454
455#[derive(Clone, Debug, Default, PartialEq, Serialize)]
456#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
457pub struct CreateConnectionRequest {
458    /// <p>The bandwidth of the connection.</p>
459    #[serde(rename = "bandwidth")]
460    pub bandwidth: String,
461    /// <p>The name of the connection.</p>
462    #[serde(rename = "connectionName")]
463    pub connection_name: String,
464    /// <p>The ID of the LAG.</p>
465    #[serde(rename = "lagId")]
466    #[serde(skip_serializing_if = "Option::is_none")]
467    pub lag_id: Option<String>,
468    /// <p>The location of the connection.</p>
469    #[serde(rename = "location")]
470    pub location: String,
471    /// <p>The name of the service provider associated with the requested connection.</p>
472    #[serde(rename = "providerName")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub provider_name: Option<String>,
475    /// <p>The tags to associate with the lag.</p>
476    #[serde(rename = "tags")]
477    #[serde(skip_serializing_if = "Option::is_none")]
478    pub tags: Option<Vec<Tag>>,
479}
480
481#[derive(Clone, Debug, Default, PartialEq, Serialize)]
482#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
483pub struct CreateDirectConnectGatewayAssociationProposalRequest {
484    /// <p>The Amazon VPC prefixes to advertise to the Direct Connect gateway.</p>
485    #[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
488    /// <p>The ID of the Direct Connect gateway.</p>
489    #[serde(rename = "directConnectGatewayId")]
490    pub direct_connect_gateway_id: String,
491    /// <p>The ID of the AWS account that owns the Direct Connect gateway.</p>
492    #[serde(rename = "directConnectGatewayOwnerAccount")]
493    pub direct_connect_gateway_owner_account: String,
494    /// <p>The ID of the virtual private gateway or transit gateway.</p>
495    #[serde(rename = "gatewayId")]
496    pub gateway_id: String,
497    /// <p>The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.</p>
498    #[serde(rename = "removeAllowedPrefixesToDirectConnectGateway")]
499    #[serde(skip_serializing_if = "Option::is_none")]
500    pub remove_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
501}
502
503#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
504#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
505pub struct CreateDirectConnectGatewayAssociationProposalResult {
506    /// <p>Information about the Direct Connect gateway proposal.</p>
507    #[serde(rename = "directConnectGatewayAssociationProposal")]
508    #[serde(skip_serializing_if = "Option::is_none")]
509    pub direct_connect_gateway_association_proposal:
510        Option<DirectConnectGatewayAssociationProposal>,
511}
512
513#[derive(Clone, Debug, Default, PartialEq, Serialize)]
514#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
515pub struct CreateDirectConnectGatewayAssociationRequest {
516    /// <p>The Amazon VPC prefixes to advertise to the Direct Connect gateway</p> <p>This parameter is required when you create an association to a transit gateway.</p> <p>For information about how to set the prefixes, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/multi-account-associate-vgw.html#allowed-prefixes">Allowed Prefixes</a> in the <i>AWS Direct Connect User Guide</i>.</p>
517    #[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
520    /// <p>The ID of the Direct Connect gateway.</p>
521    #[serde(rename = "directConnectGatewayId")]
522    pub direct_connect_gateway_id: String,
523    /// <p>The ID of the virtual private gateway or transit gateway.</p>
524    #[serde(rename = "gatewayId")]
525    #[serde(skip_serializing_if = "Option::is_none")]
526    pub gateway_id: Option<String>,
527    /// <p>The ID of the virtual private gateway.</p>
528    #[serde(rename = "virtualGatewayId")]
529    #[serde(skip_serializing_if = "Option::is_none")]
530    pub virtual_gateway_id: Option<String>,
531}
532
533#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
534#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
535pub struct CreateDirectConnectGatewayAssociationResult {
536    /// <p>The association to be created.</p>
537    #[serde(rename = "directConnectGatewayAssociation")]
538    #[serde(skip_serializing_if = "Option::is_none")]
539    pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
540}
541
542#[derive(Clone, Debug, Default, PartialEq, Serialize)]
543#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
544pub struct CreateDirectConnectGatewayRequest {
545    /// <p>The autonomous system number (ASN) for Border Gateway Protocol (BGP) to be configured on the Amazon side of the connection. The ASN must be in the private range of 64,512 to 65,534 or 4,200,000,000 to 4,294,967,294. The default is 64512.</p>
546    #[serde(rename = "amazonSideAsn")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub amazon_side_asn: Option<i64>,
549    /// <p>The name of the Direct Connect gateway.</p>
550    #[serde(rename = "directConnectGatewayName")]
551    pub direct_connect_gateway_name: String,
552}
553
554#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
555#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
556pub struct CreateDirectConnectGatewayResult {
557    /// <p>The Direct Connect gateway.</p>
558    #[serde(rename = "directConnectGateway")]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    pub direct_connect_gateway: Option<DirectConnectGateway>,
561}
562
563#[derive(Clone, Debug, Default, PartialEq, Serialize)]
564#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
565pub struct CreateInterconnectRequest {
566    /// <p>The port bandwidth, in Gbps. The possible values are 1 and 10.</p>
567    #[serde(rename = "bandwidth")]
568    pub bandwidth: String,
569    /// <p>The name of the interconnect.</p>
570    #[serde(rename = "interconnectName")]
571    pub interconnect_name: String,
572    /// <p>The ID of the LAG.</p>
573    #[serde(rename = "lagId")]
574    #[serde(skip_serializing_if = "Option::is_none")]
575    pub lag_id: Option<String>,
576    /// <p>The location of the interconnect.</p>
577    #[serde(rename = "location")]
578    pub location: String,
579    /// <p>The name of the service provider associated with the interconnect.</p>
580    #[serde(rename = "providerName")]
581    #[serde(skip_serializing_if = "Option::is_none")]
582    pub provider_name: Option<String>,
583    /// <p>The tags to associate with the interconnect.</p>
584    #[serde(rename = "tags")]
585    #[serde(skip_serializing_if = "Option::is_none")]
586    pub tags: Option<Vec<Tag>>,
587}
588
589#[derive(Clone, Debug, Default, PartialEq, Serialize)]
590#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
591pub struct CreateLagRequest {
592    /// <p>The tags to associate with the automtically created LAGs.</p>
593    #[serde(rename = "childConnectionTags")]
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub child_connection_tags: Option<Vec<Tag>>,
596    /// <p>The ID of an existing connection to migrate to the LAG.</p>
597    #[serde(rename = "connectionId")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub connection_id: Option<String>,
600    /// <p>The bandwidth of the individual physical connections bundled by the LAG. The possible values are 50Mbps, 100Mbps, 200Mbps, 300Mbps, 400Mbps, 500Mbps, 1Gbps, 2Gbps, 5Gbps, and 10Gbps. </p>
601    #[serde(rename = "connectionsBandwidth")]
602    pub connections_bandwidth: String,
603    /// <p>The name of the LAG.</p>
604    #[serde(rename = "lagName")]
605    pub lag_name: String,
606    /// <p>The location for the LAG.</p>
607    #[serde(rename = "location")]
608    pub location: String,
609    /// <p>The number of physical connections initially provisioned and bundled by the LAG.</p>
610    #[serde(rename = "numberOfConnections")]
611    pub number_of_connections: i64,
612    /// <p>The name of the service provider associated with the LAG.</p>
613    #[serde(rename = "providerName")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub provider_name: Option<String>,
616    /// <p>The tags to associate with the LAG.</p>
617    #[serde(rename = "tags")]
618    #[serde(skip_serializing_if = "Option::is_none")]
619    pub tags: Option<Vec<Tag>>,
620}
621
622#[derive(Clone, Debug, Default, PartialEq, Serialize)]
623#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
624pub struct CreatePrivateVirtualInterfaceRequest {
625    /// <p>The ID of the connection.</p>
626    #[serde(rename = "connectionId")]
627    pub connection_id: String,
628    /// <p>Information about the private virtual interface.</p>
629    #[serde(rename = "newPrivateVirtualInterface")]
630    pub new_private_virtual_interface: NewPrivateVirtualInterface,
631}
632
633#[derive(Clone, Debug, Default, PartialEq, Serialize)]
634#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
635pub struct CreatePublicVirtualInterfaceRequest {
636    /// <p>The ID of the connection.</p>
637    #[serde(rename = "connectionId")]
638    pub connection_id: String,
639    /// <p>Information about the public virtual interface.</p>
640    #[serde(rename = "newPublicVirtualInterface")]
641    pub new_public_virtual_interface: NewPublicVirtualInterface,
642}
643
644#[derive(Clone, Debug, Default, PartialEq, Serialize)]
645#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
646pub struct CreateTransitVirtualInterfaceRequest {
647    /// <p>The ID of the connection.</p>
648    #[serde(rename = "connectionId")]
649    pub connection_id: String,
650    /// <p>Information about the transit virtual interface.</p>
651    #[serde(rename = "newTransitVirtualInterface")]
652    pub new_transit_virtual_interface: NewTransitVirtualInterface,
653}
654
655#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
656#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
657pub struct CreateTransitVirtualInterfaceResult {
658    #[serde(rename = "virtualInterface")]
659    #[serde(skip_serializing_if = "Option::is_none")]
660    pub virtual_interface: Option<VirtualInterface>,
661}
662
663#[derive(Clone, Debug, Default, PartialEq, Serialize)]
664#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
665pub struct DeleteBGPPeerRequest {
666    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p>
667    #[serde(rename = "asn")]
668    #[serde(skip_serializing_if = "Option::is_none")]
669    pub asn: Option<i64>,
670    /// <p>The ID of the BGP peer.</p>
671    #[serde(rename = "bgpPeerId")]
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub bgp_peer_id: Option<String>,
674    /// <p>The IP address assigned to the customer interface.</p>
675    #[serde(rename = "customerAddress")]
676    #[serde(skip_serializing_if = "Option::is_none")]
677    pub customer_address: Option<String>,
678    /// <p>The ID of the virtual interface.</p>
679    #[serde(rename = "virtualInterfaceId")]
680    #[serde(skip_serializing_if = "Option::is_none")]
681    pub virtual_interface_id: Option<String>,
682}
683
684#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
685#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
686pub struct DeleteBGPPeerResponse {
687    /// <p>The virtual interface.</p>
688    #[serde(rename = "virtualInterface")]
689    #[serde(skip_serializing_if = "Option::is_none")]
690    pub virtual_interface: Option<VirtualInterface>,
691}
692
693#[derive(Clone, Debug, Default, PartialEq, Serialize)]
694#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
695pub struct DeleteConnectionRequest {
696    /// <p>The ID of the connection.</p>
697    #[serde(rename = "connectionId")]
698    pub connection_id: String,
699}
700
701#[derive(Clone, Debug, Default, PartialEq, Serialize)]
702#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
703pub struct DeleteDirectConnectGatewayAssociationProposalRequest {
704    /// <p>The ID of the proposal.</p>
705    #[serde(rename = "proposalId")]
706    pub proposal_id: String,
707}
708
709#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
710#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
711pub struct DeleteDirectConnectGatewayAssociationProposalResult {
712    /// <p>The ID of the associated gateway.</p>
713    #[serde(rename = "directConnectGatewayAssociationProposal")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub direct_connect_gateway_association_proposal:
716        Option<DirectConnectGatewayAssociationProposal>,
717}
718
719#[derive(Clone, Debug, Default, PartialEq, Serialize)]
720#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
721pub struct DeleteDirectConnectGatewayAssociationRequest {
722    /// <p>The ID of the Direct Connect gateway association.</p>
723    #[serde(rename = "associationId")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub association_id: Option<String>,
726    /// <p>The ID of the Direct Connect gateway.</p>
727    #[serde(rename = "directConnectGatewayId")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub direct_connect_gateway_id: Option<String>,
730    /// <p>The ID of the virtual private gateway.</p>
731    #[serde(rename = "virtualGatewayId")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub virtual_gateway_id: Option<String>,
734}
735
736#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
737#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
738pub struct DeleteDirectConnectGatewayAssociationResult {
739    /// <p>Information about the deleted association.</p>
740    #[serde(rename = "directConnectGatewayAssociation")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
743}
744
745#[derive(Clone, Debug, Default, PartialEq, Serialize)]
746#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
747pub struct DeleteDirectConnectGatewayRequest {
748    /// <p>The ID of the Direct Connect gateway.</p>
749    #[serde(rename = "directConnectGatewayId")]
750    pub direct_connect_gateway_id: String,
751}
752
753#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
754#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
755pub struct DeleteDirectConnectGatewayResult {
756    /// <p>The Direct Connect gateway.</p>
757    #[serde(rename = "directConnectGateway")]
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub direct_connect_gateway: Option<DirectConnectGateway>,
760}
761
762#[derive(Clone, Debug, Default, PartialEq, Serialize)]
763#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
764pub struct DeleteInterconnectRequest {
765    /// <p>The ID of the interconnect.</p>
766    #[serde(rename = "interconnectId")]
767    pub interconnect_id: String,
768}
769
770#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
771#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
772pub struct DeleteInterconnectResponse {
773    /// <p><p>The state of the interconnect. The following are the possible values:</p> <ul> <li> <p> <code>requested</code>: The initial state of an interconnect. The interconnect stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p> </li> <li> <p> <code>pending</code>: The interconnect is approved, and is being initialized.</p> </li> <li> <p> <code>available</code>: The network link is up, and the interconnect is ready for use.</p> </li> <li> <p> <code>down</code>: The network link is down.</p> </li> <li> <p> <code>deleting</code>: The interconnect is being deleted.</p> </li> <li> <p> <code>deleted</code>: The interconnect is deleted.</p> </li> <li> <p> <code>unknown</code>: The state of the interconnect is not available.</p> </li> </ul></p>
774    #[serde(rename = "interconnectState")]
775    #[serde(skip_serializing_if = "Option::is_none")]
776    pub interconnect_state: Option<String>,
777}
778
779#[derive(Clone, Debug, Default, PartialEq, Serialize)]
780#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
781pub struct DeleteLagRequest {
782    /// <p>The ID of the LAG.</p>
783    #[serde(rename = "lagId")]
784    pub lag_id: String,
785}
786
787#[derive(Clone, Debug, Default, PartialEq, Serialize)]
788#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
789pub struct DeleteVirtualInterfaceRequest {
790    /// <p>The ID of the virtual interface.</p>
791    #[serde(rename = "virtualInterfaceId")]
792    pub virtual_interface_id: String,
793}
794
795#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
796#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
797pub struct DeleteVirtualInterfaceResponse {
798    /// <p><p>The state of the virtual interface. The following are the possible values:</p> <ul> <li> <p> <code>confirming</code>: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.</p> </li> <li> <p> <code>verifying</code>: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.</p> </li> <li> <p> <code>pending</code>: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.</p> </li> <li> <p> <code>available</code>: A virtual interface that is able to forward traffic.</p> </li> <li> <p> <code>down</code>: A virtual interface that is BGP down.</p> </li> <li> <p> <code>deleting</code>: A virtual interface is in this state immediately after calling <a>DeleteVirtualInterface</a> until it can no longer forward traffic.</p> </li> <li> <p> <code>deleted</code>: A virtual interface that cannot forward traffic.</p> </li> <li> <p> <code>rejected</code>: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the <code>Confirming</code> state is deleted by the virtual interface owner, the virtual interface enters the <code>Rejected</code> state.</p> </li> <li> <p> <code>unknown</code>: The state of the virtual interface is not available.</p> </li> </ul></p>
799    #[serde(rename = "virtualInterfaceState")]
800    #[serde(skip_serializing_if = "Option::is_none")]
801    pub virtual_interface_state: Option<String>,
802}
803
804#[derive(Clone, Debug, Default, PartialEq, Serialize)]
805#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
806pub struct DescribeConnectionLoaRequest {
807    /// <p>The ID of the connection.</p>
808    #[serde(rename = "connectionId")]
809    pub connection_id: String,
810    /// <p>The standard media type for the LOA-CFA document. The only supported value is application/pdf.</p>
811    #[serde(rename = "loaContentType")]
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub loa_content_type: Option<String>,
814    /// <p>The name of the APN partner or service provider who establishes connectivity on your behalf. If you specify this parameter, the LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.</p>
815    #[serde(rename = "providerName")]
816    #[serde(skip_serializing_if = "Option::is_none")]
817    pub provider_name: Option<String>,
818}
819
820#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
821#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
822pub struct DescribeConnectionLoaResponse {
823    /// <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA).</p>
824    #[serde(rename = "loa")]
825    #[serde(skip_serializing_if = "Option::is_none")]
826    pub loa: Option<Loa>,
827}
828
829#[derive(Clone, Debug, Default, PartialEq, Serialize)]
830#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
831pub struct DescribeConnectionsOnInterconnectRequest {
832    /// <p>The ID of the interconnect.</p>
833    #[serde(rename = "interconnectId")]
834    pub interconnect_id: String,
835}
836
837#[derive(Clone, Debug, Default, PartialEq, Serialize)]
838#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
839pub struct DescribeConnectionsRequest {
840    /// <p>The ID of the connection.</p>
841    #[serde(rename = "connectionId")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub connection_id: Option<String>,
844}
845
846#[derive(Clone, Debug, Default, PartialEq, Serialize)]
847#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
848pub struct DescribeDirectConnectGatewayAssociationProposalsRequest {
849    /// <p>The ID of the associated gateway.</p>
850    #[serde(rename = "associatedGatewayId")]
851    #[serde(skip_serializing_if = "Option::is_none")]
852    pub associated_gateway_id: Option<String>,
853    /// <p>The ID of the Direct Connect gateway.</p>
854    #[serde(rename = "directConnectGatewayId")]
855    #[serde(skip_serializing_if = "Option::is_none")]
856    pub direct_connect_gateway_id: Option<String>,
857    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
858    #[serde(rename = "maxResults")]
859    #[serde(skip_serializing_if = "Option::is_none")]
860    pub max_results: Option<i64>,
861    /// <p>The token for the next page of results.</p>
862    #[serde(rename = "nextToken")]
863    #[serde(skip_serializing_if = "Option::is_none")]
864    pub next_token: Option<String>,
865    /// <p>The ID of the proposal.</p>
866    #[serde(rename = "proposalId")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub proposal_id: Option<String>,
869}
870
871#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
872#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
873pub struct DescribeDirectConnectGatewayAssociationProposalsResult {
874    /// <p>Describes the Direct Connect gateway association proposals.</p>
875    #[serde(rename = "directConnectGatewayAssociationProposals")]
876    #[serde(skip_serializing_if = "Option::is_none")]
877    pub direct_connect_gateway_association_proposals:
878        Option<Vec<DirectConnectGatewayAssociationProposal>>,
879    /// <p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>
880    #[serde(rename = "nextToken")]
881    #[serde(skip_serializing_if = "Option::is_none")]
882    pub next_token: Option<String>,
883}
884
885#[derive(Clone, Debug, Default, PartialEq, Serialize)]
886#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
887pub struct DescribeDirectConnectGatewayAssociationsRequest {
888    /// <p>The ID of the associated gateway.</p>
889    #[serde(rename = "associatedGatewayId")]
890    #[serde(skip_serializing_if = "Option::is_none")]
891    pub associated_gateway_id: Option<String>,
892    /// <p>The ID of the Direct Connect gateway association.</p>
893    #[serde(rename = "associationId")]
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub association_id: Option<String>,
896    /// <p>The ID of the Direct Connect gateway.</p>
897    #[serde(rename = "directConnectGatewayId")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub direct_connect_gateway_id: Option<String>,
900    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
901    #[serde(rename = "maxResults")]
902    #[serde(skip_serializing_if = "Option::is_none")]
903    pub max_results: Option<i64>,
904    /// <p>The token provided in the previous call to retrieve the next page.</p>
905    #[serde(rename = "nextToken")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub next_token: Option<String>,
908    /// <p>The ID of the virtual private gateway.</p>
909    #[serde(rename = "virtualGatewayId")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub virtual_gateway_id: Option<String>,
912}
913
914#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
915#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
916pub struct DescribeDirectConnectGatewayAssociationsResult {
917    /// <p>Information about the associations.</p>
918    #[serde(rename = "directConnectGatewayAssociations")]
919    #[serde(skip_serializing_if = "Option::is_none")]
920    pub direct_connect_gateway_associations: Option<Vec<DirectConnectGatewayAssociation>>,
921    /// <p>The token to retrieve the next page.</p>
922    #[serde(rename = "nextToken")]
923    #[serde(skip_serializing_if = "Option::is_none")]
924    pub next_token: Option<String>,
925}
926
927#[derive(Clone, Debug, Default, PartialEq, Serialize)]
928#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
929pub struct DescribeDirectConnectGatewayAttachmentsRequest {
930    /// <p>The ID of the Direct Connect gateway.</p>
931    #[serde(rename = "directConnectGatewayId")]
932    #[serde(skip_serializing_if = "Option::is_none")]
933    pub direct_connect_gateway_id: Option<String>,
934    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
935    #[serde(rename = "maxResults")]
936    #[serde(skip_serializing_if = "Option::is_none")]
937    pub max_results: Option<i64>,
938    /// <p>The token provided in the previous call to retrieve the next page.</p>
939    #[serde(rename = "nextToken")]
940    #[serde(skip_serializing_if = "Option::is_none")]
941    pub next_token: Option<String>,
942    /// <p>The ID of the virtual interface.</p>
943    #[serde(rename = "virtualInterfaceId")]
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub virtual_interface_id: Option<String>,
946}
947
948#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
949#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
950pub struct DescribeDirectConnectGatewayAttachmentsResult {
951    /// <p>The attachments.</p>
952    #[serde(rename = "directConnectGatewayAttachments")]
953    #[serde(skip_serializing_if = "Option::is_none")]
954    pub direct_connect_gateway_attachments: Option<Vec<DirectConnectGatewayAttachment>>,
955    /// <p>The token to retrieve the next page.</p>
956    #[serde(rename = "nextToken")]
957    #[serde(skip_serializing_if = "Option::is_none")]
958    pub next_token: Option<String>,
959}
960
961#[derive(Clone, Debug, Default, PartialEq, Serialize)]
962#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
963pub struct DescribeDirectConnectGatewaysRequest {
964    /// <p>The ID of the Direct Connect gateway.</p>
965    #[serde(rename = "directConnectGatewayId")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub direct_connect_gateway_id: Option<String>,
968    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
969    #[serde(rename = "maxResults")]
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub max_results: Option<i64>,
972    /// <p>The token provided in the previous call to retrieve the next page.</p>
973    #[serde(rename = "nextToken")]
974    #[serde(skip_serializing_if = "Option::is_none")]
975    pub next_token: Option<String>,
976}
977
978#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
979#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
980pub struct DescribeDirectConnectGatewaysResult {
981    /// <p>The Direct Connect gateways.</p>
982    #[serde(rename = "directConnectGateways")]
983    #[serde(skip_serializing_if = "Option::is_none")]
984    pub direct_connect_gateways: Option<Vec<DirectConnectGateway>>,
985    /// <p>The token to retrieve the next page.</p>
986    #[serde(rename = "nextToken")]
987    #[serde(skip_serializing_if = "Option::is_none")]
988    pub next_token: Option<String>,
989}
990
991#[derive(Clone, Debug, Default, PartialEq, Serialize)]
992#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
993pub struct DescribeHostedConnectionsRequest {
994    /// <p>The ID of the interconnect or LAG.</p>
995    #[serde(rename = "connectionId")]
996    pub connection_id: String,
997}
998
999#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1000#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1001pub struct DescribeInterconnectLoaRequest {
1002    /// <p>The ID of the interconnect.</p>
1003    #[serde(rename = "interconnectId")]
1004    pub interconnect_id: String,
1005    /// <p>The standard media type for the LOA-CFA document. The only supported value is application/pdf.</p>
1006    #[serde(rename = "loaContentType")]
1007    #[serde(skip_serializing_if = "Option::is_none")]
1008    pub loa_content_type: Option<String>,
1009    /// <p>The name of the service provider who establishes connectivity on your behalf. If you supply this parameter, the LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.</p>
1010    #[serde(rename = "providerName")]
1011    #[serde(skip_serializing_if = "Option::is_none")]
1012    pub provider_name: Option<String>,
1013}
1014
1015#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1016#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1017pub struct DescribeInterconnectLoaResponse {
1018    /// <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA).</p>
1019    #[serde(rename = "loa")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub loa: Option<Loa>,
1022}
1023
1024#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1025#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1026pub struct DescribeInterconnectsRequest {
1027    /// <p>The ID of the interconnect.</p>
1028    #[serde(rename = "interconnectId")]
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    pub interconnect_id: Option<String>,
1031}
1032
1033#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1034#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1035pub struct DescribeLagsRequest {
1036    /// <p>The ID of the LAG.</p>
1037    #[serde(rename = "lagId")]
1038    #[serde(skip_serializing_if = "Option::is_none")]
1039    pub lag_id: Option<String>,
1040}
1041
1042#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1043#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1044pub struct DescribeLoaRequest {
1045    /// <p>The ID of a connection, LAG, or interconnect.</p>
1046    #[serde(rename = "connectionId")]
1047    pub connection_id: String,
1048    /// <p>The standard media type for the LOA-CFA document. The only supported value is application/pdf.</p>
1049    #[serde(rename = "loaContentType")]
1050    #[serde(skip_serializing_if = "Option::is_none")]
1051    pub loa_content_type: Option<String>,
1052    /// <p>The name of the service provider who establishes connectivity on your behalf. If you specify this parameter, the LOA-CFA lists the provider name alongside your company name as the requester of the cross connect.</p>
1053    #[serde(rename = "providerName")]
1054    #[serde(skip_serializing_if = "Option::is_none")]
1055    pub provider_name: Option<String>,
1056}
1057
1058#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1059#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1060pub struct DescribeTagsRequest {
1061    /// <p>The Amazon Resource Names (ARNs) of the resources.</p>
1062    #[serde(rename = "resourceArns")]
1063    pub resource_arns: Vec<String>,
1064}
1065
1066#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1067#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1068pub struct DescribeTagsResponse {
1069    /// <p>Information about the tags.</p>
1070    #[serde(rename = "resourceTags")]
1071    #[serde(skip_serializing_if = "Option::is_none")]
1072    pub resource_tags: Option<Vec<ResourceTag>>,
1073}
1074
1075#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1076#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1077pub struct DescribeVirtualInterfacesRequest {
1078    /// <p>The ID of the connection.</p>
1079    #[serde(rename = "connectionId")]
1080    #[serde(skip_serializing_if = "Option::is_none")]
1081    pub connection_id: Option<String>,
1082    /// <p>The ID of the virtual interface.</p>
1083    #[serde(rename = "virtualInterfaceId")]
1084    #[serde(skip_serializing_if = "Option::is_none")]
1085    pub virtual_interface_id: Option<String>,
1086}
1087
1088/// <p>Information about a Direct Connect gateway, which enables you to connect virtual interfaces and virtual private gateway or transit gateways.</p>
1089#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1090#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1091pub struct DirectConnectGateway {
1092    /// <p>The autonomous system number (ASN) for the Amazon side of the connection.</p>
1093    #[serde(rename = "amazonSideAsn")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub amazon_side_asn: Option<i64>,
1096    /// <p>The ID of the Direct Connect gateway.</p>
1097    #[serde(rename = "directConnectGatewayId")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub direct_connect_gateway_id: Option<String>,
1100    /// <p>The name of the Direct Connect gateway.</p>
1101    #[serde(rename = "directConnectGatewayName")]
1102    #[serde(skip_serializing_if = "Option::is_none")]
1103    pub direct_connect_gateway_name: Option<String>,
1104    /// <p><p>The state of the Direct Connect gateway. The following are the possible values:</p> <ul> <li> <p> <code>pending</code>: The initial state after calling <a>CreateDirectConnectGateway</a>.</p> </li> <li> <p> <code>available</code>: The Direct Connect gateway is ready for use.</p> </li> <li> <p> <code>deleting</code>: The initial state after calling <a>DeleteDirectConnectGateway</a>.</p> </li> <li> <p> <code>deleted</code>: The Direct Connect gateway is deleted and cannot pass traffic.</p> </li> </ul></p>
1105    #[serde(rename = "directConnectGatewayState")]
1106    #[serde(skip_serializing_if = "Option::is_none")]
1107    pub direct_connect_gateway_state: Option<String>,
1108    /// <p>The ID of the AWS account that owns the Direct Connect gateway.</p>
1109    #[serde(rename = "ownerAccount")]
1110    #[serde(skip_serializing_if = "Option::is_none")]
1111    pub owner_account: Option<String>,
1112    /// <p>The error message if the state of an object failed to advance.</p>
1113    #[serde(rename = "stateChangeError")]
1114    #[serde(skip_serializing_if = "Option::is_none")]
1115    pub state_change_error: Option<String>,
1116}
1117
1118/// <p>Information about an association between a Direct Connect gateway and a virtual private gateway or transit gateway.</p>
1119#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1120#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1121pub struct DirectConnectGatewayAssociation {
1122    /// <p>The Amazon VPC prefixes to advertise to the Direct Connect gateway.</p>
1123    #[serde(rename = "allowedPrefixesToDirectConnectGateway")]
1124    #[serde(skip_serializing_if = "Option::is_none")]
1125    pub allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
1126    /// <p>Information about the associated gateway.</p>
1127    #[serde(rename = "associatedGateway")]
1128    #[serde(skip_serializing_if = "Option::is_none")]
1129    pub associated_gateway: Option<AssociatedGateway>,
1130    /// <p>The ID of the Direct Connect gateway association.</p>
1131    #[serde(rename = "associationId")]
1132    #[serde(skip_serializing_if = "Option::is_none")]
1133    pub association_id: Option<String>,
1134    /// <p><p>The state of the association. The following are the possible values:</p> <ul> <li> <p> <code>associating</code>: The initial state after calling <a>CreateDirectConnectGatewayAssociation</a>.</p> </li> <li> <p> <code>associated</code>: The Direct Connect gateway and virtual private gateway or transit gateway are successfully associated and ready to pass traffic.</p> </li> <li> <p> <code>disassociating</code>: The initial state after calling <a>DeleteDirectConnectGatewayAssociation</a>.</p> </li> <li> <p> <code>disassociated</code>: The virtual private gateway or transit gateway is disassociated from the Direct Connect gateway. Traffic flow between the Direct Connect gateway and virtual private gateway or transit gateway is stopped.</p> </li> </ul></p>
1135    #[serde(rename = "associationState")]
1136    #[serde(skip_serializing_if = "Option::is_none")]
1137    pub association_state: Option<String>,
1138    /// <p>The ID of the Direct Connect gateway.</p>
1139    #[serde(rename = "directConnectGatewayId")]
1140    #[serde(skip_serializing_if = "Option::is_none")]
1141    pub direct_connect_gateway_id: Option<String>,
1142    /// <p>The ID of the AWS account that owns the associated gateway.</p>
1143    #[serde(rename = "directConnectGatewayOwnerAccount")]
1144    #[serde(skip_serializing_if = "Option::is_none")]
1145    pub direct_connect_gateway_owner_account: Option<String>,
1146    /// <p>The error message if the state of an object failed to advance.</p>
1147    #[serde(rename = "stateChangeError")]
1148    #[serde(skip_serializing_if = "Option::is_none")]
1149    pub state_change_error: Option<String>,
1150    /// <p>The ID of the virtual private gateway. Applies only to private virtual interfaces.</p>
1151    #[serde(rename = "virtualGatewayId")]
1152    #[serde(skip_serializing_if = "Option::is_none")]
1153    pub virtual_gateway_id: Option<String>,
1154    /// <p>The ID of the AWS account that owns the virtual private gateway.</p>
1155    #[serde(rename = "virtualGatewayOwnerAccount")]
1156    #[serde(skip_serializing_if = "Option::is_none")]
1157    pub virtual_gateway_owner_account: Option<String>,
1158    /// <p>The AWS Region where the virtual private gateway is located.</p>
1159    #[serde(rename = "virtualGatewayRegion")]
1160    #[serde(skip_serializing_if = "Option::is_none")]
1161    pub virtual_gateway_region: Option<String>,
1162}
1163
1164/// <p>Information about the proposal request to attach a virtual private gateway to a Direct Connect gateway. </p>
1165#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1166#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1167pub struct DirectConnectGatewayAssociationProposal {
1168    /// <p>Information about the associated gateway.</p>
1169    #[serde(rename = "associatedGateway")]
1170    #[serde(skip_serializing_if = "Option::is_none")]
1171    pub associated_gateway: Option<AssociatedGateway>,
1172    /// <p>The ID of the Direct Connect gateway.</p>
1173    #[serde(rename = "directConnectGatewayId")]
1174    #[serde(skip_serializing_if = "Option::is_none")]
1175    pub direct_connect_gateway_id: Option<String>,
1176    /// <p>The ID of the AWS account that owns the Direct Connect gateway.</p>
1177    #[serde(rename = "directConnectGatewayOwnerAccount")]
1178    #[serde(skip_serializing_if = "Option::is_none")]
1179    pub direct_connect_gateway_owner_account: Option<String>,
1180    /// <p>The existing Amazon VPC prefixes advertised to the Direct Connect gateway.</p>
1181    #[serde(rename = "existingAllowedPrefixesToDirectConnectGateway")]
1182    #[serde(skip_serializing_if = "Option::is_none")]
1183    pub existing_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
1184    /// <p>The ID of the association proposal.</p>
1185    #[serde(rename = "proposalId")]
1186    #[serde(skip_serializing_if = "Option::is_none")]
1187    pub proposal_id: Option<String>,
1188    /// <p><p>The state of the proposal. The following are possible values:</p> <ul> <li> <p> <code>accepted</code>: The proposal has been accepted. The Direct Connect gateway association is available to use in this state.</p> </li> <li> <p> <code>deleted</code>: The proposal has been deleted by the owner that made the proposal. The Direct Connect gateway association cannot be used in this state.</p> </li> <li> <p> <code>requested</code>: The proposal has been requested. The Direct Connect gateway association cannot be used in this state.</p> </li> </ul></p>
1189    #[serde(rename = "proposalState")]
1190    #[serde(skip_serializing_if = "Option::is_none")]
1191    pub proposal_state: Option<String>,
1192    /// <p>The Amazon VPC prefixes to advertise to the Direct Connect gateway.</p>
1193    #[serde(rename = "requestedAllowedPrefixesToDirectConnectGateway")]
1194    #[serde(skip_serializing_if = "Option::is_none")]
1195    pub requested_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
1196}
1197
1198/// <p>Information about an attachment between a Direct Connect gateway and a virtual interface.</p>
1199#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1200#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1201pub struct DirectConnectGatewayAttachment {
1202    /// <p><p>The state of the attachment. The following are the possible values:</p> <ul> <li> <p> <code>attaching</code>: The initial state after a virtual interface is created using the Direct Connect gateway.</p> </li> <li> <p> <code>attached</code>: The Direct Connect gateway and virtual interface are attached and ready to pass traffic.</p> </li> <li> <p> <code>detaching</code>: The initial state after calling <a>DeleteVirtualInterface</a>.</p> </li> <li> <p> <code>detached</code>: The virtual interface is detached from the Direct Connect gateway. Traffic flow between the Direct Connect gateway and virtual interface is stopped.</p> </li> </ul></p>
1203    #[serde(rename = "attachmentState")]
1204    #[serde(skip_serializing_if = "Option::is_none")]
1205    pub attachment_state: Option<String>,
1206    /// <p>The type of attachment.</p>
1207    #[serde(rename = "attachmentType")]
1208    #[serde(skip_serializing_if = "Option::is_none")]
1209    pub attachment_type: Option<String>,
1210    /// <p>The ID of the Direct Connect gateway.</p>
1211    #[serde(rename = "directConnectGatewayId")]
1212    #[serde(skip_serializing_if = "Option::is_none")]
1213    pub direct_connect_gateway_id: Option<String>,
1214    /// <p>The error message if the state of an object failed to advance.</p>
1215    #[serde(rename = "stateChangeError")]
1216    #[serde(skip_serializing_if = "Option::is_none")]
1217    pub state_change_error: Option<String>,
1218    /// <p>The ID of the virtual interface.</p>
1219    #[serde(rename = "virtualInterfaceId")]
1220    #[serde(skip_serializing_if = "Option::is_none")]
1221    pub virtual_interface_id: Option<String>,
1222    /// <p>The ID of the AWS account that owns the virtual interface.</p>
1223    #[serde(rename = "virtualInterfaceOwnerAccount")]
1224    #[serde(skip_serializing_if = "Option::is_none")]
1225    pub virtual_interface_owner_account: Option<String>,
1226    /// <p>The AWS Region where the virtual interface is located.</p>
1227    #[serde(rename = "virtualInterfaceRegion")]
1228    #[serde(skip_serializing_if = "Option::is_none")]
1229    pub virtual_interface_region: Option<String>,
1230}
1231
1232#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1233#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1234pub struct DisassociateConnectionFromLagRequest {
1235    /// <p>The ID of the connection.</p>
1236    #[serde(rename = "connectionId")]
1237    pub connection_id: String,
1238    /// <p>The ID of the LAG.</p>
1239    #[serde(rename = "lagId")]
1240    pub lag_id: String,
1241}
1242
1243/// <p>Information about an interconnect.</p>
1244#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1245#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1246pub struct Interconnect {
1247    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
1248    #[serde(rename = "awsDevice")]
1249    #[serde(skip_serializing_if = "Option::is_none")]
1250    pub aws_device: Option<String>,
1251    /// <p>The Direct Connect endpoint on which the physical connection terminates.</p>
1252    #[serde(rename = "awsDeviceV2")]
1253    #[serde(skip_serializing_if = "Option::is_none")]
1254    pub aws_device_v2: Option<String>,
1255    /// <p>The bandwidth of the connection.</p>
1256    #[serde(rename = "bandwidth")]
1257    #[serde(skip_serializing_if = "Option::is_none")]
1258    pub bandwidth: Option<String>,
1259    /// <p>Indicates whether the interconnect supports a secondary BGP in the same address family (IPv4/IPv6).</p>
1260    #[serde(rename = "hasLogicalRedundancy")]
1261    #[serde(skip_serializing_if = "Option::is_none")]
1262    pub has_logical_redundancy: Option<String>,
1263    /// <p>The ID of the interconnect.</p>
1264    #[serde(rename = "interconnectId")]
1265    #[serde(skip_serializing_if = "Option::is_none")]
1266    pub interconnect_id: Option<String>,
1267    /// <p>The name of the interconnect.</p>
1268    #[serde(rename = "interconnectName")]
1269    #[serde(skip_serializing_if = "Option::is_none")]
1270    pub interconnect_name: Option<String>,
1271    /// <p><p>The state of the interconnect. The following are the possible values:</p> <ul> <li> <p> <code>requested</code>: The initial state of an interconnect. The interconnect stays in the requested state until the Letter of Authorization (LOA) is sent to the customer.</p> </li> <li> <p> <code>pending</code>: The interconnect is approved, and is being initialized.</p> </li> <li> <p> <code>available</code>: The network link is up, and the interconnect is ready for use.</p> </li> <li> <p> <code>down</code>: The network link is down.</p> </li> <li> <p> <code>deleting</code>: The interconnect is being deleted.</p> </li> <li> <p> <code>deleted</code>: The interconnect is deleted.</p> </li> <li> <p> <code>unknown</code>: The state of the interconnect is not available.</p> </li> </ul></p>
1272    #[serde(rename = "interconnectState")]
1273    #[serde(skip_serializing_if = "Option::is_none")]
1274    pub interconnect_state: Option<String>,
1275    /// <p>Indicates whether jumbo frames (9001 MTU) are supported.</p>
1276    #[serde(rename = "jumboFrameCapable")]
1277    #[serde(skip_serializing_if = "Option::is_none")]
1278    pub jumbo_frame_capable: Option<bool>,
1279    /// <p>The ID of the LAG.</p>
1280    #[serde(rename = "lagId")]
1281    #[serde(skip_serializing_if = "Option::is_none")]
1282    pub lag_id: Option<String>,
1283    /// <p>The time of the most recent call to <a>DescribeLoa</a> for this connection.</p>
1284    #[serde(rename = "loaIssueTime")]
1285    #[serde(skip_serializing_if = "Option::is_none")]
1286    pub loa_issue_time: Option<f64>,
1287    /// <p>The location of the connection.</p>
1288    #[serde(rename = "location")]
1289    #[serde(skip_serializing_if = "Option::is_none")]
1290    pub location: Option<String>,
1291    /// <p>The name of the service provider associated with the interconnect.</p>
1292    #[serde(rename = "providerName")]
1293    #[serde(skip_serializing_if = "Option::is_none")]
1294    pub provider_name: Option<String>,
1295    /// <p>The AWS Region where the connection is located.</p>
1296    #[serde(rename = "region")]
1297    #[serde(skip_serializing_if = "Option::is_none")]
1298    pub region: Option<String>,
1299    /// <p>The tags associated with the interconnect.</p>
1300    #[serde(rename = "tags")]
1301    #[serde(skip_serializing_if = "Option::is_none")]
1302    pub tags: Option<Vec<Tag>>,
1303}
1304
1305#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1306#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1307pub struct Interconnects {
1308    /// <p>The interconnects.</p>
1309    #[serde(rename = "interconnects")]
1310    #[serde(skip_serializing_if = "Option::is_none")]
1311    pub interconnects: Option<Vec<Interconnect>>,
1312}
1313
1314/// <p>Information about a link aggregation group (LAG).</p>
1315#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1316#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1317pub struct Lag {
1318    /// <p>Indicates whether the LAG can host other connections.</p>
1319    #[serde(rename = "allowsHostedConnections")]
1320    #[serde(skip_serializing_if = "Option::is_none")]
1321    pub allows_hosted_connections: Option<bool>,
1322    /// <p>The AWS Direct Connect endpoint that hosts the LAG.</p>
1323    #[serde(rename = "awsDevice")]
1324    #[serde(skip_serializing_if = "Option::is_none")]
1325    pub aws_device: Option<String>,
1326    /// <p>The AWS Direct Connect endpoint that hosts the LAG.</p>
1327    #[serde(rename = "awsDeviceV2")]
1328    #[serde(skip_serializing_if = "Option::is_none")]
1329    pub aws_device_v2: Option<String>,
1330    /// <p>The connections bundled by the LAG.</p>
1331    #[serde(rename = "connections")]
1332    #[serde(skip_serializing_if = "Option::is_none")]
1333    pub connections: Option<Vec<Connection>>,
1334    /// <p>The individual bandwidth of the physical connections bundled by the LAG. The possible values are 1Gbps and 10Gbps. </p>
1335    #[serde(rename = "connectionsBandwidth")]
1336    #[serde(skip_serializing_if = "Option::is_none")]
1337    pub connections_bandwidth: Option<String>,
1338    /// <p>Indicates whether the LAG supports a secondary BGP peer in the same address family (IPv4/IPv6).</p>
1339    #[serde(rename = "hasLogicalRedundancy")]
1340    #[serde(skip_serializing_if = "Option::is_none")]
1341    pub has_logical_redundancy: Option<String>,
1342    /// <p>Indicates whether jumbo frames (9001 MTU) are supported.</p>
1343    #[serde(rename = "jumboFrameCapable")]
1344    #[serde(skip_serializing_if = "Option::is_none")]
1345    pub jumbo_frame_capable: Option<bool>,
1346    /// <p>The ID of the LAG.</p>
1347    #[serde(rename = "lagId")]
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    pub lag_id: Option<String>,
1350    /// <p>The name of the LAG.</p>
1351    #[serde(rename = "lagName")]
1352    #[serde(skip_serializing_if = "Option::is_none")]
1353    pub lag_name: Option<String>,
1354    /// <p><p>The state of the LAG. The following are the possible values:</p> <ul> <li> <p> <code>requested</code>: The initial state of a LAG. The LAG stays in the requested state until the Letter of Authorization (LOA) is available.</p> </li> <li> <p> <code>pending</code>: The LAG has been approved and is being initialized.</p> </li> <li> <p> <code>available</code>: The network link is established and the LAG is ready for use.</p> </li> <li> <p> <code>down</code>: The network link is down.</p> </li> <li> <p> <code>deleting</code>: The LAG is being deleted.</p> </li> <li> <p> <code>deleted</code>: The LAG is deleted.</p> </li> <li> <p> <code>unknown</code>: The state of the LAG is not available.</p> </li> </ul></p>
1355    #[serde(rename = "lagState")]
1356    #[serde(skip_serializing_if = "Option::is_none")]
1357    pub lag_state: Option<String>,
1358    /// <p>The location of the LAG.</p>
1359    #[serde(rename = "location")]
1360    #[serde(skip_serializing_if = "Option::is_none")]
1361    pub location: Option<String>,
1362    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
1363    #[serde(rename = "minimumLinks")]
1364    #[serde(skip_serializing_if = "Option::is_none")]
1365    pub minimum_links: Option<i64>,
1366    /// <p>The number of physical connections bundled by the LAG, up to a maximum of 10.</p>
1367    #[serde(rename = "numberOfConnections")]
1368    #[serde(skip_serializing_if = "Option::is_none")]
1369    pub number_of_connections: Option<i64>,
1370    /// <p>The ID of the AWS account that owns the LAG.</p>
1371    #[serde(rename = "ownerAccount")]
1372    #[serde(skip_serializing_if = "Option::is_none")]
1373    pub owner_account: Option<String>,
1374    /// <p>The name of the service provider associated with the LAG.</p>
1375    #[serde(rename = "providerName")]
1376    #[serde(skip_serializing_if = "Option::is_none")]
1377    pub provider_name: Option<String>,
1378    /// <p>The AWS Region where the connection is located.</p>
1379    #[serde(rename = "region")]
1380    #[serde(skip_serializing_if = "Option::is_none")]
1381    pub region: Option<String>,
1382    /// <p>The tags associated with the LAG.</p>
1383    #[serde(rename = "tags")]
1384    #[serde(skip_serializing_if = "Option::is_none")]
1385    pub tags: Option<Vec<Tag>>,
1386}
1387
1388#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1389#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1390pub struct Lags {
1391    /// <p>The LAGs.</p>
1392    #[serde(rename = "lags")]
1393    #[serde(skip_serializing_if = "Option::is_none")]
1394    pub lags: Option<Vec<Lag>>,
1395}
1396
1397#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1398#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1399pub struct ListVirtualInterfaceTestHistoryRequest {
1400    /// <p>The BGP peers that were placed in the DOWN state during the virtual interface failover test.</p>
1401    #[serde(rename = "bgpPeers")]
1402    #[serde(skip_serializing_if = "Option::is_none")]
1403    pub bgp_peers: Option<Vec<String>>,
1404    /// <p>The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned <code>nextToken</code> value.</p> <p>If <code>MaxResults</code> is given a value larger than 100, only 100 results are returned.</p>
1405    #[serde(rename = "maxResults")]
1406    #[serde(skip_serializing_if = "Option::is_none")]
1407    pub max_results: Option<i64>,
1408    /// <p>The token for the next page of results.</p>
1409    #[serde(rename = "nextToken")]
1410    #[serde(skip_serializing_if = "Option::is_none")]
1411    pub next_token: Option<String>,
1412    /// <p>The status of the virtual interface failover test.</p>
1413    #[serde(rename = "status")]
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    pub status: Option<String>,
1416    /// <p>The ID of the virtual interface failover test.</p>
1417    #[serde(rename = "testId")]
1418    #[serde(skip_serializing_if = "Option::is_none")]
1419    pub test_id: Option<String>,
1420    /// <p>The ID of the virtual interface that was tested.</p>
1421    #[serde(rename = "virtualInterfaceId")]
1422    #[serde(skip_serializing_if = "Option::is_none")]
1423    pub virtual_interface_id: Option<String>,
1424}
1425
1426#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1427#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1428pub struct ListVirtualInterfaceTestHistoryResponse {
1429    /// <p>The token to use to retrieve the next page of results. This value is <code>null</code> when there are no more results to return.</p>
1430    #[serde(rename = "nextToken")]
1431    #[serde(skip_serializing_if = "Option::is_none")]
1432    pub next_token: Option<String>,
1433    /// <p>The ID of the tested virtual interface.</p>
1434    #[serde(rename = "virtualInterfaceTestHistory")]
1435    #[serde(skip_serializing_if = "Option::is_none")]
1436    pub virtual_interface_test_history: Option<Vec<VirtualInterfaceTestHistory>>,
1437}
1438
1439/// <p>Information about a Letter of Authorization - Connecting Facility Assignment (LOA-CFA) for a connection.</p>
1440#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1441#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1442pub struct Loa {
1443    /// <p>The binary contents of the LOA-CFA document.</p>
1444    #[serde(rename = "loaContent")]
1445    #[serde(
1446        deserialize_with = "::rusoto_core::serialization::SerdeBlob::deserialize_blob",
1447        serialize_with = "::rusoto_core::serialization::SerdeBlob::serialize_blob",
1448        default
1449    )]
1450    #[serde(skip_serializing_if = "Option::is_none")]
1451    pub loa_content: Option<bytes::Bytes>,
1452    /// <p>The standard media type for the LOA-CFA document. The only supported value is application/pdf.</p>
1453    #[serde(rename = "loaContentType")]
1454    #[serde(skip_serializing_if = "Option::is_none")]
1455    pub loa_content_type: Option<String>,
1456}
1457
1458/// <p>Information about an AWS Direct Connect location.</p>
1459#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1460#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1461pub struct Location {
1462    /// <p>The available port speeds for the location.</p>
1463    #[serde(rename = "availablePortSpeeds")]
1464    #[serde(skip_serializing_if = "Option::is_none")]
1465    pub available_port_speeds: Option<Vec<String>>,
1466    /// <p>The name of the service provider for the location.</p>
1467    #[serde(rename = "availableProviders")]
1468    #[serde(skip_serializing_if = "Option::is_none")]
1469    pub available_providers: Option<Vec<String>>,
1470    /// <p>The code for the location.</p>
1471    #[serde(rename = "locationCode")]
1472    #[serde(skip_serializing_if = "Option::is_none")]
1473    pub location_code: Option<String>,
1474    /// <p>The name of the location. This includes the name of the colocation partner and the physical site of the building.</p>
1475    #[serde(rename = "locationName")]
1476    #[serde(skip_serializing_if = "Option::is_none")]
1477    pub location_name: Option<String>,
1478    /// <p>The AWS Region for the location.</p>
1479    #[serde(rename = "region")]
1480    #[serde(skip_serializing_if = "Option::is_none")]
1481    pub region: Option<String>,
1482}
1483
1484#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1485#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1486pub struct Locations {
1487    /// <p>The locations.</p>
1488    #[serde(rename = "locations")]
1489    #[serde(skip_serializing_if = "Option::is_none")]
1490    pub locations: Option<Vec<Location>>,
1491}
1492
1493/// <p>Information about a new BGP peer.</p>
1494#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1495#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1496pub struct NewBGPPeer {
1497    /// <p>The address family for the BGP peer.</p>
1498    #[serde(rename = "addressFamily")]
1499    #[serde(skip_serializing_if = "Option::is_none")]
1500    pub address_family: Option<String>,
1501    /// <p>The IP address assigned to the Amazon interface.</p>
1502    #[serde(rename = "amazonAddress")]
1503    #[serde(skip_serializing_if = "Option::is_none")]
1504    pub amazon_address: Option<String>,
1505    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p>
1506    #[serde(rename = "asn")]
1507    #[serde(skip_serializing_if = "Option::is_none")]
1508    pub asn: Option<i64>,
1509    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1510    #[serde(rename = "authKey")]
1511    #[serde(skip_serializing_if = "Option::is_none")]
1512    pub auth_key: Option<String>,
1513    /// <p>The IP address assigned to the customer interface.</p>
1514    #[serde(rename = "customerAddress")]
1515    #[serde(skip_serializing_if = "Option::is_none")]
1516    pub customer_address: Option<String>,
1517}
1518
1519/// <p>Information about a private virtual interface.</p>
1520#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1521#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1522pub struct NewPrivateVirtualInterface {
1523    /// <p>The address family for the BGP peer.</p>
1524    #[serde(rename = "addressFamily")]
1525    #[serde(skip_serializing_if = "Option::is_none")]
1526    pub address_family: Option<String>,
1527    /// <p>The IP address assigned to the Amazon interface.</p>
1528    #[serde(rename = "amazonAddress")]
1529    #[serde(skip_serializing_if = "Option::is_none")]
1530    pub amazon_address: Option<String>,
1531    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1532    #[serde(rename = "asn")]
1533    pub asn: i64,
1534    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1535    #[serde(rename = "authKey")]
1536    #[serde(skip_serializing_if = "Option::is_none")]
1537    pub auth_key: Option<String>,
1538    /// <p>The IP address assigned to the customer interface.</p>
1539    #[serde(rename = "customerAddress")]
1540    #[serde(skip_serializing_if = "Option::is_none")]
1541    pub customer_address: Option<String>,
1542    /// <p>The ID of the Direct Connect gateway.</p>
1543    #[serde(rename = "directConnectGatewayId")]
1544    #[serde(skip_serializing_if = "Option::is_none")]
1545    pub direct_connect_gateway_id: Option<String>,
1546    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.</p>
1547    #[serde(rename = "mtu")]
1548    #[serde(skip_serializing_if = "Option::is_none")]
1549    pub mtu: Option<i64>,
1550    /// <p>The tags associated with the private virtual interface.</p>
1551    #[serde(rename = "tags")]
1552    #[serde(skip_serializing_if = "Option::is_none")]
1553    pub tags: Option<Vec<Tag>>,
1554    /// <p>The ID of the virtual private gateway.</p>
1555    #[serde(rename = "virtualGatewayId")]
1556    #[serde(skip_serializing_if = "Option::is_none")]
1557    pub virtual_gateway_id: Option<String>,
1558    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1559    #[serde(rename = "virtualInterfaceName")]
1560    pub virtual_interface_name: String,
1561    /// <p>The ID of the VLAN.</p>
1562    #[serde(rename = "vlan")]
1563    pub vlan: i64,
1564}
1565
1566/// <p>Information about a private virtual interface to be provisioned on a connection.</p>
1567#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1568#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1569pub struct NewPrivateVirtualInterfaceAllocation {
1570    /// <p>The address family for the BGP peer.</p>
1571    #[serde(rename = "addressFamily")]
1572    #[serde(skip_serializing_if = "Option::is_none")]
1573    pub address_family: Option<String>,
1574    /// <p>The IP address assigned to the Amazon interface.</p>
1575    #[serde(rename = "amazonAddress")]
1576    #[serde(skip_serializing_if = "Option::is_none")]
1577    pub amazon_address: Option<String>,
1578    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1579    #[serde(rename = "asn")]
1580    pub asn: i64,
1581    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1582    #[serde(rename = "authKey")]
1583    #[serde(skip_serializing_if = "Option::is_none")]
1584    pub auth_key: Option<String>,
1585    /// <p>The IP address assigned to the customer interface.</p>
1586    #[serde(rename = "customerAddress")]
1587    #[serde(skip_serializing_if = "Option::is_none")]
1588    pub customer_address: Option<String>,
1589    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.</p>
1590    #[serde(rename = "mtu")]
1591    #[serde(skip_serializing_if = "Option::is_none")]
1592    pub mtu: Option<i64>,
1593    /// <p>The tags associated with the private virtual interface.</p>
1594    #[serde(rename = "tags")]
1595    #[serde(skip_serializing_if = "Option::is_none")]
1596    pub tags: Option<Vec<Tag>>,
1597    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1598    #[serde(rename = "virtualInterfaceName")]
1599    pub virtual_interface_name: String,
1600    /// <p>The ID of the VLAN.</p>
1601    #[serde(rename = "vlan")]
1602    pub vlan: i64,
1603}
1604
1605/// <p>Information about a public virtual interface.</p>
1606#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1607#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1608pub struct NewPublicVirtualInterface {
1609    /// <p>The address family for the BGP peer.</p>
1610    #[serde(rename = "addressFamily")]
1611    #[serde(skip_serializing_if = "Option::is_none")]
1612    pub address_family: Option<String>,
1613    /// <p>The IP address assigned to the Amazon interface.</p>
1614    #[serde(rename = "amazonAddress")]
1615    #[serde(skip_serializing_if = "Option::is_none")]
1616    pub amazon_address: Option<String>,
1617    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1618    #[serde(rename = "asn")]
1619    pub asn: i64,
1620    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1621    #[serde(rename = "authKey")]
1622    #[serde(skip_serializing_if = "Option::is_none")]
1623    pub auth_key: Option<String>,
1624    /// <p>The IP address assigned to the customer interface.</p>
1625    #[serde(rename = "customerAddress")]
1626    #[serde(skip_serializing_if = "Option::is_none")]
1627    pub customer_address: Option<String>,
1628    /// <p>The routes to be advertised to the AWS network in this Region. Applies to public virtual interfaces.</p>
1629    #[serde(rename = "routeFilterPrefixes")]
1630    #[serde(skip_serializing_if = "Option::is_none")]
1631    pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
1632    /// <p>The tags associated with the public virtual interface.</p>
1633    #[serde(rename = "tags")]
1634    #[serde(skip_serializing_if = "Option::is_none")]
1635    pub tags: Option<Vec<Tag>>,
1636    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1637    #[serde(rename = "virtualInterfaceName")]
1638    pub virtual_interface_name: String,
1639    /// <p>The ID of the VLAN.</p>
1640    #[serde(rename = "vlan")]
1641    pub vlan: i64,
1642}
1643
1644/// <p>Information about a public virtual interface to be provisioned on a connection.</p>
1645#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1646#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1647pub struct NewPublicVirtualInterfaceAllocation {
1648    /// <p>The address family for the BGP peer.</p>
1649    #[serde(rename = "addressFamily")]
1650    #[serde(skip_serializing_if = "Option::is_none")]
1651    pub address_family: Option<String>,
1652    /// <p>The IP address assigned to the Amazon interface.</p>
1653    #[serde(rename = "amazonAddress")]
1654    #[serde(skip_serializing_if = "Option::is_none")]
1655    pub amazon_address: Option<String>,
1656    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1657    #[serde(rename = "asn")]
1658    pub asn: i64,
1659    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1660    #[serde(rename = "authKey")]
1661    #[serde(skip_serializing_if = "Option::is_none")]
1662    pub auth_key: Option<String>,
1663    /// <p>The IP address assigned to the customer interface.</p>
1664    #[serde(rename = "customerAddress")]
1665    #[serde(skip_serializing_if = "Option::is_none")]
1666    pub customer_address: Option<String>,
1667    /// <p>The routes to be advertised to the AWS network in this Region. Applies to public virtual interfaces.</p>
1668    #[serde(rename = "routeFilterPrefixes")]
1669    #[serde(skip_serializing_if = "Option::is_none")]
1670    pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
1671    /// <p>The tags associated with the public virtual interface.</p>
1672    #[serde(rename = "tags")]
1673    #[serde(skip_serializing_if = "Option::is_none")]
1674    pub tags: Option<Vec<Tag>>,
1675    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1676    #[serde(rename = "virtualInterfaceName")]
1677    pub virtual_interface_name: String,
1678    /// <p>The ID of the VLAN.</p>
1679    #[serde(rename = "vlan")]
1680    pub vlan: i64,
1681}
1682
1683/// <p>Information about a transit virtual interface.</p>
1684#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1685#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1686pub struct NewTransitVirtualInterface {
1687    /// <p>The address family for the BGP peer.</p>
1688    #[serde(rename = "addressFamily")]
1689    #[serde(skip_serializing_if = "Option::is_none")]
1690    pub address_family: Option<String>,
1691    /// <p>The IP address assigned to the Amazon interface.</p>
1692    #[serde(rename = "amazonAddress")]
1693    #[serde(skip_serializing_if = "Option::is_none")]
1694    pub amazon_address: Option<String>,
1695    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1696    #[serde(rename = "asn")]
1697    #[serde(skip_serializing_if = "Option::is_none")]
1698    pub asn: Option<i64>,
1699    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1700    #[serde(rename = "authKey")]
1701    #[serde(skip_serializing_if = "Option::is_none")]
1702    pub auth_key: Option<String>,
1703    /// <p>The IP address assigned to the customer interface.</p>
1704    #[serde(rename = "customerAddress")]
1705    #[serde(skip_serializing_if = "Option::is_none")]
1706    pub customer_address: Option<String>,
1707    /// <p>The ID of the Direct Connect gateway.</p>
1708    #[serde(rename = "directConnectGatewayId")]
1709    #[serde(skip_serializing_if = "Option::is_none")]
1710    pub direct_connect_gateway_id: Option<String>,
1711    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.</p>
1712    #[serde(rename = "mtu")]
1713    #[serde(skip_serializing_if = "Option::is_none")]
1714    pub mtu: Option<i64>,
1715    /// <p>The tags associated with the transitive virtual interface.</p>
1716    #[serde(rename = "tags")]
1717    #[serde(skip_serializing_if = "Option::is_none")]
1718    pub tags: Option<Vec<Tag>>,
1719    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1720    #[serde(rename = "virtualInterfaceName")]
1721    #[serde(skip_serializing_if = "Option::is_none")]
1722    pub virtual_interface_name: Option<String>,
1723    /// <p>The ID of the VLAN.</p>
1724    #[serde(rename = "vlan")]
1725    #[serde(skip_serializing_if = "Option::is_none")]
1726    pub vlan: Option<i64>,
1727}
1728
1729/// <p>Information about a transit virtual interface to be provisioned on a connection.</p>
1730#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1731#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1732pub struct NewTransitVirtualInterfaceAllocation {
1733    /// <p>The address family for the BGP peer.</p>
1734    #[serde(rename = "addressFamily")]
1735    #[serde(skip_serializing_if = "Option::is_none")]
1736    pub address_family: Option<String>,
1737    /// <p>The IP address assigned to the Amazon interface.</p>
1738    #[serde(rename = "amazonAddress")]
1739    #[serde(skip_serializing_if = "Option::is_none")]
1740    pub amazon_address: Option<String>,
1741    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1742    #[serde(rename = "asn")]
1743    #[serde(skip_serializing_if = "Option::is_none")]
1744    pub asn: Option<i64>,
1745    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1746    #[serde(rename = "authKey")]
1747    #[serde(skip_serializing_if = "Option::is_none")]
1748    pub auth_key: Option<String>,
1749    /// <p>The IP address assigned to the customer interface.</p>
1750    #[serde(rename = "customerAddress")]
1751    #[serde(skip_serializing_if = "Option::is_none")]
1752    pub customer_address: Option<String>,
1753    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500. </p>
1754    #[serde(rename = "mtu")]
1755    #[serde(skip_serializing_if = "Option::is_none")]
1756    pub mtu: Option<i64>,
1757    /// <p>The tags associated with the transitive virtual interface.</p>
1758    #[serde(rename = "tags")]
1759    #[serde(skip_serializing_if = "Option::is_none")]
1760    pub tags: Option<Vec<Tag>>,
1761    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
1762    #[serde(rename = "virtualInterfaceName")]
1763    #[serde(skip_serializing_if = "Option::is_none")]
1764    pub virtual_interface_name: Option<String>,
1765    /// <p>The ID of the VLAN.</p>
1766    #[serde(rename = "vlan")]
1767    #[serde(skip_serializing_if = "Option::is_none")]
1768    pub vlan: Option<i64>,
1769}
1770
1771/// <p>Information about a tag associated with an AWS Direct Connect resource.</p>
1772#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1773#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1774pub struct ResourceTag {
1775    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
1776    #[serde(rename = "resourceArn")]
1777    #[serde(skip_serializing_if = "Option::is_none")]
1778    pub resource_arn: Option<String>,
1779    /// <p>The tags.</p>
1780    #[serde(rename = "tags")]
1781    #[serde(skip_serializing_if = "Option::is_none")]
1782    pub tags: Option<Vec<Tag>>,
1783}
1784
1785/// <p>Information about a route filter prefix that a customer can advertise through Border Gateway Protocol (BGP) over a public virtual interface.</p>
1786#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1787pub struct RouteFilterPrefix {
1788    /// <p>The CIDR block for the advertised route. Separate multiple routes using commas. An IPv6 CIDR must use /64 or shorter.</p>
1789    #[serde(rename = "cidr")]
1790    #[serde(skip_serializing_if = "Option::is_none")]
1791    pub cidr: Option<String>,
1792}
1793
1794#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1795#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1796pub struct StartBgpFailoverTestRequest {
1797    /// <p>The BGP peers to place in the DOWN state.</p>
1798    #[serde(rename = "bgpPeers")]
1799    #[serde(skip_serializing_if = "Option::is_none")]
1800    pub bgp_peers: Option<Vec<String>>,
1801    /// <p>The time in minutes that the virtual interface failover test will last.</p> <p>Maximum value: 180 minutes (3 hours).</p> <p>Default: 180 minutes (3 hours).</p>
1802    #[serde(rename = "testDurationInMinutes")]
1803    #[serde(skip_serializing_if = "Option::is_none")]
1804    pub test_duration_in_minutes: Option<i64>,
1805    /// <p>The ID of the virtual interface you want to test.</p>
1806    #[serde(rename = "virtualInterfaceId")]
1807    pub virtual_interface_id: String,
1808}
1809
1810#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1811#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1812pub struct StartBgpFailoverTestResponse {
1813    /// <p>Information about the virtual interface failover test.</p>
1814    #[serde(rename = "virtualInterfaceTest")]
1815    #[serde(skip_serializing_if = "Option::is_none")]
1816    pub virtual_interface_test: Option<VirtualInterfaceTestHistory>,
1817}
1818
1819#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1820#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1821pub struct StopBgpFailoverTestRequest {
1822    /// <p>The ID of the virtual interface you no longer want to test.</p>
1823    #[serde(rename = "virtualInterfaceId")]
1824    pub virtual_interface_id: String,
1825}
1826
1827#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1828#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1829pub struct StopBgpFailoverTestResponse {
1830    /// <p>Information about the virtual interface failover test.</p>
1831    #[serde(rename = "virtualInterfaceTest")]
1832    #[serde(skip_serializing_if = "Option::is_none")]
1833    pub virtual_interface_test: Option<VirtualInterfaceTestHistory>,
1834}
1835
1836/// <p>Information about a tag.</p>
1837#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1838pub struct Tag {
1839    /// <p>The key.</p>
1840    #[serde(rename = "key")]
1841    pub key: String,
1842    /// <p>The value.</p>
1843    #[serde(rename = "value")]
1844    #[serde(skip_serializing_if = "Option::is_none")]
1845    pub value: Option<String>,
1846}
1847
1848#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1849#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1850pub struct TagResourceRequest {
1851    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
1852    #[serde(rename = "resourceArn")]
1853    pub resource_arn: String,
1854    /// <p>The tags to add.</p>
1855    #[serde(rename = "tags")]
1856    pub tags: Vec<Tag>,
1857}
1858
1859#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1860#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1861pub struct TagResourceResponse {}
1862
1863#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1864#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1865pub struct UntagResourceRequest {
1866    /// <p>The Amazon Resource Name (ARN) of the resource.</p>
1867    #[serde(rename = "resourceArn")]
1868    pub resource_arn: String,
1869    /// <p>The tag keys of the tags to remove.</p>
1870    #[serde(rename = "tagKeys")]
1871    pub tag_keys: Vec<String>,
1872}
1873
1874#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1875#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1876pub struct UntagResourceResponse {}
1877
1878#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1879#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1880pub struct UpdateDirectConnectGatewayAssociationRequest {
1881    /// <p>The Amazon VPC prefixes to advertise to the Direct Connect gateway.</p>
1882    #[serde(rename = "addAllowedPrefixesToDirectConnectGateway")]
1883    #[serde(skip_serializing_if = "Option::is_none")]
1884    pub add_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
1885    /// <p>The ID of the Direct Connect gateway association.</p>
1886    #[serde(rename = "associationId")]
1887    #[serde(skip_serializing_if = "Option::is_none")]
1888    pub association_id: Option<String>,
1889    /// <p>The Amazon VPC prefixes to no longer advertise to the Direct Connect gateway.</p>
1890    #[serde(rename = "removeAllowedPrefixesToDirectConnectGateway")]
1891    #[serde(skip_serializing_if = "Option::is_none")]
1892    pub remove_allowed_prefixes_to_direct_connect_gateway: Option<Vec<RouteFilterPrefix>>,
1893}
1894
1895#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1896#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1897pub struct UpdateDirectConnectGatewayAssociationResult {
1898    #[serde(rename = "directConnectGatewayAssociation")]
1899    #[serde(skip_serializing_if = "Option::is_none")]
1900    pub direct_connect_gateway_association: Option<DirectConnectGatewayAssociation>,
1901}
1902
1903#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1904#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1905pub struct UpdateLagRequest {
1906    /// <p>The ID of the LAG.</p>
1907    #[serde(rename = "lagId")]
1908    pub lag_id: String,
1909    /// <p>The name of the LAG.</p>
1910    #[serde(rename = "lagName")]
1911    #[serde(skip_serializing_if = "Option::is_none")]
1912    pub lag_name: Option<String>,
1913    /// <p>The minimum number of physical connections that must be operational for the LAG itself to be operational.</p>
1914    #[serde(rename = "minimumLinks")]
1915    #[serde(skip_serializing_if = "Option::is_none")]
1916    pub minimum_links: Option<i64>,
1917}
1918
1919#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1920#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1921pub struct UpdateVirtualInterfaceAttributesRequest {
1922    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.</p>
1923    #[serde(rename = "mtu")]
1924    #[serde(skip_serializing_if = "Option::is_none")]
1925    pub mtu: Option<i64>,
1926    /// <p>The ID of the virtual private interface.</p>
1927    #[serde(rename = "virtualInterfaceId")]
1928    pub virtual_interface_id: String,
1929}
1930
1931/// <p>Information about a virtual private gateway for a private virtual interface.</p>
1932#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1933#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1934pub struct VirtualGateway {
1935    /// <p>The ID of the virtual private gateway.</p>
1936    #[serde(rename = "virtualGatewayId")]
1937    #[serde(skip_serializing_if = "Option::is_none")]
1938    pub virtual_gateway_id: Option<String>,
1939    /// <p><p>The state of the virtual private gateway. The following are the possible values:</p> <ul> <li> <p> <code>pending</code>: Initial state after creating the virtual private gateway.</p> </li> <li> <p> <code>available</code>: Ready for use by a private virtual interface.</p> </li> <li> <p> <code>deleting</code>: Initial state after deleting the virtual private gateway.</p> </li> <li> <p> <code>deleted</code>: The virtual private gateway is deleted. The private virtual interface is unable to send traffic over this gateway.</p> </li> </ul></p>
1940    #[serde(rename = "virtualGatewayState")]
1941    #[serde(skip_serializing_if = "Option::is_none")]
1942    pub virtual_gateway_state: Option<String>,
1943}
1944
1945#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1946#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1947pub struct VirtualGateways {
1948    /// <p>The virtual private gateways.</p>
1949    #[serde(rename = "virtualGateways")]
1950    #[serde(skip_serializing_if = "Option::is_none")]
1951    pub virtual_gateways: Option<Vec<VirtualGateway>>,
1952}
1953
1954/// <p>Information about a virtual interface.</p>
1955#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1956#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1957pub struct VirtualInterface {
1958    /// <p>The address family for the BGP peer.</p>
1959    #[serde(rename = "addressFamily")]
1960    #[serde(skip_serializing_if = "Option::is_none")]
1961    pub address_family: Option<String>,
1962    /// <p>The IP address assigned to the Amazon interface.</p>
1963    #[serde(rename = "amazonAddress")]
1964    #[serde(skip_serializing_if = "Option::is_none")]
1965    pub amazon_address: Option<String>,
1966    /// <p>The autonomous system number (ASN) for the Amazon side of the connection.</p>
1967    #[serde(rename = "amazonSideAsn")]
1968    #[serde(skip_serializing_if = "Option::is_none")]
1969    pub amazon_side_asn: Option<i64>,
1970    /// <p>The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.</p> <p>The valid values are 1-2147483647.</p>
1971    #[serde(rename = "asn")]
1972    #[serde(skip_serializing_if = "Option::is_none")]
1973    pub asn: Option<i64>,
1974    /// <p>The authentication key for BGP configuration. This string has a minimum length of 6 characters and and a maximun lenth of 80 characters.</p>
1975    #[serde(rename = "authKey")]
1976    #[serde(skip_serializing_if = "Option::is_none")]
1977    pub auth_key: Option<String>,
1978    /// <p>The Direct Connect endpoint on which the virtual interface terminates.</p>
1979    #[serde(rename = "awsDeviceV2")]
1980    #[serde(skip_serializing_if = "Option::is_none")]
1981    pub aws_device_v2: Option<String>,
1982    /// <p>The BGP peers configured on this virtual interface.</p>
1983    #[serde(rename = "bgpPeers")]
1984    #[serde(skip_serializing_if = "Option::is_none")]
1985    pub bgp_peers: Option<Vec<BGPPeer>>,
1986    /// <p>The ID of the connection.</p>
1987    #[serde(rename = "connectionId")]
1988    #[serde(skip_serializing_if = "Option::is_none")]
1989    pub connection_id: Option<String>,
1990    /// <p>The IP address assigned to the customer interface.</p>
1991    #[serde(rename = "customerAddress")]
1992    #[serde(skip_serializing_if = "Option::is_none")]
1993    pub customer_address: Option<String>,
1994    /// <p>The customer router configuration.</p>
1995    #[serde(rename = "customerRouterConfig")]
1996    #[serde(skip_serializing_if = "Option::is_none")]
1997    pub customer_router_config: Option<String>,
1998    /// <p>The ID of the Direct Connect gateway.</p>
1999    #[serde(rename = "directConnectGatewayId")]
2000    #[serde(skip_serializing_if = "Option::is_none")]
2001    pub direct_connect_gateway_id: Option<String>,
2002    /// <p>Indicates whether jumbo frames (9001 MTU) are supported.</p>
2003    #[serde(rename = "jumboFrameCapable")]
2004    #[serde(skip_serializing_if = "Option::is_none")]
2005    pub jumbo_frame_capable: Option<bool>,
2006    /// <p>The location of the connection.</p>
2007    #[serde(rename = "location")]
2008    #[serde(skip_serializing_if = "Option::is_none")]
2009    pub location: Option<String>,
2010    /// <p>The maximum transmission unit (MTU), in bytes. The supported values are 1500 and 9001. The default value is 1500.</p>
2011    #[serde(rename = "mtu")]
2012    #[serde(skip_serializing_if = "Option::is_none")]
2013    pub mtu: Option<i64>,
2014    /// <p>The ID of the AWS account that owns the virtual interface.</p>
2015    #[serde(rename = "ownerAccount")]
2016    #[serde(skip_serializing_if = "Option::is_none")]
2017    pub owner_account: Option<String>,
2018    /// <p>The AWS Region where the virtual interface is located.</p>
2019    #[serde(rename = "region")]
2020    #[serde(skip_serializing_if = "Option::is_none")]
2021    pub region: Option<String>,
2022    /// <p>The routes to be advertised to the AWS network in this Region. Applies to public virtual interfaces.</p>
2023    #[serde(rename = "routeFilterPrefixes")]
2024    #[serde(skip_serializing_if = "Option::is_none")]
2025    pub route_filter_prefixes: Option<Vec<RouteFilterPrefix>>,
2026    /// <p>The tags associated with the virtual interface.</p>
2027    #[serde(rename = "tags")]
2028    #[serde(skip_serializing_if = "Option::is_none")]
2029    pub tags: Option<Vec<Tag>>,
2030    /// <p>The ID of the virtual private gateway. Applies only to private virtual interfaces.</p>
2031    #[serde(rename = "virtualGatewayId")]
2032    #[serde(skip_serializing_if = "Option::is_none")]
2033    pub virtual_gateway_id: Option<String>,
2034    /// <p>The ID of the virtual interface.</p>
2035    #[serde(rename = "virtualInterfaceId")]
2036    #[serde(skip_serializing_if = "Option::is_none")]
2037    pub virtual_interface_id: Option<String>,
2038    /// <p>The name of the virtual interface assigned by the customer network. The name has a maximum of 100 characters. The following are valid characters: a-z, 0-9 and a hyphen (-).</p>
2039    #[serde(rename = "virtualInterfaceName")]
2040    #[serde(skip_serializing_if = "Option::is_none")]
2041    pub virtual_interface_name: Option<String>,
2042    /// <p><p>The state of the virtual interface. The following are the possible values:</p> <ul> <li> <p> <code>confirming</code>: The creation of the virtual interface is pending confirmation from the virtual interface owner. If the owner of the virtual interface is different from the owner of the connection on which it is provisioned, then the virtual interface will remain in this state until it is confirmed by the virtual interface owner.</p> </li> <li> <p> <code>verifying</code>: This state only applies to public virtual interfaces. Each public virtual interface needs validation before the virtual interface can be created.</p> </li> <li> <p> <code>pending</code>: A virtual interface is in this state from the time that it is created until the virtual interface is ready to forward traffic.</p> </li> <li> <p> <code>available</code>: A virtual interface that is able to forward traffic.</p> </li> <li> <p> <code>down</code>: A virtual interface that is BGP down.</p> </li> <li> <p> <code>deleting</code>: A virtual interface is in this state immediately after calling <a>DeleteVirtualInterface</a> until it can no longer forward traffic.</p> </li> <li> <p> <code>deleted</code>: A virtual interface that cannot forward traffic.</p> </li> <li> <p> <code>rejected</code>: The virtual interface owner has declined creation of the virtual interface. If a virtual interface in the <code>Confirming</code> state is deleted by the virtual interface owner, the virtual interface enters the <code>Rejected</code> state.</p> </li> <li> <p> <code>unknown</code>: The state of the virtual interface is not available.</p> </li> </ul></p>
2043    #[serde(rename = "virtualInterfaceState")]
2044    #[serde(skip_serializing_if = "Option::is_none")]
2045    pub virtual_interface_state: Option<String>,
2046    /// <p>The type of virtual interface. The possible values are <code>private</code> and <code>public</code>.</p>
2047    #[serde(rename = "virtualInterfaceType")]
2048    #[serde(skip_serializing_if = "Option::is_none")]
2049    pub virtual_interface_type: Option<String>,
2050    /// <p>The ID of the VLAN.</p>
2051    #[serde(rename = "vlan")]
2052    #[serde(skip_serializing_if = "Option::is_none")]
2053    pub vlan: Option<i64>,
2054}
2055
2056/// <p>Information about the virtual interface failover test.</p>
2057#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2058#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2059pub struct VirtualInterfaceTestHistory {
2060    /// <p>The BGP peers that were put in the DOWN state as part of the virtual interface failover test.</p>
2061    #[serde(rename = "bgpPeers")]
2062    #[serde(skip_serializing_if = "Option::is_none")]
2063    pub bgp_peers: Option<Vec<String>>,
2064    /// <p>The time that the virtual interface moves out of the DOWN state.</p>
2065    #[serde(rename = "endTime")]
2066    #[serde(skip_serializing_if = "Option::is_none")]
2067    pub end_time: Option<f64>,
2068    /// <p>The owner ID of the tested virtual interface.</p>
2069    #[serde(rename = "ownerAccount")]
2070    #[serde(skip_serializing_if = "Option::is_none")]
2071    pub owner_account: Option<String>,
2072    /// <p>The time that the virtual interface moves to the DOWN state.</p>
2073    #[serde(rename = "startTime")]
2074    #[serde(skip_serializing_if = "Option::is_none")]
2075    pub start_time: Option<f64>,
2076    /// <p>The status of the virtual interface failover test.</p>
2077    #[serde(rename = "status")]
2078    #[serde(skip_serializing_if = "Option::is_none")]
2079    pub status: Option<String>,
2080    /// <p>The time that the virtual interface failover test ran in minutes.</p>
2081    #[serde(rename = "testDurationInMinutes")]
2082    #[serde(skip_serializing_if = "Option::is_none")]
2083    pub test_duration_in_minutes: Option<i64>,
2084    /// <p>The ID of the virtual interface failover test.</p>
2085    #[serde(rename = "testId")]
2086    #[serde(skip_serializing_if = "Option::is_none")]
2087    pub test_id: Option<String>,
2088    /// <p>The ID of the tested virtual interface.</p>
2089    #[serde(rename = "virtualInterfaceId")]
2090    #[serde(skip_serializing_if = "Option::is_none")]
2091    pub virtual_interface_id: Option<String>,
2092}
2093
2094#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2095#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2096pub struct VirtualInterfaces {
2097    /// <p>The virtual interfaces</p>
2098    #[serde(rename = "virtualInterfaces")]
2099    #[serde(skip_serializing_if = "Option::is_none")]
2100    pub virtual_interfaces: Option<Vec<VirtualInterface>>,
2101}
2102
2103/// Errors returned by AcceptDirectConnectGatewayAssociationProposal
2104#[derive(Debug, PartialEq)]
2105pub enum AcceptDirectConnectGatewayAssociationProposalError {
2106    /// <p>One or more parameters are not valid.</p>
2107    DirectConnectClient(String),
2108    /// <p>A server-side error occurred.</p>
2109    DirectConnectServer(String),
2110}
2111
2112impl AcceptDirectConnectGatewayAssociationProposalError {
2113    pub fn from_response(
2114        res: BufferedHttpResponse,
2115    ) -> RusotoError<AcceptDirectConnectGatewayAssociationProposalError> {
2116        if let Some(err) = proto::json::Error::parse(&res) {
2117            match err.typ.as_str() {
2118                "DirectConnectClientException" => {
2119                    return RusotoError::Service(
2120                        AcceptDirectConnectGatewayAssociationProposalError::DirectConnectClient(
2121                            err.msg,
2122                        ),
2123                    )
2124                }
2125                "DirectConnectServerException" => {
2126                    return RusotoError::Service(
2127                        AcceptDirectConnectGatewayAssociationProposalError::DirectConnectServer(
2128                            err.msg,
2129                        ),
2130                    )
2131                }
2132                "ValidationException" => return RusotoError::Validation(err.msg),
2133                _ => {}
2134            }
2135        }
2136        RusotoError::Unknown(res)
2137    }
2138}
2139impl fmt::Display for AcceptDirectConnectGatewayAssociationProposalError {
2140    #[allow(unused_variables)]
2141    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2142        match *self {
2143            AcceptDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
2144                write!(f, "{}", cause)
2145            }
2146            AcceptDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
2147                write!(f, "{}", cause)
2148            }
2149        }
2150    }
2151}
2152impl Error for AcceptDirectConnectGatewayAssociationProposalError {}
2153/// Errors returned by AllocateConnectionOnInterconnect
2154#[derive(Debug, PartialEq)]
2155pub enum AllocateConnectionOnInterconnectError {
2156    /// <p>One or more parameters are not valid.</p>
2157    DirectConnectClient(String),
2158    /// <p>A server-side error occurred.</p>
2159    DirectConnectServer(String),
2160}
2161
2162impl AllocateConnectionOnInterconnectError {
2163    pub fn from_response(
2164        res: BufferedHttpResponse,
2165    ) -> RusotoError<AllocateConnectionOnInterconnectError> {
2166        if let Some(err) = proto::json::Error::parse(&res) {
2167            match err.typ.as_str() {
2168                "DirectConnectClientException" => {
2169                    return RusotoError::Service(
2170                        AllocateConnectionOnInterconnectError::DirectConnectClient(err.msg),
2171                    )
2172                }
2173                "DirectConnectServerException" => {
2174                    return RusotoError::Service(
2175                        AllocateConnectionOnInterconnectError::DirectConnectServer(err.msg),
2176                    )
2177                }
2178                "ValidationException" => return RusotoError::Validation(err.msg),
2179                _ => {}
2180            }
2181        }
2182        RusotoError::Unknown(res)
2183    }
2184}
2185impl fmt::Display for AllocateConnectionOnInterconnectError {
2186    #[allow(unused_variables)]
2187    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2188        match *self {
2189            AllocateConnectionOnInterconnectError::DirectConnectClient(ref cause) => {
2190                write!(f, "{}", cause)
2191            }
2192            AllocateConnectionOnInterconnectError::DirectConnectServer(ref cause) => {
2193                write!(f, "{}", cause)
2194            }
2195        }
2196    }
2197}
2198impl Error for AllocateConnectionOnInterconnectError {}
2199/// Errors returned by AllocateHostedConnection
2200#[derive(Debug, PartialEq)]
2201pub enum AllocateHostedConnectionError {
2202    /// <p>One or more parameters are not valid.</p>
2203    DirectConnectClient(String),
2204    /// <p>A server-side error occurred.</p>
2205    DirectConnectServer(String),
2206    /// <p>A tag key was specified more than once.</p>
2207    DuplicateTagKeys(String),
2208    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2209    TooManyTags(String),
2210}
2211
2212impl AllocateHostedConnectionError {
2213    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AllocateHostedConnectionError> {
2214        if let Some(err) = proto::json::Error::parse(&res) {
2215            match err.typ.as_str() {
2216                "DirectConnectClientException" => {
2217                    return RusotoError::Service(
2218                        AllocateHostedConnectionError::DirectConnectClient(err.msg),
2219                    )
2220                }
2221                "DirectConnectServerException" => {
2222                    return RusotoError::Service(
2223                        AllocateHostedConnectionError::DirectConnectServer(err.msg),
2224                    )
2225                }
2226                "DuplicateTagKeysException" => {
2227                    return RusotoError::Service(AllocateHostedConnectionError::DuplicateTagKeys(
2228                        err.msg,
2229                    ))
2230                }
2231                "TooManyTagsException" => {
2232                    return RusotoError::Service(AllocateHostedConnectionError::TooManyTags(
2233                        err.msg,
2234                    ))
2235                }
2236                "ValidationException" => return RusotoError::Validation(err.msg),
2237                _ => {}
2238            }
2239        }
2240        RusotoError::Unknown(res)
2241    }
2242}
2243impl fmt::Display for AllocateHostedConnectionError {
2244    #[allow(unused_variables)]
2245    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2246        match *self {
2247            AllocateHostedConnectionError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
2248            AllocateHostedConnectionError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
2249            AllocateHostedConnectionError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
2250            AllocateHostedConnectionError::TooManyTags(ref cause) => write!(f, "{}", cause),
2251        }
2252    }
2253}
2254impl Error for AllocateHostedConnectionError {}
2255/// Errors returned by AllocatePrivateVirtualInterface
2256#[derive(Debug, PartialEq)]
2257pub enum AllocatePrivateVirtualInterfaceError {
2258    /// <p>One or more parameters are not valid.</p>
2259    DirectConnectClient(String),
2260    /// <p>A server-side error occurred.</p>
2261    DirectConnectServer(String),
2262    /// <p>A tag key was specified more than once.</p>
2263    DuplicateTagKeys(String),
2264    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2265    TooManyTags(String),
2266}
2267
2268impl AllocatePrivateVirtualInterfaceError {
2269    pub fn from_response(
2270        res: BufferedHttpResponse,
2271    ) -> RusotoError<AllocatePrivateVirtualInterfaceError> {
2272        if let Some(err) = proto::json::Error::parse(&res) {
2273            match err.typ.as_str() {
2274                "DirectConnectClientException" => {
2275                    return RusotoError::Service(
2276                        AllocatePrivateVirtualInterfaceError::DirectConnectClient(err.msg),
2277                    )
2278                }
2279                "DirectConnectServerException" => {
2280                    return RusotoError::Service(
2281                        AllocatePrivateVirtualInterfaceError::DirectConnectServer(err.msg),
2282                    )
2283                }
2284                "DuplicateTagKeysException" => {
2285                    return RusotoError::Service(
2286                        AllocatePrivateVirtualInterfaceError::DuplicateTagKeys(err.msg),
2287                    )
2288                }
2289                "TooManyTagsException" => {
2290                    return RusotoError::Service(AllocatePrivateVirtualInterfaceError::TooManyTags(
2291                        err.msg,
2292                    ))
2293                }
2294                "ValidationException" => return RusotoError::Validation(err.msg),
2295                _ => {}
2296            }
2297        }
2298        RusotoError::Unknown(res)
2299    }
2300}
2301impl fmt::Display for AllocatePrivateVirtualInterfaceError {
2302    #[allow(unused_variables)]
2303    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2304        match *self {
2305            AllocatePrivateVirtualInterfaceError::DirectConnectClient(ref cause) => {
2306                write!(f, "{}", cause)
2307            }
2308            AllocatePrivateVirtualInterfaceError::DirectConnectServer(ref cause) => {
2309                write!(f, "{}", cause)
2310            }
2311            AllocatePrivateVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
2312                write!(f, "{}", cause)
2313            }
2314            AllocatePrivateVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
2315        }
2316    }
2317}
2318impl Error for AllocatePrivateVirtualInterfaceError {}
2319/// Errors returned by AllocatePublicVirtualInterface
2320#[derive(Debug, PartialEq)]
2321pub enum AllocatePublicVirtualInterfaceError {
2322    /// <p>One or more parameters are not valid.</p>
2323    DirectConnectClient(String),
2324    /// <p>A server-side error occurred.</p>
2325    DirectConnectServer(String),
2326    /// <p>A tag key was specified more than once.</p>
2327    DuplicateTagKeys(String),
2328    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2329    TooManyTags(String),
2330}
2331
2332impl AllocatePublicVirtualInterfaceError {
2333    pub fn from_response(
2334        res: BufferedHttpResponse,
2335    ) -> RusotoError<AllocatePublicVirtualInterfaceError> {
2336        if let Some(err) = proto::json::Error::parse(&res) {
2337            match err.typ.as_str() {
2338                "DirectConnectClientException" => {
2339                    return RusotoError::Service(
2340                        AllocatePublicVirtualInterfaceError::DirectConnectClient(err.msg),
2341                    )
2342                }
2343                "DirectConnectServerException" => {
2344                    return RusotoError::Service(
2345                        AllocatePublicVirtualInterfaceError::DirectConnectServer(err.msg),
2346                    )
2347                }
2348                "DuplicateTagKeysException" => {
2349                    return RusotoError::Service(
2350                        AllocatePublicVirtualInterfaceError::DuplicateTagKeys(err.msg),
2351                    )
2352                }
2353                "TooManyTagsException" => {
2354                    return RusotoError::Service(AllocatePublicVirtualInterfaceError::TooManyTags(
2355                        err.msg,
2356                    ))
2357                }
2358                "ValidationException" => return RusotoError::Validation(err.msg),
2359                _ => {}
2360            }
2361        }
2362        RusotoError::Unknown(res)
2363    }
2364}
2365impl fmt::Display for AllocatePublicVirtualInterfaceError {
2366    #[allow(unused_variables)]
2367    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2368        match *self {
2369            AllocatePublicVirtualInterfaceError::DirectConnectClient(ref cause) => {
2370                write!(f, "{}", cause)
2371            }
2372            AllocatePublicVirtualInterfaceError::DirectConnectServer(ref cause) => {
2373                write!(f, "{}", cause)
2374            }
2375            AllocatePublicVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
2376                write!(f, "{}", cause)
2377            }
2378            AllocatePublicVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
2379        }
2380    }
2381}
2382impl Error for AllocatePublicVirtualInterfaceError {}
2383/// Errors returned by AllocateTransitVirtualInterface
2384#[derive(Debug, PartialEq)]
2385pub enum AllocateTransitVirtualInterfaceError {
2386    /// <p>One or more parameters are not valid.</p>
2387    DirectConnectClient(String),
2388    /// <p>A server-side error occurred.</p>
2389    DirectConnectServer(String),
2390    /// <p>A tag key was specified more than once.</p>
2391    DuplicateTagKeys(String),
2392    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2393    TooManyTags(String),
2394}
2395
2396impl AllocateTransitVirtualInterfaceError {
2397    pub fn from_response(
2398        res: BufferedHttpResponse,
2399    ) -> RusotoError<AllocateTransitVirtualInterfaceError> {
2400        if let Some(err) = proto::json::Error::parse(&res) {
2401            match err.typ.as_str() {
2402                "DirectConnectClientException" => {
2403                    return RusotoError::Service(
2404                        AllocateTransitVirtualInterfaceError::DirectConnectClient(err.msg),
2405                    )
2406                }
2407                "DirectConnectServerException" => {
2408                    return RusotoError::Service(
2409                        AllocateTransitVirtualInterfaceError::DirectConnectServer(err.msg),
2410                    )
2411                }
2412                "DuplicateTagKeysException" => {
2413                    return RusotoError::Service(
2414                        AllocateTransitVirtualInterfaceError::DuplicateTagKeys(err.msg),
2415                    )
2416                }
2417                "TooManyTagsException" => {
2418                    return RusotoError::Service(AllocateTransitVirtualInterfaceError::TooManyTags(
2419                        err.msg,
2420                    ))
2421                }
2422                "ValidationException" => return RusotoError::Validation(err.msg),
2423                _ => {}
2424            }
2425        }
2426        RusotoError::Unknown(res)
2427    }
2428}
2429impl fmt::Display for AllocateTransitVirtualInterfaceError {
2430    #[allow(unused_variables)]
2431    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2432        match *self {
2433            AllocateTransitVirtualInterfaceError::DirectConnectClient(ref cause) => {
2434                write!(f, "{}", cause)
2435            }
2436            AllocateTransitVirtualInterfaceError::DirectConnectServer(ref cause) => {
2437                write!(f, "{}", cause)
2438            }
2439            AllocateTransitVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
2440                write!(f, "{}", cause)
2441            }
2442            AllocateTransitVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
2443        }
2444    }
2445}
2446impl Error for AllocateTransitVirtualInterfaceError {}
2447/// Errors returned by AssociateConnectionWithLag
2448#[derive(Debug, PartialEq)]
2449pub enum AssociateConnectionWithLagError {
2450    /// <p>One or more parameters are not valid.</p>
2451    DirectConnectClient(String),
2452    /// <p>A server-side error occurred.</p>
2453    DirectConnectServer(String),
2454}
2455
2456impl AssociateConnectionWithLagError {
2457    pub fn from_response(
2458        res: BufferedHttpResponse,
2459    ) -> RusotoError<AssociateConnectionWithLagError> {
2460        if let Some(err) = proto::json::Error::parse(&res) {
2461            match err.typ.as_str() {
2462                "DirectConnectClientException" => {
2463                    return RusotoError::Service(
2464                        AssociateConnectionWithLagError::DirectConnectClient(err.msg),
2465                    )
2466                }
2467                "DirectConnectServerException" => {
2468                    return RusotoError::Service(
2469                        AssociateConnectionWithLagError::DirectConnectServer(err.msg),
2470                    )
2471                }
2472                "ValidationException" => return RusotoError::Validation(err.msg),
2473                _ => {}
2474            }
2475        }
2476        RusotoError::Unknown(res)
2477    }
2478}
2479impl fmt::Display for AssociateConnectionWithLagError {
2480    #[allow(unused_variables)]
2481    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2482        match *self {
2483            AssociateConnectionWithLagError::DirectConnectClient(ref cause) => {
2484                write!(f, "{}", cause)
2485            }
2486            AssociateConnectionWithLagError::DirectConnectServer(ref cause) => {
2487                write!(f, "{}", cause)
2488            }
2489        }
2490    }
2491}
2492impl Error for AssociateConnectionWithLagError {}
2493/// Errors returned by AssociateHostedConnection
2494#[derive(Debug, PartialEq)]
2495pub enum AssociateHostedConnectionError {
2496    /// <p>One or more parameters are not valid.</p>
2497    DirectConnectClient(String),
2498    /// <p>A server-side error occurred.</p>
2499    DirectConnectServer(String),
2500}
2501
2502impl AssociateHostedConnectionError {
2503    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateHostedConnectionError> {
2504        if let Some(err) = proto::json::Error::parse(&res) {
2505            match err.typ.as_str() {
2506                "DirectConnectClientException" => {
2507                    return RusotoError::Service(
2508                        AssociateHostedConnectionError::DirectConnectClient(err.msg),
2509                    )
2510                }
2511                "DirectConnectServerException" => {
2512                    return RusotoError::Service(
2513                        AssociateHostedConnectionError::DirectConnectServer(err.msg),
2514                    )
2515                }
2516                "ValidationException" => return RusotoError::Validation(err.msg),
2517                _ => {}
2518            }
2519        }
2520        RusotoError::Unknown(res)
2521    }
2522}
2523impl fmt::Display for AssociateHostedConnectionError {
2524    #[allow(unused_variables)]
2525    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2526        match *self {
2527            AssociateHostedConnectionError::DirectConnectClient(ref cause) => {
2528                write!(f, "{}", cause)
2529            }
2530            AssociateHostedConnectionError::DirectConnectServer(ref cause) => {
2531                write!(f, "{}", cause)
2532            }
2533        }
2534    }
2535}
2536impl Error for AssociateHostedConnectionError {}
2537/// Errors returned by AssociateVirtualInterface
2538#[derive(Debug, PartialEq)]
2539pub enum AssociateVirtualInterfaceError {
2540    /// <p>One or more parameters are not valid.</p>
2541    DirectConnectClient(String),
2542    /// <p>A server-side error occurred.</p>
2543    DirectConnectServer(String),
2544}
2545
2546impl AssociateVirtualInterfaceError {
2547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AssociateVirtualInterfaceError> {
2548        if let Some(err) = proto::json::Error::parse(&res) {
2549            match err.typ.as_str() {
2550                "DirectConnectClientException" => {
2551                    return RusotoError::Service(
2552                        AssociateVirtualInterfaceError::DirectConnectClient(err.msg),
2553                    )
2554                }
2555                "DirectConnectServerException" => {
2556                    return RusotoError::Service(
2557                        AssociateVirtualInterfaceError::DirectConnectServer(err.msg),
2558                    )
2559                }
2560                "ValidationException" => return RusotoError::Validation(err.msg),
2561                _ => {}
2562            }
2563        }
2564        RusotoError::Unknown(res)
2565    }
2566}
2567impl fmt::Display for AssociateVirtualInterfaceError {
2568    #[allow(unused_variables)]
2569    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2570        match *self {
2571            AssociateVirtualInterfaceError::DirectConnectClient(ref cause) => {
2572                write!(f, "{}", cause)
2573            }
2574            AssociateVirtualInterfaceError::DirectConnectServer(ref cause) => {
2575                write!(f, "{}", cause)
2576            }
2577        }
2578    }
2579}
2580impl Error for AssociateVirtualInterfaceError {}
2581/// Errors returned by ConfirmConnection
2582#[derive(Debug, PartialEq)]
2583pub enum ConfirmConnectionError {
2584    /// <p>One or more parameters are not valid.</p>
2585    DirectConnectClient(String),
2586    /// <p>A server-side error occurred.</p>
2587    DirectConnectServer(String),
2588}
2589
2590impl ConfirmConnectionError {
2591    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ConfirmConnectionError> {
2592        if let Some(err) = proto::json::Error::parse(&res) {
2593            match err.typ.as_str() {
2594                "DirectConnectClientException" => {
2595                    return RusotoError::Service(ConfirmConnectionError::DirectConnectClient(
2596                        err.msg,
2597                    ))
2598                }
2599                "DirectConnectServerException" => {
2600                    return RusotoError::Service(ConfirmConnectionError::DirectConnectServer(
2601                        err.msg,
2602                    ))
2603                }
2604                "ValidationException" => return RusotoError::Validation(err.msg),
2605                _ => {}
2606            }
2607        }
2608        RusotoError::Unknown(res)
2609    }
2610}
2611impl fmt::Display for ConfirmConnectionError {
2612    #[allow(unused_variables)]
2613    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2614        match *self {
2615            ConfirmConnectionError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
2616            ConfirmConnectionError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
2617        }
2618    }
2619}
2620impl Error for ConfirmConnectionError {}
2621/// Errors returned by ConfirmPrivateVirtualInterface
2622#[derive(Debug, PartialEq)]
2623pub enum ConfirmPrivateVirtualInterfaceError {
2624    /// <p>One or more parameters are not valid.</p>
2625    DirectConnectClient(String),
2626    /// <p>A server-side error occurred.</p>
2627    DirectConnectServer(String),
2628}
2629
2630impl ConfirmPrivateVirtualInterfaceError {
2631    pub fn from_response(
2632        res: BufferedHttpResponse,
2633    ) -> RusotoError<ConfirmPrivateVirtualInterfaceError> {
2634        if let Some(err) = proto::json::Error::parse(&res) {
2635            match err.typ.as_str() {
2636                "DirectConnectClientException" => {
2637                    return RusotoError::Service(
2638                        ConfirmPrivateVirtualInterfaceError::DirectConnectClient(err.msg),
2639                    )
2640                }
2641                "DirectConnectServerException" => {
2642                    return RusotoError::Service(
2643                        ConfirmPrivateVirtualInterfaceError::DirectConnectServer(err.msg),
2644                    )
2645                }
2646                "ValidationException" => return RusotoError::Validation(err.msg),
2647                _ => {}
2648            }
2649        }
2650        RusotoError::Unknown(res)
2651    }
2652}
2653impl fmt::Display for ConfirmPrivateVirtualInterfaceError {
2654    #[allow(unused_variables)]
2655    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2656        match *self {
2657            ConfirmPrivateVirtualInterfaceError::DirectConnectClient(ref cause) => {
2658                write!(f, "{}", cause)
2659            }
2660            ConfirmPrivateVirtualInterfaceError::DirectConnectServer(ref cause) => {
2661                write!(f, "{}", cause)
2662            }
2663        }
2664    }
2665}
2666impl Error for ConfirmPrivateVirtualInterfaceError {}
2667/// Errors returned by ConfirmPublicVirtualInterface
2668#[derive(Debug, PartialEq)]
2669pub enum ConfirmPublicVirtualInterfaceError {
2670    /// <p>One or more parameters are not valid.</p>
2671    DirectConnectClient(String),
2672    /// <p>A server-side error occurred.</p>
2673    DirectConnectServer(String),
2674}
2675
2676impl ConfirmPublicVirtualInterfaceError {
2677    pub fn from_response(
2678        res: BufferedHttpResponse,
2679    ) -> RusotoError<ConfirmPublicVirtualInterfaceError> {
2680        if let Some(err) = proto::json::Error::parse(&res) {
2681            match err.typ.as_str() {
2682                "DirectConnectClientException" => {
2683                    return RusotoError::Service(
2684                        ConfirmPublicVirtualInterfaceError::DirectConnectClient(err.msg),
2685                    )
2686                }
2687                "DirectConnectServerException" => {
2688                    return RusotoError::Service(
2689                        ConfirmPublicVirtualInterfaceError::DirectConnectServer(err.msg),
2690                    )
2691                }
2692                "ValidationException" => return RusotoError::Validation(err.msg),
2693                _ => {}
2694            }
2695        }
2696        RusotoError::Unknown(res)
2697    }
2698}
2699impl fmt::Display for ConfirmPublicVirtualInterfaceError {
2700    #[allow(unused_variables)]
2701    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2702        match *self {
2703            ConfirmPublicVirtualInterfaceError::DirectConnectClient(ref cause) => {
2704                write!(f, "{}", cause)
2705            }
2706            ConfirmPublicVirtualInterfaceError::DirectConnectServer(ref cause) => {
2707                write!(f, "{}", cause)
2708            }
2709        }
2710    }
2711}
2712impl Error for ConfirmPublicVirtualInterfaceError {}
2713/// Errors returned by ConfirmTransitVirtualInterface
2714#[derive(Debug, PartialEq)]
2715pub enum ConfirmTransitVirtualInterfaceError {
2716    /// <p>One or more parameters are not valid.</p>
2717    DirectConnectClient(String),
2718    /// <p>A server-side error occurred.</p>
2719    DirectConnectServer(String),
2720}
2721
2722impl ConfirmTransitVirtualInterfaceError {
2723    pub fn from_response(
2724        res: BufferedHttpResponse,
2725    ) -> RusotoError<ConfirmTransitVirtualInterfaceError> {
2726        if let Some(err) = proto::json::Error::parse(&res) {
2727            match err.typ.as_str() {
2728                "DirectConnectClientException" => {
2729                    return RusotoError::Service(
2730                        ConfirmTransitVirtualInterfaceError::DirectConnectClient(err.msg),
2731                    )
2732                }
2733                "DirectConnectServerException" => {
2734                    return RusotoError::Service(
2735                        ConfirmTransitVirtualInterfaceError::DirectConnectServer(err.msg),
2736                    )
2737                }
2738                "ValidationException" => return RusotoError::Validation(err.msg),
2739                _ => {}
2740            }
2741        }
2742        RusotoError::Unknown(res)
2743    }
2744}
2745impl fmt::Display for ConfirmTransitVirtualInterfaceError {
2746    #[allow(unused_variables)]
2747    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2748        match *self {
2749            ConfirmTransitVirtualInterfaceError::DirectConnectClient(ref cause) => {
2750                write!(f, "{}", cause)
2751            }
2752            ConfirmTransitVirtualInterfaceError::DirectConnectServer(ref cause) => {
2753                write!(f, "{}", cause)
2754            }
2755        }
2756    }
2757}
2758impl Error for ConfirmTransitVirtualInterfaceError {}
2759/// Errors returned by CreateBGPPeer
2760#[derive(Debug, PartialEq)]
2761pub enum CreateBGPPeerError {
2762    /// <p>One or more parameters are not valid.</p>
2763    DirectConnectClient(String),
2764    /// <p>A server-side error occurred.</p>
2765    DirectConnectServer(String),
2766}
2767
2768impl CreateBGPPeerError {
2769    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBGPPeerError> {
2770        if let Some(err) = proto::json::Error::parse(&res) {
2771            match err.typ.as_str() {
2772                "DirectConnectClientException" => {
2773                    return RusotoError::Service(CreateBGPPeerError::DirectConnectClient(err.msg))
2774                }
2775                "DirectConnectServerException" => {
2776                    return RusotoError::Service(CreateBGPPeerError::DirectConnectServer(err.msg))
2777                }
2778                "ValidationException" => return RusotoError::Validation(err.msg),
2779                _ => {}
2780            }
2781        }
2782        RusotoError::Unknown(res)
2783    }
2784}
2785impl fmt::Display for CreateBGPPeerError {
2786    #[allow(unused_variables)]
2787    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2788        match *self {
2789            CreateBGPPeerError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
2790            CreateBGPPeerError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
2791        }
2792    }
2793}
2794impl Error for CreateBGPPeerError {}
2795/// Errors returned by CreateConnection
2796#[derive(Debug, PartialEq)]
2797pub enum CreateConnectionError {
2798    /// <p>One or more parameters are not valid.</p>
2799    DirectConnectClient(String),
2800    /// <p>A server-side error occurred.</p>
2801    DirectConnectServer(String),
2802    /// <p>A tag key was specified more than once.</p>
2803    DuplicateTagKeys(String),
2804    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2805    TooManyTags(String),
2806}
2807
2808impl CreateConnectionError {
2809    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateConnectionError> {
2810        if let Some(err) = proto::json::Error::parse(&res) {
2811            match err.typ.as_str() {
2812                "DirectConnectClientException" => {
2813                    return RusotoError::Service(CreateConnectionError::DirectConnectClient(
2814                        err.msg,
2815                    ))
2816                }
2817                "DirectConnectServerException" => {
2818                    return RusotoError::Service(CreateConnectionError::DirectConnectServer(
2819                        err.msg,
2820                    ))
2821                }
2822                "DuplicateTagKeysException" => {
2823                    return RusotoError::Service(CreateConnectionError::DuplicateTagKeys(err.msg))
2824                }
2825                "TooManyTagsException" => {
2826                    return RusotoError::Service(CreateConnectionError::TooManyTags(err.msg))
2827                }
2828                "ValidationException" => return RusotoError::Validation(err.msg),
2829                _ => {}
2830            }
2831        }
2832        RusotoError::Unknown(res)
2833    }
2834}
2835impl fmt::Display for CreateConnectionError {
2836    #[allow(unused_variables)]
2837    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2838        match *self {
2839            CreateConnectionError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
2840            CreateConnectionError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
2841            CreateConnectionError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
2842            CreateConnectionError::TooManyTags(ref cause) => write!(f, "{}", cause),
2843        }
2844    }
2845}
2846impl Error for CreateConnectionError {}
2847/// Errors returned by CreateDirectConnectGateway
2848#[derive(Debug, PartialEq)]
2849pub enum CreateDirectConnectGatewayError {
2850    /// <p>One or more parameters are not valid.</p>
2851    DirectConnectClient(String),
2852    /// <p>A server-side error occurred.</p>
2853    DirectConnectServer(String),
2854}
2855
2856impl CreateDirectConnectGatewayError {
2857    pub fn from_response(
2858        res: BufferedHttpResponse,
2859    ) -> RusotoError<CreateDirectConnectGatewayError> {
2860        if let Some(err) = proto::json::Error::parse(&res) {
2861            match err.typ.as_str() {
2862                "DirectConnectClientException" => {
2863                    return RusotoError::Service(
2864                        CreateDirectConnectGatewayError::DirectConnectClient(err.msg),
2865                    )
2866                }
2867                "DirectConnectServerException" => {
2868                    return RusotoError::Service(
2869                        CreateDirectConnectGatewayError::DirectConnectServer(err.msg),
2870                    )
2871                }
2872                "ValidationException" => return RusotoError::Validation(err.msg),
2873                _ => {}
2874            }
2875        }
2876        RusotoError::Unknown(res)
2877    }
2878}
2879impl fmt::Display for CreateDirectConnectGatewayError {
2880    #[allow(unused_variables)]
2881    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2882        match *self {
2883            CreateDirectConnectGatewayError::DirectConnectClient(ref cause) => {
2884                write!(f, "{}", cause)
2885            }
2886            CreateDirectConnectGatewayError::DirectConnectServer(ref cause) => {
2887                write!(f, "{}", cause)
2888            }
2889        }
2890    }
2891}
2892impl Error for CreateDirectConnectGatewayError {}
2893/// Errors returned by CreateDirectConnectGatewayAssociation
2894#[derive(Debug, PartialEq)]
2895pub enum CreateDirectConnectGatewayAssociationError {
2896    /// <p>One or more parameters are not valid.</p>
2897    DirectConnectClient(String),
2898    /// <p>A server-side error occurred.</p>
2899    DirectConnectServer(String),
2900}
2901
2902impl CreateDirectConnectGatewayAssociationError {
2903    pub fn from_response(
2904        res: BufferedHttpResponse,
2905    ) -> RusotoError<CreateDirectConnectGatewayAssociationError> {
2906        if let Some(err) = proto::json::Error::parse(&res) {
2907            match err.typ.as_str() {
2908                "DirectConnectClientException" => {
2909                    return RusotoError::Service(
2910                        CreateDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
2911                    )
2912                }
2913                "DirectConnectServerException" => {
2914                    return RusotoError::Service(
2915                        CreateDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
2916                    )
2917                }
2918                "ValidationException" => return RusotoError::Validation(err.msg),
2919                _ => {}
2920            }
2921        }
2922        RusotoError::Unknown(res)
2923    }
2924}
2925impl fmt::Display for CreateDirectConnectGatewayAssociationError {
2926    #[allow(unused_variables)]
2927    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2928        match *self {
2929            CreateDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => {
2930                write!(f, "{}", cause)
2931            }
2932            CreateDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => {
2933                write!(f, "{}", cause)
2934            }
2935        }
2936    }
2937}
2938impl Error for CreateDirectConnectGatewayAssociationError {}
2939/// Errors returned by CreateDirectConnectGatewayAssociationProposal
2940#[derive(Debug, PartialEq)]
2941pub enum CreateDirectConnectGatewayAssociationProposalError {
2942    /// <p>One or more parameters are not valid.</p>
2943    DirectConnectClient(String),
2944    /// <p>A server-side error occurred.</p>
2945    DirectConnectServer(String),
2946}
2947
2948impl CreateDirectConnectGatewayAssociationProposalError {
2949    pub fn from_response(
2950        res: BufferedHttpResponse,
2951    ) -> RusotoError<CreateDirectConnectGatewayAssociationProposalError> {
2952        if let Some(err) = proto::json::Error::parse(&res) {
2953            match err.typ.as_str() {
2954                "DirectConnectClientException" => {
2955                    return RusotoError::Service(
2956                        CreateDirectConnectGatewayAssociationProposalError::DirectConnectClient(
2957                            err.msg,
2958                        ),
2959                    )
2960                }
2961                "DirectConnectServerException" => {
2962                    return RusotoError::Service(
2963                        CreateDirectConnectGatewayAssociationProposalError::DirectConnectServer(
2964                            err.msg,
2965                        ),
2966                    )
2967                }
2968                "ValidationException" => return RusotoError::Validation(err.msg),
2969                _ => {}
2970            }
2971        }
2972        RusotoError::Unknown(res)
2973    }
2974}
2975impl fmt::Display for CreateDirectConnectGatewayAssociationProposalError {
2976    #[allow(unused_variables)]
2977    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2978        match *self {
2979            CreateDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
2980                write!(f, "{}", cause)
2981            }
2982            CreateDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
2983                write!(f, "{}", cause)
2984            }
2985        }
2986    }
2987}
2988impl Error for CreateDirectConnectGatewayAssociationProposalError {}
2989/// Errors returned by CreateInterconnect
2990#[derive(Debug, PartialEq)]
2991pub enum CreateInterconnectError {
2992    /// <p>One or more parameters are not valid.</p>
2993    DirectConnectClient(String),
2994    /// <p>A server-side error occurred.</p>
2995    DirectConnectServer(String),
2996    /// <p>A tag key was specified more than once.</p>
2997    DuplicateTagKeys(String),
2998    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
2999    TooManyTags(String),
3000}
3001
3002impl CreateInterconnectError {
3003    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateInterconnectError> {
3004        if let Some(err) = proto::json::Error::parse(&res) {
3005            match err.typ.as_str() {
3006                "DirectConnectClientException" => {
3007                    return RusotoError::Service(CreateInterconnectError::DirectConnectClient(
3008                        err.msg,
3009                    ))
3010                }
3011                "DirectConnectServerException" => {
3012                    return RusotoError::Service(CreateInterconnectError::DirectConnectServer(
3013                        err.msg,
3014                    ))
3015                }
3016                "DuplicateTagKeysException" => {
3017                    return RusotoError::Service(CreateInterconnectError::DuplicateTagKeys(err.msg))
3018                }
3019                "TooManyTagsException" => {
3020                    return RusotoError::Service(CreateInterconnectError::TooManyTags(err.msg))
3021                }
3022                "ValidationException" => return RusotoError::Validation(err.msg),
3023                _ => {}
3024            }
3025        }
3026        RusotoError::Unknown(res)
3027    }
3028}
3029impl fmt::Display for CreateInterconnectError {
3030    #[allow(unused_variables)]
3031    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3032        match *self {
3033            CreateInterconnectError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3034            CreateInterconnectError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3035            CreateInterconnectError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
3036            CreateInterconnectError::TooManyTags(ref cause) => write!(f, "{}", cause),
3037        }
3038    }
3039}
3040impl Error for CreateInterconnectError {}
3041/// Errors returned by CreateLag
3042#[derive(Debug, PartialEq)]
3043pub enum CreateLagError {
3044    /// <p>One or more parameters are not valid.</p>
3045    DirectConnectClient(String),
3046    /// <p>A server-side error occurred.</p>
3047    DirectConnectServer(String),
3048    /// <p>A tag key was specified more than once.</p>
3049    DuplicateTagKeys(String),
3050    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
3051    TooManyTags(String),
3052}
3053
3054impl CreateLagError {
3055    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLagError> {
3056        if let Some(err) = proto::json::Error::parse(&res) {
3057            match err.typ.as_str() {
3058                "DirectConnectClientException" => {
3059                    return RusotoError::Service(CreateLagError::DirectConnectClient(err.msg))
3060                }
3061                "DirectConnectServerException" => {
3062                    return RusotoError::Service(CreateLagError::DirectConnectServer(err.msg))
3063                }
3064                "DuplicateTagKeysException" => {
3065                    return RusotoError::Service(CreateLagError::DuplicateTagKeys(err.msg))
3066                }
3067                "TooManyTagsException" => {
3068                    return RusotoError::Service(CreateLagError::TooManyTags(err.msg))
3069                }
3070                "ValidationException" => return RusotoError::Validation(err.msg),
3071                _ => {}
3072            }
3073        }
3074        RusotoError::Unknown(res)
3075    }
3076}
3077impl fmt::Display for CreateLagError {
3078    #[allow(unused_variables)]
3079    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3080        match *self {
3081            CreateLagError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3082            CreateLagError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3083            CreateLagError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
3084            CreateLagError::TooManyTags(ref cause) => write!(f, "{}", cause),
3085        }
3086    }
3087}
3088impl Error for CreateLagError {}
3089/// Errors returned by CreatePrivateVirtualInterface
3090#[derive(Debug, PartialEq)]
3091pub enum CreatePrivateVirtualInterfaceError {
3092    /// <p>One or more parameters are not valid.</p>
3093    DirectConnectClient(String),
3094    /// <p>A server-side error occurred.</p>
3095    DirectConnectServer(String),
3096    /// <p>A tag key was specified more than once.</p>
3097    DuplicateTagKeys(String),
3098    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
3099    TooManyTags(String),
3100}
3101
3102impl CreatePrivateVirtualInterfaceError {
3103    pub fn from_response(
3104        res: BufferedHttpResponse,
3105    ) -> RusotoError<CreatePrivateVirtualInterfaceError> {
3106        if let Some(err) = proto::json::Error::parse(&res) {
3107            match err.typ.as_str() {
3108                "DirectConnectClientException" => {
3109                    return RusotoError::Service(
3110                        CreatePrivateVirtualInterfaceError::DirectConnectClient(err.msg),
3111                    )
3112                }
3113                "DirectConnectServerException" => {
3114                    return RusotoError::Service(
3115                        CreatePrivateVirtualInterfaceError::DirectConnectServer(err.msg),
3116                    )
3117                }
3118                "DuplicateTagKeysException" => {
3119                    return RusotoError::Service(
3120                        CreatePrivateVirtualInterfaceError::DuplicateTagKeys(err.msg),
3121                    )
3122                }
3123                "TooManyTagsException" => {
3124                    return RusotoError::Service(CreatePrivateVirtualInterfaceError::TooManyTags(
3125                        err.msg,
3126                    ))
3127                }
3128                "ValidationException" => return RusotoError::Validation(err.msg),
3129                _ => {}
3130            }
3131        }
3132        RusotoError::Unknown(res)
3133    }
3134}
3135impl fmt::Display for CreatePrivateVirtualInterfaceError {
3136    #[allow(unused_variables)]
3137    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3138        match *self {
3139            CreatePrivateVirtualInterfaceError::DirectConnectClient(ref cause) => {
3140                write!(f, "{}", cause)
3141            }
3142            CreatePrivateVirtualInterfaceError::DirectConnectServer(ref cause) => {
3143                write!(f, "{}", cause)
3144            }
3145            CreatePrivateVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
3146                write!(f, "{}", cause)
3147            }
3148            CreatePrivateVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
3149        }
3150    }
3151}
3152impl Error for CreatePrivateVirtualInterfaceError {}
3153/// Errors returned by CreatePublicVirtualInterface
3154#[derive(Debug, PartialEq)]
3155pub enum CreatePublicVirtualInterfaceError {
3156    /// <p>One or more parameters are not valid.</p>
3157    DirectConnectClient(String),
3158    /// <p>A server-side error occurred.</p>
3159    DirectConnectServer(String),
3160    /// <p>A tag key was specified more than once.</p>
3161    DuplicateTagKeys(String),
3162    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
3163    TooManyTags(String),
3164}
3165
3166impl CreatePublicVirtualInterfaceError {
3167    pub fn from_response(
3168        res: BufferedHttpResponse,
3169    ) -> RusotoError<CreatePublicVirtualInterfaceError> {
3170        if let Some(err) = proto::json::Error::parse(&res) {
3171            match err.typ.as_str() {
3172                "DirectConnectClientException" => {
3173                    return RusotoError::Service(
3174                        CreatePublicVirtualInterfaceError::DirectConnectClient(err.msg),
3175                    )
3176                }
3177                "DirectConnectServerException" => {
3178                    return RusotoError::Service(
3179                        CreatePublicVirtualInterfaceError::DirectConnectServer(err.msg),
3180                    )
3181                }
3182                "DuplicateTagKeysException" => {
3183                    return RusotoError::Service(
3184                        CreatePublicVirtualInterfaceError::DuplicateTagKeys(err.msg),
3185                    )
3186                }
3187                "TooManyTagsException" => {
3188                    return RusotoError::Service(CreatePublicVirtualInterfaceError::TooManyTags(
3189                        err.msg,
3190                    ))
3191                }
3192                "ValidationException" => return RusotoError::Validation(err.msg),
3193                _ => {}
3194            }
3195        }
3196        RusotoError::Unknown(res)
3197    }
3198}
3199impl fmt::Display for CreatePublicVirtualInterfaceError {
3200    #[allow(unused_variables)]
3201    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3202        match *self {
3203            CreatePublicVirtualInterfaceError::DirectConnectClient(ref cause) => {
3204                write!(f, "{}", cause)
3205            }
3206            CreatePublicVirtualInterfaceError::DirectConnectServer(ref cause) => {
3207                write!(f, "{}", cause)
3208            }
3209            CreatePublicVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
3210                write!(f, "{}", cause)
3211            }
3212            CreatePublicVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
3213        }
3214    }
3215}
3216impl Error for CreatePublicVirtualInterfaceError {}
3217/// Errors returned by CreateTransitVirtualInterface
3218#[derive(Debug, PartialEq)]
3219pub enum CreateTransitVirtualInterfaceError {
3220    /// <p>One or more parameters are not valid.</p>
3221    DirectConnectClient(String),
3222    /// <p>A server-side error occurred.</p>
3223    DirectConnectServer(String),
3224    /// <p>A tag key was specified more than once.</p>
3225    DuplicateTagKeys(String),
3226    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
3227    TooManyTags(String),
3228}
3229
3230impl CreateTransitVirtualInterfaceError {
3231    pub fn from_response(
3232        res: BufferedHttpResponse,
3233    ) -> RusotoError<CreateTransitVirtualInterfaceError> {
3234        if let Some(err) = proto::json::Error::parse(&res) {
3235            match err.typ.as_str() {
3236                "DirectConnectClientException" => {
3237                    return RusotoError::Service(
3238                        CreateTransitVirtualInterfaceError::DirectConnectClient(err.msg),
3239                    )
3240                }
3241                "DirectConnectServerException" => {
3242                    return RusotoError::Service(
3243                        CreateTransitVirtualInterfaceError::DirectConnectServer(err.msg),
3244                    )
3245                }
3246                "DuplicateTagKeysException" => {
3247                    return RusotoError::Service(
3248                        CreateTransitVirtualInterfaceError::DuplicateTagKeys(err.msg),
3249                    )
3250                }
3251                "TooManyTagsException" => {
3252                    return RusotoError::Service(CreateTransitVirtualInterfaceError::TooManyTags(
3253                        err.msg,
3254                    ))
3255                }
3256                "ValidationException" => return RusotoError::Validation(err.msg),
3257                _ => {}
3258            }
3259        }
3260        RusotoError::Unknown(res)
3261    }
3262}
3263impl fmt::Display for CreateTransitVirtualInterfaceError {
3264    #[allow(unused_variables)]
3265    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3266        match *self {
3267            CreateTransitVirtualInterfaceError::DirectConnectClient(ref cause) => {
3268                write!(f, "{}", cause)
3269            }
3270            CreateTransitVirtualInterfaceError::DirectConnectServer(ref cause) => {
3271                write!(f, "{}", cause)
3272            }
3273            CreateTransitVirtualInterfaceError::DuplicateTagKeys(ref cause) => {
3274                write!(f, "{}", cause)
3275            }
3276            CreateTransitVirtualInterfaceError::TooManyTags(ref cause) => write!(f, "{}", cause),
3277        }
3278    }
3279}
3280impl Error for CreateTransitVirtualInterfaceError {}
3281/// Errors returned by DeleteBGPPeer
3282#[derive(Debug, PartialEq)]
3283pub enum DeleteBGPPeerError {
3284    /// <p>One or more parameters are not valid.</p>
3285    DirectConnectClient(String),
3286    /// <p>A server-side error occurred.</p>
3287    DirectConnectServer(String),
3288}
3289
3290impl DeleteBGPPeerError {
3291    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBGPPeerError> {
3292        if let Some(err) = proto::json::Error::parse(&res) {
3293            match err.typ.as_str() {
3294                "DirectConnectClientException" => {
3295                    return RusotoError::Service(DeleteBGPPeerError::DirectConnectClient(err.msg))
3296                }
3297                "DirectConnectServerException" => {
3298                    return RusotoError::Service(DeleteBGPPeerError::DirectConnectServer(err.msg))
3299                }
3300                "ValidationException" => return RusotoError::Validation(err.msg),
3301                _ => {}
3302            }
3303        }
3304        RusotoError::Unknown(res)
3305    }
3306}
3307impl fmt::Display for DeleteBGPPeerError {
3308    #[allow(unused_variables)]
3309    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3310        match *self {
3311            DeleteBGPPeerError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3312            DeleteBGPPeerError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3313        }
3314    }
3315}
3316impl Error for DeleteBGPPeerError {}
3317/// Errors returned by DeleteConnection
3318#[derive(Debug, PartialEq)]
3319pub enum DeleteConnectionError {
3320    /// <p>One or more parameters are not valid.</p>
3321    DirectConnectClient(String),
3322    /// <p>A server-side error occurred.</p>
3323    DirectConnectServer(String),
3324}
3325
3326impl DeleteConnectionError {
3327    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteConnectionError> {
3328        if let Some(err) = proto::json::Error::parse(&res) {
3329            match err.typ.as_str() {
3330                "DirectConnectClientException" => {
3331                    return RusotoError::Service(DeleteConnectionError::DirectConnectClient(
3332                        err.msg,
3333                    ))
3334                }
3335                "DirectConnectServerException" => {
3336                    return RusotoError::Service(DeleteConnectionError::DirectConnectServer(
3337                        err.msg,
3338                    ))
3339                }
3340                "ValidationException" => return RusotoError::Validation(err.msg),
3341                _ => {}
3342            }
3343        }
3344        RusotoError::Unknown(res)
3345    }
3346}
3347impl fmt::Display for DeleteConnectionError {
3348    #[allow(unused_variables)]
3349    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3350        match *self {
3351            DeleteConnectionError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3352            DeleteConnectionError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3353        }
3354    }
3355}
3356impl Error for DeleteConnectionError {}
3357/// Errors returned by DeleteDirectConnectGateway
3358#[derive(Debug, PartialEq)]
3359pub enum DeleteDirectConnectGatewayError {
3360    /// <p>One or more parameters are not valid.</p>
3361    DirectConnectClient(String),
3362    /// <p>A server-side error occurred.</p>
3363    DirectConnectServer(String),
3364}
3365
3366impl DeleteDirectConnectGatewayError {
3367    pub fn from_response(
3368        res: BufferedHttpResponse,
3369    ) -> RusotoError<DeleteDirectConnectGatewayError> {
3370        if let Some(err) = proto::json::Error::parse(&res) {
3371            match err.typ.as_str() {
3372                "DirectConnectClientException" => {
3373                    return RusotoError::Service(
3374                        DeleteDirectConnectGatewayError::DirectConnectClient(err.msg),
3375                    )
3376                }
3377                "DirectConnectServerException" => {
3378                    return RusotoError::Service(
3379                        DeleteDirectConnectGatewayError::DirectConnectServer(err.msg),
3380                    )
3381                }
3382                "ValidationException" => return RusotoError::Validation(err.msg),
3383                _ => {}
3384            }
3385        }
3386        RusotoError::Unknown(res)
3387    }
3388}
3389impl fmt::Display for DeleteDirectConnectGatewayError {
3390    #[allow(unused_variables)]
3391    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3392        match *self {
3393            DeleteDirectConnectGatewayError::DirectConnectClient(ref cause) => {
3394                write!(f, "{}", cause)
3395            }
3396            DeleteDirectConnectGatewayError::DirectConnectServer(ref cause) => {
3397                write!(f, "{}", cause)
3398            }
3399        }
3400    }
3401}
3402impl Error for DeleteDirectConnectGatewayError {}
3403/// Errors returned by DeleteDirectConnectGatewayAssociation
3404#[derive(Debug, PartialEq)]
3405pub enum DeleteDirectConnectGatewayAssociationError {
3406    /// <p>One or more parameters are not valid.</p>
3407    DirectConnectClient(String),
3408    /// <p>A server-side error occurred.</p>
3409    DirectConnectServer(String),
3410}
3411
3412impl DeleteDirectConnectGatewayAssociationError {
3413    pub fn from_response(
3414        res: BufferedHttpResponse,
3415    ) -> RusotoError<DeleteDirectConnectGatewayAssociationError> {
3416        if let Some(err) = proto::json::Error::parse(&res) {
3417            match err.typ.as_str() {
3418                "DirectConnectClientException" => {
3419                    return RusotoError::Service(
3420                        DeleteDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
3421                    )
3422                }
3423                "DirectConnectServerException" => {
3424                    return RusotoError::Service(
3425                        DeleteDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
3426                    )
3427                }
3428                "ValidationException" => return RusotoError::Validation(err.msg),
3429                _ => {}
3430            }
3431        }
3432        RusotoError::Unknown(res)
3433    }
3434}
3435impl fmt::Display for DeleteDirectConnectGatewayAssociationError {
3436    #[allow(unused_variables)]
3437    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3438        match *self {
3439            DeleteDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => {
3440                write!(f, "{}", cause)
3441            }
3442            DeleteDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => {
3443                write!(f, "{}", cause)
3444            }
3445        }
3446    }
3447}
3448impl Error for DeleteDirectConnectGatewayAssociationError {}
3449/// Errors returned by DeleteDirectConnectGatewayAssociationProposal
3450#[derive(Debug, PartialEq)]
3451pub enum DeleteDirectConnectGatewayAssociationProposalError {
3452    /// <p>One or more parameters are not valid.</p>
3453    DirectConnectClient(String),
3454    /// <p>A server-side error occurred.</p>
3455    DirectConnectServer(String),
3456}
3457
3458impl DeleteDirectConnectGatewayAssociationProposalError {
3459    pub fn from_response(
3460        res: BufferedHttpResponse,
3461    ) -> RusotoError<DeleteDirectConnectGatewayAssociationProposalError> {
3462        if let Some(err) = proto::json::Error::parse(&res) {
3463            match err.typ.as_str() {
3464                "DirectConnectClientException" => {
3465                    return RusotoError::Service(
3466                        DeleteDirectConnectGatewayAssociationProposalError::DirectConnectClient(
3467                            err.msg,
3468                        ),
3469                    )
3470                }
3471                "DirectConnectServerException" => {
3472                    return RusotoError::Service(
3473                        DeleteDirectConnectGatewayAssociationProposalError::DirectConnectServer(
3474                            err.msg,
3475                        ),
3476                    )
3477                }
3478                "ValidationException" => return RusotoError::Validation(err.msg),
3479                _ => {}
3480            }
3481        }
3482        RusotoError::Unknown(res)
3483    }
3484}
3485impl fmt::Display for DeleteDirectConnectGatewayAssociationProposalError {
3486    #[allow(unused_variables)]
3487    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3488        match *self {
3489            DeleteDirectConnectGatewayAssociationProposalError::DirectConnectClient(ref cause) => {
3490                write!(f, "{}", cause)
3491            }
3492            DeleteDirectConnectGatewayAssociationProposalError::DirectConnectServer(ref cause) => {
3493                write!(f, "{}", cause)
3494            }
3495        }
3496    }
3497}
3498impl Error for DeleteDirectConnectGatewayAssociationProposalError {}
3499/// Errors returned by DeleteInterconnect
3500#[derive(Debug, PartialEq)]
3501pub enum DeleteInterconnectError {
3502    /// <p>One or more parameters are not valid.</p>
3503    DirectConnectClient(String),
3504    /// <p>A server-side error occurred.</p>
3505    DirectConnectServer(String),
3506}
3507
3508impl DeleteInterconnectError {
3509    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteInterconnectError> {
3510        if let Some(err) = proto::json::Error::parse(&res) {
3511            match err.typ.as_str() {
3512                "DirectConnectClientException" => {
3513                    return RusotoError::Service(DeleteInterconnectError::DirectConnectClient(
3514                        err.msg,
3515                    ))
3516                }
3517                "DirectConnectServerException" => {
3518                    return RusotoError::Service(DeleteInterconnectError::DirectConnectServer(
3519                        err.msg,
3520                    ))
3521                }
3522                "ValidationException" => return RusotoError::Validation(err.msg),
3523                _ => {}
3524            }
3525        }
3526        RusotoError::Unknown(res)
3527    }
3528}
3529impl fmt::Display for DeleteInterconnectError {
3530    #[allow(unused_variables)]
3531    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3532        match *self {
3533            DeleteInterconnectError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3534            DeleteInterconnectError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3535        }
3536    }
3537}
3538impl Error for DeleteInterconnectError {}
3539/// Errors returned by DeleteLag
3540#[derive(Debug, PartialEq)]
3541pub enum DeleteLagError {
3542    /// <p>One or more parameters are not valid.</p>
3543    DirectConnectClient(String),
3544    /// <p>A server-side error occurred.</p>
3545    DirectConnectServer(String),
3546}
3547
3548impl DeleteLagError {
3549    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLagError> {
3550        if let Some(err) = proto::json::Error::parse(&res) {
3551            match err.typ.as_str() {
3552                "DirectConnectClientException" => {
3553                    return RusotoError::Service(DeleteLagError::DirectConnectClient(err.msg))
3554                }
3555                "DirectConnectServerException" => {
3556                    return RusotoError::Service(DeleteLagError::DirectConnectServer(err.msg))
3557                }
3558                "ValidationException" => return RusotoError::Validation(err.msg),
3559                _ => {}
3560            }
3561        }
3562        RusotoError::Unknown(res)
3563    }
3564}
3565impl fmt::Display for DeleteLagError {
3566    #[allow(unused_variables)]
3567    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3568        match *self {
3569            DeleteLagError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3570            DeleteLagError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3571        }
3572    }
3573}
3574impl Error for DeleteLagError {}
3575/// Errors returned by DeleteVirtualInterface
3576#[derive(Debug, PartialEq)]
3577pub enum DeleteVirtualInterfaceError {
3578    /// <p>One or more parameters are not valid.</p>
3579    DirectConnectClient(String),
3580    /// <p>A server-side error occurred.</p>
3581    DirectConnectServer(String),
3582}
3583
3584impl DeleteVirtualInterfaceError {
3585    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteVirtualInterfaceError> {
3586        if let Some(err) = proto::json::Error::parse(&res) {
3587            match err.typ.as_str() {
3588                "DirectConnectClientException" => {
3589                    return RusotoError::Service(DeleteVirtualInterfaceError::DirectConnectClient(
3590                        err.msg,
3591                    ))
3592                }
3593                "DirectConnectServerException" => {
3594                    return RusotoError::Service(DeleteVirtualInterfaceError::DirectConnectServer(
3595                        err.msg,
3596                    ))
3597                }
3598                "ValidationException" => return RusotoError::Validation(err.msg),
3599                _ => {}
3600            }
3601        }
3602        RusotoError::Unknown(res)
3603    }
3604}
3605impl fmt::Display for DeleteVirtualInterfaceError {
3606    #[allow(unused_variables)]
3607    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3608        match *self {
3609            DeleteVirtualInterfaceError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3610            DeleteVirtualInterfaceError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3611        }
3612    }
3613}
3614impl Error for DeleteVirtualInterfaceError {}
3615/// Errors returned by DescribeConnectionLoa
3616#[derive(Debug, PartialEq)]
3617pub enum DescribeConnectionLoaError {
3618    /// <p>One or more parameters are not valid.</p>
3619    DirectConnectClient(String),
3620    /// <p>A server-side error occurred.</p>
3621    DirectConnectServer(String),
3622}
3623
3624impl DescribeConnectionLoaError {
3625    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConnectionLoaError> {
3626        if let Some(err) = proto::json::Error::parse(&res) {
3627            match err.typ.as_str() {
3628                "DirectConnectClientException" => {
3629                    return RusotoError::Service(DescribeConnectionLoaError::DirectConnectClient(
3630                        err.msg,
3631                    ))
3632                }
3633                "DirectConnectServerException" => {
3634                    return RusotoError::Service(DescribeConnectionLoaError::DirectConnectServer(
3635                        err.msg,
3636                    ))
3637                }
3638                "ValidationException" => return RusotoError::Validation(err.msg),
3639                _ => {}
3640            }
3641        }
3642        RusotoError::Unknown(res)
3643    }
3644}
3645impl fmt::Display for DescribeConnectionLoaError {
3646    #[allow(unused_variables)]
3647    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3648        match *self {
3649            DescribeConnectionLoaError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3650            DescribeConnectionLoaError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3651        }
3652    }
3653}
3654impl Error for DescribeConnectionLoaError {}
3655/// Errors returned by DescribeConnections
3656#[derive(Debug, PartialEq)]
3657pub enum DescribeConnectionsError {
3658    /// <p>One or more parameters are not valid.</p>
3659    DirectConnectClient(String),
3660    /// <p>A server-side error occurred.</p>
3661    DirectConnectServer(String),
3662}
3663
3664impl DescribeConnectionsError {
3665    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeConnectionsError> {
3666        if let Some(err) = proto::json::Error::parse(&res) {
3667            match err.typ.as_str() {
3668                "DirectConnectClientException" => {
3669                    return RusotoError::Service(DescribeConnectionsError::DirectConnectClient(
3670                        err.msg,
3671                    ))
3672                }
3673                "DirectConnectServerException" => {
3674                    return RusotoError::Service(DescribeConnectionsError::DirectConnectServer(
3675                        err.msg,
3676                    ))
3677                }
3678                "ValidationException" => return RusotoError::Validation(err.msg),
3679                _ => {}
3680            }
3681        }
3682        RusotoError::Unknown(res)
3683    }
3684}
3685impl fmt::Display for DescribeConnectionsError {
3686    #[allow(unused_variables)]
3687    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3688        match *self {
3689            DescribeConnectionsError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
3690            DescribeConnectionsError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
3691        }
3692    }
3693}
3694impl Error for DescribeConnectionsError {}
3695/// Errors returned by DescribeConnectionsOnInterconnect
3696#[derive(Debug, PartialEq)]
3697pub enum DescribeConnectionsOnInterconnectError {
3698    /// <p>One or more parameters are not valid.</p>
3699    DirectConnectClient(String),
3700    /// <p>A server-side error occurred.</p>
3701    DirectConnectServer(String),
3702}
3703
3704impl DescribeConnectionsOnInterconnectError {
3705    pub fn from_response(
3706        res: BufferedHttpResponse,
3707    ) -> RusotoError<DescribeConnectionsOnInterconnectError> {
3708        if let Some(err) = proto::json::Error::parse(&res) {
3709            match err.typ.as_str() {
3710                "DirectConnectClientException" => {
3711                    return RusotoError::Service(
3712                        DescribeConnectionsOnInterconnectError::DirectConnectClient(err.msg),
3713                    )
3714                }
3715                "DirectConnectServerException" => {
3716                    return RusotoError::Service(
3717                        DescribeConnectionsOnInterconnectError::DirectConnectServer(err.msg),
3718                    )
3719                }
3720                "ValidationException" => return RusotoError::Validation(err.msg),
3721                _ => {}
3722            }
3723        }
3724        RusotoError::Unknown(res)
3725    }
3726}
3727impl fmt::Display for DescribeConnectionsOnInterconnectError {
3728    #[allow(unused_variables)]
3729    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3730        match *self {
3731            DescribeConnectionsOnInterconnectError::DirectConnectClient(ref cause) => {
3732                write!(f, "{}", cause)
3733            }
3734            DescribeConnectionsOnInterconnectError::DirectConnectServer(ref cause) => {
3735                write!(f, "{}", cause)
3736            }
3737        }
3738    }
3739}
3740impl Error for DescribeConnectionsOnInterconnectError {}
3741/// Errors returned by DescribeDirectConnectGatewayAssociationProposals
3742#[derive(Debug, PartialEq)]
3743pub enum DescribeDirectConnectGatewayAssociationProposalsError {
3744    /// <p>One or more parameters are not valid.</p>
3745    DirectConnectClient(String),
3746    /// <p>A server-side error occurred.</p>
3747    DirectConnectServer(String),
3748}
3749
3750impl DescribeDirectConnectGatewayAssociationProposalsError {
3751    pub fn from_response(
3752        res: BufferedHttpResponse,
3753    ) -> RusotoError<DescribeDirectConnectGatewayAssociationProposalsError> {
3754        if let Some(err) = proto::json::Error::parse(&res) {
3755            match err.typ.as_str() {
3756                "DirectConnectClientException" => {
3757                    return RusotoError::Service(
3758                        DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectClient(
3759                            err.msg,
3760                        ),
3761                    )
3762                }
3763                "DirectConnectServerException" => {
3764                    return RusotoError::Service(
3765                        DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectServer(
3766                            err.msg,
3767                        ),
3768                    )
3769                }
3770                "ValidationException" => return RusotoError::Validation(err.msg),
3771                _ => {}
3772            }
3773        }
3774        RusotoError::Unknown(res)
3775    }
3776}
3777impl fmt::Display for DescribeDirectConnectGatewayAssociationProposalsError {
3778    #[allow(unused_variables)]
3779    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3780        match *self {
3781            DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectClient(
3782                ref cause,
3783            ) => write!(f, "{}", cause),
3784            DescribeDirectConnectGatewayAssociationProposalsError::DirectConnectServer(
3785                ref cause,
3786            ) => write!(f, "{}", cause),
3787        }
3788    }
3789}
3790impl Error for DescribeDirectConnectGatewayAssociationProposalsError {}
3791/// Errors returned by DescribeDirectConnectGatewayAssociations
3792#[derive(Debug, PartialEq)]
3793pub enum DescribeDirectConnectGatewayAssociationsError {
3794    /// <p>One or more parameters are not valid.</p>
3795    DirectConnectClient(String),
3796    /// <p>A server-side error occurred.</p>
3797    DirectConnectServer(String),
3798}
3799
3800impl DescribeDirectConnectGatewayAssociationsError {
3801    pub fn from_response(
3802        res: BufferedHttpResponse,
3803    ) -> RusotoError<DescribeDirectConnectGatewayAssociationsError> {
3804        if let Some(err) = proto::json::Error::parse(&res) {
3805            match err.typ.as_str() {
3806                "DirectConnectClientException" => {
3807                    return RusotoError::Service(
3808                        DescribeDirectConnectGatewayAssociationsError::DirectConnectClient(err.msg),
3809                    )
3810                }
3811                "DirectConnectServerException" => {
3812                    return RusotoError::Service(
3813                        DescribeDirectConnectGatewayAssociationsError::DirectConnectServer(err.msg),
3814                    )
3815                }
3816                "ValidationException" => return RusotoError::Validation(err.msg),
3817                _ => {}
3818            }
3819        }
3820        RusotoError::Unknown(res)
3821    }
3822}
3823impl fmt::Display for DescribeDirectConnectGatewayAssociationsError {
3824    #[allow(unused_variables)]
3825    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3826        match *self {
3827            DescribeDirectConnectGatewayAssociationsError::DirectConnectClient(ref cause) => {
3828                write!(f, "{}", cause)
3829            }
3830            DescribeDirectConnectGatewayAssociationsError::DirectConnectServer(ref cause) => {
3831                write!(f, "{}", cause)
3832            }
3833        }
3834    }
3835}
3836impl Error for DescribeDirectConnectGatewayAssociationsError {}
3837/// Errors returned by DescribeDirectConnectGatewayAttachments
3838#[derive(Debug, PartialEq)]
3839pub enum DescribeDirectConnectGatewayAttachmentsError {
3840    /// <p>One or more parameters are not valid.</p>
3841    DirectConnectClient(String),
3842    /// <p>A server-side error occurred.</p>
3843    DirectConnectServer(String),
3844}
3845
3846impl DescribeDirectConnectGatewayAttachmentsError {
3847    pub fn from_response(
3848        res: BufferedHttpResponse,
3849    ) -> RusotoError<DescribeDirectConnectGatewayAttachmentsError> {
3850        if let Some(err) = proto::json::Error::parse(&res) {
3851            match err.typ.as_str() {
3852                "DirectConnectClientException" => {
3853                    return RusotoError::Service(
3854                        DescribeDirectConnectGatewayAttachmentsError::DirectConnectClient(err.msg),
3855                    )
3856                }
3857                "DirectConnectServerException" => {
3858                    return RusotoError::Service(
3859                        DescribeDirectConnectGatewayAttachmentsError::DirectConnectServer(err.msg),
3860                    )
3861                }
3862                "ValidationException" => return RusotoError::Validation(err.msg),
3863                _ => {}
3864            }
3865        }
3866        RusotoError::Unknown(res)
3867    }
3868}
3869impl fmt::Display for DescribeDirectConnectGatewayAttachmentsError {
3870    #[allow(unused_variables)]
3871    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3872        match *self {
3873            DescribeDirectConnectGatewayAttachmentsError::DirectConnectClient(ref cause) => {
3874                write!(f, "{}", cause)
3875            }
3876            DescribeDirectConnectGatewayAttachmentsError::DirectConnectServer(ref cause) => {
3877                write!(f, "{}", cause)
3878            }
3879        }
3880    }
3881}
3882impl Error for DescribeDirectConnectGatewayAttachmentsError {}
3883/// Errors returned by DescribeDirectConnectGateways
3884#[derive(Debug, PartialEq)]
3885pub enum DescribeDirectConnectGatewaysError {
3886    /// <p>One or more parameters are not valid.</p>
3887    DirectConnectClient(String),
3888    /// <p>A server-side error occurred.</p>
3889    DirectConnectServer(String),
3890}
3891
3892impl DescribeDirectConnectGatewaysError {
3893    pub fn from_response(
3894        res: BufferedHttpResponse,
3895    ) -> RusotoError<DescribeDirectConnectGatewaysError> {
3896        if let Some(err) = proto::json::Error::parse(&res) {
3897            match err.typ.as_str() {
3898                "DirectConnectClientException" => {
3899                    return RusotoError::Service(
3900                        DescribeDirectConnectGatewaysError::DirectConnectClient(err.msg),
3901                    )
3902                }
3903                "DirectConnectServerException" => {
3904                    return RusotoError::Service(
3905                        DescribeDirectConnectGatewaysError::DirectConnectServer(err.msg),
3906                    )
3907                }
3908                "ValidationException" => return RusotoError::Validation(err.msg),
3909                _ => {}
3910            }
3911        }
3912        RusotoError::Unknown(res)
3913    }
3914}
3915impl fmt::Display for DescribeDirectConnectGatewaysError {
3916    #[allow(unused_variables)]
3917    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3918        match *self {
3919            DescribeDirectConnectGatewaysError::DirectConnectClient(ref cause) => {
3920                write!(f, "{}", cause)
3921            }
3922            DescribeDirectConnectGatewaysError::DirectConnectServer(ref cause) => {
3923                write!(f, "{}", cause)
3924            }
3925        }
3926    }
3927}
3928impl Error for DescribeDirectConnectGatewaysError {}
3929/// Errors returned by DescribeHostedConnections
3930#[derive(Debug, PartialEq)]
3931pub enum DescribeHostedConnectionsError {
3932    /// <p>One or more parameters are not valid.</p>
3933    DirectConnectClient(String),
3934    /// <p>A server-side error occurred.</p>
3935    DirectConnectServer(String),
3936}
3937
3938impl DescribeHostedConnectionsError {
3939    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHostedConnectionsError> {
3940        if let Some(err) = proto::json::Error::parse(&res) {
3941            match err.typ.as_str() {
3942                "DirectConnectClientException" => {
3943                    return RusotoError::Service(
3944                        DescribeHostedConnectionsError::DirectConnectClient(err.msg),
3945                    )
3946                }
3947                "DirectConnectServerException" => {
3948                    return RusotoError::Service(
3949                        DescribeHostedConnectionsError::DirectConnectServer(err.msg),
3950                    )
3951                }
3952                "ValidationException" => return RusotoError::Validation(err.msg),
3953                _ => {}
3954            }
3955        }
3956        RusotoError::Unknown(res)
3957    }
3958}
3959impl fmt::Display for DescribeHostedConnectionsError {
3960    #[allow(unused_variables)]
3961    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3962        match *self {
3963            DescribeHostedConnectionsError::DirectConnectClient(ref cause) => {
3964                write!(f, "{}", cause)
3965            }
3966            DescribeHostedConnectionsError::DirectConnectServer(ref cause) => {
3967                write!(f, "{}", cause)
3968            }
3969        }
3970    }
3971}
3972impl Error for DescribeHostedConnectionsError {}
3973/// Errors returned by DescribeInterconnectLoa
3974#[derive(Debug, PartialEq)]
3975pub enum DescribeInterconnectLoaError {
3976    /// <p>One or more parameters are not valid.</p>
3977    DirectConnectClient(String),
3978    /// <p>A server-side error occurred.</p>
3979    DirectConnectServer(String),
3980}
3981
3982impl DescribeInterconnectLoaError {
3983    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInterconnectLoaError> {
3984        if let Some(err) = proto::json::Error::parse(&res) {
3985            match err.typ.as_str() {
3986                "DirectConnectClientException" => {
3987                    return RusotoError::Service(DescribeInterconnectLoaError::DirectConnectClient(
3988                        err.msg,
3989                    ))
3990                }
3991                "DirectConnectServerException" => {
3992                    return RusotoError::Service(DescribeInterconnectLoaError::DirectConnectServer(
3993                        err.msg,
3994                    ))
3995                }
3996                "ValidationException" => return RusotoError::Validation(err.msg),
3997                _ => {}
3998            }
3999        }
4000        RusotoError::Unknown(res)
4001    }
4002}
4003impl fmt::Display for DescribeInterconnectLoaError {
4004    #[allow(unused_variables)]
4005    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4006        match *self {
4007            DescribeInterconnectLoaError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4008            DescribeInterconnectLoaError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4009        }
4010    }
4011}
4012impl Error for DescribeInterconnectLoaError {}
4013/// Errors returned by DescribeInterconnects
4014#[derive(Debug, PartialEq)]
4015pub enum DescribeInterconnectsError {
4016    /// <p>One or more parameters are not valid.</p>
4017    DirectConnectClient(String),
4018    /// <p>A server-side error occurred.</p>
4019    DirectConnectServer(String),
4020}
4021
4022impl DescribeInterconnectsError {
4023    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeInterconnectsError> {
4024        if let Some(err) = proto::json::Error::parse(&res) {
4025            match err.typ.as_str() {
4026                "DirectConnectClientException" => {
4027                    return RusotoError::Service(DescribeInterconnectsError::DirectConnectClient(
4028                        err.msg,
4029                    ))
4030                }
4031                "DirectConnectServerException" => {
4032                    return RusotoError::Service(DescribeInterconnectsError::DirectConnectServer(
4033                        err.msg,
4034                    ))
4035                }
4036                "ValidationException" => return RusotoError::Validation(err.msg),
4037                _ => {}
4038            }
4039        }
4040        RusotoError::Unknown(res)
4041    }
4042}
4043impl fmt::Display for DescribeInterconnectsError {
4044    #[allow(unused_variables)]
4045    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4046        match *self {
4047            DescribeInterconnectsError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4048            DescribeInterconnectsError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4049        }
4050    }
4051}
4052impl Error for DescribeInterconnectsError {}
4053/// Errors returned by DescribeLags
4054#[derive(Debug, PartialEq)]
4055pub enum DescribeLagsError {
4056    /// <p>One or more parameters are not valid.</p>
4057    DirectConnectClient(String),
4058    /// <p>A server-side error occurred.</p>
4059    DirectConnectServer(String),
4060}
4061
4062impl DescribeLagsError {
4063    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLagsError> {
4064        if let Some(err) = proto::json::Error::parse(&res) {
4065            match err.typ.as_str() {
4066                "DirectConnectClientException" => {
4067                    return RusotoError::Service(DescribeLagsError::DirectConnectClient(err.msg))
4068                }
4069                "DirectConnectServerException" => {
4070                    return RusotoError::Service(DescribeLagsError::DirectConnectServer(err.msg))
4071                }
4072                "ValidationException" => return RusotoError::Validation(err.msg),
4073                _ => {}
4074            }
4075        }
4076        RusotoError::Unknown(res)
4077    }
4078}
4079impl fmt::Display for DescribeLagsError {
4080    #[allow(unused_variables)]
4081    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4082        match *self {
4083            DescribeLagsError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4084            DescribeLagsError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4085        }
4086    }
4087}
4088impl Error for DescribeLagsError {}
4089/// Errors returned by DescribeLoa
4090#[derive(Debug, PartialEq)]
4091pub enum DescribeLoaError {
4092    /// <p>One or more parameters are not valid.</p>
4093    DirectConnectClient(String),
4094    /// <p>A server-side error occurred.</p>
4095    DirectConnectServer(String),
4096}
4097
4098impl DescribeLoaError {
4099    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLoaError> {
4100        if let Some(err) = proto::json::Error::parse(&res) {
4101            match err.typ.as_str() {
4102                "DirectConnectClientException" => {
4103                    return RusotoError::Service(DescribeLoaError::DirectConnectClient(err.msg))
4104                }
4105                "DirectConnectServerException" => {
4106                    return RusotoError::Service(DescribeLoaError::DirectConnectServer(err.msg))
4107                }
4108                "ValidationException" => return RusotoError::Validation(err.msg),
4109                _ => {}
4110            }
4111        }
4112        RusotoError::Unknown(res)
4113    }
4114}
4115impl fmt::Display for DescribeLoaError {
4116    #[allow(unused_variables)]
4117    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4118        match *self {
4119            DescribeLoaError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4120            DescribeLoaError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4121        }
4122    }
4123}
4124impl Error for DescribeLoaError {}
4125/// Errors returned by DescribeLocations
4126#[derive(Debug, PartialEq)]
4127pub enum DescribeLocationsError {
4128    /// <p>One or more parameters are not valid.</p>
4129    DirectConnectClient(String),
4130    /// <p>A server-side error occurred.</p>
4131    DirectConnectServer(String),
4132}
4133
4134impl DescribeLocationsError {
4135    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationsError> {
4136        if let Some(err) = proto::json::Error::parse(&res) {
4137            match err.typ.as_str() {
4138                "DirectConnectClientException" => {
4139                    return RusotoError::Service(DescribeLocationsError::DirectConnectClient(
4140                        err.msg,
4141                    ))
4142                }
4143                "DirectConnectServerException" => {
4144                    return RusotoError::Service(DescribeLocationsError::DirectConnectServer(
4145                        err.msg,
4146                    ))
4147                }
4148                "ValidationException" => return RusotoError::Validation(err.msg),
4149                _ => {}
4150            }
4151        }
4152        RusotoError::Unknown(res)
4153    }
4154}
4155impl fmt::Display for DescribeLocationsError {
4156    #[allow(unused_variables)]
4157    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4158        match *self {
4159            DescribeLocationsError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4160            DescribeLocationsError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4161        }
4162    }
4163}
4164impl Error for DescribeLocationsError {}
4165/// Errors returned by DescribeTags
4166#[derive(Debug, PartialEq)]
4167pub enum DescribeTagsError {
4168    /// <p>One or more parameters are not valid.</p>
4169    DirectConnectClient(String),
4170    /// <p>A server-side error occurred.</p>
4171    DirectConnectServer(String),
4172}
4173
4174impl DescribeTagsError {
4175    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTagsError> {
4176        if let Some(err) = proto::json::Error::parse(&res) {
4177            match err.typ.as_str() {
4178                "DirectConnectClientException" => {
4179                    return RusotoError::Service(DescribeTagsError::DirectConnectClient(err.msg))
4180                }
4181                "DirectConnectServerException" => {
4182                    return RusotoError::Service(DescribeTagsError::DirectConnectServer(err.msg))
4183                }
4184                "ValidationException" => return RusotoError::Validation(err.msg),
4185                _ => {}
4186            }
4187        }
4188        RusotoError::Unknown(res)
4189    }
4190}
4191impl fmt::Display for DescribeTagsError {
4192    #[allow(unused_variables)]
4193    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4194        match *self {
4195            DescribeTagsError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4196            DescribeTagsError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4197        }
4198    }
4199}
4200impl Error for DescribeTagsError {}
4201/// Errors returned by DescribeVirtualGateways
4202#[derive(Debug, PartialEq)]
4203pub enum DescribeVirtualGatewaysError {
4204    /// <p>One or more parameters are not valid.</p>
4205    DirectConnectClient(String),
4206    /// <p>A server-side error occurred.</p>
4207    DirectConnectServer(String),
4208}
4209
4210impl DescribeVirtualGatewaysError {
4211    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualGatewaysError> {
4212        if let Some(err) = proto::json::Error::parse(&res) {
4213            match err.typ.as_str() {
4214                "DirectConnectClientException" => {
4215                    return RusotoError::Service(DescribeVirtualGatewaysError::DirectConnectClient(
4216                        err.msg,
4217                    ))
4218                }
4219                "DirectConnectServerException" => {
4220                    return RusotoError::Service(DescribeVirtualGatewaysError::DirectConnectServer(
4221                        err.msg,
4222                    ))
4223                }
4224                "ValidationException" => return RusotoError::Validation(err.msg),
4225                _ => {}
4226            }
4227        }
4228        RusotoError::Unknown(res)
4229    }
4230}
4231impl fmt::Display for DescribeVirtualGatewaysError {
4232    #[allow(unused_variables)]
4233    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4234        match *self {
4235            DescribeVirtualGatewaysError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4236            DescribeVirtualGatewaysError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4237        }
4238    }
4239}
4240impl Error for DescribeVirtualGatewaysError {}
4241/// Errors returned by DescribeVirtualInterfaces
4242#[derive(Debug, PartialEq)]
4243pub enum DescribeVirtualInterfacesError {
4244    /// <p>One or more parameters are not valid.</p>
4245    DirectConnectClient(String),
4246    /// <p>A server-side error occurred.</p>
4247    DirectConnectServer(String),
4248}
4249
4250impl DescribeVirtualInterfacesError {
4251    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeVirtualInterfacesError> {
4252        if let Some(err) = proto::json::Error::parse(&res) {
4253            match err.typ.as_str() {
4254                "DirectConnectClientException" => {
4255                    return RusotoError::Service(
4256                        DescribeVirtualInterfacesError::DirectConnectClient(err.msg),
4257                    )
4258                }
4259                "DirectConnectServerException" => {
4260                    return RusotoError::Service(
4261                        DescribeVirtualInterfacesError::DirectConnectServer(err.msg),
4262                    )
4263                }
4264                "ValidationException" => return RusotoError::Validation(err.msg),
4265                _ => {}
4266            }
4267        }
4268        RusotoError::Unknown(res)
4269    }
4270}
4271impl fmt::Display for DescribeVirtualInterfacesError {
4272    #[allow(unused_variables)]
4273    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4274        match *self {
4275            DescribeVirtualInterfacesError::DirectConnectClient(ref cause) => {
4276                write!(f, "{}", cause)
4277            }
4278            DescribeVirtualInterfacesError::DirectConnectServer(ref cause) => {
4279                write!(f, "{}", cause)
4280            }
4281        }
4282    }
4283}
4284impl Error for DescribeVirtualInterfacesError {}
4285/// Errors returned by DisassociateConnectionFromLag
4286#[derive(Debug, PartialEq)]
4287pub enum DisassociateConnectionFromLagError {
4288    /// <p>One or more parameters are not valid.</p>
4289    DirectConnectClient(String),
4290    /// <p>A server-side error occurred.</p>
4291    DirectConnectServer(String),
4292}
4293
4294impl DisassociateConnectionFromLagError {
4295    pub fn from_response(
4296        res: BufferedHttpResponse,
4297    ) -> RusotoError<DisassociateConnectionFromLagError> {
4298        if let Some(err) = proto::json::Error::parse(&res) {
4299            match err.typ.as_str() {
4300                "DirectConnectClientException" => {
4301                    return RusotoError::Service(
4302                        DisassociateConnectionFromLagError::DirectConnectClient(err.msg),
4303                    )
4304                }
4305                "DirectConnectServerException" => {
4306                    return RusotoError::Service(
4307                        DisassociateConnectionFromLagError::DirectConnectServer(err.msg),
4308                    )
4309                }
4310                "ValidationException" => return RusotoError::Validation(err.msg),
4311                _ => {}
4312            }
4313        }
4314        RusotoError::Unknown(res)
4315    }
4316}
4317impl fmt::Display for DisassociateConnectionFromLagError {
4318    #[allow(unused_variables)]
4319    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4320        match *self {
4321            DisassociateConnectionFromLagError::DirectConnectClient(ref cause) => {
4322                write!(f, "{}", cause)
4323            }
4324            DisassociateConnectionFromLagError::DirectConnectServer(ref cause) => {
4325                write!(f, "{}", cause)
4326            }
4327        }
4328    }
4329}
4330impl Error for DisassociateConnectionFromLagError {}
4331/// Errors returned by ListVirtualInterfaceTestHistory
4332#[derive(Debug, PartialEq)]
4333pub enum ListVirtualInterfaceTestHistoryError {
4334    /// <p>One or more parameters are not valid.</p>
4335    DirectConnectClient(String),
4336    /// <p>A server-side error occurred.</p>
4337    DirectConnectServer(String),
4338}
4339
4340impl ListVirtualInterfaceTestHistoryError {
4341    pub fn from_response(
4342        res: BufferedHttpResponse,
4343    ) -> RusotoError<ListVirtualInterfaceTestHistoryError> {
4344        if let Some(err) = proto::json::Error::parse(&res) {
4345            match err.typ.as_str() {
4346                "DirectConnectClientException" => {
4347                    return RusotoError::Service(
4348                        ListVirtualInterfaceTestHistoryError::DirectConnectClient(err.msg),
4349                    )
4350                }
4351                "DirectConnectServerException" => {
4352                    return RusotoError::Service(
4353                        ListVirtualInterfaceTestHistoryError::DirectConnectServer(err.msg),
4354                    )
4355                }
4356                "ValidationException" => return RusotoError::Validation(err.msg),
4357                _ => {}
4358            }
4359        }
4360        RusotoError::Unknown(res)
4361    }
4362}
4363impl fmt::Display for ListVirtualInterfaceTestHistoryError {
4364    #[allow(unused_variables)]
4365    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4366        match *self {
4367            ListVirtualInterfaceTestHistoryError::DirectConnectClient(ref cause) => {
4368                write!(f, "{}", cause)
4369            }
4370            ListVirtualInterfaceTestHistoryError::DirectConnectServer(ref cause) => {
4371                write!(f, "{}", cause)
4372            }
4373        }
4374    }
4375}
4376impl Error for ListVirtualInterfaceTestHistoryError {}
4377/// Errors returned by StartBgpFailoverTest
4378#[derive(Debug, PartialEq)]
4379pub enum StartBgpFailoverTestError {
4380    /// <p>One or more parameters are not valid.</p>
4381    DirectConnectClient(String),
4382    /// <p>A server-side error occurred.</p>
4383    DirectConnectServer(String),
4384}
4385
4386impl StartBgpFailoverTestError {
4387    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartBgpFailoverTestError> {
4388        if let Some(err) = proto::json::Error::parse(&res) {
4389            match err.typ.as_str() {
4390                "DirectConnectClientException" => {
4391                    return RusotoError::Service(StartBgpFailoverTestError::DirectConnectClient(
4392                        err.msg,
4393                    ))
4394                }
4395                "DirectConnectServerException" => {
4396                    return RusotoError::Service(StartBgpFailoverTestError::DirectConnectServer(
4397                        err.msg,
4398                    ))
4399                }
4400                "ValidationException" => return RusotoError::Validation(err.msg),
4401                _ => {}
4402            }
4403        }
4404        RusotoError::Unknown(res)
4405    }
4406}
4407impl fmt::Display for StartBgpFailoverTestError {
4408    #[allow(unused_variables)]
4409    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4410        match *self {
4411            StartBgpFailoverTestError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4412            StartBgpFailoverTestError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4413        }
4414    }
4415}
4416impl Error for StartBgpFailoverTestError {}
4417/// Errors returned by StopBgpFailoverTest
4418#[derive(Debug, PartialEq)]
4419pub enum StopBgpFailoverTestError {
4420    /// <p>One or more parameters are not valid.</p>
4421    DirectConnectClient(String),
4422    /// <p>A server-side error occurred.</p>
4423    DirectConnectServer(String),
4424}
4425
4426impl StopBgpFailoverTestError {
4427    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopBgpFailoverTestError> {
4428        if let Some(err) = proto::json::Error::parse(&res) {
4429            match err.typ.as_str() {
4430                "DirectConnectClientException" => {
4431                    return RusotoError::Service(StopBgpFailoverTestError::DirectConnectClient(
4432                        err.msg,
4433                    ))
4434                }
4435                "DirectConnectServerException" => {
4436                    return RusotoError::Service(StopBgpFailoverTestError::DirectConnectServer(
4437                        err.msg,
4438                    ))
4439                }
4440                "ValidationException" => return RusotoError::Validation(err.msg),
4441                _ => {}
4442            }
4443        }
4444        RusotoError::Unknown(res)
4445    }
4446}
4447impl fmt::Display for StopBgpFailoverTestError {
4448    #[allow(unused_variables)]
4449    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4450        match *self {
4451            StopBgpFailoverTestError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4452            StopBgpFailoverTestError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4453        }
4454    }
4455}
4456impl Error for StopBgpFailoverTestError {}
4457/// Errors returned by TagResource
4458#[derive(Debug, PartialEq)]
4459pub enum TagResourceError {
4460    /// <p>One or more parameters are not valid.</p>
4461    DirectConnectClient(String),
4462    /// <p>A server-side error occurred.</p>
4463    DirectConnectServer(String),
4464    /// <p>A tag key was specified more than once.</p>
4465    DuplicateTagKeys(String),
4466    /// <p>You have reached the limit on the number of tags that can be assigned.</p>
4467    TooManyTags(String),
4468}
4469
4470impl TagResourceError {
4471    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
4472        if let Some(err) = proto::json::Error::parse(&res) {
4473            match err.typ.as_str() {
4474                "DirectConnectClientException" => {
4475                    return RusotoError::Service(TagResourceError::DirectConnectClient(err.msg))
4476                }
4477                "DirectConnectServerException" => {
4478                    return RusotoError::Service(TagResourceError::DirectConnectServer(err.msg))
4479                }
4480                "DuplicateTagKeysException" => {
4481                    return RusotoError::Service(TagResourceError::DuplicateTagKeys(err.msg))
4482                }
4483                "TooManyTagsException" => {
4484                    return RusotoError::Service(TagResourceError::TooManyTags(err.msg))
4485                }
4486                "ValidationException" => return RusotoError::Validation(err.msg),
4487                _ => {}
4488            }
4489        }
4490        RusotoError::Unknown(res)
4491    }
4492}
4493impl fmt::Display for TagResourceError {
4494    #[allow(unused_variables)]
4495    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4496        match *self {
4497            TagResourceError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4498            TagResourceError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4499            TagResourceError::DuplicateTagKeys(ref cause) => write!(f, "{}", cause),
4500            TagResourceError::TooManyTags(ref cause) => write!(f, "{}", cause),
4501        }
4502    }
4503}
4504impl Error for TagResourceError {}
4505/// Errors returned by UntagResource
4506#[derive(Debug, PartialEq)]
4507pub enum UntagResourceError {
4508    /// <p>One or more parameters are not valid.</p>
4509    DirectConnectClient(String),
4510    /// <p>A server-side error occurred.</p>
4511    DirectConnectServer(String),
4512}
4513
4514impl UntagResourceError {
4515    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
4516        if let Some(err) = proto::json::Error::parse(&res) {
4517            match err.typ.as_str() {
4518                "DirectConnectClientException" => {
4519                    return RusotoError::Service(UntagResourceError::DirectConnectClient(err.msg))
4520                }
4521                "DirectConnectServerException" => {
4522                    return RusotoError::Service(UntagResourceError::DirectConnectServer(err.msg))
4523                }
4524                "ValidationException" => return RusotoError::Validation(err.msg),
4525                _ => {}
4526            }
4527        }
4528        RusotoError::Unknown(res)
4529    }
4530}
4531impl fmt::Display for UntagResourceError {
4532    #[allow(unused_variables)]
4533    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4534        match *self {
4535            UntagResourceError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4536            UntagResourceError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4537        }
4538    }
4539}
4540impl Error for UntagResourceError {}
4541/// Errors returned by UpdateDirectConnectGatewayAssociation
4542#[derive(Debug, PartialEq)]
4543pub enum UpdateDirectConnectGatewayAssociationError {
4544    /// <p>One or more parameters are not valid.</p>
4545    DirectConnectClient(String),
4546    /// <p>A server-side error occurred.</p>
4547    DirectConnectServer(String),
4548}
4549
4550impl UpdateDirectConnectGatewayAssociationError {
4551    pub fn from_response(
4552        res: BufferedHttpResponse,
4553    ) -> RusotoError<UpdateDirectConnectGatewayAssociationError> {
4554        if let Some(err) = proto::json::Error::parse(&res) {
4555            match err.typ.as_str() {
4556                "DirectConnectClientException" => {
4557                    return RusotoError::Service(
4558                        UpdateDirectConnectGatewayAssociationError::DirectConnectClient(err.msg),
4559                    )
4560                }
4561                "DirectConnectServerException" => {
4562                    return RusotoError::Service(
4563                        UpdateDirectConnectGatewayAssociationError::DirectConnectServer(err.msg),
4564                    )
4565                }
4566                "ValidationException" => return RusotoError::Validation(err.msg),
4567                _ => {}
4568            }
4569        }
4570        RusotoError::Unknown(res)
4571    }
4572}
4573impl fmt::Display for UpdateDirectConnectGatewayAssociationError {
4574    #[allow(unused_variables)]
4575    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4576        match *self {
4577            UpdateDirectConnectGatewayAssociationError::DirectConnectClient(ref cause) => {
4578                write!(f, "{}", cause)
4579            }
4580            UpdateDirectConnectGatewayAssociationError::DirectConnectServer(ref cause) => {
4581                write!(f, "{}", cause)
4582            }
4583        }
4584    }
4585}
4586impl Error for UpdateDirectConnectGatewayAssociationError {}
4587/// Errors returned by UpdateLag
4588#[derive(Debug, PartialEq)]
4589pub enum UpdateLagError {
4590    /// <p>One or more parameters are not valid.</p>
4591    DirectConnectClient(String),
4592    /// <p>A server-side error occurred.</p>
4593    DirectConnectServer(String),
4594}
4595
4596impl UpdateLagError {
4597    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateLagError> {
4598        if let Some(err) = proto::json::Error::parse(&res) {
4599            match err.typ.as_str() {
4600                "DirectConnectClientException" => {
4601                    return RusotoError::Service(UpdateLagError::DirectConnectClient(err.msg))
4602                }
4603                "DirectConnectServerException" => {
4604                    return RusotoError::Service(UpdateLagError::DirectConnectServer(err.msg))
4605                }
4606                "ValidationException" => return RusotoError::Validation(err.msg),
4607                _ => {}
4608            }
4609        }
4610        RusotoError::Unknown(res)
4611    }
4612}
4613impl fmt::Display for UpdateLagError {
4614    #[allow(unused_variables)]
4615    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4616        match *self {
4617            UpdateLagError::DirectConnectClient(ref cause) => write!(f, "{}", cause),
4618            UpdateLagError::DirectConnectServer(ref cause) => write!(f, "{}", cause),
4619        }
4620    }
4621}
4622impl Error for UpdateLagError {}
4623/// Errors returned by UpdateVirtualInterfaceAttributes
4624#[derive(Debug, PartialEq)]
4625pub enum UpdateVirtualInterfaceAttributesError {
4626    /// <p>One or more parameters are not valid.</p>
4627    DirectConnectClient(String),
4628    /// <p>A server-side error occurred.</p>
4629    DirectConnectServer(String),
4630}
4631
4632impl UpdateVirtualInterfaceAttributesError {
4633    pub fn from_response(
4634        res: BufferedHttpResponse,
4635    ) -> RusotoError<UpdateVirtualInterfaceAttributesError> {
4636        if let Some(err) = proto::json::Error::parse(&res) {
4637            match err.typ.as_str() {
4638                "DirectConnectClientException" => {
4639                    return RusotoError::Service(
4640                        UpdateVirtualInterfaceAttributesError::DirectConnectClient(err.msg),
4641                    )
4642                }
4643                "DirectConnectServerException" => {
4644                    return RusotoError::Service(
4645                        UpdateVirtualInterfaceAttributesError::DirectConnectServer(err.msg),
4646                    )
4647                }
4648                "ValidationException" => return RusotoError::Validation(err.msg),
4649                _ => {}
4650            }
4651        }
4652        RusotoError::Unknown(res)
4653    }
4654}
4655impl fmt::Display for UpdateVirtualInterfaceAttributesError {
4656    #[allow(unused_variables)]
4657    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4658        match *self {
4659            UpdateVirtualInterfaceAttributesError::DirectConnectClient(ref cause) => {
4660                write!(f, "{}", cause)
4661            }
4662            UpdateVirtualInterfaceAttributesError::DirectConnectServer(ref cause) => {
4663                write!(f, "{}", cause)
4664            }
4665        }
4666    }
4667}
4668impl Error for UpdateVirtualInterfaceAttributesError {}
4669/// Trait representing the capabilities of the AWS Direct Connect API. AWS Direct Connect clients implement this trait.
4670#[async_trait]
4671pub trait DirectConnect {
4672    /// <p>Accepts a proposal request to attach a virtual private gateway or transit gateway to a Direct Connect gateway.</p>
4673    async fn accept_direct_connect_gateway_association_proposal(
4674        &self,
4675        input: AcceptDirectConnectGatewayAssociationProposalRequest,
4676    ) -> Result<
4677        AcceptDirectConnectGatewayAssociationProposalResult,
4678        RusotoError<AcceptDirectConnectGatewayAssociationProposalError>,
4679    >;
4680
4681    /// <p><p>Deprecated. Use <a>AllocateHostedConnection</a> instead.</p> <p>Creates a hosted connection on an interconnect.</p> <p>Allocates a VLAN number and a specified amount of bandwidth for use by a hosted connection on the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4682    async fn allocate_connection_on_interconnect(
4683        &self,
4684        input: AllocateConnectionOnInterconnectRequest,
4685    ) -> Result<Connection, RusotoError<AllocateConnectionOnInterconnectError>>;
4686
4687    /// <p><p>Creates a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects.</p> <p>Allocates a VLAN number and a specified amount of capacity (bandwidth) for use by a hosted connection on the specified interconnect or LAG of interconnects. AWS polices the hosted connection for the specified capacity and the AWS Direct Connect Partner must also police the hosted connection for the specified capacity.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4688    async fn allocate_hosted_connection(
4689        &self,
4690        input: AllocateHostedConnectionRequest,
4691    ) -> Result<Connection, RusotoError<AllocateHostedConnectionError>>;
4692
4693    /// <p>Provisions a private virtual interface to be owned by the specified AWS account.</p> <p>Virtual interfaces created using this action must be confirmed by the owner using <a>ConfirmPrivateVirtualInterface</a>. Until then, the virtual interface is in the <code>Confirming</code> state and is not available to handle traffic.</p>
4694    async fn allocate_private_virtual_interface(
4695        &self,
4696        input: AllocatePrivateVirtualInterfaceRequest,
4697    ) -> Result<VirtualInterface, RusotoError<AllocatePrivateVirtualInterfaceError>>;
4698
4699    /// <p>Provisions a public virtual interface to be owned by the specified AWS account.</p> <p>The owner of a connection calls this function to provision a public virtual interface to be owned by the specified AWS account.</p> <p>Virtual interfaces created using this function must be confirmed by the owner using <a>ConfirmPublicVirtualInterface</a>. Until this step has been completed, the virtual interface is in the <code>confirming</code> state and is not available to handle traffic.</p> <p>When creating an IPv6 public virtual interface, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.</p>
4700    async fn allocate_public_virtual_interface(
4701        &self,
4702        input: AllocatePublicVirtualInterfaceRequest,
4703    ) -> Result<VirtualInterface, RusotoError<AllocatePublicVirtualInterfaceError>>;
4704
4705    /// <p>Provisions a transit virtual interface to be owned by the specified AWS account. Use this type of interface to connect a transit gateway to your Direct Connect gateway.</p> <p>The owner of a connection provisions a transit virtual interface to be owned by the specified AWS account.</p> <p>After you create a transit virtual interface, it must be confirmed by the owner using <a>ConfirmTransitVirtualInterface</a>. Until this step has been completed, the transit virtual interface is in the <code>requested</code> state and is not available to handle traffic.</p>
4706    async fn allocate_transit_virtual_interface(
4707        &self,
4708        input: AllocateTransitVirtualInterfaceRequest,
4709    ) -> Result<
4710        AllocateTransitVirtualInterfaceResult,
4711        RusotoError<AllocateTransitVirtualInterfaceError>,
4712    >;
4713
4714    /// <p>Associates an existing connection with a link aggregation group (LAG). The connection is interrupted and re-established as a member of the LAG (connectivity to AWS is interrupted). The connection must be hosted on the same AWS Direct Connect endpoint as the LAG, and its bandwidth must match the bandwidth for the LAG. You can re-associate a connection that's currently associated with a different LAG; however, if removing the connection would cause the original LAG to fall below its setting for minimum number of operational connections, the request fails.</p> <p>Any virtual interfaces that are directly associated with the connection are automatically re-associated with the LAG. If the connection was originally associated with a different LAG, the virtual interfaces remain associated with the original LAG.</p> <p>For interconnects, any hosted connections are automatically re-associated with the LAG. If the interconnect was originally associated with a different LAG, the hosted connections remain associated with the original LAG.</p>
4715    async fn associate_connection_with_lag(
4716        &self,
4717        input: AssociateConnectionWithLagRequest,
4718    ) -> Result<Connection, RusotoError<AssociateConnectionWithLagError>>;
4719
4720    /// <p><p>Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect. If the target interconnect or LAG has an existing hosted connection with a conflicting VLAN number or IP address, the operation fails. This action temporarily interrupts the hosted connection&#39;s connectivity to AWS as it is being migrated.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4721    async fn associate_hosted_connection(
4722        &self,
4723        input: AssociateHostedConnectionRequest,
4724    ) -> Result<Connection, RusotoError<AssociateHostedConnectionError>>;
4725
4726    /// <p>Associates a virtual interface with a specified link aggregation group (LAG) or connection. Connectivity to AWS is temporarily interrupted as the virtual interface is being migrated. If the target connection or LAG has an associated virtual interface with a conflicting VLAN number or a conflicting IP address, the operation fails.</p> <p>Virtual interfaces associated with a hosted connection cannot be associated with a LAG; hosted connections must be migrated along with their virtual interfaces using <a>AssociateHostedConnection</a>.</p> <p>To reassociate a virtual interface to a new connection or LAG, the requester must own either the virtual interface itself or the connection to which the virtual interface is currently associated. Additionally, the requester must own the connection or LAG for the association.</p>
4727    async fn associate_virtual_interface(
4728        &self,
4729        input: AssociateVirtualInterfaceRequest,
4730    ) -> Result<VirtualInterface, RusotoError<AssociateVirtualInterfaceError>>;
4731
4732    /// <p>Confirms the creation of the specified hosted connection on an interconnect.</p> <p>Upon creation, the hosted connection is initially in the <code>Ordering</code> state, and remains in this state until the owner confirms creation of the hosted connection.</p>
4733    async fn confirm_connection(
4734        &self,
4735        input: ConfirmConnectionRequest,
4736    ) -> Result<ConfirmConnectionResponse, RusotoError<ConfirmConnectionError>>;
4737
4738    /// <p>Accepts ownership of a private virtual interface created by another AWS account.</p> <p>After the virtual interface owner makes this call, the virtual interface is created and attached to the specified virtual private gateway or Direct Connect gateway, and is made available to handle traffic.</p>
4739    async fn confirm_private_virtual_interface(
4740        &self,
4741        input: ConfirmPrivateVirtualInterfaceRequest,
4742    ) -> Result<
4743        ConfirmPrivateVirtualInterfaceResponse,
4744        RusotoError<ConfirmPrivateVirtualInterfaceError>,
4745    >;
4746
4747    /// <p>Accepts ownership of a public virtual interface created by another AWS account.</p> <p>After the virtual interface owner makes this call, the specified virtual interface is created and made available to handle traffic.</p>
4748    async fn confirm_public_virtual_interface(
4749        &self,
4750        input: ConfirmPublicVirtualInterfaceRequest,
4751    ) -> Result<
4752        ConfirmPublicVirtualInterfaceResponse,
4753        RusotoError<ConfirmPublicVirtualInterfaceError>,
4754    >;
4755
4756    /// <p>Accepts ownership of a transit virtual interface created by another AWS account.</p> <p> After the owner of the transit virtual interface makes this call, the specified transit virtual interface is created and made available to handle traffic.</p>
4757    async fn confirm_transit_virtual_interface(
4758        &self,
4759        input: ConfirmTransitVirtualInterfaceRequest,
4760    ) -> Result<
4761        ConfirmTransitVirtualInterfaceResponse,
4762        RusotoError<ConfirmTransitVirtualInterfaceError>,
4763    >;
4764
4765    /// <p>Creates a BGP peer on the specified virtual interface.</p> <p>You must create a BGP peer for the corresponding address family (IPv4/IPv6) in order to access AWS resources that also use that address family.</p> <p>If logical redundancy is not supported by the connection, interconnect, or LAG, the BGP peer cannot be in the same address family as an existing BGP peer on the virtual interface.</p> <p>When creating a IPv6 BGP peer, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.</p> <p>For a public virtual interface, the Autonomous System Number (ASN) must be private or already whitelisted for the virtual interface.</p>
4766    async fn create_bgp_peer(
4767        &self,
4768        input: CreateBGPPeerRequest,
4769    ) -> Result<CreateBGPPeerResponse, RusotoError<CreateBGPPeerError>>;
4770
4771    /// <p>Creates a connection between a customer network and a specific AWS Direct Connect location.</p> <p>A connection links your internal network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an AWS Direct Connect router.</p> <p>To find the locations for your Region, use <a>DescribeLocations</a>.</p> <p>You can automatically add the new connection to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new connection is allocated on the same AWS Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no connection is created.</p>
4772    async fn create_connection(
4773        &self,
4774        input: CreateConnectionRequest,
4775    ) -> Result<Connection, RusotoError<CreateConnectionError>>;
4776
4777    /// <p>Creates a Direct Connect gateway, which is an intermediate object that enables you to connect a set of virtual interfaces and virtual private gateways. A Direct Connect gateway is global and visible in any AWS Region after it is created. The virtual interfaces and virtual private gateways that are connected through a Direct Connect gateway can be in different AWS Regions. This enables you to connect to a VPC in any Region, regardless of the Region in which the virtual interfaces are located, and pass traffic between them.</p>
4778    async fn create_direct_connect_gateway(
4779        &self,
4780        input: CreateDirectConnectGatewayRequest,
4781    ) -> Result<CreateDirectConnectGatewayResult, RusotoError<CreateDirectConnectGatewayError>>;
4782
4783    /// <p>Creates an association between a Direct Connect gateway and a virtual private gateway. The virtual private gateway must be attached to a VPC and must not be associated with another Direct Connect gateway.</p>
4784    async fn create_direct_connect_gateway_association(
4785        &self,
4786        input: CreateDirectConnectGatewayAssociationRequest,
4787    ) -> Result<
4788        CreateDirectConnectGatewayAssociationResult,
4789        RusotoError<CreateDirectConnectGatewayAssociationError>,
4790    >;
4791
4792    /// <p>Creates a proposal to associate the specified virtual private gateway or transit gateway with the specified Direct Connect gateway.</p> <p>You can only associate a Direct Connect gateway and virtual private gateway or transit gateway when the account that owns the Direct Connect gateway and the account that owns the virtual private gateway or transit gateway have the same AWS Payer ID.</p>
4793    async fn create_direct_connect_gateway_association_proposal(
4794        &self,
4795        input: CreateDirectConnectGatewayAssociationProposalRequest,
4796    ) -> Result<
4797        CreateDirectConnectGatewayAssociationProposalResult,
4798        RusotoError<CreateDirectConnectGatewayAssociationProposalError>,
4799    >;
4800
4801    /// <p><p>Creates an interconnect between an AWS Direct Connect Partner&#39;s network and a specific AWS Direct Connect location.</p> <p>An interconnect is a connection that is capable of hosting other connections. The AWS Direct Connect partner can use an interconnect to provide AWS Direct Connect hosted connections to customers through their own network services. Like a standard connection, an interconnect links the partner&#39;s network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end is connected to the partner&#39;s router, the other to an AWS Direct Connect router.</p> <p>You can automatically add the new interconnect to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect is allocated on the same AWS Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no interconnect is created.</p> <p>For each end customer, the AWS Direct Connect Partner provisions a connection on their interconnect by calling <a>AllocateHostedConnection</a>. The end customer can then connect to AWS resources by creating a virtual interface on their connection, using the VLAN assigned to them by the AWS Direct Connect Partner.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4802    async fn create_interconnect(
4803        &self,
4804        input: CreateInterconnectRequest,
4805    ) -> Result<Interconnect, RusotoError<CreateInterconnectError>>;
4806
4807    /// <p>Creates a link aggregation group (LAG) with the specified number of bundled physical connections between the customer network and a specific AWS Direct Connect location. A LAG is a logical interface that uses the Link Aggregation Control Protocol (LACP) to aggregate multiple interfaces, enabling you to treat them as a single interface.</p> <p>All connections in a LAG must use the same bandwidth and must terminate at the same AWS Direct Connect endpoint.</p> <p>You can have up to 10 connections per LAG. Regardless of this limit, if you request more connections for the LAG than AWS Direct Connect can allocate on a single endpoint, no LAG is created.</p> <p>You can specify an existing physical connection or interconnect to include in the LAG (which counts towards the total number of connections). Doing so interrupts the current physical connection or hosted connections, and re-establishes them as a member of the LAG. The LAG will be created on the same AWS Direct Connect endpoint to which the connection terminates. Any virtual interfaces associated with the connection are automatically disassociated and re-associated with the LAG. The connection ID does not change.</p> <p>If the AWS account used to create a LAG is a registered AWS Direct Connect Partner, the LAG is automatically enabled to host sub-connections. For a LAG owned by a partner, any associated virtual interfaces cannot be directly configured.</p>
4808    async fn create_lag(&self, input: CreateLagRequest)
4809        -> Result<Lag, RusotoError<CreateLagError>>;
4810
4811    /// <p>Creates a private virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A private virtual interface can be connected to either a Direct Connect gateway or a Virtual Private Gateway (VGW). Connecting the private virtual interface to a Direct Connect gateway enables the possibility for connecting to multiple VPCs, including VPCs in different AWS Regions. Connecting the private virtual interface to a VGW only provides access to a single VPC within the same Region.</p> <p>Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
4812    async fn create_private_virtual_interface(
4813        &self,
4814        input: CreatePrivateVirtualInterfaceRequest,
4815    ) -> Result<VirtualInterface, RusotoError<CreatePrivateVirtualInterfaceError>>;
4816
4817    /// <p>Creates a public virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A public virtual interface supports sending traffic to public services of AWS such as Amazon S3.</p> <p>When creating an IPv6 public virtual interface (<code>addressFamily</code> is <code>ipv6</code>), leave the <code>customer</code> and <code>amazon</code> address fields blank to use auto-assigned IPv6 space. Custom IPv6 addresses are not supported.</p>
4818    async fn create_public_virtual_interface(
4819        &self,
4820        input: CreatePublicVirtualInterfaceRequest,
4821    ) -> Result<VirtualInterface, RusotoError<CreatePublicVirtualInterfaceError>>;
4822
4823    /// <p>Creates a transit virtual interface. A transit virtual interface should be used to access one or more transit gateways associated with Direct Connect gateways. A transit virtual interface enables the connection of multiple VPCs attached to a transit gateway to a Direct Connect gateway.</p> <important> <p>If you associate your transit gateway with one or more Direct Connect gateways, the Autonomous System Number (ASN) used by the transit gateway and the Direct Connect gateway must be different. For example, if you use the default ASN 64512 for both your the transit gateway and Direct Connect gateway, the association request fails.</p> </important> <p>Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
4824    async fn create_transit_virtual_interface(
4825        &self,
4826        input: CreateTransitVirtualInterfaceRequest,
4827    ) -> Result<CreateTransitVirtualInterfaceResult, RusotoError<CreateTransitVirtualInterfaceError>>;
4828
4829    /// <p>Deletes the specified BGP peer on the specified virtual interface with the specified customer address and ASN.</p> <p>You cannot delete the last BGP peer from a virtual interface.</p>
4830    async fn delete_bgp_peer(
4831        &self,
4832        input: DeleteBGPPeerRequest,
4833    ) -> Result<DeleteBGPPeerResponse, RusotoError<DeleteBGPPeerError>>;
4834
4835    /// <p>Deletes the specified connection.</p> <p>Deleting a connection only stops the AWS Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the AWS Direct Connect location, you must cancel your service with them separately.</p>
4836    async fn delete_connection(
4837        &self,
4838        input: DeleteConnectionRequest,
4839    ) -> Result<Connection, RusotoError<DeleteConnectionError>>;
4840
4841    /// <p>Deletes the specified Direct Connect gateway. You must first delete all virtual interfaces that are attached to the Direct Connect gateway and disassociate all virtual private gateways associated with the Direct Connect gateway.</p>
4842    async fn delete_direct_connect_gateway(
4843        &self,
4844        input: DeleteDirectConnectGatewayRequest,
4845    ) -> Result<DeleteDirectConnectGatewayResult, RusotoError<DeleteDirectConnectGatewayError>>;
4846
4847    /// <p>Deletes the association between the specified Direct Connect gateway and virtual private gateway.</p> <p>We recommend that you specify the <code>associationID</code> to delete the association. Alternatively, if you own virtual gateway and a Direct Connect gateway association, you can specify the <code>virtualGatewayId</code> and <code>directConnectGatewayId</code> to delete an association.</p>
4848    async fn delete_direct_connect_gateway_association(
4849        &self,
4850        input: DeleteDirectConnectGatewayAssociationRequest,
4851    ) -> Result<
4852        DeleteDirectConnectGatewayAssociationResult,
4853        RusotoError<DeleteDirectConnectGatewayAssociationError>,
4854    >;
4855
4856    /// <p>Deletes the association proposal request between the specified Direct Connect gateway and virtual private gateway or transit gateway.</p>
4857    async fn delete_direct_connect_gateway_association_proposal(
4858        &self,
4859        input: DeleteDirectConnectGatewayAssociationProposalRequest,
4860    ) -> Result<
4861        DeleteDirectConnectGatewayAssociationProposalResult,
4862        RusotoError<DeleteDirectConnectGatewayAssociationProposalError>,
4863    >;
4864
4865    /// <p><p>Deletes the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4866    async fn delete_interconnect(
4867        &self,
4868        input: DeleteInterconnectRequest,
4869    ) -> Result<DeleteInterconnectResponse, RusotoError<DeleteInterconnectError>>;
4870
4871    /// <p>Deletes the specified link aggregation group (LAG). You cannot delete a LAG if it has active virtual interfaces or hosted connections.</p>
4872    async fn delete_lag(&self, input: DeleteLagRequest)
4873        -> Result<Lag, RusotoError<DeleteLagError>>;
4874
4875    /// <p>Deletes a virtual interface.</p>
4876    async fn delete_virtual_interface(
4877        &self,
4878        input: DeleteVirtualInterfaceRequest,
4879    ) -> Result<DeleteVirtualInterfaceResponse, RusotoError<DeleteVirtualInterfaceError>>;
4880
4881    /// <p>Deprecated. Use <a>DescribeLoa</a> instead.</p> <p>Gets the LOA-CFA for a connection.</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that your APN partner or service provider uses when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
4882    async fn describe_connection_loa(
4883        &self,
4884        input: DescribeConnectionLoaRequest,
4885    ) -> Result<DescribeConnectionLoaResponse, RusotoError<DescribeConnectionLoaError>>;
4886
4887    /// <p>Displays the specified connection or all connections in this Region.</p>
4888    async fn describe_connections(
4889        &self,
4890        input: DescribeConnectionsRequest,
4891    ) -> Result<Connections, RusotoError<DescribeConnectionsError>>;
4892
4893    /// <p><p>Deprecated. Use <a>DescribeHostedConnections</a> instead.</p> <p>Lists the connections that have been provisioned on the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4894    async fn describe_connections_on_interconnect(
4895        &self,
4896        input: DescribeConnectionsOnInterconnectRequest,
4897    ) -> Result<Connections, RusotoError<DescribeConnectionsOnInterconnectError>>;
4898
4899    /// <p>Describes one or more association proposals for connection between a virtual private gateway or transit gateway and a Direct Connect gateway. </p>
4900    async fn describe_direct_connect_gateway_association_proposals(
4901        &self,
4902        input: DescribeDirectConnectGatewayAssociationProposalsRequest,
4903    ) -> Result<
4904        DescribeDirectConnectGatewayAssociationProposalsResult,
4905        RusotoError<DescribeDirectConnectGatewayAssociationProposalsError>,
4906    >;
4907
4908    /// <p>Lists the associations between your Direct Connect gateways and virtual private gateways. You must specify a Direct Connect gateway, a virtual private gateway, or both. If you specify a Direct Connect gateway, the response contains all virtual private gateways associated with the Direct Connect gateway. If you specify a virtual private gateway, the response contains all Direct Connect gateways associated with the virtual private gateway. If you specify both, the response contains the association between the Direct Connect gateway and the virtual private gateway.</p>
4909    async fn describe_direct_connect_gateway_associations(
4910        &self,
4911        input: DescribeDirectConnectGatewayAssociationsRequest,
4912    ) -> Result<
4913        DescribeDirectConnectGatewayAssociationsResult,
4914        RusotoError<DescribeDirectConnectGatewayAssociationsError>,
4915    >;
4916
4917    /// <p>Lists the attachments between your Direct Connect gateways and virtual interfaces. You must specify a Direct Connect gateway, a virtual interface, or both. If you specify a Direct Connect gateway, the response contains all virtual interfaces attached to the Direct Connect gateway. If you specify a virtual interface, the response contains all Direct Connect gateways attached to the virtual interface. If you specify both, the response contains the attachment between the Direct Connect gateway and the virtual interface.</p>
4918    async fn describe_direct_connect_gateway_attachments(
4919        &self,
4920        input: DescribeDirectConnectGatewayAttachmentsRequest,
4921    ) -> Result<
4922        DescribeDirectConnectGatewayAttachmentsResult,
4923        RusotoError<DescribeDirectConnectGatewayAttachmentsError>,
4924    >;
4925
4926    /// <p>Lists all your Direct Connect gateways or only the specified Direct Connect gateway. Deleted Direct Connect gateways are not returned.</p>
4927    async fn describe_direct_connect_gateways(
4928        &self,
4929        input: DescribeDirectConnectGatewaysRequest,
4930    ) -> Result<DescribeDirectConnectGatewaysResult, RusotoError<DescribeDirectConnectGatewaysError>>;
4931
4932    /// <p><p>Lists the hosted connections that have been provisioned on the specified interconnect or link aggregation group (LAG).</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
4933    async fn describe_hosted_connections(
4934        &self,
4935        input: DescribeHostedConnectionsRequest,
4936    ) -> Result<Connections, RusotoError<DescribeHostedConnectionsError>>;
4937
4938    /// <p>Deprecated. Use <a>DescribeLoa</a> instead.</p> <p>Gets the LOA-CFA for the specified interconnect.</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that is used when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
4939    async fn describe_interconnect_loa(
4940        &self,
4941        input: DescribeInterconnectLoaRequest,
4942    ) -> Result<DescribeInterconnectLoaResponse, RusotoError<DescribeInterconnectLoaError>>;
4943
4944    /// <p>Lists the interconnects owned by the AWS account or only the specified interconnect.</p>
4945    async fn describe_interconnects(
4946        &self,
4947        input: DescribeInterconnectsRequest,
4948    ) -> Result<Interconnects, RusotoError<DescribeInterconnectsError>>;
4949
4950    /// <p>Describes all your link aggregation groups (LAG) or the specified LAG.</p>
4951    async fn describe_lags(
4952        &self,
4953        input: DescribeLagsRequest,
4954    ) -> Result<Lags, RusotoError<DescribeLagsError>>;
4955
4956    /// <p>Gets the LOA-CFA for a connection, interconnect, or link aggregation group (LAG).</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that is used when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
4957    async fn describe_loa(
4958        &self,
4959        input: DescribeLoaRequest,
4960    ) -> Result<Loa, RusotoError<DescribeLoaError>>;
4961
4962    /// <p>Lists the AWS Direct Connect locations in the current AWS Region. These are the locations that can be selected when calling <a>CreateConnection</a> or <a>CreateInterconnect</a>.</p>
4963    async fn describe_locations(&self) -> Result<Locations, RusotoError<DescribeLocationsError>>;
4964
4965    /// <p>Describes the tags associated with the specified AWS Direct Connect resources.</p>
4966    async fn describe_tags(
4967        &self,
4968        input: DescribeTagsRequest,
4969    ) -> Result<DescribeTagsResponse, RusotoError<DescribeTagsError>>;
4970
4971    /// <p>Lists the virtual private gateways owned by the AWS account.</p> <p>You can create one or more AWS Direct Connect private virtual interfaces linked to a virtual private gateway.</p>
4972    async fn describe_virtual_gateways(
4973        &self,
4974    ) -> Result<VirtualGateways, RusotoError<DescribeVirtualGatewaysError>>;
4975
4976    /// <p>Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer than 15 minutes before you make the request are also returned. If you specify a connection ID, only the virtual interfaces associated with the connection are returned. If you specify a virtual interface ID, then only a single virtual interface is returned.</p> <p>A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect location and the customer network.</p>
4977    async fn describe_virtual_interfaces(
4978        &self,
4979        input: DescribeVirtualInterfacesRequest,
4980    ) -> Result<VirtualInterfaces, RusotoError<DescribeVirtualInterfacesError>>;
4981
4982    /// <p>Disassociates a connection from a link aggregation group (LAG). The connection is interrupted and re-established as a standalone connection (the connection is not deleted; to delete the connection, use the <a>DeleteConnection</a> request). If the LAG has associated virtual interfaces or hosted connections, they remain associated with the LAG. A disassociated connection owned by an AWS Direct Connect Partner is automatically converted to an interconnect.</p> <p>If disassociating the connection would cause the LAG to fall below its setting for minimum number of operational connections, the request fails, except when it's the last member of the LAG. If all connections are disassociated, the LAG continues to exist as an empty LAG with no physical connections. </p>
4983    async fn disassociate_connection_from_lag(
4984        &self,
4985        input: DisassociateConnectionFromLagRequest,
4986    ) -> Result<Connection, RusotoError<DisassociateConnectionFromLagError>>;
4987
4988    /// <p>Lists the virtual interface failover test history.</p>
4989    async fn list_virtual_interface_test_history(
4990        &self,
4991        input: ListVirtualInterfaceTestHistoryRequest,
4992    ) -> Result<
4993        ListVirtualInterfaceTestHistoryResponse,
4994        RusotoError<ListVirtualInterfaceTestHistoryError>,
4995    >;
4996
4997    /// <p>Starts the virtual interface failover test that verifies your configuration meets your resiliency requirements by placing the BGP peering session in the DOWN state. You can then send traffic to verify that there are no outages.</p> <p>You can run the test on public, private, transit, and hosted virtual interfaces.</p> <p>You can use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_ListVirtualInterfaceTestHistory.html">ListVirtualInterfaceTestHistory</a> to view the virtual interface test history.</p> <p>If you need to stop the test before the test interval completes, use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_StopBgpFailoverTest.html">StopBgpFailoverTest</a>.</p>
4998    async fn start_bgp_failover_test(
4999        &self,
5000        input: StartBgpFailoverTestRequest,
5001    ) -> Result<StartBgpFailoverTestResponse, RusotoError<StartBgpFailoverTestError>>;
5002
5003    /// <p>Stops the virtual interface failover test.</p>
5004    async fn stop_bgp_failover_test(
5005        &self,
5006        input: StopBgpFailoverTestRequest,
5007    ) -> Result<StopBgpFailoverTestResponse, RusotoError<StopBgpFailoverTestError>>;
5008
5009    /// <p>Adds the specified tags to the specified AWS Direct Connect resource. Each resource can have a maximum of 50 tags.</p> <p>Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.</p>
5010    async fn tag_resource(
5011        &self,
5012        input: TagResourceRequest,
5013    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
5014
5015    /// <p>Removes one or more tags from the specified AWS Direct Connect resource.</p>
5016    async fn untag_resource(
5017        &self,
5018        input: UntagResourceRequest,
5019    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
5020
5021    /// <p>Updates the specified attributes of the Direct Connect gateway association.</p> <p>Add or remove prefixes from the association.</p>
5022    async fn update_direct_connect_gateway_association(
5023        &self,
5024        input: UpdateDirectConnectGatewayAssociationRequest,
5025    ) -> Result<
5026        UpdateDirectConnectGatewayAssociationResult,
5027        RusotoError<UpdateDirectConnectGatewayAssociationError>,
5028    >;
5029
5030    /// <p>Updates the attributes of the specified link aggregation group (LAG).</p> <p>You can update the following attributes:</p> <ul> <li> <p>The name of the LAG.</p> </li> <li> <p>The value for the minimum number of connections that must be operational for the LAG itself to be operational. </p> </li> </ul> <p>When you create a LAG, the default value for the minimum number of operational connections is zero (0). If you update this value and the number of operational connections falls below the specified value, the LAG automatically goes down to avoid over-utilization of the remaining connections. Adjust this value with care, as it could force the LAG down if it is set higher than the current number of operational connections.</p>
5031    async fn update_lag(&self, input: UpdateLagRequest)
5032        -> Result<Lag, RusotoError<UpdateLagError>>;
5033
5034    /// <p>Updates the specified attributes of the specified virtual private interface.</p> <p>Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual q interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
5035    async fn update_virtual_interface_attributes(
5036        &self,
5037        input: UpdateVirtualInterfaceAttributesRequest,
5038    ) -> Result<VirtualInterface, RusotoError<UpdateVirtualInterfaceAttributesError>>;
5039}
5040/// A client for the AWS Direct Connect API.
5041#[derive(Clone)]
5042pub struct DirectConnectClient {
5043    client: Client,
5044    region: region::Region,
5045}
5046
5047impl DirectConnectClient {
5048    /// Creates a client backed by the default tokio event loop.
5049    ///
5050    /// The client will use the default credentials provider and tls client.
5051    pub fn new(region: region::Region) -> DirectConnectClient {
5052        DirectConnectClient {
5053            client: Client::shared(),
5054            region,
5055        }
5056    }
5057
5058    pub fn new_with<P, D>(
5059        request_dispatcher: D,
5060        credentials_provider: P,
5061        region: region::Region,
5062    ) -> DirectConnectClient
5063    where
5064        P: ProvideAwsCredentials + Send + Sync + 'static,
5065        D: DispatchSignedRequest + Send + Sync + 'static,
5066    {
5067        DirectConnectClient {
5068            client: Client::new_with(credentials_provider, request_dispatcher),
5069            region,
5070        }
5071    }
5072
5073    pub fn new_with_client(client: Client, region: region::Region) -> DirectConnectClient {
5074        DirectConnectClient { client, region }
5075    }
5076}
5077
5078#[async_trait]
5079impl DirectConnect for DirectConnectClient {
5080    /// <p>Accepts a proposal request to attach a virtual private gateway or transit gateway to a Direct Connect gateway.</p>
5081    async fn accept_direct_connect_gateway_association_proposal(
5082        &self,
5083        input: AcceptDirectConnectGatewayAssociationProposalRequest,
5084    ) -> Result<
5085        AcceptDirectConnectGatewayAssociationProposalResult,
5086        RusotoError<AcceptDirectConnectGatewayAssociationProposalError>,
5087    > {
5088        let mut request = self.new_signed_request("POST", "/");
5089        request.add_header(
5090            "x-amz-target",
5091            "OvertureService.AcceptDirectConnectGatewayAssociationProposal",
5092        );
5093        let encoded = serde_json::to_string(&input).unwrap();
5094        request.set_payload(Some(encoded));
5095
5096        let response = self
5097            .sign_and_dispatch(
5098                request,
5099                AcceptDirectConnectGatewayAssociationProposalError::from_response,
5100            )
5101            .await?;
5102        let mut response = response;
5103        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5104        proto::json::ResponsePayload::new(&response)
5105            .deserialize::<AcceptDirectConnectGatewayAssociationProposalResult, _>()
5106    }
5107
5108    /// <p><p>Deprecated. Use <a>AllocateHostedConnection</a> instead.</p> <p>Creates a hosted connection on an interconnect.</p> <p>Allocates a VLAN number and a specified amount of bandwidth for use by a hosted connection on the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5109    async fn allocate_connection_on_interconnect(
5110        &self,
5111        input: AllocateConnectionOnInterconnectRequest,
5112    ) -> Result<Connection, RusotoError<AllocateConnectionOnInterconnectError>> {
5113        let mut request = self.new_signed_request("POST", "/");
5114        request.add_header(
5115            "x-amz-target",
5116            "OvertureService.AllocateConnectionOnInterconnect",
5117        );
5118        let encoded = serde_json::to_string(&input).unwrap();
5119        request.set_payload(Some(encoded));
5120
5121        let response = self
5122            .sign_and_dispatch(
5123                request,
5124                AllocateConnectionOnInterconnectError::from_response,
5125            )
5126            .await?;
5127        let mut response = response;
5128        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5129        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5130    }
5131
5132    /// <p><p>Creates a hosted connection on the specified interconnect or a link aggregation group (LAG) of interconnects.</p> <p>Allocates a VLAN number and a specified amount of capacity (bandwidth) for use by a hosted connection on the specified interconnect or LAG of interconnects. AWS polices the hosted connection for the specified capacity and the AWS Direct Connect Partner must also police the hosted connection for the specified capacity.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5133    async fn allocate_hosted_connection(
5134        &self,
5135        input: AllocateHostedConnectionRequest,
5136    ) -> Result<Connection, RusotoError<AllocateHostedConnectionError>> {
5137        let mut request = self.new_signed_request("POST", "/");
5138        request.add_header("x-amz-target", "OvertureService.AllocateHostedConnection");
5139        let encoded = serde_json::to_string(&input).unwrap();
5140        request.set_payload(Some(encoded));
5141
5142        let response = self
5143            .sign_and_dispatch(request, AllocateHostedConnectionError::from_response)
5144            .await?;
5145        let mut response = response;
5146        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5147        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5148    }
5149
5150    /// <p>Provisions a private virtual interface to be owned by the specified AWS account.</p> <p>Virtual interfaces created using this action must be confirmed by the owner using <a>ConfirmPrivateVirtualInterface</a>. Until then, the virtual interface is in the <code>Confirming</code> state and is not available to handle traffic.</p>
5151    async fn allocate_private_virtual_interface(
5152        &self,
5153        input: AllocatePrivateVirtualInterfaceRequest,
5154    ) -> Result<VirtualInterface, RusotoError<AllocatePrivateVirtualInterfaceError>> {
5155        let mut request = self.new_signed_request("POST", "/");
5156        request.add_header(
5157            "x-amz-target",
5158            "OvertureService.AllocatePrivateVirtualInterface",
5159        );
5160        let encoded = serde_json::to_string(&input).unwrap();
5161        request.set_payload(Some(encoded));
5162
5163        let response = self
5164            .sign_and_dispatch(request, AllocatePrivateVirtualInterfaceError::from_response)
5165            .await?;
5166        let mut response = response;
5167        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5168        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
5169    }
5170
5171    /// <p>Provisions a public virtual interface to be owned by the specified AWS account.</p> <p>The owner of a connection calls this function to provision a public virtual interface to be owned by the specified AWS account.</p> <p>Virtual interfaces created using this function must be confirmed by the owner using <a>ConfirmPublicVirtualInterface</a>. Until this step has been completed, the virtual interface is in the <code>confirming</code> state and is not available to handle traffic.</p> <p>When creating an IPv6 public virtual interface, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.</p>
5172    async fn allocate_public_virtual_interface(
5173        &self,
5174        input: AllocatePublicVirtualInterfaceRequest,
5175    ) -> Result<VirtualInterface, RusotoError<AllocatePublicVirtualInterfaceError>> {
5176        let mut request = self.new_signed_request("POST", "/");
5177        request.add_header(
5178            "x-amz-target",
5179            "OvertureService.AllocatePublicVirtualInterface",
5180        );
5181        let encoded = serde_json::to_string(&input).unwrap();
5182        request.set_payload(Some(encoded));
5183
5184        let response = self
5185            .sign_and_dispatch(request, AllocatePublicVirtualInterfaceError::from_response)
5186            .await?;
5187        let mut response = response;
5188        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5189        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
5190    }
5191
5192    /// <p>Provisions a transit virtual interface to be owned by the specified AWS account. Use this type of interface to connect a transit gateway to your Direct Connect gateway.</p> <p>The owner of a connection provisions a transit virtual interface to be owned by the specified AWS account.</p> <p>After you create a transit virtual interface, it must be confirmed by the owner using <a>ConfirmTransitVirtualInterface</a>. Until this step has been completed, the transit virtual interface is in the <code>requested</code> state and is not available to handle traffic.</p>
5193    async fn allocate_transit_virtual_interface(
5194        &self,
5195        input: AllocateTransitVirtualInterfaceRequest,
5196    ) -> Result<
5197        AllocateTransitVirtualInterfaceResult,
5198        RusotoError<AllocateTransitVirtualInterfaceError>,
5199    > {
5200        let mut request = self.new_signed_request("POST", "/");
5201        request.add_header(
5202            "x-amz-target",
5203            "OvertureService.AllocateTransitVirtualInterface",
5204        );
5205        let encoded = serde_json::to_string(&input).unwrap();
5206        request.set_payload(Some(encoded));
5207
5208        let response = self
5209            .sign_and_dispatch(request, AllocateTransitVirtualInterfaceError::from_response)
5210            .await?;
5211        let mut response = response;
5212        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5213        proto::json::ResponsePayload::new(&response)
5214            .deserialize::<AllocateTransitVirtualInterfaceResult, _>()
5215    }
5216
5217    /// <p>Associates an existing connection with a link aggregation group (LAG). The connection is interrupted and re-established as a member of the LAG (connectivity to AWS is interrupted). The connection must be hosted on the same AWS Direct Connect endpoint as the LAG, and its bandwidth must match the bandwidth for the LAG. You can re-associate a connection that's currently associated with a different LAG; however, if removing the connection would cause the original LAG to fall below its setting for minimum number of operational connections, the request fails.</p> <p>Any virtual interfaces that are directly associated with the connection are automatically re-associated with the LAG. If the connection was originally associated with a different LAG, the virtual interfaces remain associated with the original LAG.</p> <p>For interconnects, any hosted connections are automatically re-associated with the LAG. If the interconnect was originally associated with a different LAG, the hosted connections remain associated with the original LAG.</p>
5218    async fn associate_connection_with_lag(
5219        &self,
5220        input: AssociateConnectionWithLagRequest,
5221    ) -> Result<Connection, RusotoError<AssociateConnectionWithLagError>> {
5222        let mut request = self.new_signed_request("POST", "/");
5223        request.add_header("x-amz-target", "OvertureService.AssociateConnectionWithLag");
5224        let encoded = serde_json::to_string(&input).unwrap();
5225        request.set_payload(Some(encoded));
5226
5227        let response = self
5228            .sign_and_dispatch(request, AssociateConnectionWithLagError::from_response)
5229            .await?;
5230        let mut response = response;
5231        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5232        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5233    }
5234
5235    /// <p><p>Associates a hosted connection and its virtual interfaces with a link aggregation group (LAG) or interconnect. If the target interconnect or LAG has an existing hosted connection with a conflicting VLAN number or IP address, the operation fails. This action temporarily interrupts the hosted connection&#39;s connectivity to AWS as it is being migrated.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5236    async fn associate_hosted_connection(
5237        &self,
5238        input: AssociateHostedConnectionRequest,
5239    ) -> Result<Connection, RusotoError<AssociateHostedConnectionError>> {
5240        let mut request = self.new_signed_request("POST", "/");
5241        request.add_header("x-amz-target", "OvertureService.AssociateHostedConnection");
5242        let encoded = serde_json::to_string(&input).unwrap();
5243        request.set_payload(Some(encoded));
5244
5245        let response = self
5246            .sign_and_dispatch(request, AssociateHostedConnectionError::from_response)
5247            .await?;
5248        let mut response = response;
5249        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5250        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5251    }
5252
5253    /// <p>Associates a virtual interface with a specified link aggregation group (LAG) or connection. Connectivity to AWS is temporarily interrupted as the virtual interface is being migrated. If the target connection or LAG has an associated virtual interface with a conflicting VLAN number or a conflicting IP address, the operation fails.</p> <p>Virtual interfaces associated with a hosted connection cannot be associated with a LAG; hosted connections must be migrated along with their virtual interfaces using <a>AssociateHostedConnection</a>.</p> <p>To reassociate a virtual interface to a new connection or LAG, the requester must own either the virtual interface itself or the connection to which the virtual interface is currently associated. Additionally, the requester must own the connection or LAG for the association.</p>
5254    async fn associate_virtual_interface(
5255        &self,
5256        input: AssociateVirtualInterfaceRequest,
5257    ) -> Result<VirtualInterface, RusotoError<AssociateVirtualInterfaceError>> {
5258        let mut request = self.new_signed_request("POST", "/");
5259        request.add_header("x-amz-target", "OvertureService.AssociateVirtualInterface");
5260        let encoded = serde_json::to_string(&input).unwrap();
5261        request.set_payload(Some(encoded));
5262
5263        let response = self
5264            .sign_and_dispatch(request, AssociateVirtualInterfaceError::from_response)
5265            .await?;
5266        let mut response = response;
5267        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5268        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
5269    }
5270
5271    /// <p>Confirms the creation of the specified hosted connection on an interconnect.</p> <p>Upon creation, the hosted connection is initially in the <code>Ordering</code> state, and remains in this state until the owner confirms creation of the hosted connection.</p>
5272    async fn confirm_connection(
5273        &self,
5274        input: ConfirmConnectionRequest,
5275    ) -> Result<ConfirmConnectionResponse, RusotoError<ConfirmConnectionError>> {
5276        let mut request = self.new_signed_request("POST", "/");
5277        request.add_header("x-amz-target", "OvertureService.ConfirmConnection");
5278        let encoded = serde_json::to_string(&input).unwrap();
5279        request.set_payload(Some(encoded));
5280
5281        let response = self
5282            .sign_and_dispatch(request, ConfirmConnectionError::from_response)
5283            .await?;
5284        let mut response = response;
5285        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5286        proto::json::ResponsePayload::new(&response).deserialize::<ConfirmConnectionResponse, _>()
5287    }
5288
5289    /// <p>Accepts ownership of a private virtual interface created by another AWS account.</p> <p>After the virtual interface owner makes this call, the virtual interface is created and attached to the specified virtual private gateway or Direct Connect gateway, and is made available to handle traffic.</p>
5290    async fn confirm_private_virtual_interface(
5291        &self,
5292        input: ConfirmPrivateVirtualInterfaceRequest,
5293    ) -> Result<
5294        ConfirmPrivateVirtualInterfaceResponse,
5295        RusotoError<ConfirmPrivateVirtualInterfaceError>,
5296    > {
5297        let mut request = self.new_signed_request("POST", "/");
5298        request.add_header(
5299            "x-amz-target",
5300            "OvertureService.ConfirmPrivateVirtualInterface",
5301        );
5302        let encoded = serde_json::to_string(&input).unwrap();
5303        request.set_payload(Some(encoded));
5304
5305        let response = self
5306            .sign_and_dispatch(request, ConfirmPrivateVirtualInterfaceError::from_response)
5307            .await?;
5308        let mut response = response;
5309        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5310        proto::json::ResponsePayload::new(&response)
5311            .deserialize::<ConfirmPrivateVirtualInterfaceResponse, _>()
5312    }
5313
5314    /// <p>Accepts ownership of a public virtual interface created by another AWS account.</p> <p>After the virtual interface owner makes this call, the specified virtual interface is created and made available to handle traffic.</p>
5315    async fn confirm_public_virtual_interface(
5316        &self,
5317        input: ConfirmPublicVirtualInterfaceRequest,
5318    ) -> Result<
5319        ConfirmPublicVirtualInterfaceResponse,
5320        RusotoError<ConfirmPublicVirtualInterfaceError>,
5321    > {
5322        let mut request = self.new_signed_request("POST", "/");
5323        request.add_header(
5324            "x-amz-target",
5325            "OvertureService.ConfirmPublicVirtualInterface",
5326        );
5327        let encoded = serde_json::to_string(&input).unwrap();
5328        request.set_payload(Some(encoded));
5329
5330        let response = self
5331            .sign_and_dispatch(request, ConfirmPublicVirtualInterfaceError::from_response)
5332            .await?;
5333        let mut response = response;
5334        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5335        proto::json::ResponsePayload::new(&response)
5336            .deserialize::<ConfirmPublicVirtualInterfaceResponse, _>()
5337    }
5338
5339    /// <p>Accepts ownership of a transit virtual interface created by another AWS account.</p> <p> After the owner of the transit virtual interface makes this call, the specified transit virtual interface is created and made available to handle traffic.</p>
5340    async fn confirm_transit_virtual_interface(
5341        &self,
5342        input: ConfirmTransitVirtualInterfaceRequest,
5343    ) -> Result<
5344        ConfirmTransitVirtualInterfaceResponse,
5345        RusotoError<ConfirmTransitVirtualInterfaceError>,
5346    > {
5347        let mut request = self.new_signed_request("POST", "/");
5348        request.add_header(
5349            "x-amz-target",
5350            "OvertureService.ConfirmTransitVirtualInterface",
5351        );
5352        let encoded = serde_json::to_string(&input).unwrap();
5353        request.set_payload(Some(encoded));
5354
5355        let response = self
5356            .sign_and_dispatch(request, ConfirmTransitVirtualInterfaceError::from_response)
5357            .await?;
5358        let mut response = response;
5359        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5360        proto::json::ResponsePayload::new(&response)
5361            .deserialize::<ConfirmTransitVirtualInterfaceResponse, _>()
5362    }
5363
5364    /// <p>Creates a BGP peer on the specified virtual interface.</p> <p>You must create a BGP peer for the corresponding address family (IPv4/IPv6) in order to access AWS resources that also use that address family.</p> <p>If logical redundancy is not supported by the connection, interconnect, or LAG, the BGP peer cannot be in the same address family as an existing BGP peer on the virtual interface.</p> <p>When creating a IPv6 BGP peer, omit the Amazon address and customer address. IPv6 addresses are automatically assigned from the Amazon pool of IPv6 addresses; you cannot specify custom IPv6 addresses.</p> <p>For a public virtual interface, the Autonomous System Number (ASN) must be private or already whitelisted for the virtual interface.</p>
5365    async fn create_bgp_peer(
5366        &self,
5367        input: CreateBGPPeerRequest,
5368    ) -> Result<CreateBGPPeerResponse, RusotoError<CreateBGPPeerError>> {
5369        let mut request = self.new_signed_request("POST", "/");
5370        request.add_header("x-amz-target", "OvertureService.CreateBGPPeer");
5371        let encoded = serde_json::to_string(&input).unwrap();
5372        request.set_payload(Some(encoded));
5373
5374        let response = self
5375            .sign_and_dispatch(request, CreateBGPPeerError::from_response)
5376            .await?;
5377        let mut response = response;
5378        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5379        proto::json::ResponsePayload::new(&response).deserialize::<CreateBGPPeerResponse, _>()
5380    }
5381
5382    /// <p>Creates a connection between a customer network and a specific AWS Direct Connect location.</p> <p>A connection links your internal network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end of the cable is connected to your router, the other to an AWS Direct Connect router.</p> <p>To find the locations for your Region, use <a>DescribeLocations</a>.</p> <p>You can automatically add the new connection to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new connection is allocated on the same AWS Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no connection is created.</p>
5383    async fn create_connection(
5384        &self,
5385        input: CreateConnectionRequest,
5386    ) -> Result<Connection, RusotoError<CreateConnectionError>> {
5387        let mut request = self.new_signed_request("POST", "/");
5388        request.add_header("x-amz-target", "OvertureService.CreateConnection");
5389        let encoded = serde_json::to_string(&input).unwrap();
5390        request.set_payload(Some(encoded));
5391
5392        let response = self
5393            .sign_and_dispatch(request, CreateConnectionError::from_response)
5394            .await?;
5395        let mut response = response;
5396        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5397        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5398    }
5399
5400    /// <p>Creates a Direct Connect gateway, which is an intermediate object that enables you to connect a set of virtual interfaces and virtual private gateways. A Direct Connect gateway is global and visible in any AWS Region after it is created. The virtual interfaces and virtual private gateways that are connected through a Direct Connect gateway can be in different AWS Regions. This enables you to connect to a VPC in any Region, regardless of the Region in which the virtual interfaces are located, and pass traffic between them.</p>
5401    async fn create_direct_connect_gateway(
5402        &self,
5403        input: CreateDirectConnectGatewayRequest,
5404    ) -> Result<CreateDirectConnectGatewayResult, RusotoError<CreateDirectConnectGatewayError>>
5405    {
5406        let mut request = self.new_signed_request("POST", "/");
5407        request.add_header("x-amz-target", "OvertureService.CreateDirectConnectGateway");
5408        let encoded = serde_json::to_string(&input).unwrap();
5409        request.set_payload(Some(encoded));
5410
5411        let response = self
5412            .sign_and_dispatch(request, CreateDirectConnectGatewayError::from_response)
5413            .await?;
5414        let mut response = response;
5415        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5416        proto::json::ResponsePayload::new(&response)
5417            .deserialize::<CreateDirectConnectGatewayResult, _>()
5418    }
5419
5420    /// <p>Creates an association between a Direct Connect gateway and a virtual private gateway. The virtual private gateway must be attached to a VPC and must not be associated with another Direct Connect gateway.</p>
5421    async fn create_direct_connect_gateway_association(
5422        &self,
5423        input: CreateDirectConnectGatewayAssociationRequest,
5424    ) -> Result<
5425        CreateDirectConnectGatewayAssociationResult,
5426        RusotoError<CreateDirectConnectGatewayAssociationError>,
5427    > {
5428        let mut request = self.new_signed_request("POST", "/");
5429        request.add_header(
5430            "x-amz-target",
5431            "OvertureService.CreateDirectConnectGatewayAssociation",
5432        );
5433        let encoded = serde_json::to_string(&input).unwrap();
5434        request.set_payload(Some(encoded));
5435
5436        let response = self
5437            .sign_and_dispatch(
5438                request,
5439                CreateDirectConnectGatewayAssociationError::from_response,
5440            )
5441            .await?;
5442        let mut response = response;
5443        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5444        proto::json::ResponsePayload::new(&response)
5445            .deserialize::<CreateDirectConnectGatewayAssociationResult, _>()
5446    }
5447
5448    /// <p>Creates a proposal to associate the specified virtual private gateway or transit gateway with the specified Direct Connect gateway.</p> <p>You can only associate a Direct Connect gateway and virtual private gateway or transit gateway when the account that owns the Direct Connect gateway and the account that owns the virtual private gateway or transit gateway have the same AWS Payer ID.</p>
5449    async fn create_direct_connect_gateway_association_proposal(
5450        &self,
5451        input: CreateDirectConnectGatewayAssociationProposalRequest,
5452    ) -> Result<
5453        CreateDirectConnectGatewayAssociationProposalResult,
5454        RusotoError<CreateDirectConnectGatewayAssociationProposalError>,
5455    > {
5456        let mut request = self.new_signed_request("POST", "/");
5457        request.add_header(
5458            "x-amz-target",
5459            "OvertureService.CreateDirectConnectGatewayAssociationProposal",
5460        );
5461        let encoded = serde_json::to_string(&input).unwrap();
5462        request.set_payload(Some(encoded));
5463
5464        let response = self
5465            .sign_and_dispatch(
5466                request,
5467                CreateDirectConnectGatewayAssociationProposalError::from_response,
5468            )
5469            .await?;
5470        let mut response = response;
5471        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5472        proto::json::ResponsePayload::new(&response)
5473            .deserialize::<CreateDirectConnectGatewayAssociationProposalResult, _>()
5474    }
5475
5476    /// <p><p>Creates an interconnect between an AWS Direct Connect Partner&#39;s network and a specific AWS Direct Connect location.</p> <p>An interconnect is a connection that is capable of hosting other connections. The AWS Direct Connect partner can use an interconnect to provide AWS Direct Connect hosted connections to customers through their own network services. Like a standard connection, an interconnect links the partner&#39;s network to an AWS Direct Connect location over a standard Ethernet fiber-optic cable. One end is connected to the partner&#39;s router, the other to an AWS Direct Connect router.</p> <p>You can automatically add the new interconnect to a link aggregation group (LAG) by specifying a LAG ID in the request. This ensures that the new interconnect is allocated on the same AWS Direct Connect endpoint that hosts the specified LAG. If there are no available ports on the endpoint, the request fails and no interconnect is created.</p> <p>For each end customer, the AWS Direct Connect Partner provisions a connection on their interconnect by calling <a>AllocateHostedConnection</a>. The end customer can then connect to AWS resources by creating a virtual interface on their connection, using the VLAN assigned to them by the AWS Direct Connect Partner.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5477    async fn create_interconnect(
5478        &self,
5479        input: CreateInterconnectRequest,
5480    ) -> Result<Interconnect, RusotoError<CreateInterconnectError>> {
5481        let mut request = self.new_signed_request("POST", "/");
5482        request.add_header("x-amz-target", "OvertureService.CreateInterconnect");
5483        let encoded = serde_json::to_string(&input).unwrap();
5484        request.set_payload(Some(encoded));
5485
5486        let response = self
5487            .sign_and_dispatch(request, CreateInterconnectError::from_response)
5488            .await?;
5489        let mut response = response;
5490        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5491        proto::json::ResponsePayload::new(&response).deserialize::<Interconnect, _>()
5492    }
5493
5494    /// <p>Creates a link aggregation group (LAG) with the specified number of bundled physical connections between the customer network and a specific AWS Direct Connect location. A LAG is a logical interface that uses the Link Aggregation Control Protocol (LACP) to aggregate multiple interfaces, enabling you to treat them as a single interface.</p> <p>All connections in a LAG must use the same bandwidth and must terminate at the same AWS Direct Connect endpoint.</p> <p>You can have up to 10 connections per LAG. Regardless of this limit, if you request more connections for the LAG than AWS Direct Connect can allocate on a single endpoint, no LAG is created.</p> <p>You can specify an existing physical connection or interconnect to include in the LAG (which counts towards the total number of connections). Doing so interrupts the current physical connection or hosted connections, and re-establishes them as a member of the LAG. The LAG will be created on the same AWS Direct Connect endpoint to which the connection terminates. Any virtual interfaces associated with the connection are automatically disassociated and re-associated with the LAG. The connection ID does not change.</p> <p>If the AWS account used to create a LAG is a registered AWS Direct Connect Partner, the LAG is automatically enabled to host sub-connections. For a LAG owned by a partner, any associated virtual interfaces cannot be directly configured.</p>
5495    async fn create_lag(
5496        &self,
5497        input: CreateLagRequest,
5498    ) -> Result<Lag, RusotoError<CreateLagError>> {
5499        let mut request = self.new_signed_request("POST", "/");
5500        request.add_header("x-amz-target", "OvertureService.CreateLag");
5501        let encoded = serde_json::to_string(&input).unwrap();
5502        request.set_payload(Some(encoded));
5503
5504        let response = self
5505            .sign_and_dispatch(request, CreateLagError::from_response)
5506            .await?;
5507        let mut response = response;
5508        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5509        proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
5510    }
5511
5512    /// <p>Creates a private virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A private virtual interface can be connected to either a Direct Connect gateway or a Virtual Private Gateway (VGW). Connecting the private virtual interface to a Direct Connect gateway enables the possibility for connecting to multiple VPCs, including VPCs in different AWS Regions. Connecting the private virtual interface to a VGW only provides access to a single VPC within the same Region.</p> <p>Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
5513    async fn create_private_virtual_interface(
5514        &self,
5515        input: CreatePrivateVirtualInterfaceRequest,
5516    ) -> Result<VirtualInterface, RusotoError<CreatePrivateVirtualInterfaceError>> {
5517        let mut request = self.new_signed_request("POST", "/");
5518        request.add_header(
5519            "x-amz-target",
5520            "OvertureService.CreatePrivateVirtualInterface",
5521        );
5522        let encoded = serde_json::to_string(&input).unwrap();
5523        request.set_payload(Some(encoded));
5524
5525        let response = self
5526            .sign_and_dispatch(request, CreatePrivateVirtualInterfaceError::from_response)
5527            .await?;
5528        let mut response = response;
5529        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5530        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
5531    }
5532
5533    /// <p>Creates a public virtual interface. A virtual interface is the VLAN that transports AWS Direct Connect traffic. A public virtual interface supports sending traffic to public services of AWS such as Amazon S3.</p> <p>When creating an IPv6 public virtual interface (<code>addressFamily</code> is <code>ipv6</code>), leave the <code>customer</code> and <code>amazon</code> address fields blank to use auto-assigned IPv6 space. Custom IPv6 addresses are not supported.</p>
5534    async fn create_public_virtual_interface(
5535        &self,
5536        input: CreatePublicVirtualInterfaceRequest,
5537    ) -> Result<VirtualInterface, RusotoError<CreatePublicVirtualInterfaceError>> {
5538        let mut request = self.new_signed_request("POST", "/");
5539        request.add_header(
5540            "x-amz-target",
5541            "OvertureService.CreatePublicVirtualInterface",
5542        );
5543        let encoded = serde_json::to_string(&input).unwrap();
5544        request.set_payload(Some(encoded));
5545
5546        let response = self
5547            .sign_and_dispatch(request, CreatePublicVirtualInterfaceError::from_response)
5548            .await?;
5549        let mut response = response;
5550        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5551        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
5552    }
5553
5554    /// <p>Creates a transit virtual interface. A transit virtual interface should be used to access one or more transit gateways associated with Direct Connect gateways. A transit virtual interface enables the connection of multiple VPCs attached to a transit gateway to a Direct Connect gateway.</p> <important> <p>If you associate your transit gateway with one or more Direct Connect gateways, the Autonomous System Number (ASN) used by the transit gateway and the Direct Connect gateway must be different. For example, if you use the default ASN 64512 for both your the transit gateway and Direct Connect gateway, the association request fails.</p> </important> <p>Setting the MTU of a virtual interface to 8500 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
5555    async fn create_transit_virtual_interface(
5556        &self,
5557        input: CreateTransitVirtualInterfaceRequest,
5558    ) -> Result<CreateTransitVirtualInterfaceResult, RusotoError<CreateTransitVirtualInterfaceError>>
5559    {
5560        let mut request = self.new_signed_request("POST", "/");
5561        request.add_header(
5562            "x-amz-target",
5563            "OvertureService.CreateTransitVirtualInterface",
5564        );
5565        let encoded = serde_json::to_string(&input).unwrap();
5566        request.set_payload(Some(encoded));
5567
5568        let response = self
5569            .sign_and_dispatch(request, CreateTransitVirtualInterfaceError::from_response)
5570            .await?;
5571        let mut response = response;
5572        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5573        proto::json::ResponsePayload::new(&response)
5574            .deserialize::<CreateTransitVirtualInterfaceResult, _>()
5575    }
5576
5577    /// <p>Deletes the specified BGP peer on the specified virtual interface with the specified customer address and ASN.</p> <p>You cannot delete the last BGP peer from a virtual interface.</p>
5578    async fn delete_bgp_peer(
5579        &self,
5580        input: DeleteBGPPeerRequest,
5581    ) -> Result<DeleteBGPPeerResponse, RusotoError<DeleteBGPPeerError>> {
5582        let mut request = self.new_signed_request("POST", "/");
5583        request.add_header("x-amz-target", "OvertureService.DeleteBGPPeer");
5584        let encoded = serde_json::to_string(&input).unwrap();
5585        request.set_payload(Some(encoded));
5586
5587        let response = self
5588            .sign_and_dispatch(request, DeleteBGPPeerError::from_response)
5589            .await?;
5590        let mut response = response;
5591        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5592        proto::json::ResponsePayload::new(&response).deserialize::<DeleteBGPPeerResponse, _>()
5593    }
5594
5595    /// <p>Deletes the specified connection.</p> <p>Deleting a connection only stops the AWS Direct Connect port hour and data transfer charges. If you are partnering with any third parties to connect with the AWS Direct Connect location, you must cancel your service with them separately.</p>
5596    async fn delete_connection(
5597        &self,
5598        input: DeleteConnectionRequest,
5599    ) -> Result<Connection, RusotoError<DeleteConnectionError>> {
5600        let mut request = self.new_signed_request("POST", "/");
5601        request.add_header("x-amz-target", "OvertureService.DeleteConnection");
5602        let encoded = serde_json::to_string(&input).unwrap();
5603        request.set_payload(Some(encoded));
5604
5605        let response = self
5606            .sign_and_dispatch(request, DeleteConnectionError::from_response)
5607            .await?;
5608        let mut response = response;
5609        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5610        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
5611    }
5612
5613    /// <p>Deletes the specified Direct Connect gateway. You must first delete all virtual interfaces that are attached to the Direct Connect gateway and disassociate all virtual private gateways associated with the Direct Connect gateway.</p>
5614    async fn delete_direct_connect_gateway(
5615        &self,
5616        input: DeleteDirectConnectGatewayRequest,
5617    ) -> Result<DeleteDirectConnectGatewayResult, RusotoError<DeleteDirectConnectGatewayError>>
5618    {
5619        let mut request = self.new_signed_request("POST", "/");
5620        request.add_header("x-amz-target", "OvertureService.DeleteDirectConnectGateway");
5621        let encoded = serde_json::to_string(&input).unwrap();
5622        request.set_payload(Some(encoded));
5623
5624        let response = self
5625            .sign_and_dispatch(request, DeleteDirectConnectGatewayError::from_response)
5626            .await?;
5627        let mut response = response;
5628        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5629        proto::json::ResponsePayload::new(&response)
5630            .deserialize::<DeleteDirectConnectGatewayResult, _>()
5631    }
5632
5633    /// <p>Deletes the association between the specified Direct Connect gateway and virtual private gateway.</p> <p>We recommend that you specify the <code>associationID</code> to delete the association. Alternatively, if you own virtual gateway and a Direct Connect gateway association, you can specify the <code>virtualGatewayId</code> and <code>directConnectGatewayId</code> to delete an association.</p>
5634    async fn delete_direct_connect_gateway_association(
5635        &self,
5636        input: DeleteDirectConnectGatewayAssociationRequest,
5637    ) -> Result<
5638        DeleteDirectConnectGatewayAssociationResult,
5639        RusotoError<DeleteDirectConnectGatewayAssociationError>,
5640    > {
5641        let mut request = self.new_signed_request("POST", "/");
5642        request.add_header(
5643            "x-amz-target",
5644            "OvertureService.DeleteDirectConnectGatewayAssociation",
5645        );
5646        let encoded = serde_json::to_string(&input).unwrap();
5647        request.set_payload(Some(encoded));
5648
5649        let response = self
5650            .sign_and_dispatch(
5651                request,
5652                DeleteDirectConnectGatewayAssociationError::from_response,
5653            )
5654            .await?;
5655        let mut response = response;
5656        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5657        proto::json::ResponsePayload::new(&response)
5658            .deserialize::<DeleteDirectConnectGatewayAssociationResult, _>()
5659    }
5660
5661    /// <p>Deletes the association proposal request between the specified Direct Connect gateway and virtual private gateway or transit gateway.</p>
5662    async fn delete_direct_connect_gateway_association_proposal(
5663        &self,
5664        input: DeleteDirectConnectGatewayAssociationProposalRequest,
5665    ) -> Result<
5666        DeleteDirectConnectGatewayAssociationProposalResult,
5667        RusotoError<DeleteDirectConnectGatewayAssociationProposalError>,
5668    > {
5669        let mut request = self.new_signed_request("POST", "/");
5670        request.add_header(
5671            "x-amz-target",
5672            "OvertureService.DeleteDirectConnectGatewayAssociationProposal",
5673        );
5674        let encoded = serde_json::to_string(&input).unwrap();
5675        request.set_payload(Some(encoded));
5676
5677        let response = self
5678            .sign_and_dispatch(
5679                request,
5680                DeleteDirectConnectGatewayAssociationProposalError::from_response,
5681            )
5682            .await?;
5683        let mut response = response;
5684        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5685        proto::json::ResponsePayload::new(&response)
5686            .deserialize::<DeleteDirectConnectGatewayAssociationProposalResult, _>()
5687    }
5688
5689    /// <p><p>Deletes the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5690    async fn delete_interconnect(
5691        &self,
5692        input: DeleteInterconnectRequest,
5693    ) -> Result<DeleteInterconnectResponse, RusotoError<DeleteInterconnectError>> {
5694        let mut request = self.new_signed_request("POST", "/");
5695        request.add_header("x-amz-target", "OvertureService.DeleteInterconnect");
5696        let encoded = serde_json::to_string(&input).unwrap();
5697        request.set_payload(Some(encoded));
5698
5699        let response = self
5700            .sign_and_dispatch(request, DeleteInterconnectError::from_response)
5701            .await?;
5702        let mut response = response;
5703        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5704        proto::json::ResponsePayload::new(&response).deserialize::<DeleteInterconnectResponse, _>()
5705    }
5706
5707    /// <p>Deletes the specified link aggregation group (LAG). You cannot delete a LAG if it has active virtual interfaces or hosted connections.</p>
5708    async fn delete_lag(
5709        &self,
5710        input: DeleteLagRequest,
5711    ) -> Result<Lag, RusotoError<DeleteLagError>> {
5712        let mut request = self.new_signed_request("POST", "/");
5713        request.add_header("x-amz-target", "OvertureService.DeleteLag");
5714        let encoded = serde_json::to_string(&input).unwrap();
5715        request.set_payload(Some(encoded));
5716
5717        let response = self
5718            .sign_and_dispatch(request, DeleteLagError::from_response)
5719            .await?;
5720        let mut response = response;
5721        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5722        proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
5723    }
5724
5725    /// <p>Deletes a virtual interface.</p>
5726    async fn delete_virtual_interface(
5727        &self,
5728        input: DeleteVirtualInterfaceRequest,
5729    ) -> Result<DeleteVirtualInterfaceResponse, RusotoError<DeleteVirtualInterfaceError>> {
5730        let mut request = self.new_signed_request("POST", "/");
5731        request.add_header("x-amz-target", "OvertureService.DeleteVirtualInterface");
5732        let encoded = serde_json::to_string(&input).unwrap();
5733        request.set_payload(Some(encoded));
5734
5735        let response = self
5736            .sign_and_dispatch(request, DeleteVirtualInterfaceError::from_response)
5737            .await?;
5738        let mut response = response;
5739        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5740        proto::json::ResponsePayload::new(&response)
5741            .deserialize::<DeleteVirtualInterfaceResponse, _>()
5742    }
5743
5744    /// <p>Deprecated. Use <a>DescribeLoa</a> instead.</p> <p>Gets the LOA-CFA for a connection.</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that your APN partner or service provider uses when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
5745    async fn describe_connection_loa(
5746        &self,
5747        input: DescribeConnectionLoaRequest,
5748    ) -> Result<DescribeConnectionLoaResponse, RusotoError<DescribeConnectionLoaError>> {
5749        let mut request = self.new_signed_request("POST", "/");
5750        request.add_header("x-amz-target", "OvertureService.DescribeConnectionLoa");
5751        let encoded = serde_json::to_string(&input).unwrap();
5752        request.set_payload(Some(encoded));
5753
5754        let response = self
5755            .sign_and_dispatch(request, DescribeConnectionLoaError::from_response)
5756            .await?;
5757        let mut response = response;
5758        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5759        proto::json::ResponsePayload::new(&response)
5760            .deserialize::<DescribeConnectionLoaResponse, _>()
5761    }
5762
5763    /// <p>Displays the specified connection or all connections in this Region.</p>
5764    async fn describe_connections(
5765        &self,
5766        input: DescribeConnectionsRequest,
5767    ) -> Result<Connections, RusotoError<DescribeConnectionsError>> {
5768        let mut request = self.new_signed_request("POST", "/");
5769        request.add_header("x-amz-target", "OvertureService.DescribeConnections");
5770        let encoded = serde_json::to_string(&input).unwrap();
5771        request.set_payload(Some(encoded));
5772
5773        let response = self
5774            .sign_and_dispatch(request, DescribeConnectionsError::from_response)
5775            .await?;
5776        let mut response = response;
5777        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5778        proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
5779    }
5780
5781    /// <p><p>Deprecated. Use <a>DescribeHostedConnections</a> instead.</p> <p>Lists the connections that have been provisioned on the specified interconnect.</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5782    async fn describe_connections_on_interconnect(
5783        &self,
5784        input: DescribeConnectionsOnInterconnectRequest,
5785    ) -> Result<Connections, RusotoError<DescribeConnectionsOnInterconnectError>> {
5786        let mut request = self.new_signed_request("POST", "/");
5787        request.add_header(
5788            "x-amz-target",
5789            "OvertureService.DescribeConnectionsOnInterconnect",
5790        );
5791        let encoded = serde_json::to_string(&input).unwrap();
5792        request.set_payload(Some(encoded));
5793
5794        let response = self
5795            .sign_and_dispatch(
5796                request,
5797                DescribeConnectionsOnInterconnectError::from_response,
5798            )
5799            .await?;
5800        let mut response = response;
5801        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5802        proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
5803    }
5804
5805    /// <p>Describes one or more association proposals for connection between a virtual private gateway or transit gateway and a Direct Connect gateway. </p>
5806    async fn describe_direct_connect_gateway_association_proposals(
5807        &self,
5808        input: DescribeDirectConnectGatewayAssociationProposalsRequest,
5809    ) -> Result<
5810        DescribeDirectConnectGatewayAssociationProposalsResult,
5811        RusotoError<DescribeDirectConnectGatewayAssociationProposalsError>,
5812    > {
5813        let mut request = self.new_signed_request("POST", "/");
5814        request.add_header(
5815            "x-amz-target",
5816            "OvertureService.DescribeDirectConnectGatewayAssociationProposals",
5817        );
5818        let encoded = serde_json::to_string(&input).unwrap();
5819        request.set_payload(Some(encoded));
5820
5821        let response = self
5822            .sign_and_dispatch(
5823                request,
5824                DescribeDirectConnectGatewayAssociationProposalsError::from_response,
5825            )
5826            .await?;
5827        let mut response = response;
5828        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5829        proto::json::ResponsePayload::new(&response)
5830            .deserialize::<DescribeDirectConnectGatewayAssociationProposalsResult, _>()
5831    }
5832
5833    /// <p>Lists the associations between your Direct Connect gateways and virtual private gateways. You must specify a Direct Connect gateway, a virtual private gateway, or both. If you specify a Direct Connect gateway, the response contains all virtual private gateways associated with the Direct Connect gateway. If you specify a virtual private gateway, the response contains all Direct Connect gateways associated with the virtual private gateway. If you specify both, the response contains the association between the Direct Connect gateway and the virtual private gateway.</p>
5834    async fn describe_direct_connect_gateway_associations(
5835        &self,
5836        input: DescribeDirectConnectGatewayAssociationsRequest,
5837    ) -> Result<
5838        DescribeDirectConnectGatewayAssociationsResult,
5839        RusotoError<DescribeDirectConnectGatewayAssociationsError>,
5840    > {
5841        let mut request = self.new_signed_request("POST", "/");
5842        request.add_header(
5843            "x-amz-target",
5844            "OvertureService.DescribeDirectConnectGatewayAssociations",
5845        );
5846        let encoded = serde_json::to_string(&input).unwrap();
5847        request.set_payload(Some(encoded));
5848
5849        let response = self
5850            .sign_and_dispatch(
5851                request,
5852                DescribeDirectConnectGatewayAssociationsError::from_response,
5853            )
5854            .await?;
5855        let mut response = response;
5856        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5857        proto::json::ResponsePayload::new(&response)
5858            .deserialize::<DescribeDirectConnectGatewayAssociationsResult, _>()
5859    }
5860
5861    /// <p>Lists the attachments between your Direct Connect gateways and virtual interfaces. You must specify a Direct Connect gateway, a virtual interface, or both. If you specify a Direct Connect gateway, the response contains all virtual interfaces attached to the Direct Connect gateway. If you specify a virtual interface, the response contains all Direct Connect gateways attached to the virtual interface. If you specify both, the response contains the attachment between the Direct Connect gateway and the virtual interface.</p>
5862    async fn describe_direct_connect_gateway_attachments(
5863        &self,
5864        input: DescribeDirectConnectGatewayAttachmentsRequest,
5865    ) -> Result<
5866        DescribeDirectConnectGatewayAttachmentsResult,
5867        RusotoError<DescribeDirectConnectGatewayAttachmentsError>,
5868    > {
5869        let mut request = self.new_signed_request("POST", "/");
5870        request.add_header(
5871            "x-amz-target",
5872            "OvertureService.DescribeDirectConnectGatewayAttachments",
5873        );
5874        let encoded = serde_json::to_string(&input).unwrap();
5875        request.set_payload(Some(encoded));
5876
5877        let response = self
5878            .sign_and_dispatch(
5879                request,
5880                DescribeDirectConnectGatewayAttachmentsError::from_response,
5881            )
5882            .await?;
5883        let mut response = response;
5884        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5885        proto::json::ResponsePayload::new(&response)
5886            .deserialize::<DescribeDirectConnectGatewayAttachmentsResult, _>()
5887    }
5888
5889    /// <p>Lists all your Direct Connect gateways or only the specified Direct Connect gateway. Deleted Direct Connect gateways are not returned.</p>
5890    async fn describe_direct_connect_gateways(
5891        &self,
5892        input: DescribeDirectConnectGatewaysRequest,
5893    ) -> Result<DescribeDirectConnectGatewaysResult, RusotoError<DescribeDirectConnectGatewaysError>>
5894    {
5895        let mut request = self.new_signed_request("POST", "/");
5896        request.add_header(
5897            "x-amz-target",
5898            "OvertureService.DescribeDirectConnectGateways",
5899        );
5900        let encoded = serde_json::to_string(&input).unwrap();
5901        request.set_payload(Some(encoded));
5902
5903        let response = self
5904            .sign_and_dispatch(request, DescribeDirectConnectGatewaysError::from_response)
5905            .await?;
5906        let mut response = response;
5907        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5908        proto::json::ResponsePayload::new(&response)
5909            .deserialize::<DescribeDirectConnectGatewaysResult, _>()
5910    }
5911
5912    /// <p><p>Lists the hosted connections that have been provisioned on the specified interconnect or link aggregation group (LAG).</p> <note> <p>Intended for use by AWS Direct Connect Partners only.</p> </note></p>
5913    async fn describe_hosted_connections(
5914        &self,
5915        input: DescribeHostedConnectionsRequest,
5916    ) -> Result<Connections, RusotoError<DescribeHostedConnectionsError>> {
5917        let mut request = self.new_signed_request("POST", "/");
5918        request.add_header("x-amz-target", "OvertureService.DescribeHostedConnections");
5919        let encoded = serde_json::to_string(&input).unwrap();
5920        request.set_payload(Some(encoded));
5921
5922        let response = self
5923            .sign_and_dispatch(request, DescribeHostedConnectionsError::from_response)
5924            .await?;
5925        let mut response = response;
5926        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5927        proto::json::ResponsePayload::new(&response).deserialize::<Connections, _>()
5928    }
5929
5930    /// <p>Deprecated. Use <a>DescribeLoa</a> instead.</p> <p>Gets the LOA-CFA for the specified interconnect.</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that is used when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
5931    async fn describe_interconnect_loa(
5932        &self,
5933        input: DescribeInterconnectLoaRequest,
5934    ) -> Result<DescribeInterconnectLoaResponse, RusotoError<DescribeInterconnectLoaError>> {
5935        let mut request = self.new_signed_request("POST", "/");
5936        request.add_header("x-amz-target", "OvertureService.DescribeInterconnectLoa");
5937        let encoded = serde_json::to_string(&input).unwrap();
5938        request.set_payload(Some(encoded));
5939
5940        let response = self
5941            .sign_and_dispatch(request, DescribeInterconnectLoaError::from_response)
5942            .await?;
5943        let mut response = response;
5944        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5945        proto::json::ResponsePayload::new(&response)
5946            .deserialize::<DescribeInterconnectLoaResponse, _>()
5947    }
5948
5949    /// <p>Lists the interconnects owned by the AWS account or only the specified interconnect.</p>
5950    async fn describe_interconnects(
5951        &self,
5952        input: DescribeInterconnectsRequest,
5953    ) -> Result<Interconnects, RusotoError<DescribeInterconnectsError>> {
5954        let mut request = self.new_signed_request("POST", "/");
5955        request.add_header("x-amz-target", "OvertureService.DescribeInterconnects");
5956        let encoded = serde_json::to_string(&input).unwrap();
5957        request.set_payload(Some(encoded));
5958
5959        let response = self
5960            .sign_and_dispatch(request, DescribeInterconnectsError::from_response)
5961            .await?;
5962        let mut response = response;
5963        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5964        proto::json::ResponsePayload::new(&response).deserialize::<Interconnects, _>()
5965    }
5966
5967    /// <p>Describes all your link aggregation groups (LAG) or the specified LAG.</p>
5968    async fn describe_lags(
5969        &self,
5970        input: DescribeLagsRequest,
5971    ) -> Result<Lags, RusotoError<DescribeLagsError>> {
5972        let mut request = self.new_signed_request("POST", "/");
5973        request.add_header("x-amz-target", "OvertureService.DescribeLags");
5974        let encoded = serde_json::to_string(&input).unwrap();
5975        request.set_payload(Some(encoded));
5976
5977        let response = self
5978            .sign_and_dispatch(request, DescribeLagsError::from_response)
5979            .await?;
5980        let mut response = response;
5981        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5982        proto::json::ResponsePayload::new(&response).deserialize::<Lags, _>()
5983    }
5984
5985    /// <p>Gets the LOA-CFA for a connection, interconnect, or link aggregation group (LAG).</p> <p>The Letter of Authorization - Connecting Facility Assignment (LOA-CFA) is a document that is used when establishing your cross connect to AWS at the colocation facility. For more information, see <a href="https://docs.aws.amazon.com/directconnect/latest/UserGuide/Colocation.html">Requesting Cross Connects at AWS Direct Connect Locations</a> in the <i>AWS Direct Connect User Guide</i>.</p>
5986    async fn describe_loa(
5987        &self,
5988        input: DescribeLoaRequest,
5989    ) -> Result<Loa, RusotoError<DescribeLoaError>> {
5990        let mut request = self.new_signed_request("POST", "/");
5991        request.add_header("x-amz-target", "OvertureService.DescribeLoa");
5992        let encoded = serde_json::to_string(&input).unwrap();
5993        request.set_payload(Some(encoded));
5994
5995        let response = self
5996            .sign_and_dispatch(request, DescribeLoaError::from_response)
5997            .await?;
5998        let mut response = response;
5999        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6000        proto::json::ResponsePayload::new(&response).deserialize::<Loa, _>()
6001    }
6002
6003    /// <p>Lists the AWS Direct Connect locations in the current AWS Region. These are the locations that can be selected when calling <a>CreateConnection</a> or <a>CreateInterconnect</a>.</p>
6004    async fn describe_locations(&self) -> Result<Locations, RusotoError<DescribeLocationsError>> {
6005        let mut request = self.new_signed_request("POST", "/");
6006        request.add_header("x-amz-target", "OvertureService.DescribeLocations");
6007        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
6008
6009        let response = self
6010            .sign_and_dispatch(request, DescribeLocationsError::from_response)
6011            .await?;
6012        let mut response = response;
6013        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6014        proto::json::ResponsePayload::new(&response).deserialize::<Locations, _>()
6015    }
6016
6017    /// <p>Describes the tags associated with the specified AWS Direct Connect resources.</p>
6018    async fn describe_tags(
6019        &self,
6020        input: DescribeTagsRequest,
6021    ) -> Result<DescribeTagsResponse, RusotoError<DescribeTagsError>> {
6022        let mut request = self.new_signed_request("POST", "/");
6023        request.add_header("x-amz-target", "OvertureService.DescribeTags");
6024        let encoded = serde_json::to_string(&input).unwrap();
6025        request.set_payload(Some(encoded));
6026
6027        let response = self
6028            .sign_and_dispatch(request, DescribeTagsError::from_response)
6029            .await?;
6030        let mut response = response;
6031        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6032        proto::json::ResponsePayload::new(&response).deserialize::<DescribeTagsResponse, _>()
6033    }
6034
6035    /// <p>Lists the virtual private gateways owned by the AWS account.</p> <p>You can create one or more AWS Direct Connect private virtual interfaces linked to a virtual private gateway.</p>
6036    async fn describe_virtual_gateways(
6037        &self,
6038    ) -> Result<VirtualGateways, RusotoError<DescribeVirtualGatewaysError>> {
6039        let mut request = self.new_signed_request("POST", "/");
6040        request.add_header("x-amz-target", "OvertureService.DescribeVirtualGateways");
6041        request.set_payload(Some(bytes::Bytes::from_static(b"{}")));
6042
6043        let response = self
6044            .sign_and_dispatch(request, DescribeVirtualGatewaysError::from_response)
6045            .await?;
6046        let mut response = response;
6047        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6048        proto::json::ResponsePayload::new(&response).deserialize::<VirtualGateways, _>()
6049    }
6050
6051    /// <p>Displays all virtual interfaces for an AWS account. Virtual interfaces deleted fewer than 15 minutes before you make the request are also returned. If you specify a connection ID, only the virtual interfaces associated with the connection are returned. If you specify a virtual interface ID, then only a single virtual interface is returned.</p> <p>A virtual interface (VLAN) transmits the traffic between the AWS Direct Connect location and the customer network.</p>
6052    async fn describe_virtual_interfaces(
6053        &self,
6054        input: DescribeVirtualInterfacesRequest,
6055    ) -> Result<VirtualInterfaces, RusotoError<DescribeVirtualInterfacesError>> {
6056        let mut request = self.new_signed_request("POST", "/");
6057        request.add_header("x-amz-target", "OvertureService.DescribeVirtualInterfaces");
6058        let encoded = serde_json::to_string(&input).unwrap();
6059        request.set_payload(Some(encoded));
6060
6061        let response = self
6062            .sign_and_dispatch(request, DescribeVirtualInterfacesError::from_response)
6063            .await?;
6064        let mut response = response;
6065        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6066        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterfaces, _>()
6067    }
6068
6069    /// <p>Disassociates a connection from a link aggregation group (LAG). The connection is interrupted and re-established as a standalone connection (the connection is not deleted; to delete the connection, use the <a>DeleteConnection</a> request). If the LAG has associated virtual interfaces or hosted connections, they remain associated with the LAG. A disassociated connection owned by an AWS Direct Connect Partner is automatically converted to an interconnect.</p> <p>If disassociating the connection would cause the LAG to fall below its setting for minimum number of operational connections, the request fails, except when it's the last member of the LAG. If all connections are disassociated, the LAG continues to exist as an empty LAG with no physical connections. </p>
6070    async fn disassociate_connection_from_lag(
6071        &self,
6072        input: DisassociateConnectionFromLagRequest,
6073    ) -> Result<Connection, RusotoError<DisassociateConnectionFromLagError>> {
6074        let mut request = self.new_signed_request("POST", "/");
6075        request.add_header(
6076            "x-amz-target",
6077            "OvertureService.DisassociateConnectionFromLag",
6078        );
6079        let encoded = serde_json::to_string(&input).unwrap();
6080        request.set_payload(Some(encoded));
6081
6082        let response = self
6083            .sign_and_dispatch(request, DisassociateConnectionFromLagError::from_response)
6084            .await?;
6085        let mut response = response;
6086        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6087        proto::json::ResponsePayload::new(&response).deserialize::<Connection, _>()
6088    }
6089
6090    /// <p>Lists the virtual interface failover test history.</p>
6091    async fn list_virtual_interface_test_history(
6092        &self,
6093        input: ListVirtualInterfaceTestHistoryRequest,
6094    ) -> Result<
6095        ListVirtualInterfaceTestHistoryResponse,
6096        RusotoError<ListVirtualInterfaceTestHistoryError>,
6097    > {
6098        let mut request = self.new_signed_request("POST", "/");
6099        request.add_header(
6100            "x-amz-target",
6101            "OvertureService.ListVirtualInterfaceTestHistory",
6102        );
6103        let encoded = serde_json::to_string(&input).unwrap();
6104        request.set_payload(Some(encoded));
6105
6106        let response = self
6107            .sign_and_dispatch(request, ListVirtualInterfaceTestHistoryError::from_response)
6108            .await?;
6109        let mut response = response;
6110        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6111        proto::json::ResponsePayload::new(&response)
6112            .deserialize::<ListVirtualInterfaceTestHistoryResponse, _>()
6113    }
6114
6115    /// <p>Starts the virtual interface failover test that verifies your configuration meets your resiliency requirements by placing the BGP peering session in the DOWN state. You can then send traffic to verify that there are no outages.</p> <p>You can run the test on public, private, transit, and hosted virtual interfaces.</p> <p>You can use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_ListVirtualInterfaceTestHistory.html">ListVirtualInterfaceTestHistory</a> to view the virtual interface test history.</p> <p>If you need to stop the test before the test interval completes, use <a href="https://docs.aws.amazon.com/directconnect/latest/APIReference/API_StopBgpFailoverTest.html">StopBgpFailoverTest</a>.</p>
6116    async fn start_bgp_failover_test(
6117        &self,
6118        input: StartBgpFailoverTestRequest,
6119    ) -> Result<StartBgpFailoverTestResponse, RusotoError<StartBgpFailoverTestError>> {
6120        let mut request = self.new_signed_request("POST", "/");
6121        request.add_header("x-amz-target", "OvertureService.StartBgpFailoverTest");
6122        let encoded = serde_json::to_string(&input).unwrap();
6123        request.set_payload(Some(encoded));
6124
6125        let response = self
6126            .sign_and_dispatch(request, StartBgpFailoverTestError::from_response)
6127            .await?;
6128        let mut response = response;
6129        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6130        proto::json::ResponsePayload::new(&response)
6131            .deserialize::<StartBgpFailoverTestResponse, _>()
6132    }
6133
6134    /// <p>Stops the virtual interface failover test.</p>
6135    async fn stop_bgp_failover_test(
6136        &self,
6137        input: StopBgpFailoverTestRequest,
6138    ) -> Result<StopBgpFailoverTestResponse, RusotoError<StopBgpFailoverTestError>> {
6139        let mut request = self.new_signed_request("POST", "/");
6140        request.add_header("x-amz-target", "OvertureService.StopBgpFailoverTest");
6141        let encoded = serde_json::to_string(&input).unwrap();
6142        request.set_payload(Some(encoded));
6143
6144        let response = self
6145            .sign_and_dispatch(request, StopBgpFailoverTestError::from_response)
6146            .await?;
6147        let mut response = response;
6148        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6149        proto::json::ResponsePayload::new(&response).deserialize::<StopBgpFailoverTestResponse, _>()
6150    }
6151
6152    /// <p>Adds the specified tags to the specified AWS Direct Connect resource. Each resource can have a maximum of 50 tags.</p> <p>Each tag consists of a key and an optional value. If a tag with the same key is already associated with the resource, this action updates its value.</p>
6153    async fn tag_resource(
6154        &self,
6155        input: TagResourceRequest,
6156    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
6157        let mut request = self.new_signed_request("POST", "/");
6158        request.add_header("x-amz-target", "OvertureService.TagResource");
6159        let encoded = serde_json::to_string(&input).unwrap();
6160        request.set_payload(Some(encoded));
6161
6162        let response = self
6163            .sign_and_dispatch(request, TagResourceError::from_response)
6164            .await?;
6165        let mut response = response;
6166        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6167        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
6168    }
6169
6170    /// <p>Removes one or more tags from the specified AWS Direct Connect resource.</p>
6171    async fn untag_resource(
6172        &self,
6173        input: UntagResourceRequest,
6174    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
6175        let mut request = self.new_signed_request("POST", "/");
6176        request.add_header("x-amz-target", "OvertureService.UntagResource");
6177        let encoded = serde_json::to_string(&input).unwrap();
6178        request.set_payload(Some(encoded));
6179
6180        let response = self
6181            .sign_and_dispatch(request, UntagResourceError::from_response)
6182            .await?;
6183        let mut response = response;
6184        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6185        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
6186    }
6187
6188    /// <p>Updates the specified attributes of the Direct Connect gateway association.</p> <p>Add or remove prefixes from the association.</p>
6189    async fn update_direct_connect_gateway_association(
6190        &self,
6191        input: UpdateDirectConnectGatewayAssociationRequest,
6192    ) -> Result<
6193        UpdateDirectConnectGatewayAssociationResult,
6194        RusotoError<UpdateDirectConnectGatewayAssociationError>,
6195    > {
6196        let mut request = self.new_signed_request("POST", "/");
6197        request.add_header(
6198            "x-amz-target",
6199            "OvertureService.UpdateDirectConnectGatewayAssociation",
6200        );
6201        let encoded = serde_json::to_string(&input).unwrap();
6202        request.set_payload(Some(encoded));
6203
6204        let response = self
6205            .sign_and_dispatch(
6206                request,
6207                UpdateDirectConnectGatewayAssociationError::from_response,
6208            )
6209            .await?;
6210        let mut response = response;
6211        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6212        proto::json::ResponsePayload::new(&response)
6213            .deserialize::<UpdateDirectConnectGatewayAssociationResult, _>()
6214    }
6215
6216    /// <p>Updates the attributes of the specified link aggregation group (LAG).</p> <p>You can update the following attributes:</p> <ul> <li> <p>The name of the LAG.</p> </li> <li> <p>The value for the minimum number of connections that must be operational for the LAG itself to be operational. </p> </li> </ul> <p>When you create a LAG, the default value for the minimum number of operational connections is zero (0). If you update this value and the number of operational connections falls below the specified value, the LAG automatically goes down to avoid over-utilization of the remaining connections. Adjust this value with care, as it could force the LAG down if it is set higher than the current number of operational connections.</p>
6217    async fn update_lag(
6218        &self,
6219        input: UpdateLagRequest,
6220    ) -> Result<Lag, RusotoError<UpdateLagError>> {
6221        let mut request = self.new_signed_request("POST", "/");
6222        request.add_header("x-amz-target", "OvertureService.UpdateLag");
6223        let encoded = serde_json::to_string(&input).unwrap();
6224        request.set_payload(Some(encoded));
6225
6226        let response = self
6227            .sign_and_dispatch(request, UpdateLagError::from_response)
6228            .await?;
6229        let mut response = response;
6230        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6231        proto::json::ResponsePayload::new(&response).deserialize::<Lag, _>()
6232    }
6233
6234    /// <p>Updates the specified attributes of the specified virtual private interface.</p> <p>Setting the MTU of a virtual interface to 9001 (jumbo frames) can cause an update to the underlying physical connection if it wasn't updated to support jumbo frames. Updating the connection disrupts network connectivity for all virtual interfaces associated with the connection for up to 30 seconds. To check whether your connection supports jumbo frames, call <a>DescribeConnections</a>. To check whether your virtual q interface supports jumbo frames, call <a>DescribeVirtualInterfaces</a>.</p>
6235    async fn update_virtual_interface_attributes(
6236        &self,
6237        input: UpdateVirtualInterfaceAttributesRequest,
6238    ) -> Result<VirtualInterface, RusotoError<UpdateVirtualInterfaceAttributesError>> {
6239        let mut request = self.new_signed_request("POST", "/");
6240        request.add_header(
6241            "x-amz-target",
6242            "OvertureService.UpdateVirtualInterfaceAttributes",
6243        );
6244        let encoded = serde_json::to_string(&input).unwrap();
6245        request.set_payload(Some(encoded));
6246
6247        let response = self
6248            .sign_and_dispatch(
6249                request,
6250                UpdateVirtualInterfaceAttributesError::from_response,
6251            )
6252            .await?;
6253        let mut response = response;
6254        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6255        proto::json::ResponsePayload::new(&response).deserialize::<VirtualInterface, _>()
6256    }
6257}