rusoto_mediaconnect/
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::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>A request to add outputs to the specified flow.</p>
29#[derive(Clone, Debug, Default, PartialEq, Serialize)]
30#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
31pub struct AddFlowOutputsRequest {
32    /// <p>The flow that you want to add outputs to.</p>
33    #[serde(rename = "FlowArn")]
34    pub flow_arn: String,
35    /// <p>A list of outputs that you want to add.</p>
36    #[serde(rename = "Outputs")]
37    pub outputs: Vec<AddOutputRequest>,
38}
39
40#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
41#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
42pub struct AddFlowOutputsResponse {
43    /// <p>The ARN of the flow that these outputs were added to.</p>
44    #[serde(rename = "FlowArn")]
45    #[serde(skip_serializing_if = "Option::is_none")]
46    pub flow_arn: Option<String>,
47    /// <p>The details of the newly added outputs.</p>
48    #[serde(rename = "Outputs")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub outputs: Option<Vec<Output>>,
51}
52
53/// <p>A request to add sources to the flow.</p>
54#[derive(Clone, Debug, Default, PartialEq, Serialize)]
55#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
56pub struct AddFlowSourcesRequest {
57    /// <p>The flow that you want to mutate.</p>
58    #[serde(rename = "FlowArn")]
59    pub flow_arn: String,
60    /// <p>A list of sources that you want to add.</p>
61    #[serde(rename = "Sources")]
62    pub sources: Vec<SetSourceRequest>,
63}
64
65#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
66#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
67pub struct AddFlowSourcesResponse {
68    /// <p>The ARN of the flow that these sources were added to.</p>
69    #[serde(rename = "FlowArn")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub flow_arn: Option<String>,
72    /// <p>The details of the newly added sources.</p>
73    #[serde(rename = "Sources")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub sources: Option<Vec<Source>>,
76}
77
78/// <p>A request to add VPC interfaces to the flow.</p>
79#[derive(Clone, Debug, Default, PartialEq, Serialize)]
80#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
81pub struct AddFlowVpcInterfacesRequest {
82    /// <p>The flow that you want to mutate.</p>
83    #[serde(rename = "FlowArn")]
84    pub flow_arn: String,
85    /// <p>A list of VPC interfaces that you want to add.</p>
86    #[serde(rename = "VpcInterfaces")]
87    pub vpc_interfaces: Vec<VpcInterfaceRequest>,
88}
89
90#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
91#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
92pub struct AddFlowVpcInterfacesResponse {
93    /// <p>The ARN of the flow that these VPC interfaces were added to.</p>
94    #[serde(rename = "FlowArn")]
95    #[serde(skip_serializing_if = "Option::is_none")]
96    pub flow_arn: Option<String>,
97    /// <p>The details of the newly added VPC interfaces.</p>
98    #[serde(rename = "VpcInterfaces")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub vpc_interfaces: Option<Vec<VpcInterface>>,
101}
102
103/// <p>The output that you want to add to this flow.</p>
104#[derive(Clone, Debug, Default, PartialEq, Serialize)]
105#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
106pub struct AddOutputRequest {
107    /// <p>The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
108    #[serde(rename = "CidrAllowList")]
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub cidr_allow_list: Option<Vec<String>>,
111    /// <p>A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user.</p>
112    #[serde(rename = "Description")]
113    #[serde(skip_serializing_if = "Option::is_none")]
114    pub description: Option<String>,
115    /// <p>The IP address from which video will be sent to output destinations.</p>
116    #[serde(rename = "Destination")]
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub destination: Option<String>,
119    /// <p>The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
120    #[serde(rename = "Encryption")]
121    #[serde(skip_serializing_if = "Option::is_none")]
122    pub encryption: Option<Encryption>,
123    /// <p>The maximum latency in milliseconds for Zixi-based streams.</p>
124    #[serde(rename = "MaxLatency")]
125    #[serde(skip_serializing_if = "Option::is_none")]
126    pub max_latency: Option<i64>,
127    /// <p>The name of the output. This value must be unique within the current flow.</p>
128    #[serde(rename = "Name")]
129    #[serde(skip_serializing_if = "Option::is_none")]
130    pub name: Option<String>,
131    /// <p>The port to use when content is distributed to this output.</p>
132    #[serde(rename = "Port")]
133    #[serde(skip_serializing_if = "Option::is_none")]
134    pub port: Option<i64>,
135    /// <p>The protocol to use for the output.</p>
136    #[serde(rename = "Protocol")]
137    pub protocol: String,
138    /// <p>The remote ID for the Zixi-pull output stream.</p>
139    #[serde(rename = "RemoteId")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub remote_id: Option<String>,
142    /// <p>The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.</p>
143    #[serde(rename = "SmoothingLatency")]
144    #[serde(skip_serializing_if = "Option::is_none")]
145    pub smoothing_latency: Option<i64>,
146    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.</p>
147    #[serde(rename = "StreamId")]
148    #[serde(skip_serializing_if = "Option::is_none")]
149    pub stream_id: Option<String>,
150    /// <p>The name of the VPC interface attachment to use for this output.</p>
151    #[serde(rename = "VpcInterfaceAttachment")]
152    #[serde(skip_serializing_if = "Option::is_none")]
153    pub vpc_interface_attachment: Option<VpcInterfaceAttachment>,
154}
155
156/// <p>Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).</p>
157#[derive(Clone, Debug, Default, PartialEq, Serialize)]
158#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
159pub struct CreateFlowRequest {
160    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS Region.</p>
161    #[serde(rename = "AvailabilityZone")]
162    #[serde(skip_serializing_if = "Option::is_none")]
163    pub availability_zone: Option<String>,
164    /// <p>The entitlements that you want to grant on a flow.</p>
165    #[serde(rename = "Entitlements")]
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub entitlements: Option<Vec<GrantEntitlementRequest>>,
168    /// <p>The name of the flow.</p>
169    #[serde(rename = "Name")]
170    pub name: String,
171    /// <p>The outputs that you want to add to this flow.</p>
172    #[serde(rename = "Outputs")]
173    #[serde(skip_serializing_if = "Option::is_none")]
174    pub outputs: Option<Vec<AddOutputRequest>>,
175    #[serde(rename = "Source")]
176    #[serde(skip_serializing_if = "Option::is_none")]
177    pub source: Option<SetSourceRequest>,
178    #[serde(rename = "SourceFailoverConfig")]
179    #[serde(skip_serializing_if = "Option::is_none")]
180    pub source_failover_config: Option<FailoverConfig>,
181    #[serde(rename = "Sources")]
182    #[serde(skip_serializing_if = "Option::is_none")]
183    pub sources: Option<Vec<SetSourceRequest>>,
184    /// <p>The VPC interfaces you want on the flow.</p>
185    #[serde(rename = "VpcInterfaces")]
186    #[serde(skip_serializing_if = "Option::is_none")]
187    pub vpc_interfaces: Option<Vec<VpcInterfaceRequest>>,
188}
189
190#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
191#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
192pub struct CreateFlowResponse {
193    #[serde(rename = "Flow")]
194    #[serde(skip_serializing_if = "Option::is_none")]
195    pub flow: Option<Flow>,
196}
197
198#[derive(Clone, Debug, Default, PartialEq, Serialize)]
199#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
200pub struct DeleteFlowRequest {
201    /// <p>The ARN of the flow that you want to delete.</p>
202    #[serde(rename = "FlowArn")]
203    pub flow_arn: String,
204}
205
206#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
207#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
208pub struct DeleteFlowResponse {
209    /// <p>The ARN of the flow that was deleted.</p>
210    #[serde(rename = "FlowArn")]
211    #[serde(skip_serializing_if = "Option::is_none")]
212    pub flow_arn: Option<String>,
213    /// <p>The status of the flow when the DeleteFlow process begins.</p>
214    #[serde(rename = "Status")]
215    #[serde(skip_serializing_if = "Option::is_none")]
216    pub status: Option<String>,
217}
218
219#[derive(Clone, Debug, Default, PartialEq, Serialize)]
220#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
221pub struct DescribeFlowRequest {
222    /// <p>The ARN of the flow that you want to describe.</p>
223    #[serde(rename = "FlowArn")]
224    pub flow_arn: String,
225}
226
227#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
228#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
229pub struct DescribeFlowResponse {
230    #[serde(rename = "Flow")]
231    #[serde(skip_serializing_if = "Option::is_none")]
232    pub flow: Option<Flow>,
233    #[serde(rename = "Messages")]
234    #[serde(skip_serializing_if = "Option::is_none")]
235    pub messages: Option<Messages>,
236}
237
238/// <p>Information about the encryption of the flow.</p>
239#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
240pub struct Encryption {
241    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
242    #[serde(rename = "Algorithm")]
243    pub algorithm: String,
244    /// <p>A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.</p>
245    #[serde(rename = "ConstantInitializationVector")]
246    #[serde(skip_serializing_if = "Option::is_none")]
247    pub constant_initialization_vector: Option<String>,
248    /// <p>The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
249    #[serde(rename = "DeviceId")]
250    #[serde(skip_serializing_if = "Option::is_none")]
251    pub device_id: Option<String>,
252    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
253    #[serde(rename = "KeyType")]
254    #[serde(skip_serializing_if = "Option::is_none")]
255    pub key_type: Option<String>,
256    /// <p>The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
257    #[serde(rename = "Region")]
258    #[serde(skip_serializing_if = "Option::is_none")]
259    pub region: Option<String>,
260    /// <p>An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
261    #[serde(rename = "ResourceId")]
262    #[serde(skip_serializing_if = "Option::is_none")]
263    pub resource_id: Option<String>,
264    /// <p>The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).</p>
265    #[serde(rename = "RoleArn")]
266    pub role_arn: String,
267    /// <p>The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
268    #[serde(rename = "SecretArn")]
269    #[serde(skip_serializing_if = "Option::is_none")]
270    pub secret_arn: Option<String>,
271    /// <p>The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
272    #[serde(rename = "Url")]
273    #[serde(skip_serializing_if = "Option::is_none")]
274    pub url: Option<String>,
275}
276
277/// <p>The settings for a flow entitlement.</p>
278#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
279#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
280pub struct Entitlement {
281    /// <p>Percentage from 0-100 of the data transfer cost to be billed to the subscriber.</p>
282    #[serde(rename = "DataTransferSubscriberFeePercent")]
283    #[serde(skip_serializing_if = "Option::is_none")]
284    pub data_transfer_subscriber_fee_percent: Option<i64>,
285    /// <p>A description of the entitlement.</p>
286    #[serde(rename = "Description")]
287    #[serde(skip_serializing_if = "Option::is_none")]
288    pub description: Option<String>,
289    /// <p>The type of encryption that will be used on the output that is associated with this entitlement.</p>
290    #[serde(rename = "Encryption")]
291    #[serde(skip_serializing_if = "Option::is_none")]
292    pub encryption: Option<Encryption>,
293    /// <p>The ARN of the entitlement.</p>
294    #[serde(rename = "EntitlementArn")]
295    pub entitlement_arn: String,
296    /// <p>The name of the entitlement.</p>
297    #[serde(rename = "Name")]
298    pub name: String,
299    /// <p>The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
300    #[serde(rename = "Subscribers")]
301    pub subscribers: Vec<String>,
302}
303
304/// <p>The settings for source failover</p>
305#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
306pub struct FailoverConfig {
307    /// <p>Search window time to look for dash-7 packets</p>
308    #[serde(rename = "RecoveryWindow")]
309    #[serde(skip_serializing_if = "Option::is_none")]
310    pub recovery_window: Option<i64>,
311    #[serde(rename = "State")]
312    #[serde(skip_serializing_if = "Option::is_none")]
313    pub state: Option<String>,
314}
315
316/// <p>The settings for a flow, including its source, outputs, and entitlements.</p>
317#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
318#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
319pub struct Flow {
320    /// <p>The Availability Zone that you want to create the flow in. These options are limited to the Availability Zones within the current AWS.</p>
321    #[serde(rename = "AvailabilityZone")]
322    pub availability_zone: String,
323    /// <p>A description of the flow. This value is not used or seen outside of the current AWS Elemental MediaConnect account.</p>
324    #[serde(rename = "Description")]
325    #[serde(skip_serializing_if = "Option::is_none")]
326    pub description: Option<String>,
327    /// <p>The IP address from which video will be sent to output destinations.</p>
328    #[serde(rename = "EgressIp")]
329    #[serde(skip_serializing_if = "Option::is_none")]
330    pub egress_ip: Option<String>,
331    /// <p>The entitlements in this flow.</p>
332    #[serde(rename = "Entitlements")]
333    pub entitlements: Vec<Entitlement>,
334    /// <p>The Amazon Resource Name (ARN), a unique identifier for any AWS resource, of the flow.</p>
335    #[serde(rename = "FlowArn")]
336    pub flow_arn: String,
337    /// <p>The name of the flow.</p>
338    #[serde(rename = "Name")]
339    pub name: String,
340    /// <p>The outputs in this flow.</p>
341    #[serde(rename = "Outputs")]
342    pub outputs: Vec<Output>,
343    #[serde(rename = "Source")]
344    pub source: Source,
345    #[serde(rename = "SourceFailoverConfig")]
346    #[serde(skip_serializing_if = "Option::is_none")]
347    pub source_failover_config: Option<FailoverConfig>,
348    #[serde(rename = "Sources")]
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub sources: Option<Vec<Source>>,
351    /// <p>The current status of the flow.</p>
352    #[serde(rename = "Status")]
353    pub status: String,
354    /// <p>The VPC Interfaces for this flow.</p>
355    #[serde(rename = "VpcInterfaces")]
356    #[serde(skip_serializing_if = "Option::is_none")]
357    pub vpc_interfaces: Option<Vec<VpcInterface>>,
358}
359
360/// <p>The entitlements that you want to grant on a flow.</p>
361#[derive(Clone, Debug, Default, PartialEq, Serialize)]
362#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
363pub struct GrantEntitlementRequest {
364    /// <p>Percentage from 0-100 of the data transfer cost to be billed to the subscriber.</p>
365    #[serde(rename = "DataTransferSubscriberFeePercent")]
366    #[serde(skip_serializing_if = "Option::is_none")]
367    pub data_transfer_subscriber_fee_percent: Option<i64>,
368    /// <p>A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user.</p>
369    #[serde(rename = "Description")]
370    #[serde(skip_serializing_if = "Option::is_none")]
371    pub description: Option<String>,
372    /// <p>The type of encryption that will be used on the output that is associated with this entitlement.</p>
373    #[serde(rename = "Encryption")]
374    #[serde(skip_serializing_if = "Option::is_none")]
375    pub encryption: Option<Encryption>,
376    /// <p>The name of the entitlement. This value must be unique within the current flow.</p>
377    #[serde(rename = "Name")]
378    #[serde(skip_serializing_if = "Option::is_none")]
379    pub name: Option<String>,
380    /// <p>The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flows using your content as the source.</p>
381    #[serde(rename = "Subscribers")]
382    pub subscribers: Vec<String>,
383}
384
385/// <p>A request to grant entitlements on a flow.</p>
386#[derive(Clone, Debug, Default, PartialEq, Serialize)]
387#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
388pub struct GrantFlowEntitlementsRequest {
389    /// <p>The list of entitlements that you want to grant.</p>
390    #[serde(rename = "Entitlements")]
391    pub entitlements: Vec<GrantEntitlementRequest>,
392    /// <p>The flow that you want to grant entitlements on.</p>
393    #[serde(rename = "FlowArn")]
394    pub flow_arn: String,
395}
396
397#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
398#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
399pub struct GrantFlowEntitlementsResponse {
400    /// <p>The entitlements that were just granted.</p>
401    #[serde(rename = "Entitlements")]
402    #[serde(skip_serializing_if = "Option::is_none")]
403    pub entitlements: Option<Vec<Entitlement>>,
404    /// <p>The ARN of the flow that these entitlements were granted to.</p>
405    #[serde(rename = "FlowArn")]
406    #[serde(skip_serializing_if = "Option::is_none")]
407    pub flow_arn: Option<String>,
408}
409
410#[derive(Clone, Debug, Default, PartialEq, Serialize)]
411#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
412pub struct ListEntitlementsRequest {
413    /// <p>The maximum number of results to return per API request. For example, you submit a ListEntitlements request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 20 results per page.</p>
414    #[serde(rename = "MaxResults")]
415    #[serde(skip_serializing_if = "Option::is_none")]
416    pub max_results: Option<i64>,
417    /// <p>The token that identifies which batch of results that you want to see. For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value.</p>
418    #[serde(rename = "NextToken")]
419    #[serde(skip_serializing_if = "Option::is_none")]
420    pub next_token: Option<String>,
421}
422
423#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
424#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
425pub struct ListEntitlementsResponse {
426    /// <p>A list of entitlements that have been granted to you from other AWS accounts.</p>
427    #[serde(rename = "Entitlements")]
428    #[serde(skip_serializing_if = "Option::is_none")]
429    pub entitlements: Option<Vec<ListedEntitlement>>,
430    /// <p>The token that identifies which batch of results that you want to see. For example, you submit a ListEntitlements request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListEntitlements request a second time and specify the NextToken value.</p>
431    #[serde(rename = "NextToken")]
432    #[serde(skip_serializing_if = "Option::is_none")]
433    pub next_token: Option<String>,
434}
435
436#[derive(Clone, Debug, Default, PartialEq, Serialize)]
437#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
438pub struct ListFlowsRequest {
439    /// <p>The maximum number of results to return per API request. For example, you submit a ListFlows request with MaxResults set at 5. Although 20 items match your request, the service returns no more than the first 5 items. (The service also returns a NextToken value that you can use to fetch the next batch of results.) The service might return fewer results than the MaxResults value. If MaxResults is not included in the request, the service defaults to pagination with a maximum of 10 results per page.</p>
440    #[serde(rename = "MaxResults")]
441    #[serde(skip_serializing_if = "Option::is_none")]
442    pub max_results: Option<i64>,
443    /// <p>The token that identifies which batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.</p>
444    #[serde(rename = "NextToken")]
445    #[serde(skip_serializing_if = "Option::is_none")]
446    pub next_token: Option<String>,
447}
448
449#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
450#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
451pub struct ListFlowsResponse {
452    /// <p>A list of flow summaries.</p>
453    #[serde(rename = "Flows")]
454    #[serde(skip_serializing_if = "Option::is_none")]
455    pub flows: Option<Vec<ListedFlow>>,
456    /// <p>The token that identifies which batch of results that you want to see. For example, you submit a ListFlows request with MaxResults set at 5. The service returns the first batch of results (up to 5) and a NextToken value. To see the next batch of results, you can submit the ListFlows request a second time and specify the NextToken value.</p>
457    #[serde(rename = "NextToken")]
458    #[serde(skip_serializing_if = "Option::is_none")]
459    pub next_token: Option<String>,
460}
461
462#[derive(Clone, Debug, Default, PartialEq, Serialize)]
463#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
464pub struct ListTagsForResourceRequest {
465    /// <p>The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource for which to list the tags.</p>
466    #[serde(rename = "ResourceArn")]
467    pub resource_arn: String,
468}
469
470#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
471#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
472pub struct ListTagsForResourceResponse {
473    /// <p>A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p>
474    #[serde(rename = "Tags")]
475    #[serde(skip_serializing_if = "Option::is_none")]
476    pub tags: Option<::std::collections::HashMap<String, String>>,
477}
478
479/// <p>An entitlement that has been granted to you from other AWS accounts.</p>
480#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
481#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
482pub struct ListedEntitlement {
483    /// <p>Percentage from 0-100 of the data transfer cost to be billed to the subscriber.</p>
484    #[serde(rename = "DataTransferSubscriberFeePercent")]
485    #[serde(skip_serializing_if = "Option::is_none")]
486    pub data_transfer_subscriber_fee_percent: Option<i64>,
487    /// <p>The ARN of the entitlement.</p>
488    #[serde(rename = "EntitlementArn")]
489    pub entitlement_arn: String,
490    /// <p>The name of the entitlement.</p>
491    #[serde(rename = "EntitlementName")]
492    pub entitlement_name: String,
493}
494
495/// <p>Provides a summary of a flow, including its ARN, Availability Zone, and source type.</p>
496#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
497#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
498pub struct ListedFlow {
499    /// <p>The Availability Zone that the flow was created in.</p>
500    #[serde(rename = "AvailabilityZone")]
501    pub availability_zone: String,
502    /// <p>A description of the flow.</p>
503    #[serde(rename = "Description")]
504    pub description: String,
505    /// <p>The ARN of the flow.</p>
506    #[serde(rename = "FlowArn")]
507    pub flow_arn: String,
508    /// <p>The name of the flow.</p>
509    #[serde(rename = "Name")]
510    pub name: String,
511    /// <p>The type of source. This value is either owned (originated somewhere other than an AWS Elemental MediaConnect flow owned by another AWS account) or entitled (originated at an AWS Elemental MediaConnect flow owned by another AWS account).</p>
512    #[serde(rename = "SourceType")]
513    pub source_type: String,
514    /// <p>The current status of the flow.</p>
515    #[serde(rename = "Status")]
516    pub status: String,
517}
518
519/// <p>Messages that provide the state of the flow.</p>
520#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
521#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
522pub struct Messages {
523    /// <p>A list of errors that might have been generated from processes on this flow.</p>
524    #[serde(rename = "Errors")]
525    pub errors: Vec<String>,
526}
527
528/// <p>The settings for an output.</p>
529#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
530#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
531pub struct Output {
532    /// <p>Percentage from 0-100 of the data transfer cost to be billed to the subscriber.</p>
533    #[serde(rename = "DataTransferSubscriberFeePercent")]
534    #[serde(skip_serializing_if = "Option::is_none")]
535    pub data_transfer_subscriber_fee_percent: Option<i64>,
536    /// <p>A description of the output.</p>
537    #[serde(rename = "Description")]
538    #[serde(skip_serializing_if = "Option::is_none")]
539    pub description: Option<String>,
540    /// <p>The address where you want to send the output.</p>
541    #[serde(rename = "Destination")]
542    #[serde(skip_serializing_if = "Option::is_none")]
543    pub destination: Option<String>,
544    /// <p>The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
545    #[serde(rename = "Encryption")]
546    #[serde(skip_serializing_if = "Option::is_none")]
547    pub encryption: Option<Encryption>,
548    /// <p>The ARN of the entitlement on the originator&#39;&#39;s flow. This value is relevant only on entitled flows.</p>
549    #[serde(rename = "EntitlementArn")]
550    #[serde(skip_serializing_if = "Option::is_none")]
551    pub entitlement_arn: Option<String>,
552    /// <p>The input ARN of the AWS Elemental MediaLive channel. This parameter is relevant only for outputs that were added by creating a MediaLive input.</p>
553    #[serde(rename = "MediaLiveInputArn")]
554    #[serde(skip_serializing_if = "Option::is_none")]
555    pub media_live_input_arn: Option<String>,
556    /// <p>The name of the output. This value must be unique within the current flow.</p>
557    #[serde(rename = "Name")]
558    pub name: String,
559    /// <p>The ARN of the output.</p>
560    #[serde(rename = "OutputArn")]
561    pub output_arn: String,
562    /// <p>The port to use when content is distributed to this output.</p>
563    #[serde(rename = "Port")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub port: Option<i64>,
566    /// <p>Attributes related to the transport stream that are used in the output.</p>
567    #[serde(rename = "Transport")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub transport: Option<Transport>,
570    /// <p>The name of the VPC interface attachment to use for this output.</p>
571    #[serde(rename = "VpcInterfaceAttachment")]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub vpc_interface_attachment: Option<VpcInterfaceAttachment>,
574}
575
576#[derive(Clone, Debug, Default, PartialEq, Serialize)]
577#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
578pub struct RemoveFlowOutputRequest {
579    /// <p>The flow that you want to remove an output from.</p>
580    #[serde(rename = "FlowArn")]
581    pub flow_arn: String,
582    /// <p>The ARN of the output that you want to remove.</p>
583    #[serde(rename = "OutputArn")]
584    pub output_arn: String,
585}
586
587#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
588#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
589pub struct RemoveFlowOutputResponse {
590    /// <p>The ARN of the flow that is associated with the output you removed.</p>
591    #[serde(rename = "FlowArn")]
592    #[serde(skip_serializing_if = "Option::is_none")]
593    pub flow_arn: Option<String>,
594    /// <p>The ARN of the output that was removed.</p>
595    #[serde(rename = "OutputArn")]
596    #[serde(skip_serializing_if = "Option::is_none")]
597    pub output_arn: Option<String>,
598}
599
600#[derive(Clone, Debug, Default, PartialEq, Serialize)]
601#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
602pub struct RemoveFlowSourceRequest {
603    /// <p>The flow that you want to remove a source from.</p>
604    #[serde(rename = "FlowArn")]
605    pub flow_arn: String,
606    /// <p>The ARN of the source that you want to remove.</p>
607    #[serde(rename = "SourceArn")]
608    pub source_arn: String,
609}
610
611#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
612#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
613pub struct RemoveFlowSourceResponse {
614    /// <p>The ARN of the flow that is associated with the source you removed.</p>
615    #[serde(rename = "FlowArn")]
616    #[serde(skip_serializing_if = "Option::is_none")]
617    pub flow_arn: Option<String>,
618    /// <p>The ARN of the source that was removed.</p>
619    #[serde(rename = "SourceArn")]
620    #[serde(skip_serializing_if = "Option::is_none")]
621    pub source_arn: Option<String>,
622}
623
624#[derive(Clone, Debug, Default, PartialEq, Serialize)]
625#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
626pub struct RemoveFlowVpcInterfaceRequest {
627    /// <p>The flow that you want to remove a VPC interface from.</p>
628    #[serde(rename = "FlowArn")]
629    pub flow_arn: String,
630    /// <p>The name of the VPC interface that you want to remove.</p>
631    #[serde(rename = "VpcInterfaceName")]
632    pub vpc_interface_name: String,
633}
634
635#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
636#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
637pub struct RemoveFlowVpcInterfaceResponse {
638    /// <p>The ARN of the flow that is associated with the VPC interface you removed.</p>
639    #[serde(rename = "FlowArn")]
640    #[serde(skip_serializing_if = "Option::is_none")]
641    pub flow_arn: Option<String>,
642    /// <p>IDs of network interfaces associated with the removed VPC interface that Media Connect was unable to remove.</p>
643    #[serde(rename = "NonDeletedNetworkInterfaceIds")]
644    #[serde(skip_serializing_if = "Option::is_none")]
645    pub non_deleted_network_interface_ids: Option<Vec<String>>,
646    /// <p>The name of the VPC interface that was removed.</p>
647    #[serde(rename = "VpcInterfaceName")]
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub vpc_interface_name: Option<String>,
650}
651
652#[derive(Clone, Debug, Default, PartialEq, Serialize)]
653#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
654pub struct RevokeFlowEntitlementRequest {
655    /// <p>The ARN of the entitlement that you want to revoke.</p>
656    #[serde(rename = "EntitlementArn")]
657    pub entitlement_arn: String,
658    /// <p>The flow that you want to revoke an entitlement from.</p>
659    #[serde(rename = "FlowArn")]
660    pub flow_arn: String,
661}
662
663#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
664#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
665pub struct RevokeFlowEntitlementResponse {
666    /// <p>The ARN of the entitlement that was revoked.</p>
667    #[serde(rename = "EntitlementArn")]
668    #[serde(skip_serializing_if = "Option::is_none")]
669    pub entitlement_arn: Option<String>,
670    /// <p>The ARN of the flow that the entitlement was revoked from.</p>
671    #[serde(rename = "FlowArn")]
672    #[serde(skip_serializing_if = "Option::is_none")]
673    pub flow_arn: Option<String>,
674}
675
676/// <p>The settings for the source of the flow.</p>
677#[derive(Clone, Debug, Default, PartialEq, Serialize)]
678#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
679pub struct SetSourceRequest {
680    /// <p>The type of encryption that is used on the content ingested from this source.</p>
681    #[serde(rename = "Decryption")]
682    #[serde(skip_serializing_if = "Option::is_none")]
683    pub decryption: Option<Encryption>,
684    /// <p>A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.</p>
685    #[serde(rename = "Description")]
686    #[serde(skip_serializing_if = "Option::is_none")]
687    pub description: Option<String>,
688    /// <p>The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator&#39;s flow.</p>
689    #[serde(rename = "EntitlementArn")]
690    #[serde(skip_serializing_if = "Option::is_none")]
691    pub entitlement_arn: Option<String>,
692    /// <p>The port that the flow will be listening on for incoming content.</p>
693    #[serde(rename = "IngestPort")]
694    #[serde(skip_serializing_if = "Option::is_none")]
695    pub ingest_port: Option<i64>,
696    /// <p>The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.</p>
697    #[serde(rename = "MaxBitrate")]
698    #[serde(skip_serializing_if = "Option::is_none")]
699    pub max_bitrate: Option<i64>,
700    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
701    #[serde(rename = "MaxLatency")]
702    #[serde(skip_serializing_if = "Option::is_none")]
703    pub max_latency: Option<i64>,
704    /// <p>The name of the source.</p>
705    #[serde(rename = "Name")]
706    #[serde(skip_serializing_if = "Option::is_none")]
707    pub name: Option<String>,
708    /// <p>The protocol that is used by the source.</p>
709    #[serde(rename = "Protocol")]
710    #[serde(skip_serializing_if = "Option::is_none")]
711    pub protocol: Option<String>,
712    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.</p>
713    #[serde(rename = "StreamId")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub stream_id: Option<String>,
716    /// <p>The name of the VPC interface to use for this source.</p>
717    #[serde(rename = "VpcInterfaceName")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub vpc_interface_name: Option<String>,
720    /// <p>The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
721    #[serde(rename = "WhitelistCidr")]
722    #[serde(skip_serializing_if = "Option::is_none")]
723    pub whitelist_cidr: Option<String>,
724}
725
726/// <p>The settings for the source of the flow.</p>
727#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
728#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
729pub struct Source {
730    /// <p>Percentage from 0-100 of the data transfer cost to be billed to the subscriber.</p>
731    #[serde(rename = "DataTransferSubscriberFeePercent")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub data_transfer_subscriber_fee_percent: Option<i64>,
734    /// <p>The type of encryption that is used on the content ingested from this source.</p>
735    #[serde(rename = "Decryption")]
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub decryption: Option<Encryption>,
738    /// <p>A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.</p>
739    #[serde(rename = "Description")]
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub description: Option<String>,
742    /// <p>The ARN of the entitlement that allows you to subscribe to content that comes from another AWS account. The entitlement is set by the content originator and the ARN is generated as part of the originator&#39;s flow.</p>
743    #[serde(rename = "EntitlementArn")]
744    #[serde(skip_serializing_if = "Option::is_none")]
745    pub entitlement_arn: Option<String>,
746    /// <p>The IP address that the flow will be listening on for incoming content.</p>
747    #[serde(rename = "IngestIp")]
748    #[serde(skip_serializing_if = "Option::is_none")]
749    pub ingest_ip: Option<String>,
750    /// <p>The port that the flow will be listening on for incoming content.</p>
751    #[serde(rename = "IngestPort")]
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub ingest_port: Option<i64>,
754    /// <p>The name of the source.</p>
755    #[serde(rename = "Name")]
756    pub name: String,
757    /// <p>The ARN of the source.</p>
758    #[serde(rename = "SourceArn")]
759    pub source_arn: String,
760    /// <p>Attributes related to the transport stream that are used in the source.</p>
761    #[serde(rename = "Transport")]
762    #[serde(skip_serializing_if = "Option::is_none")]
763    pub transport: Option<Transport>,
764    /// <p>The name of the VPC Interface this Source is configured with.</p>
765    #[serde(rename = "VpcInterfaceName")]
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub vpc_interface_name: Option<String>,
768    /// <p>The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
769    #[serde(rename = "WhitelistCidr")]
770    #[serde(skip_serializing_if = "Option::is_none")]
771    pub whitelist_cidr: Option<String>,
772}
773
774#[derive(Clone, Debug, Default, PartialEq, Serialize)]
775#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
776pub struct StartFlowRequest {
777    /// <p>The ARN of the flow that you want to start.</p>
778    #[serde(rename = "FlowArn")]
779    pub flow_arn: String,
780}
781
782#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
783#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
784pub struct StartFlowResponse {
785    /// <p>The ARN of the flow that you started.</p>
786    #[serde(rename = "FlowArn")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub flow_arn: Option<String>,
789    /// <p>The status of the flow when the StartFlow process begins.</p>
790    #[serde(rename = "Status")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub status: Option<String>,
793}
794
795#[derive(Clone, Debug, Default, PartialEq, Serialize)]
796#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
797pub struct StopFlowRequest {
798    /// <p>The ARN of the flow that you want to stop.</p>
799    #[serde(rename = "FlowArn")]
800    pub flow_arn: String,
801}
802
803#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
804#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
805pub struct StopFlowResponse {
806    /// <p>The ARN of the flow that you stopped.</p>
807    #[serde(rename = "FlowArn")]
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub flow_arn: Option<String>,
810    /// <p>The status of the flow when the StopFlow process begins.</p>
811    #[serde(rename = "Status")]
812    #[serde(skip_serializing_if = "Option::is_none")]
813    pub status: Option<String>,
814}
815
816/// <p>The tags to add to the resource. A tag is an array of key-value pairs. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p>
817#[derive(Clone, Debug, Default, PartialEq, Serialize)]
818#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
819pub struct TagResourceRequest {
820    /// <p>The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource to which to add tags.</p>
821    #[serde(rename = "ResourceArn")]
822    pub resource_arn: String,
823    /// <p>A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.</p>
824    #[serde(rename = "Tags")]
825    pub tags: ::std::collections::HashMap<String, String>,
826}
827
828/// <p>Attributes related to the transport stream that are used in a source or output.</p>
829#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
830#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
831pub struct Transport {
832    /// <p>The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
833    #[serde(rename = "CidrAllowList")]
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub cidr_allow_list: Option<Vec<String>>,
836    /// <p>The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.</p>
837    #[serde(rename = "MaxBitrate")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub max_bitrate: Option<i64>,
840    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
841    #[serde(rename = "MaxLatency")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub max_latency: Option<i64>,
844    /// <p>The protocol that is used by the source or output.</p>
845    #[serde(rename = "Protocol")]
846    pub protocol: String,
847    /// <p>The remote ID for the Zixi-pull stream.</p>
848    #[serde(rename = "RemoteId")]
849    #[serde(skip_serializing_if = "Option::is_none")]
850    pub remote_id: Option<String>,
851    /// <p>The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.</p>
852    #[serde(rename = "SmoothingLatency")]
853    #[serde(skip_serializing_if = "Option::is_none")]
854    pub smoothing_latency: Option<i64>,
855    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.</p>
856    #[serde(rename = "StreamId")]
857    #[serde(skip_serializing_if = "Option::is_none")]
858    pub stream_id: Option<String>,
859}
860
861#[derive(Clone, Debug, Default, PartialEq, Serialize)]
862#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
863pub struct UntagResourceRequest {
864    /// <p>The Amazon Resource Name (ARN) that identifies the AWS Elemental MediaConnect resource from which to delete tags.</p>
865    #[serde(rename = "ResourceArn")]
866    pub resource_arn: String,
867    /// <p>The keys of the tags to be removed.</p>
868    #[serde(rename = "TagKeys")]
869    pub tag_keys: Vec<String>,
870}
871
872/// <p>Information about the encryption of the flow.</p>
873#[derive(Clone, Debug, Default, PartialEq, Serialize)]
874#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
875pub struct UpdateEncryption {
876    /// <p>The type of algorithm that is used for the encryption (such as aes128, aes192, or aes256).</p>
877    #[serde(rename = "Algorithm")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub algorithm: Option<String>,
880    /// <p>A 128-bit, 16-byte hex value represented by a 32-character string, to be used with the key for encrypting content. This parameter is not valid for static key encryption.</p>
881    #[serde(rename = "ConstantInitializationVector")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub constant_initialization_vector: Option<String>,
884    /// <p>The value of one of the devices that you configured with your digital rights management (DRM) platform key provider. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
885    #[serde(rename = "DeviceId")]
886    #[serde(skip_serializing_if = "Option::is_none")]
887    pub device_id: Option<String>,
888    /// <p>The type of key that is used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
889    #[serde(rename = "KeyType")]
890    #[serde(skip_serializing_if = "Option::is_none")]
891    pub key_type: Option<String>,
892    /// <p>The AWS Region that the API Gateway proxy endpoint was created in. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
893    #[serde(rename = "Region")]
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub region: Option<String>,
896    /// <p>An identifier for the content. The service sends this value to the key server to identify the current endpoint. The resource ID is also known as the content ID. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
897    #[serde(rename = "ResourceId")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub resource_id: Option<String>,
900    /// <p>The ARN of the role that you created during setup (when you set up AWS Elemental MediaConnect as a trusted entity).</p>
901    #[serde(rename = "RoleArn")]
902    #[serde(skip_serializing_if = "Option::is_none")]
903    pub role_arn: Option<String>,
904    /// <p>The ARN of the secret that you created in AWS Secrets Manager to store the encryption key. This parameter is required for static key encryption and is not valid for SPEKE encryption.</p>
905    #[serde(rename = "SecretArn")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub secret_arn: Option<String>,
908    /// <p>The URL from the API Gateway proxy that you set up to talk to your key server. This parameter is required for SPEKE encryption and is not valid for static key encryption.</p>
909    #[serde(rename = "Url")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub url: Option<String>,
912}
913
914/// <p>The settings for source failover</p>
915#[derive(Clone, Debug, Default, PartialEq, Serialize)]
916#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
917pub struct UpdateFailoverConfig {
918    /// <p>Recovery window time to look for dash-7 packets</p>
919    #[serde(rename = "RecoveryWindow")]
920    #[serde(skip_serializing_if = "Option::is_none")]
921    pub recovery_window: Option<i64>,
922    #[serde(rename = "State")]
923    #[serde(skip_serializing_if = "Option::is_none")]
924    pub state: Option<String>,
925}
926
927/// <p>The entitlement fields that you want to update.</p>
928#[derive(Clone, Debug, Default, PartialEq, Serialize)]
929#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
930pub struct UpdateFlowEntitlementRequest {
931    /// <p>A description of the entitlement. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the subscriber or end user.</p>
932    #[serde(rename = "Description")]
933    #[serde(skip_serializing_if = "Option::is_none")]
934    pub description: Option<String>,
935    /// <p>The type of encryption that will be used on the output associated with this entitlement.</p>
936    #[serde(rename = "Encryption")]
937    #[serde(skip_serializing_if = "Option::is_none")]
938    pub encryption: Option<UpdateEncryption>,
939    /// <p>The ARN of the entitlement that you want to update.</p>
940    #[serde(rename = "EntitlementArn")]
941    pub entitlement_arn: String,
942    /// <p>The flow that is associated with the entitlement that you want to update.</p>
943    #[serde(rename = "FlowArn")]
944    pub flow_arn: String,
945    /// <p>The AWS account IDs that you want to share your content with. The receiving accounts (subscribers) will be allowed to create their own flow using your content as the source.</p>
946    #[serde(rename = "Subscribers")]
947    #[serde(skip_serializing_if = "Option::is_none")]
948    pub subscribers: Option<Vec<String>>,
949}
950
951#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
952#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
953pub struct UpdateFlowEntitlementResponse {
954    #[serde(rename = "Entitlement")]
955    #[serde(skip_serializing_if = "Option::is_none")]
956    pub entitlement: Option<Entitlement>,
957    /// <p>The ARN of the flow that this entitlement was granted on.</p>
958    #[serde(rename = "FlowArn")]
959    #[serde(skip_serializing_if = "Option::is_none")]
960    pub flow_arn: Option<String>,
961}
962
963/// <p>The fields that you want to update in the output.</p>
964#[derive(Clone, Debug, Default, PartialEq, Serialize)]
965#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
966pub struct UpdateFlowOutputRequest {
967    /// <p>The range of IP addresses that should be allowed to initiate output requests to this flow. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
968    #[serde(rename = "CidrAllowList")]
969    #[serde(skip_serializing_if = "Option::is_none")]
970    pub cidr_allow_list: Option<Vec<String>>,
971    /// <p>A description of the output. This description appears only on the AWS Elemental MediaConnect console and will not be seen by the end user.</p>
972    #[serde(rename = "Description")]
973    #[serde(skip_serializing_if = "Option::is_none")]
974    pub description: Option<String>,
975    /// <p>The IP address where you want to send the output.</p>
976    #[serde(rename = "Destination")]
977    #[serde(skip_serializing_if = "Option::is_none")]
978    pub destination: Option<String>,
979    /// <p>The type of key used for the encryption. If no keyType is provided, the service will use the default setting (static-key).</p>
980    #[serde(rename = "Encryption")]
981    #[serde(skip_serializing_if = "Option::is_none")]
982    pub encryption: Option<UpdateEncryption>,
983    /// <p>The flow that is associated with the output that you want to update.</p>
984    #[serde(rename = "FlowArn")]
985    pub flow_arn: String,
986    /// <p>The maximum latency in milliseconds for Zixi-based streams.</p>
987    #[serde(rename = "MaxLatency")]
988    #[serde(skip_serializing_if = "Option::is_none")]
989    pub max_latency: Option<i64>,
990    /// <p>The ARN of the output that you want to update.</p>
991    #[serde(rename = "OutputArn")]
992    pub output_arn: String,
993    /// <p>The port to use when content is distributed to this output.</p>
994    #[serde(rename = "Port")]
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub port: Option<i64>,
997    /// <p>The protocol to use for the output.</p>
998    #[serde(rename = "Protocol")]
999    #[serde(skip_serializing_if = "Option::is_none")]
1000    pub protocol: Option<String>,
1001    /// <p>The remote ID for the Zixi-pull stream.</p>
1002    #[serde(rename = "RemoteId")]
1003    #[serde(skip_serializing_if = "Option::is_none")]
1004    pub remote_id: Option<String>,
1005    /// <p>The smoothing latency in milliseconds for RIST, RTP, and RTP-FEC streams.</p>
1006    #[serde(rename = "SmoothingLatency")]
1007    #[serde(skip_serializing_if = "Option::is_none")]
1008    pub smoothing_latency: Option<i64>,
1009    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.</p>
1010    #[serde(rename = "StreamId")]
1011    #[serde(skip_serializing_if = "Option::is_none")]
1012    pub stream_id: Option<String>,
1013    /// <p>The name of the VPC interface attachment to use for this output.</p>
1014    #[serde(rename = "VpcInterfaceAttachment")]
1015    #[serde(skip_serializing_if = "Option::is_none")]
1016    pub vpc_interface_attachment: Option<VpcInterfaceAttachment>,
1017}
1018
1019#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1020#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1021pub struct UpdateFlowOutputResponse {
1022    /// <p>The ARN of the flow that is associated with the updated output.</p>
1023    #[serde(rename = "FlowArn")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub flow_arn: Option<String>,
1026    #[serde(rename = "Output")]
1027    #[serde(skip_serializing_if = "Option::is_none")]
1028    pub output: Option<Output>,
1029}
1030
1031/// <p>A request to update flow.</p>
1032#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1033#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1034pub struct UpdateFlowRequest {
1035    /// <p>The flow that you want to update.</p>
1036    #[serde(rename = "FlowArn")]
1037    pub flow_arn: String,
1038    #[serde(rename = "SourceFailoverConfig")]
1039    #[serde(skip_serializing_if = "Option::is_none")]
1040    pub source_failover_config: Option<UpdateFailoverConfig>,
1041}
1042
1043#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1044#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1045pub struct UpdateFlowResponse {
1046    #[serde(rename = "Flow")]
1047    #[serde(skip_serializing_if = "Option::is_none")]
1048    pub flow: Option<Flow>,
1049}
1050
1051/// <p>A request to update the source of a flow.</p>
1052#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1053#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1054pub struct UpdateFlowSourceRequest {
1055    /// <p>The type of encryption used on the content ingested from this source.</p>
1056    #[serde(rename = "Decryption")]
1057    #[serde(skip_serializing_if = "Option::is_none")]
1058    pub decryption: Option<UpdateEncryption>,
1059    /// <p>A description for the source. This value is not used or seen outside of the current AWS Elemental MediaConnect account.</p>
1060    #[serde(rename = "Description")]
1061    #[serde(skip_serializing_if = "Option::is_none")]
1062    pub description: Option<String>,
1063    /// <p>The ARN of the entitlement that allows you to subscribe to this flow. The entitlement is set by the flow originator, and the ARN is generated as part of the originator&#39;s flow.</p>
1064    #[serde(rename = "EntitlementArn")]
1065    #[serde(skip_serializing_if = "Option::is_none")]
1066    pub entitlement_arn: Option<String>,
1067    /// <p>The flow that is associated with the source that you want to update.</p>
1068    #[serde(rename = "FlowArn")]
1069    pub flow_arn: String,
1070    /// <p>The port that the flow will be listening on for incoming content.</p>
1071    #[serde(rename = "IngestPort")]
1072    #[serde(skip_serializing_if = "Option::is_none")]
1073    pub ingest_port: Option<i64>,
1074    /// <p>The smoothing max bitrate for RIST, RTP, and RTP-FEC streams.</p>
1075    #[serde(rename = "MaxBitrate")]
1076    #[serde(skip_serializing_if = "Option::is_none")]
1077    pub max_bitrate: Option<i64>,
1078    /// <p>The maximum latency in milliseconds. This parameter applies only to RIST-based and Zixi-based streams.</p>
1079    #[serde(rename = "MaxLatency")]
1080    #[serde(skip_serializing_if = "Option::is_none")]
1081    pub max_latency: Option<i64>,
1082    /// <p>The protocol that is used by the source.</p>
1083    #[serde(rename = "Protocol")]
1084    #[serde(skip_serializing_if = "Option::is_none")]
1085    pub protocol: Option<String>,
1086    /// <p>The ARN of the source that you want to update.</p>
1087    #[serde(rename = "SourceArn")]
1088    pub source_arn: String,
1089    /// <p>The stream ID that you want to use for this transport. This parameter applies only to Zixi-based streams.</p>
1090    #[serde(rename = "StreamId")]
1091    #[serde(skip_serializing_if = "Option::is_none")]
1092    pub stream_id: Option<String>,
1093    /// <p>The name of the VPC Interface to configure this Source with.</p>
1094    #[serde(rename = "VpcInterfaceName")]
1095    #[serde(skip_serializing_if = "Option::is_none")]
1096    pub vpc_interface_name: Option<String>,
1097    /// <p>The range of IP addresses that should be allowed to contribute content to your source. These IP addresses should be in the form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16.</p>
1098    #[serde(rename = "WhitelistCidr")]
1099    #[serde(skip_serializing_if = "Option::is_none")]
1100    pub whitelist_cidr: Option<String>,
1101}
1102
1103#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1104#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1105pub struct UpdateFlowSourceResponse {
1106    /// <p>The ARN of the flow that you want to update.</p>
1107    #[serde(rename = "FlowArn")]
1108    #[serde(skip_serializing_if = "Option::is_none")]
1109    pub flow_arn: Option<String>,
1110    /// <p>The settings for the source of the flow.</p>
1111    #[serde(rename = "Source")]
1112    #[serde(skip_serializing_if = "Option::is_none")]
1113    pub source: Option<Source>,
1114}
1115
1116/// <p>The settings for a VPC Source.</p>
1117#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1118#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1119pub struct VpcInterface {
1120    /// <p>Immutable and has to be a unique against other VpcInterfaces in this Flow</p>
1121    #[serde(rename = "Name")]
1122    pub name: String,
1123    /// <p>IDs of the network interfaces created in customer&#39;s account by MediaConnect.</p>
1124    #[serde(rename = "NetworkInterfaceIds")]
1125    pub network_interface_ids: Vec<String>,
1126    /// <p>Role Arn MediaConnect can assumes to create ENIs in customer&#39;s account</p>
1127    #[serde(rename = "RoleArn")]
1128    pub role_arn: String,
1129    /// <p>Security Group IDs to be used on ENI.</p>
1130    #[serde(rename = "SecurityGroupIds")]
1131    pub security_group_ids: Vec<String>,
1132    /// <p>Subnet must be in the AZ of the Flow</p>
1133    #[serde(rename = "SubnetId")]
1134    pub subnet_id: String,
1135}
1136
1137/// <p>The settings for attaching a VPC interface to an output.</p>
1138#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1139pub struct VpcInterfaceAttachment {
1140    /// <p>The name of the VPC interface to use for this output.</p>
1141    #[serde(rename = "VpcInterfaceName")]
1142    #[serde(skip_serializing_if = "Option::is_none")]
1143    pub vpc_interface_name: Option<String>,
1144}
1145
1146/// <p>Desired VPC Interface for a Flow</p>
1147#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1148#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1149pub struct VpcInterfaceRequest {
1150    /// <p>The name of the VPC Interface. This value must be unique within the current flow.</p>
1151    #[serde(rename = "Name")]
1152    pub name: String,
1153    /// <p>Role Arn MediaConnect can assumes to create ENIs in customer&#39;s account</p>
1154    #[serde(rename = "RoleArn")]
1155    pub role_arn: String,
1156    /// <p>Security Group IDs to be used on ENI.</p>
1157    #[serde(rename = "SecurityGroupIds")]
1158    pub security_group_ids: Vec<String>,
1159    /// <p>Subnet must be in the AZ of the Flow</p>
1160    #[serde(rename = "SubnetId")]
1161    pub subnet_id: String,
1162}
1163
1164/// Errors returned by AddFlowOutputs
1165#[derive(Debug, PartialEq)]
1166pub enum AddFlowOutputsError {
1167    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1168    AddFlowOutputs420(String),
1169    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1170    BadRequest(String),
1171    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1172    Forbidden(String),
1173    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1174    InternalServerError(String),
1175    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1176    NotFound(String),
1177    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1178    ServiceUnavailable(String),
1179    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1180    TooManyRequests(String),
1181}
1182
1183impl AddFlowOutputsError {
1184    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddFlowOutputsError> {
1185        if let Some(err) = proto::json::Error::parse_rest(&res) {
1186            match err.typ.as_str() {
1187                "AddFlowOutputs420Exception" => {
1188                    return RusotoError::Service(AddFlowOutputsError::AddFlowOutputs420(err.msg))
1189                }
1190                "BadRequestException" => {
1191                    return RusotoError::Service(AddFlowOutputsError::BadRequest(err.msg))
1192                }
1193                "ForbiddenException" => {
1194                    return RusotoError::Service(AddFlowOutputsError::Forbidden(err.msg))
1195                }
1196                "InternalServerErrorException" => {
1197                    return RusotoError::Service(AddFlowOutputsError::InternalServerError(err.msg))
1198                }
1199                "NotFoundException" => {
1200                    return RusotoError::Service(AddFlowOutputsError::NotFound(err.msg))
1201                }
1202                "ServiceUnavailableException" => {
1203                    return RusotoError::Service(AddFlowOutputsError::ServiceUnavailable(err.msg))
1204                }
1205                "TooManyRequestsException" => {
1206                    return RusotoError::Service(AddFlowOutputsError::TooManyRequests(err.msg))
1207                }
1208                "ValidationException" => return RusotoError::Validation(err.msg),
1209                _ => {}
1210            }
1211        }
1212        RusotoError::Unknown(res)
1213    }
1214}
1215impl fmt::Display for AddFlowOutputsError {
1216    #[allow(unused_variables)]
1217    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1218        match *self {
1219            AddFlowOutputsError::AddFlowOutputs420(ref cause) => write!(f, "{}", cause),
1220            AddFlowOutputsError::BadRequest(ref cause) => write!(f, "{}", cause),
1221            AddFlowOutputsError::Forbidden(ref cause) => write!(f, "{}", cause),
1222            AddFlowOutputsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1223            AddFlowOutputsError::NotFound(ref cause) => write!(f, "{}", cause),
1224            AddFlowOutputsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1225            AddFlowOutputsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1226        }
1227    }
1228}
1229impl Error for AddFlowOutputsError {}
1230/// Errors returned by AddFlowSources
1231#[derive(Debug, PartialEq)]
1232pub enum AddFlowSourcesError {
1233    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1234    BadRequest(String),
1235    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1236    Forbidden(String),
1237    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1238    InternalServerError(String),
1239    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1240    NotFound(String),
1241    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1242    ServiceUnavailable(String),
1243    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1244    TooManyRequests(String),
1245}
1246
1247impl AddFlowSourcesError {
1248    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddFlowSourcesError> {
1249        if let Some(err) = proto::json::Error::parse_rest(&res) {
1250            match err.typ.as_str() {
1251                "BadRequestException" => {
1252                    return RusotoError::Service(AddFlowSourcesError::BadRequest(err.msg))
1253                }
1254                "ForbiddenException" => {
1255                    return RusotoError::Service(AddFlowSourcesError::Forbidden(err.msg))
1256                }
1257                "InternalServerErrorException" => {
1258                    return RusotoError::Service(AddFlowSourcesError::InternalServerError(err.msg))
1259                }
1260                "NotFoundException" => {
1261                    return RusotoError::Service(AddFlowSourcesError::NotFound(err.msg))
1262                }
1263                "ServiceUnavailableException" => {
1264                    return RusotoError::Service(AddFlowSourcesError::ServiceUnavailable(err.msg))
1265                }
1266                "TooManyRequestsException" => {
1267                    return RusotoError::Service(AddFlowSourcesError::TooManyRequests(err.msg))
1268                }
1269                "ValidationException" => return RusotoError::Validation(err.msg),
1270                _ => {}
1271            }
1272        }
1273        RusotoError::Unknown(res)
1274    }
1275}
1276impl fmt::Display for AddFlowSourcesError {
1277    #[allow(unused_variables)]
1278    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1279        match *self {
1280            AddFlowSourcesError::BadRequest(ref cause) => write!(f, "{}", cause),
1281            AddFlowSourcesError::Forbidden(ref cause) => write!(f, "{}", cause),
1282            AddFlowSourcesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1283            AddFlowSourcesError::NotFound(ref cause) => write!(f, "{}", cause),
1284            AddFlowSourcesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1285            AddFlowSourcesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1286        }
1287    }
1288}
1289impl Error for AddFlowSourcesError {}
1290/// Errors returned by AddFlowVpcInterfaces
1291#[derive(Debug, PartialEq)]
1292pub enum AddFlowVpcInterfacesError {
1293    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1294    BadRequest(String),
1295    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1296    Forbidden(String),
1297    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1298    InternalServerError(String),
1299    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1300    NotFound(String),
1301    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1302    ServiceUnavailable(String),
1303    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1304    TooManyRequests(String),
1305}
1306
1307impl AddFlowVpcInterfacesError {
1308    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddFlowVpcInterfacesError> {
1309        if let Some(err) = proto::json::Error::parse_rest(&res) {
1310            match err.typ.as_str() {
1311                "BadRequestException" => {
1312                    return RusotoError::Service(AddFlowVpcInterfacesError::BadRequest(err.msg))
1313                }
1314                "ForbiddenException" => {
1315                    return RusotoError::Service(AddFlowVpcInterfacesError::Forbidden(err.msg))
1316                }
1317                "InternalServerErrorException" => {
1318                    return RusotoError::Service(AddFlowVpcInterfacesError::InternalServerError(
1319                        err.msg,
1320                    ))
1321                }
1322                "NotFoundException" => {
1323                    return RusotoError::Service(AddFlowVpcInterfacesError::NotFound(err.msg))
1324                }
1325                "ServiceUnavailableException" => {
1326                    return RusotoError::Service(AddFlowVpcInterfacesError::ServiceUnavailable(
1327                        err.msg,
1328                    ))
1329                }
1330                "TooManyRequestsException" => {
1331                    return RusotoError::Service(AddFlowVpcInterfacesError::TooManyRequests(
1332                        err.msg,
1333                    ))
1334                }
1335                "ValidationException" => return RusotoError::Validation(err.msg),
1336                _ => {}
1337            }
1338        }
1339        RusotoError::Unknown(res)
1340    }
1341}
1342impl fmt::Display for AddFlowVpcInterfacesError {
1343    #[allow(unused_variables)]
1344    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1345        match *self {
1346            AddFlowVpcInterfacesError::BadRequest(ref cause) => write!(f, "{}", cause),
1347            AddFlowVpcInterfacesError::Forbidden(ref cause) => write!(f, "{}", cause),
1348            AddFlowVpcInterfacesError::InternalServerError(ref cause) => write!(f, "{}", cause),
1349            AddFlowVpcInterfacesError::NotFound(ref cause) => write!(f, "{}", cause),
1350            AddFlowVpcInterfacesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1351            AddFlowVpcInterfacesError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1352        }
1353    }
1354}
1355impl Error for AddFlowVpcInterfacesError {}
1356/// Errors returned by CreateFlow
1357#[derive(Debug, PartialEq)]
1358pub enum CreateFlowError {
1359    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1360    BadRequest(String),
1361    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1362    CreateFlow420(String),
1363    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1364    Forbidden(String),
1365    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1366    InternalServerError(String),
1367    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1368    ServiceUnavailable(String),
1369    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1370    TooManyRequests(String),
1371}
1372
1373impl CreateFlowError {
1374    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFlowError> {
1375        if let Some(err) = proto::json::Error::parse_rest(&res) {
1376            match err.typ.as_str() {
1377                "BadRequestException" => {
1378                    return RusotoError::Service(CreateFlowError::BadRequest(err.msg))
1379                }
1380                "CreateFlow420Exception" => {
1381                    return RusotoError::Service(CreateFlowError::CreateFlow420(err.msg))
1382                }
1383                "ForbiddenException" => {
1384                    return RusotoError::Service(CreateFlowError::Forbidden(err.msg))
1385                }
1386                "InternalServerErrorException" => {
1387                    return RusotoError::Service(CreateFlowError::InternalServerError(err.msg))
1388                }
1389                "ServiceUnavailableException" => {
1390                    return RusotoError::Service(CreateFlowError::ServiceUnavailable(err.msg))
1391                }
1392                "TooManyRequestsException" => {
1393                    return RusotoError::Service(CreateFlowError::TooManyRequests(err.msg))
1394                }
1395                "ValidationException" => return RusotoError::Validation(err.msg),
1396                _ => {}
1397            }
1398        }
1399        RusotoError::Unknown(res)
1400    }
1401}
1402impl fmt::Display for CreateFlowError {
1403    #[allow(unused_variables)]
1404    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1405        match *self {
1406            CreateFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
1407            CreateFlowError::CreateFlow420(ref cause) => write!(f, "{}", cause),
1408            CreateFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
1409            CreateFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
1410            CreateFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1411            CreateFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1412        }
1413    }
1414}
1415impl Error for CreateFlowError {}
1416/// Errors returned by DeleteFlow
1417#[derive(Debug, PartialEq)]
1418pub enum DeleteFlowError {
1419    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1420    BadRequest(String),
1421    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1422    Forbidden(String),
1423    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1424    InternalServerError(String),
1425    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1426    NotFound(String),
1427    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1428    ServiceUnavailable(String),
1429    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1430    TooManyRequests(String),
1431}
1432
1433impl DeleteFlowError {
1434    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFlowError> {
1435        if let Some(err) = proto::json::Error::parse_rest(&res) {
1436            match err.typ.as_str() {
1437                "BadRequestException" => {
1438                    return RusotoError::Service(DeleteFlowError::BadRequest(err.msg))
1439                }
1440                "ForbiddenException" => {
1441                    return RusotoError::Service(DeleteFlowError::Forbidden(err.msg))
1442                }
1443                "InternalServerErrorException" => {
1444                    return RusotoError::Service(DeleteFlowError::InternalServerError(err.msg))
1445                }
1446                "NotFoundException" => {
1447                    return RusotoError::Service(DeleteFlowError::NotFound(err.msg))
1448                }
1449                "ServiceUnavailableException" => {
1450                    return RusotoError::Service(DeleteFlowError::ServiceUnavailable(err.msg))
1451                }
1452                "TooManyRequestsException" => {
1453                    return RusotoError::Service(DeleteFlowError::TooManyRequests(err.msg))
1454                }
1455                "ValidationException" => return RusotoError::Validation(err.msg),
1456                _ => {}
1457            }
1458        }
1459        RusotoError::Unknown(res)
1460    }
1461}
1462impl fmt::Display for DeleteFlowError {
1463    #[allow(unused_variables)]
1464    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1465        match *self {
1466            DeleteFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
1467            DeleteFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
1468            DeleteFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
1469            DeleteFlowError::NotFound(ref cause) => write!(f, "{}", cause),
1470            DeleteFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1471            DeleteFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1472        }
1473    }
1474}
1475impl Error for DeleteFlowError {}
1476/// Errors returned by DescribeFlow
1477#[derive(Debug, PartialEq)]
1478pub enum DescribeFlowError {
1479    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1480    BadRequest(String),
1481    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1482    Forbidden(String),
1483    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1484    InternalServerError(String),
1485    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1486    NotFound(String),
1487    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1488    ServiceUnavailable(String),
1489    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1490    TooManyRequests(String),
1491}
1492
1493impl DescribeFlowError {
1494    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFlowError> {
1495        if let Some(err) = proto::json::Error::parse_rest(&res) {
1496            match err.typ.as_str() {
1497                "BadRequestException" => {
1498                    return RusotoError::Service(DescribeFlowError::BadRequest(err.msg))
1499                }
1500                "ForbiddenException" => {
1501                    return RusotoError::Service(DescribeFlowError::Forbidden(err.msg))
1502                }
1503                "InternalServerErrorException" => {
1504                    return RusotoError::Service(DescribeFlowError::InternalServerError(err.msg))
1505                }
1506                "NotFoundException" => {
1507                    return RusotoError::Service(DescribeFlowError::NotFound(err.msg))
1508                }
1509                "ServiceUnavailableException" => {
1510                    return RusotoError::Service(DescribeFlowError::ServiceUnavailable(err.msg))
1511                }
1512                "TooManyRequestsException" => {
1513                    return RusotoError::Service(DescribeFlowError::TooManyRequests(err.msg))
1514                }
1515                "ValidationException" => return RusotoError::Validation(err.msg),
1516                _ => {}
1517            }
1518        }
1519        RusotoError::Unknown(res)
1520    }
1521}
1522impl fmt::Display for DescribeFlowError {
1523    #[allow(unused_variables)]
1524    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1525        match *self {
1526            DescribeFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
1527            DescribeFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
1528            DescribeFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
1529            DescribeFlowError::NotFound(ref cause) => write!(f, "{}", cause),
1530            DescribeFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1531            DescribeFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1532        }
1533    }
1534}
1535impl Error for DescribeFlowError {}
1536/// Errors returned by GrantFlowEntitlements
1537#[derive(Debug, PartialEq)]
1538pub enum GrantFlowEntitlementsError {
1539    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1540    BadRequest(String),
1541    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1542    Forbidden(String),
1543    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1544    GrantFlowEntitlements420(String),
1545    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1546    InternalServerError(String),
1547    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1548    NotFound(String),
1549    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1550    ServiceUnavailable(String),
1551    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1552    TooManyRequests(String),
1553}
1554
1555impl GrantFlowEntitlementsError {
1556    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GrantFlowEntitlementsError> {
1557        if let Some(err) = proto::json::Error::parse_rest(&res) {
1558            match err.typ.as_str() {
1559                "BadRequestException" => {
1560                    return RusotoError::Service(GrantFlowEntitlementsError::BadRequest(err.msg))
1561                }
1562                "ForbiddenException" => {
1563                    return RusotoError::Service(GrantFlowEntitlementsError::Forbidden(err.msg))
1564                }
1565                "GrantFlowEntitlements420Exception" => {
1566                    return RusotoError::Service(
1567                        GrantFlowEntitlementsError::GrantFlowEntitlements420(err.msg),
1568                    )
1569                }
1570                "InternalServerErrorException" => {
1571                    return RusotoError::Service(GrantFlowEntitlementsError::InternalServerError(
1572                        err.msg,
1573                    ))
1574                }
1575                "NotFoundException" => {
1576                    return RusotoError::Service(GrantFlowEntitlementsError::NotFound(err.msg))
1577                }
1578                "ServiceUnavailableException" => {
1579                    return RusotoError::Service(GrantFlowEntitlementsError::ServiceUnavailable(
1580                        err.msg,
1581                    ))
1582                }
1583                "TooManyRequestsException" => {
1584                    return RusotoError::Service(GrantFlowEntitlementsError::TooManyRequests(
1585                        err.msg,
1586                    ))
1587                }
1588                "ValidationException" => return RusotoError::Validation(err.msg),
1589                _ => {}
1590            }
1591        }
1592        RusotoError::Unknown(res)
1593    }
1594}
1595impl fmt::Display for GrantFlowEntitlementsError {
1596    #[allow(unused_variables)]
1597    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1598        match *self {
1599            GrantFlowEntitlementsError::BadRequest(ref cause) => write!(f, "{}", cause),
1600            GrantFlowEntitlementsError::Forbidden(ref cause) => write!(f, "{}", cause),
1601            GrantFlowEntitlementsError::GrantFlowEntitlements420(ref cause) => {
1602                write!(f, "{}", cause)
1603            }
1604            GrantFlowEntitlementsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1605            GrantFlowEntitlementsError::NotFound(ref cause) => write!(f, "{}", cause),
1606            GrantFlowEntitlementsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1607            GrantFlowEntitlementsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1608        }
1609    }
1610}
1611impl Error for GrantFlowEntitlementsError {}
1612/// Errors returned by ListEntitlements
1613#[derive(Debug, PartialEq)]
1614pub enum ListEntitlementsError {
1615    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1616    BadRequest(String),
1617    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1618    InternalServerError(String),
1619    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1620    ServiceUnavailable(String),
1621    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1622    TooManyRequests(String),
1623}
1624
1625impl ListEntitlementsError {
1626    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListEntitlementsError> {
1627        if let Some(err) = proto::json::Error::parse_rest(&res) {
1628            match err.typ.as_str() {
1629                "BadRequestException" => {
1630                    return RusotoError::Service(ListEntitlementsError::BadRequest(err.msg))
1631                }
1632                "InternalServerErrorException" => {
1633                    return RusotoError::Service(ListEntitlementsError::InternalServerError(
1634                        err.msg,
1635                    ))
1636                }
1637                "ServiceUnavailableException" => {
1638                    return RusotoError::Service(ListEntitlementsError::ServiceUnavailable(err.msg))
1639                }
1640                "TooManyRequestsException" => {
1641                    return RusotoError::Service(ListEntitlementsError::TooManyRequests(err.msg))
1642                }
1643                "ValidationException" => return RusotoError::Validation(err.msg),
1644                _ => {}
1645            }
1646        }
1647        RusotoError::Unknown(res)
1648    }
1649}
1650impl fmt::Display for ListEntitlementsError {
1651    #[allow(unused_variables)]
1652    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1653        match *self {
1654            ListEntitlementsError::BadRequest(ref cause) => write!(f, "{}", cause),
1655            ListEntitlementsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1656            ListEntitlementsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1657            ListEntitlementsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1658        }
1659    }
1660}
1661impl Error for ListEntitlementsError {}
1662/// Errors returned by ListFlows
1663#[derive(Debug, PartialEq)]
1664pub enum ListFlowsError {
1665    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1666    BadRequest(String),
1667    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1668    InternalServerError(String),
1669    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1670    ServiceUnavailable(String),
1671    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1672    TooManyRequests(String),
1673}
1674
1675impl ListFlowsError {
1676    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListFlowsError> {
1677        if let Some(err) = proto::json::Error::parse_rest(&res) {
1678            match err.typ.as_str() {
1679                "BadRequestException" => {
1680                    return RusotoError::Service(ListFlowsError::BadRequest(err.msg))
1681                }
1682                "InternalServerErrorException" => {
1683                    return RusotoError::Service(ListFlowsError::InternalServerError(err.msg))
1684                }
1685                "ServiceUnavailableException" => {
1686                    return RusotoError::Service(ListFlowsError::ServiceUnavailable(err.msg))
1687                }
1688                "TooManyRequestsException" => {
1689                    return RusotoError::Service(ListFlowsError::TooManyRequests(err.msg))
1690                }
1691                "ValidationException" => return RusotoError::Validation(err.msg),
1692                _ => {}
1693            }
1694        }
1695        RusotoError::Unknown(res)
1696    }
1697}
1698impl fmt::Display for ListFlowsError {
1699    #[allow(unused_variables)]
1700    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1701        match *self {
1702            ListFlowsError::BadRequest(ref cause) => write!(f, "{}", cause),
1703            ListFlowsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1704            ListFlowsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1705            ListFlowsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1706        }
1707    }
1708}
1709impl Error for ListFlowsError {}
1710/// Errors returned by ListTagsForResource
1711#[derive(Debug, PartialEq)]
1712pub enum ListTagsForResourceError {
1713    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1714    BadRequest(String),
1715    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1716    InternalServerError(String),
1717    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1718    NotFound(String),
1719}
1720
1721impl ListTagsForResourceError {
1722    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
1723        if let Some(err) = proto::json::Error::parse_rest(&res) {
1724            match err.typ.as_str() {
1725                "BadRequestException" => {
1726                    return RusotoError::Service(ListTagsForResourceError::BadRequest(err.msg))
1727                }
1728                "InternalServerErrorException" => {
1729                    return RusotoError::Service(ListTagsForResourceError::InternalServerError(
1730                        err.msg,
1731                    ))
1732                }
1733                "NotFoundException" => {
1734                    return RusotoError::Service(ListTagsForResourceError::NotFound(err.msg))
1735                }
1736                "ValidationException" => return RusotoError::Validation(err.msg),
1737                _ => {}
1738            }
1739        }
1740        RusotoError::Unknown(res)
1741    }
1742}
1743impl fmt::Display for ListTagsForResourceError {
1744    #[allow(unused_variables)]
1745    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1746        match *self {
1747            ListTagsForResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1748            ListTagsForResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
1749            ListTagsForResourceError::NotFound(ref cause) => write!(f, "{}", cause),
1750        }
1751    }
1752}
1753impl Error for ListTagsForResourceError {}
1754/// Errors returned by RemoveFlowOutput
1755#[derive(Debug, PartialEq)]
1756pub enum RemoveFlowOutputError {
1757    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1758    BadRequest(String),
1759    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1760    Forbidden(String),
1761    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1762    InternalServerError(String),
1763    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1764    NotFound(String),
1765    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1766    ServiceUnavailable(String),
1767    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1768    TooManyRequests(String),
1769}
1770
1771impl RemoveFlowOutputError {
1772    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveFlowOutputError> {
1773        if let Some(err) = proto::json::Error::parse_rest(&res) {
1774            match err.typ.as_str() {
1775                "BadRequestException" => {
1776                    return RusotoError::Service(RemoveFlowOutputError::BadRequest(err.msg))
1777                }
1778                "ForbiddenException" => {
1779                    return RusotoError::Service(RemoveFlowOutputError::Forbidden(err.msg))
1780                }
1781                "InternalServerErrorException" => {
1782                    return RusotoError::Service(RemoveFlowOutputError::InternalServerError(
1783                        err.msg,
1784                    ))
1785                }
1786                "NotFoundException" => {
1787                    return RusotoError::Service(RemoveFlowOutputError::NotFound(err.msg))
1788                }
1789                "ServiceUnavailableException" => {
1790                    return RusotoError::Service(RemoveFlowOutputError::ServiceUnavailable(err.msg))
1791                }
1792                "TooManyRequestsException" => {
1793                    return RusotoError::Service(RemoveFlowOutputError::TooManyRequests(err.msg))
1794                }
1795                "ValidationException" => return RusotoError::Validation(err.msg),
1796                _ => {}
1797            }
1798        }
1799        RusotoError::Unknown(res)
1800    }
1801}
1802impl fmt::Display for RemoveFlowOutputError {
1803    #[allow(unused_variables)]
1804    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1805        match *self {
1806            RemoveFlowOutputError::BadRequest(ref cause) => write!(f, "{}", cause),
1807            RemoveFlowOutputError::Forbidden(ref cause) => write!(f, "{}", cause),
1808            RemoveFlowOutputError::InternalServerError(ref cause) => write!(f, "{}", cause),
1809            RemoveFlowOutputError::NotFound(ref cause) => write!(f, "{}", cause),
1810            RemoveFlowOutputError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1811            RemoveFlowOutputError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1812        }
1813    }
1814}
1815impl Error for RemoveFlowOutputError {}
1816/// Errors returned by RemoveFlowSource
1817#[derive(Debug, PartialEq)]
1818pub enum RemoveFlowSourceError {
1819    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1820    BadRequest(String),
1821    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1822    Forbidden(String),
1823    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1824    InternalServerError(String),
1825    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1826    NotFound(String),
1827    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1828    ServiceUnavailable(String),
1829    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1830    TooManyRequests(String),
1831}
1832
1833impl RemoveFlowSourceError {
1834    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveFlowSourceError> {
1835        if let Some(err) = proto::json::Error::parse_rest(&res) {
1836            match err.typ.as_str() {
1837                "BadRequestException" => {
1838                    return RusotoError::Service(RemoveFlowSourceError::BadRequest(err.msg))
1839                }
1840                "ForbiddenException" => {
1841                    return RusotoError::Service(RemoveFlowSourceError::Forbidden(err.msg))
1842                }
1843                "InternalServerErrorException" => {
1844                    return RusotoError::Service(RemoveFlowSourceError::InternalServerError(
1845                        err.msg,
1846                    ))
1847                }
1848                "NotFoundException" => {
1849                    return RusotoError::Service(RemoveFlowSourceError::NotFound(err.msg))
1850                }
1851                "ServiceUnavailableException" => {
1852                    return RusotoError::Service(RemoveFlowSourceError::ServiceUnavailable(err.msg))
1853                }
1854                "TooManyRequestsException" => {
1855                    return RusotoError::Service(RemoveFlowSourceError::TooManyRequests(err.msg))
1856                }
1857                "ValidationException" => return RusotoError::Validation(err.msg),
1858                _ => {}
1859            }
1860        }
1861        RusotoError::Unknown(res)
1862    }
1863}
1864impl fmt::Display for RemoveFlowSourceError {
1865    #[allow(unused_variables)]
1866    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1867        match *self {
1868            RemoveFlowSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
1869            RemoveFlowSourceError::Forbidden(ref cause) => write!(f, "{}", cause),
1870            RemoveFlowSourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
1871            RemoveFlowSourceError::NotFound(ref cause) => write!(f, "{}", cause),
1872            RemoveFlowSourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1873            RemoveFlowSourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1874        }
1875    }
1876}
1877impl Error for RemoveFlowSourceError {}
1878/// Errors returned by RemoveFlowVpcInterface
1879#[derive(Debug, PartialEq)]
1880pub enum RemoveFlowVpcInterfaceError {
1881    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1882    BadRequest(String),
1883    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1884    Forbidden(String),
1885    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1886    InternalServerError(String),
1887    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1888    NotFound(String),
1889    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1890    ServiceUnavailable(String),
1891    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1892    TooManyRequests(String),
1893}
1894
1895impl RemoveFlowVpcInterfaceError {
1896    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveFlowVpcInterfaceError> {
1897        if let Some(err) = proto::json::Error::parse_rest(&res) {
1898            match err.typ.as_str() {
1899                "BadRequestException" => {
1900                    return RusotoError::Service(RemoveFlowVpcInterfaceError::BadRequest(err.msg))
1901                }
1902                "ForbiddenException" => {
1903                    return RusotoError::Service(RemoveFlowVpcInterfaceError::Forbidden(err.msg))
1904                }
1905                "InternalServerErrorException" => {
1906                    return RusotoError::Service(RemoveFlowVpcInterfaceError::InternalServerError(
1907                        err.msg,
1908                    ))
1909                }
1910                "NotFoundException" => {
1911                    return RusotoError::Service(RemoveFlowVpcInterfaceError::NotFound(err.msg))
1912                }
1913                "ServiceUnavailableException" => {
1914                    return RusotoError::Service(RemoveFlowVpcInterfaceError::ServiceUnavailable(
1915                        err.msg,
1916                    ))
1917                }
1918                "TooManyRequestsException" => {
1919                    return RusotoError::Service(RemoveFlowVpcInterfaceError::TooManyRequests(
1920                        err.msg,
1921                    ))
1922                }
1923                "ValidationException" => return RusotoError::Validation(err.msg),
1924                _ => {}
1925            }
1926        }
1927        RusotoError::Unknown(res)
1928    }
1929}
1930impl fmt::Display for RemoveFlowVpcInterfaceError {
1931    #[allow(unused_variables)]
1932    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1933        match *self {
1934            RemoveFlowVpcInterfaceError::BadRequest(ref cause) => write!(f, "{}", cause),
1935            RemoveFlowVpcInterfaceError::Forbidden(ref cause) => write!(f, "{}", cause),
1936            RemoveFlowVpcInterfaceError::InternalServerError(ref cause) => write!(f, "{}", cause),
1937            RemoveFlowVpcInterfaceError::NotFound(ref cause) => write!(f, "{}", cause),
1938            RemoveFlowVpcInterfaceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1939            RemoveFlowVpcInterfaceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1940        }
1941    }
1942}
1943impl Error for RemoveFlowVpcInterfaceError {}
1944/// Errors returned by RevokeFlowEntitlement
1945#[derive(Debug, PartialEq)]
1946pub enum RevokeFlowEntitlementError {
1947    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1948    BadRequest(String),
1949    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1950    Forbidden(String),
1951    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1952    InternalServerError(String),
1953    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1954    NotFound(String),
1955    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1956    ServiceUnavailable(String),
1957    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
1958    TooManyRequests(String),
1959}
1960
1961impl RevokeFlowEntitlementError {
1962    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RevokeFlowEntitlementError> {
1963        if let Some(err) = proto::json::Error::parse_rest(&res) {
1964            match err.typ.as_str() {
1965                "BadRequestException" => {
1966                    return RusotoError::Service(RevokeFlowEntitlementError::BadRequest(err.msg))
1967                }
1968                "ForbiddenException" => {
1969                    return RusotoError::Service(RevokeFlowEntitlementError::Forbidden(err.msg))
1970                }
1971                "InternalServerErrorException" => {
1972                    return RusotoError::Service(RevokeFlowEntitlementError::InternalServerError(
1973                        err.msg,
1974                    ))
1975                }
1976                "NotFoundException" => {
1977                    return RusotoError::Service(RevokeFlowEntitlementError::NotFound(err.msg))
1978                }
1979                "ServiceUnavailableException" => {
1980                    return RusotoError::Service(RevokeFlowEntitlementError::ServiceUnavailable(
1981                        err.msg,
1982                    ))
1983                }
1984                "TooManyRequestsException" => {
1985                    return RusotoError::Service(RevokeFlowEntitlementError::TooManyRequests(
1986                        err.msg,
1987                    ))
1988                }
1989                "ValidationException" => return RusotoError::Validation(err.msg),
1990                _ => {}
1991            }
1992        }
1993        RusotoError::Unknown(res)
1994    }
1995}
1996impl fmt::Display for RevokeFlowEntitlementError {
1997    #[allow(unused_variables)]
1998    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1999        match *self {
2000            RevokeFlowEntitlementError::BadRequest(ref cause) => write!(f, "{}", cause),
2001            RevokeFlowEntitlementError::Forbidden(ref cause) => write!(f, "{}", cause),
2002            RevokeFlowEntitlementError::InternalServerError(ref cause) => write!(f, "{}", cause),
2003            RevokeFlowEntitlementError::NotFound(ref cause) => write!(f, "{}", cause),
2004            RevokeFlowEntitlementError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2005            RevokeFlowEntitlementError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2006        }
2007    }
2008}
2009impl Error for RevokeFlowEntitlementError {}
2010/// Errors returned by StartFlow
2011#[derive(Debug, PartialEq)]
2012pub enum StartFlowError {
2013    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2014    BadRequest(String),
2015    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2016    Forbidden(String),
2017    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2018    InternalServerError(String),
2019    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2020    NotFound(String),
2021    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2022    ServiceUnavailable(String),
2023    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2024    TooManyRequests(String),
2025}
2026
2027impl StartFlowError {
2028    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartFlowError> {
2029        if let Some(err) = proto::json::Error::parse_rest(&res) {
2030            match err.typ.as_str() {
2031                "BadRequestException" => {
2032                    return RusotoError::Service(StartFlowError::BadRequest(err.msg))
2033                }
2034                "ForbiddenException" => {
2035                    return RusotoError::Service(StartFlowError::Forbidden(err.msg))
2036                }
2037                "InternalServerErrorException" => {
2038                    return RusotoError::Service(StartFlowError::InternalServerError(err.msg))
2039                }
2040                "NotFoundException" => {
2041                    return RusotoError::Service(StartFlowError::NotFound(err.msg))
2042                }
2043                "ServiceUnavailableException" => {
2044                    return RusotoError::Service(StartFlowError::ServiceUnavailable(err.msg))
2045                }
2046                "TooManyRequestsException" => {
2047                    return RusotoError::Service(StartFlowError::TooManyRequests(err.msg))
2048                }
2049                "ValidationException" => return RusotoError::Validation(err.msg),
2050                _ => {}
2051            }
2052        }
2053        RusotoError::Unknown(res)
2054    }
2055}
2056impl fmt::Display for StartFlowError {
2057    #[allow(unused_variables)]
2058    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2059        match *self {
2060            StartFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
2061            StartFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
2062            StartFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
2063            StartFlowError::NotFound(ref cause) => write!(f, "{}", cause),
2064            StartFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2065            StartFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2066        }
2067    }
2068}
2069impl Error for StartFlowError {}
2070/// Errors returned by StopFlow
2071#[derive(Debug, PartialEq)]
2072pub enum StopFlowError {
2073    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2074    BadRequest(String),
2075    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2076    Forbidden(String),
2077    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2078    InternalServerError(String),
2079    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2080    NotFound(String),
2081    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2082    ServiceUnavailable(String),
2083    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2084    TooManyRequests(String),
2085}
2086
2087impl StopFlowError {
2088    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopFlowError> {
2089        if let Some(err) = proto::json::Error::parse_rest(&res) {
2090            match err.typ.as_str() {
2091                "BadRequestException" => {
2092                    return RusotoError::Service(StopFlowError::BadRequest(err.msg))
2093                }
2094                "ForbiddenException" => {
2095                    return RusotoError::Service(StopFlowError::Forbidden(err.msg))
2096                }
2097                "InternalServerErrorException" => {
2098                    return RusotoError::Service(StopFlowError::InternalServerError(err.msg))
2099                }
2100                "NotFoundException" => {
2101                    return RusotoError::Service(StopFlowError::NotFound(err.msg))
2102                }
2103                "ServiceUnavailableException" => {
2104                    return RusotoError::Service(StopFlowError::ServiceUnavailable(err.msg))
2105                }
2106                "TooManyRequestsException" => {
2107                    return RusotoError::Service(StopFlowError::TooManyRequests(err.msg))
2108                }
2109                "ValidationException" => return RusotoError::Validation(err.msg),
2110                _ => {}
2111            }
2112        }
2113        RusotoError::Unknown(res)
2114    }
2115}
2116impl fmt::Display for StopFlowError {
2117    #[allow(unused_variables)]
2118    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2119        match *self {
2120            StopFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
2121            StopFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
2122            StopFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
2123            StopFlowError::NotFound(ref cause) => write!(f, "{}", cause),
2124            StopFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2125            StopFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2126        }
2127    }
2128}
2129impl Error for StopFlowError {}
2130/// Errors returned by TagResource
2131#[derive(Debug, PartialEq)]
2132pub enum TagResourceError {
2133    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2134    BadRequest(String),
2135    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2136    InternalServerError(String),
2137    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2138    NotFound(String),
2139}
2140
2141impl TagResourceError {
2142    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2143        if let Some(err) = proto::json::Error::parse_rest(&res) {
2144            match err.typ.as_str() {
2145                "BadRequestException" => {
2146                    return RusotoError::Service(TagResourceError::BadRequest(err.msg))
2147                }
2148                "InternalServerErrorException" => {
2149                    return RusotoError::Service(TagResourceError::InternalServerError(err.msg))
2150                }
2151                "NotFoundException" => {
2152                    return RusotoError::Service(TagResourceError::NotFound(err.msg))
2153                }
2154                "ValidationException" => return RusotoError::Validation(err.msg),
2155                _ => {}
2156            }
2157        }
2158        RusotoError::Unknown(res)
2159    }
2160}
2161impl fmt::Display for TagResourceError {
2162    #[allow(unused_variables)]
2163    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2164        match *self {
2165            TagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2166            TagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2167            TagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
2168        }
2169    }
2170}
2171impl Error for TagResourceError {}
2172/// Errors returned by UntagResource
2173#[derive(Debug, PartialEq)]
2174pub enum UntagResourceError {
2175    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2176    BadRequest(String),
2177    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2178    InternalServerError(String),
2179    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2180    NotFound(String),
2181}
2182
2183impl UntagResourceError {
2184    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2185        if let Some(err) = proto::json::Error::parse_rest(&res) {
2186            match err.typ.as_str() {
2187                "BadRequestException" => {
2188                    return RusotoError::Service(UntagResourceError::BadRequest(err.msg))
2189                }
2190                "InternalServerErrorException" => {
2191                    return RusotoError::Service(UntagResourceError::InternalServerError(err.msg))
2192                }
2193                "NotFoundException" => {
2194                    return RusotoError::Service(UntagResourceError::NotFound(err.msg))
2195                }
2196                "ValidationException" => return RusotoError::Validation(err.msg),
2197                _ => {}
2198            }
2199        }
2200        RusotoError::Unknown(res)
2201    }
2202}
2203impl fmt::Display for UntagResourceError {
2204    #[allow(unused_variables)]
2205    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2206        match *self {
2207            UntagResourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2208            UntagResourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2209            UntagResourceError::NotFound(ref cause) => write!(f, "{}", cause),
2210        }
2211    }
2212}
2213impl Error for UntagResourceError {}
2214/// Errors returned by UpdateFlow
2215#[derive(Debug, PartialEq)]
2216pub enum UpdateFlowError {
2217    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2218    BadRequest(String),
2219    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2220    Forbidden(String),
2221    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2222    InternalServerError(String),
2223    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2224    NotFound(String),
2225    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2226    ServiceUnavailable(String),
2227    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2228    TooManyRequests(String),
2229}
2230
2231impl UpdateFlowError {
2232    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFlowError> {
2233        if let Some(err) = proto::json::Error::parse_rest(&res) {
2234            match err.typ.as_str() {
2235                "BadRequestException" => {
2236                    return RusotoError::Service(UpdateFlowError::BadRequest(err.msg))
2237                }
2238                "ForbiddenException" => {
2239                    return RusotoError::Service(UpdateFlowError::Forbidden(err.msg))
2240                }
2241                "InternalServerErrorException" => {
2242                    return RusotoError::Service(UpdateFlowError::InternalServerError(err.msg))
2243                }
2244                "NotFoundException" => {
2245                    return RusotoError::Service(UpdateFlowError::NotFound(err.msg))
2246                }
2247                "ServiceUnavailableException" => {
2248                    return RusotoError::Service(UpdateFlowError::ServiceUnavailable(err.msg))
2249                }
2250                "TooManyRequestsException" => {
2251                    return RusotoError::Service(UpdateFlowError::TooManyRequests(err.msg))
2252                }
2253                "ValidationException" => return RusotoError::Validation(err.msg),
2254                _ => {}
2255            }
2256        }
2257        RusotoError::Unknown(res)
2258    }
2259}
2260impl fmt::Display for UpdateFlowError {
2261    #[allow(unused_variables)]
2262    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2263        match *self {
2264            UpdateFlowError::BadRequest(ref cause) => write!(f, "{}", cause),
2265            UpdateFlowError::Forbidden(ref cause) => write!(f, "{}", cause),
2266            UpdateFlowError::InternalServerError(ref cause) => write!(f, "{}", cause),
2267            UpdateFlowError::NotFound(ref cause) => write!(f, "{}", cause),
2268            UpdateFlowError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2269            UpdateFlowError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2270        }
2271    }
2272}
2273impl Error for UpdateFlowError {}
2274/// Errors returned by UpdateFlowEntitlement
2275#[derive(Debug, PartialEq)]
2276pub enum UpdateFlowEntitlementError {
2277    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2278    BadRequest(String),
2279    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2280    Forbidden(String),
2281    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2282    InternalServerError(String),
2283    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2284    NotFound(String),
2285    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2286    ServiceUnavailable(String),
2287    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2288    TooManyRequests(String),
2289}
2290
2291impl UpdateFlowEntitlementError {
2292    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFlowEntitlementError> {
2293        if let Some(err) = proto::json::Error::parse_rest(&res) {
2294            match err.typ.as_str() {
2295                "BadRequestException" => {
2296                    return RusotoError::Service(UpdateFlowEntitlementError::BadRequest(err.msg))
2297                }
2298                "ForbiddenException" => {
2299                    return RusotoError::Service(UpdateFlowEntitlementError::Forbidden(err.msg))
2300                }
2301                "InternalServerErrorException" => {
2302                    return RusotoError::Service(UpdateFlowEntitlementError::InternalServerError(
2303                        err.msg,
2304                    ))
2305                }
2306                "NotFoundException" => {
2307                    return RusotoError::Service(UpdateFlowEntitlementError::NotFound(err.msg))
2308                }
2309                "ServiceUnavailableException" => {
2310                    return RusotoError::Service(UpdateFlowEntitlementError::ServiceUnavailable(
2311                        err.msg,
2312                    ))
2313                }
2314                "TooManyRequestsException" => {
2315                    return RusotoError::Service(UpdateFlowEntitlementError::TooManyRequests(
2316                        err.msg,
2317                    ))
2318                }
2319                "ValidationException" => return RusotoError::Validation(err.msg),
2320                _ => {}
2321            }
2322        }
2323        RusotoError::Unknown(res)
2324    }
2325}
2326impl fmt::Display for UpdateFlowEntitlementError {
2327    #[allow(unused_variables)]
2328    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2329        match *self {
2330            UpdateFlowEntitlementError::BadRequest(ref cause) => write!(f, "{}", cause),
2331            UpdateFlowEntitlementError::Forbidden(ref cause) => write!(f, "{}", cause),
2332            UpdateFlowEntitlementError::InternalServerError(ref cause) => write!(f, "{}", cause),
2333            UpdateFlowEntitlementError::NotFound(ref cause) => write!(f, "{}", cause),
2334            UpdateFlowEntitlementError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2335            UpdateFlowEntitlementError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2336        }
2337    }
2338}
2339impl Error for UpdateFlowEntitlementError {}
2340/// Errors returned by UpdateFlowOutput
2341#[derive(Debug, PartialEq)]
2342pub enum UpdateFlowOutputError {
2343    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2344    BadRequest(String),
2345    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2346    Forbidden(String),
2347    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2348    InternalServerError(String),
2349    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2350    NotFound(String),
2351    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2352    ServiceUnavailable(String),
2353    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2354    TooManyRequests(String),
2355}
2356
2357impl UpdateFlowOutputError {
2358    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFlowOutputError> {
2359        if let Some(err) = proto::json::Error::parse_rest(&res) {
2360            match err.typ.as_str() {
2361                "BadRequestException" => {
2362                    return RusotoError::Service(UpdateFlowOutputError::BadRequest(err.msg))
2363                }
2364                "ForbiddenException" => {
2365                    return RusotoError::Service(UpdateFlowOutputError::Forbidden(err.msg))
2366                }
2367                "InternalServerErrorException" => {
2368                    return RusotoError::Service(UpdateFlowOutputError::InternalServerError(
2369                        err.msg,
2370                    ))
2371                }
2372                "NotFoundException" => {
2373                    return RusotoError::Service(UpdateFlowOutputError::NotFound(err.msg))
2374                }
2375                "ServiceUnavailableException" => {
2376                    return RusotoError::Service(UpdateFlowOutputError::ServiceUnavailable(err.msg))
2377                }
2378                "TooManyRequestsException" => {
2379                    return RusotoError::Service(UpdateFlowOutputError::TooManyRequests(err.msg))
2380                }
2381                "ValidationException" => return RusotoError::Validation(err.msg),
2382                _ => {}
2383            }
2384        }
2385        RusotoError::Unknown(res)
2386    }
2387}
2388impl fmt::Display for UpdateFlowOutputError {
2389    #[allow(unused_variables)]
2390    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2391        match *self {
2392            UpdateFlowOutputError::BadRequest(ref cause) => write!(f, "{}", cause),
2393            UpdateFlowOutputError::Forbidden(ref cause) => write!(f, "{}", cause),
2394            UpdateFlowOutputError::InternalServerError(ref cause) => write!(f, "{}", cause),
2395            UpdateFlowOutputError::NotFound(ref cause) => write!(f, "{}", cause),
2396            UpdateFlowOutputError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2397            UpdateFlowOutputError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2398        }
2399    }
2400}
2401impl Error for UpdateFlowOutputError {}
2402/// Errors returned by UpdateFlowSource
2403#[derive(Debug, PartialEq)]
2404pub enum UpdateFlowSourceError {
2405    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2406    BadRequest(String),
2407    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2408    Forbidden(String),
2409    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2410    InternalServerError(String),
2411    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2412    NotFound(String),
2413    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2414    ServiceUnavailable(String),
2415    /// <p>Exception raised by AWS Elemental MediaConnect. See the error message and documentation for the operation for more information on the cause of this exception.</p>
2416    TooManyRequests(String),
2417}
2418
2419impl UpdateFlowSourceError {
2420    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFlowSourceError> {
2421        if let Some(err) = proto::json::Error::parse_rest(&res) {
2422            match err.typ.as_str() {
2423                "BadRequestException" => {
2424                    return RusotoError::Service(UpdateFlowSourceError::BadRequest(err.msg))
2425                }
2426                "ForbiddenException" => {
2427                    return RusotoError::Service(UpdateFlowSourceError::Forbidden(err.msg))
2428                }
2429                "InternalServerErrorException" => {
2430                    return RusotoError::Service(UpdateFlowSourceError::InternalServerError(
2431                        err.msg,
2432                    ))
2433                }
2434                "NotFoundException" => {
2435                    return RusotoError::Service(UpdateFlowSourceError::NotFound(err.msg))
2436                }
2437                "ServiceUnavailableException" => {
2438                    return RusotoError::Service(UpdateFlowSourceError::ServiceUnavailable(err.msg))
2439                }
2440                "TooManyRequestsException" => {
2441                    return RusotoError::Service(UpdateFlowSourceError::TooManyRequests(err.msg))
2442                }
2443                "ValidationException" => return RusotoError::Validation(err.msg),
2444                _ => {}
2445            }
2446        }
2447        RusotoError::Unknown(res)
2448    }
2449}
2450impl fmt::Display for UpdateFlowSourceError {
2451    #[allow(unused_variables)]
2452    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2453        match *self {
2454            UpdateFlowSourceError::BadRequest(ref cause) => write!(f, "{}", cause),
2455            UpdateFlowSourceError::Forbidden(ref cause) => write!(f, "{}", cause),
2456            UpdateFlowSourceError::InternalServerError(ref cause) => write!(f, "{}", cause),
2457            UpdateFlowSourceError::NotFound(ref cause) => write!(f, "{}", cause),
2458            UpdateFlowSourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2459            UpdateFlowSourceError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2460        }
2461    }
2462}
2463impl Error for UpdateFlowSourceError {}
2464/// Trait representing the capabilities of the AWS MediaConnect API. AWS MediaConnect clients implement this trait.
2465#[async_trait]
2466pub trait MediaConnect {
2467    /// <p>Adds outputs to an existing flow. You can create up to 50 outputs per flow.</p>
2468    async fn add_flow_outputs(
2469        &self,
2470        input: AddFlowOutputsRequest,
2471    ) -> Result<AddFlowOutputsResponse, RusotoError<AddFlowOutputsError>>;
2472
2473    /// <p>Adds Sources to flow</p>
2474    async fn add_flow_sources(
2475        &self,
2476        input: AddFlowSourcesRequest,
2477    ) -> Result<AddFlowSourcesResponse, RusotoError<AddFlowSourcesError>>;
2478
2479    /// <p>Adds VPC interfaces to flow</p>
2480    async fn add_flow_vpc_interfaces(
2481        &self,
2482        input: AddFlowVpcInterfacesRequest,
2483    ) -> Result<AddFlowVpcInterfacesResponse, RusotoError<AddFlowVpcInterfacesError>>;
2484
2485    /// <p>Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).</p>
2486    async fn create_flow(
2487        &self,
2488        input: CreateFlowRequest,
2489    ) -> Result<CreateFlowResponse, RusotoError<CreateFlowError>>;
2490
2491    /// <p>Deletes a flow. Before you can delete a flow, you must stop the flow.</p>
2492    async fn delete_flow(
2493        &self,
2494        input: DeleteFlowRequest,
2495    ) -> Result<DeleteFlowResponse, RusotoError<DeleteFlowError>>;
2496
2497    /// <p>Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as details about the source, outputs, and entitlements.</p>
2498    async fn describe_flow(
2499        &self,
2500        input: DescribeFlowRequest,
2501    ) -> Result<DescribeFlowResponse, RusotoError<DescribeFlowError>>;
2502
2503    /// <p>Grants entitlements to an existing flow.</p>
2504    async fn grant_flow_entitlements(
2505        &self,
2506        input: GrantFlowEntitlementsRequest,
2507    ) -> Result<GrantFlowEntitlementsResponse, RusotoError<GrantFlowEntitlementsError>>;
2508
2509    /// <p>Displays a list of all entitlements that have been granted to this account. This request returns 20 results per page.</p>
2510    async fn list_entitlements(
2511        &self,
2512        input: ListEntitlementsRequest,
2513    ) -> Result<ListEntitlementsResponse, RusotoError<ListEntitlementsError>>;
2514
2515    /// <p>Displays a list of flows that are associated with this account. This request returns a paginated result.</p>
2516    async fn list_flows(
2517        &self,
2518        input: ListFlowsRequest,
2519    ) -> Result<ListFlowsResponse, RusotoError<ListFlowsError>>;
2520
2521    /// <p>List all tags on an AWS Elemental MediaConnect resource</p>
2522    async fn list_tags_for_resource(
2523        &self,
2524        input: ListTagsForResourceRequest,
2525    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2526
2527    /// <p>Removes an output from an existing flow. This request can be made only on an output that does not have an entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When an entitlement is revoked from a flow, the service automatically removes the associated output.</p>
2528    async fn remove_flow_output(
2529        &self,
2530        input: RemoveFlowOutputRequest,
2531    ) -> Result<RemoveFlowOutputResponse, RusotoError<RemoveFlowOutputError>>;
2532
2533    /// <p>Removes a source from an existing flow. This request can be made only if there is more than one source on the flow.</p>
2534    async fn remove_flow_source(
2535        &self,
2536        input: RemoveFlowSourceRequest,
2537    ) -> Result<RemoveFlowSourceResponse, RusotoError<RemoveFlowSourceError>>;
2538
2539    /// <p>Removes a VPC Interface from an existing flow. This request can be made only on a VPC interface that does not have a Source or Output associated with it. If the VPC interface is referenced by a Source or Output, you must first delete or update the Source or Output to no longer reference the VPC interface.</p>
2540    async fn remove_flow_vpc_interface(
2541        &self,
2542        input: RemoveFlowVpcInterfaceRequest,
2543    ) -> Result<RemoveFlowVpcInterfaceResponse, RusotoError<RemoveFlowVpcInterfaceError>>;
2544
2545    /// <p>Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the subscriber and the associated output is removed.</p>
2546    async fn revoke_flow_entitlement(
2547        &self,
2548        input: RevokeFlowEntitlementRequest,
2549    ) -> Result<RevokeFlowEntitlementResponse, RusotoError<RevokeFlowEntitlementError>>;
2550
2551    /// <p>Starts a flow.</p>
2552    async fn start_flow(
2553        &self,
2554        input: StartFlowRequest,
2555    ) -> Result<StartFlowResponse, RusotoError<StartFlowError>>;
2556
2557    /// <p>Stops a flow.</p>
2558    async fn stop_flow(
2559        &self,
2560        input: StopFlowRequest,
2561    ) -> Result<StopFlowResponse, RusotoError<StopFlowError>>;
2562
2563    /// <p>Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.</p>
2564    async fn tag_resource(
2565        &self,
2566        input: TagResourceRequest,
2567    ) -> Result<(), RusotoError<TagResourceError>>;
2568
2569    /// <p>Deletes specified tags from a resource.</p>
2570    async fn untag_resource(
2571        &self,
2572        input: UntagResourceRequest,
2573    ) -> Result<(), RusotoError<UntagResourceError>>;
2574
2575    /// <p>Updates flow</p>
2576    async fn update_flow(
2577        &self,
2578        input: UpdateFlowRequest,
2579    ) -> Result<UpdateFlowResponse, RusotoError<UpdateFlowError>>;
2580
2581    /// <p>You can change an entitlement&#39;s description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.</p>
2582    async fn update_flow_entitlement(
2583        &self,
2584        input: UpdateFlowEntitlementRequest,
2585    ) -> Result<UpdateFlowEntitlementResponse, RusotoError<UpdateFlowEntitlementError>>;
2586
2587    /// <p>Updates an existing flow output.</p>
2588    async fn update_flow_output(
2589        &self,
2590        input: UpdateFlowOutputRequest,
2591    ) -> Result<UpdateFlowOutputResponse, RusotoError<UpdateFlowOutputError>>;
2592
2593    /// <p>Updates the source of a flow.</p>
2594    async fn update_flow_source(
2595        &self,
2596        input: UpdateFlowSourceRequest,
2597    ) -> Result<UpdateFlowSourceResponse, RusotoError<UpdateFlowSourceError>>;
2598}
2599/// A client for the AWS MediaConnect API.
2600#[derive(Clone)]
2601pub struct MediaConnectClient {
2602    client: Client,
2603    region: region::Region,
2604}
2605
2606impl MediaConnectClient {
2607    /// Creates a client backed by the default tokio event loop.
2608    ///
2609    /// The client will use the default credentials provider and tls client.
2610    pub fn new(region: region::Region) -> MediaConnectClient {
2611        MediaConnectClient {
2612            client: Client::shared(),
2613            region,
2614        }
2615    }
2616
2617    pub fn new_with<P, D>(
2618        request_dispatcher: D,
2619        credentials_provider: P,
2620        region: region::Region,
2621    ) -> MediaConnectClient
2622    where
2623        P: ProvideAwsCredentials + Send + Sync + 'static,
2624        D: DispatchSignedRequest + Send + Sync + 'static,
2625    {
2626        MediaConnectClient {
2627            client: Client::new_with(credentials_provider, request_dispatcher),
2628            region,
2629        }
2630    }
2631
2632    pub fn new_with_client(client: Client, region: region::Region) -> MediaConnectClient {
2633        MediaConnectClient { client, region }
2634    }
2635}
2636
2637#[async_trait]
2638impl MediaConnect for MediaConnectClient {
2639    /// <p>Adds outputs to an existing flow. You can create up to 50 outputs per flow.</p>
2640    #[allow(unused_mut)]
2641    async fn add_flow_outputs(
2642        &self,
2643        input: AddFlowOutputsRequest,
2644    ) -> Result<AddFlowOutputsResponse, RusotoError<AddFlowOutputsError>> {
2645        let request_uri = format!("/v1/flows/{flow_arn}/outputs", flow_arn = input.flow_arn);
2646
2647        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
2648        request.set_content_type("application/x-amz-json-1.1".to_owned());
2649
2650        let encoded = Some(serde_json::to_vec(&input).unwrap());
2651        request.set_payload(encoded);
2652
2653        let mut response = self
2654            .client
2655            .sign_and_dispatch(request)
2656            .await
2657            .map_err(RusotoError::from)?;
2658        if response.status.as_u16() == 201 {
2659            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2660            let result = proto::json::ResponsePayload::new(&response)
2661                .deserialize::<AddFlowOutputsResponse, _>()?;
2662
2663            Ok(result)
2664        } else {
2665            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2666            Err(AddFlowOutputsError::from_response(response))
2667        }
2668    }
2669
2670    /// <p>Adds Sources to flow</p>
2671    #[allow(unused_mut)]
2672    async fn add_flow_sources(
2673        &self,
2674        input: AddFlowSourcesRequest,
2675    ) -> Result<AddFlowSourcesResponse, RusotoError<AddFlowSourcesError>> {
2676        let request_uri = format!("/v1/flows/{flow_arn}/source", flow_arn = input.flow_arn);
2677
2678        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
2679        request.set_content_type("application/x-amz-json-1.1".to_owned());
2680
2681        let encoded = Some(serde_json::to_vec(&input).unwrap());
2682        request.set_payload(encoded);
2683
2684        let mut response = self
2685            .client
2686            .sign_and_dispatch(request)
2687            .await
2688            .map_err(RusotoError::from)?;
2689        if response.status.as_u16() == 201 {
2690            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2691            let result = proto::json::ResponsePayload::new(&response)
2692                .deserialize::<AddFlowSourcesResponse, _>()?;
2693
2694            Ok(result)
2695        } else {
2696            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2697            Err(AddFlowSourcesError::from_response(response))
2698        }
2699    }
2700
2701    /// <p>Adds VPC interfaces to flow</p>
2702    #[allow(unused_mut)]
2703    async fn add_flow_vpc_interfaces(
2704        &self,
2705        input: AddFlowVpcInterfacesRequest,
2706    ) -> Result<AddFlowVpcInterfacesResponse, RusotoError<AddFlowVpcInterfacesError>> {
2707        let request_uri = format!(
2708            "/v1/flows/{flow_arn}/vpcInterfaces",
2709            flow_arn = input.flow_arn
2710        );
2711
2712        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
2713        request.set_content_type("application/x-amz-json-1.1".to_owned());
2714
2715        let encoded = Some(serde_json::to_vec(&input).unwrap());
2716        request.set_payload(encoded);
2717
2718        let mut response = self
2719            .client
2720            .sign_and_dispatch(request)
2721            .await
2722            .map_err(RusotoError::from)?;
2723        if response.status.as_u16() == 201 {
2724            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2725            let result = proto::json::ResponsePayload::new(&response)
2726                .deserialize::<AddFlowVpcInterfacesResponse, _>()?;
2727
2728            Ok(result)
2729        } else {
2730            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2731            Err(AddFlowVpcInterfacesError::from_response(response))
2732        }
2733    }
2734
2735    /// <p>Creates a new flow. The request must include one source. The request optionally can include outputs (up to 50) and entitlements (up to 50).</p>
2736    #[allow(unused_mut)]
2737    async fn create_flow(
2738        &self,
2739        input: CreateFlowRequest,
2740    ) -> Result<CreateFlowResponse, RusotoError<CreateFlowError>> {
2741        let request_uri = "/v1/flows";
2742
2743        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
2744        request.set_content_type("application/x-amz-json-1.1".to_owned());
2745
2746        let encoded = Some(serde_json::to_vec(&input).unwrap());
2747        request.set_payload(encoded);
2748
2749        let mut response = self
2750            .client
2751            .sign_and_dispatch(request)
2752            .await
2753            .map_err(RusotoError::from)?;
2754        if response.status.as_u16() == 201 {
2755            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2756            let result = proto::json::ResponsePayload::new(&response)
2757                .deserialize::<CreateFlowResponse, _>()?;
2758
2759            Ok(result)
2760        } else {
2761            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2762            Err(CreateFlowError::from_response(response))
2763        }
2764    }
2765
2766    /// <p>Deletes a flow. Before you can delete a flow, you must stop the flow.</p>
2767    #[allow(unused_mut)]
2768    async fn delete_flow(
2769        &self,
2770        input: DeleteFlowRequest,
2771    ) -> Result<DeleteFlowResponse, RusotoError<DeleteFlowError>> {
2772        let request_uri = format!("/v1/flows/{flow_arn}", flow_arn = input.flow_arn);
2773
2774        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
2775        request.set_content_type("application/x-amz-json-1.1".to_owned());
2776
2777        let mut response = self
2778            .client
2779            .sign_and_dispatch(request)
2780            .await
2781            .map_err(RusotoError::from)?;
2782        if response.status.as_u16() == 202 {
2783            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2784            let result = proto::json::ResponsePayload::new(&response)
2785                .deserialize::<DeleteFlowResponse, _>()?;
2786
2787            Ok(result)
2788        } else {
2789            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2790            Err(DeleteFlowError::from_response(response))
2791        }
2792    }
2793
2794    /// <p>Displays the details of a flow. The response includes the flow ARN, name, and Availability Zone, as well as details about the source, outputs, and entitlements.</p>
2795    #[allow(unused_mut)]
2796    async fn describe_flow(
2797        &self,
2798        input: DescribeFlowRequest,
2799    ) -> Result<DescribeFlowResponse, RusotoError<DescribeFlowError>> {
2800        let request_uri = format!("/v1/flows/{flow_arn}", flow_arn = input.flow_arn);
2801
2802        let mut request = SignedRequest::new("GET", "mediaconnect", &self.region, &request_uri);
2803        request.set_content_type("application/x-amz-json-1.1".to_owned());
2804
2805        let mut response = self
2806            .client
2807            .sign_and_dispatch(request)
2808            .await
2809            .map_err(RusotoError::from)?;
2810        if response.status.as_u16() == 200 {
2811            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2812            let result = proto::json::ResponsePayload::new(&response)
2813                .deserialize::<DescribeFlowResponse, _>()?;
2814
2815            Ok(result)
2816        } else {
2817            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2818            Err(DescribeFlowError::from_response(response))
2819        }
2820    }
2821
2822    /// <p>Grants entitlements to an existing flow.</p>
2823    #[allow(unused_mut)]
2824    async fn grant_flow_entitlements(
2825        &self,
2826        input: GrantFlowEntitlementsRequest,
2827    ) -> Result<GrantFlowEntitlementsResponse, RusotoError<GrantFlowEntitlementsError>> {
2828        let request_uri = format!(
2829            "/v1/flows/{flow_arn}/entitlements",
2830            flow_arn = input.flow_arn
2831        );
2832
2833        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
2834        request.set_content_type("application/x-amz-json-1.1".to_owned());
2835
2836        let encoded = Some(serde_json::to_vec(&input).unwrap());
2837        request.set_payload(encoded);
2838
2839        let mut response = self
2840            .client
2841            .sign_and_dispatch(request)
2842            .await
2843            .map_err(RusotoError::from)?;
2844        if response.status.as_u16() == 200 {
2845            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2846            let result = proto::json::ResponsePayload::new(&response)
2847                .deserialize::<GrantFlowEntitlementsResponse, _>()?;
2848
2849            Ok(result)
2850        } else {
2851            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2852            Err(GrantFlowEntitlementsError::from_response(response))
2853        }
2854    }
2855
2856    /// <p>Displays a list of all entitlements that have been granted to this account. This request returns 20 results per page.</p>
2857    #[allow(unused_mut)]
2858    async fn list_entitlements(
2859        &self,
2860        input: ListEntitlementsRequest,
2861    ) -> Result<ListEntitlementsResponse, RusotoError<ListEntitlementsError>> {
2862        let request_uri = "/v1/entitlements";
2863
2864        let mut request = SignedRequest::new("GET", "mediaconnect", &self.region, &request_uri);
2865        request.set_content_type("application/x-amz-json-1.1".to_owned());
2866
2867        let mut params = Params::new();
2868        if let Some(ref x) = input.max_results {
2869            params.put("maxResults", x);
2870        }
2871        if let Some(ref x) = input.next_token {
2872            params.put("nextToken", x);
2873        }
2874        request.set_params(params);
2875
2876        let mut response = self
2877            .client
2878            .sign_and_dispatch(request)
2879            .await
2880            .map_err(RusotoError::from)?;
2881        if response.status.as_u16() == 200 {
2882            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2883            let result = proto::json::ResponsePayload::new(&response)
2884                .deserialize::<ListEntitlementsResponse, _>()?;
2885
2886            Ok(result)
2887        } else {
2888            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2889            Err(ListEntitlementsError::from_response(response))
2890        }
2891    }
2892
2893    /// <p>Displays a list of flows that are associated with this account. This request returns a paginated result.</p>
2894    #[allow(unused_mut)]
2895    async fn list_flows(
2896        &self,
2897        input: ListFlowsRequest,
2898    ) -> Result<ListFlowsResponse, RusotoError<ListFlowsError>> {
2899        let request_uri = "/v1/flows";
2900
2901        let mut request = SignedRequest::new("GET", "mediaconnect", &self.region, &request_uri);
2902        request.set_content_type("application/x-amz-json-1.1".to_owned());
2903
2904        let mut params = Params::new();
2905        if let Some(ref x) = input.max_results {
2906            params.put("maxResults", x);
2907        }
2908        if let Some(ref x) = input.next_token {
2909            params.put("nextToken", x);
2910        }
2911        request.set_params(params);
2912
2913        let mut response = self
2914            .client
2915            .sign_and_dispatch(request)
2916            .await
2917            .map_err(RusotoError::from)?;
2918        if response.status.as_u16() == 200 {
2919            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2920            let result = proto::json::ResponsePayload::new(&response)
2921                .deserialize::<ListFlowsResponse, _>()?;
2922
2923            Ok(result)
2924        } else {
2925            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2926            Err(ListFlowsError::from_response(response))
2927        }
2928    }
2929
2930    /// <p>List all tags on an AWS Elemental MediaConnect resource</p>
2931    #[allow(unused_mut)]
2932    async fn list_tags_for_resource(
2933        &self,
2934        input: ListTagsForResourceRequest,
2935    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2936        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
2937
2938        let mut request = SignedRequest::new("GET", "mediaconnect", &self.region, &request_uri);
2939        request.set_content_type("application/x-amz-json-1.1".to_owned());
2940
2941        let mut response = self
2942            .client
2943            .sign_and_dispatch(request)
2944            .await
2945            .map_err(RusotoError::from)?;
2946        if response.status.as_u16() == 200 {
2947            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2948            let result = proto::json::ResponsePayload::new(&response)
2949                .deserialize::<ListTagsForResourceResponse, _>()?;
2950
2951            Ok(result)
2952        } else {
2953            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2954            Err(ListTagsForResourceError::from_response(response))
2955        }
2956    }
2957
2958    /// <p>Removes an output from an existing flow. This request can be made only on an output that does not have an entitlement associated with it. If the output has an entitlement, you must revoke the entitlement instead. When an entitlement is revoked from a flow, the service automatically removes the associated output.</p>
2959    #[allow(unused_mut)]
2960    async fn remove_flow_output(
2961        &self,
2962        input: RemoveFlowOutputRequest,
2963    ) -> Result<RemoveFlowOutputResponse, RusotoError<RemoveFlowOutputError>> {
2964        let request_uri = format!(
2965            "/v1/flows/{flow_arn}/outputs/{output_arn}",
2966            flow_arn = input.flow_arn,
2967            output_arn = input.output_arn
2968        );
2969
2970        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
2971        request.set_content_type("application/x-amz-json-1.1".to_owned());
2972
2973        let mut response = self
2974            .client
2975            .sign_and_dispatch(request)
2976            .await
2977            .map_err(RusotoError::from)?;
2978        if response.status.as_u16() == 202 {
2979            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2980            let result = proto::json::ResponsePayload::new(&response)
2981                .deserialize::<RemoveFlowOutputResponse, _>()?;
2982
2983            Ok(result)
2984        } else {
2985            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2986            Err(RemoveFlowOutputError::from_response(response))
2987        }
2988    }
2989
2990    /// <p>Removes a source from an existing flow. This request can be made only if there is more than one source on the flow.</p>
2991    #[allow(unused_mut)]
2992    async fn remove_flow_source(
2993        &self,
2994        input: RemoveFlowSourceRequest,
2995    ) -> Result<RemoveFlowSourceResponse, RusotoError<RemoveFlowSourceError>> {
2996        let request_uri = format!(
2997            "/v1/flows/{flow_arn}/source/{source_arn}",
2998            flow_arn = input.flow_arn,
2999            source_arn = input.source_arn
3000        );
3001
3002        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
3003        request.set_content_type("application/x-amz-json-1.1".to_owned());
3004
3005        let mut response = self
3006            .client
3007            .sign_and_dispatch(request)
3008            .await
3009            .map_err(RusotoError::from)?;
3010        if response.status.as_u16() == 202 {
3011            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3012            let result = proto::json::ResponsePayload::new(&response)
3013                .deserialize::<RemoveFlowSourceResponse, _>()?;
3014
3015            Ok(result)
3016        } else {
3017            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3018            Err(RemoveFlowSourceError::from_response(response))
3019        }
3020    }
3021
3022    /// <p>Removes a VPC Interface from an existing flow. This request can be made only on a VPC interface that does not have a Source or Output associated with it. If the VPC interface is referenced by a Source or Output, you must first delete or update the Source or Output to no longer reference the VPC interface.</p>
3023    #[allow(unused_mut)]
3024    async fn remove_flow_vpc_interface(
3025        &self,
3026        input: RemoveFlowVpcInterfaceRequest,
3027    ) -> Result<RemoveFlowVpcInterfaceResponse, RusotoError<RemoveFlowVpcInterfaceError>> {
3028        let request_uri = format!(
3029            "/v1/flows/{flow_arn}/vpcInterfaces/{vpc_interface_name}",
3030            flow_arn = input.flow_arn,
3031            vpc_interface_name = input.vpc_interface_name
3032        );
3033
3034        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
3035        request.set_content_type("application/x-amz-json-1.1".to_owned());
3036
3037        let mut response = self
3038            .client
3039            .sign_and_dispatch(request)
3040            .await
3041            .map_err(RusotoError::from)?;
3042        if response.status.as_u16() == 200 {
3043            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3044            let result = proto::json::ResponsePayload::new(&response)
3045                .deserialize::<RemoveFlowVpcInterfaceResponse, _>()?;
3046
3047            Ok(result)
3048        } else {
3049            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3050            Err(RemoveFlowVpcInterfaceError::from_response(response))
3051        }
3052    }
3053
3054    /// <p>Revokes an entitlement from a flow. Once an entitlement is revoked, the content becomes unavailable to the subscriber and the associated output is removed.</p>
3055    #[allow(unused_mut)]
3056    async fn revoke_flow_entitlement(
3057        &self,
3058        input: RevokeFlowEntitlementRequest,
3059    ) -> Result<RevokeFlowEntitlementResponse, RusotoError<RevokeFlowEntitlementError>> {
3060        let request_uri = format!(
3061            "/v1/flows/{flow_arn}/entitlements/{entitlement_arn}",
3062            entitlement_arn = input.entitlement_arn,
3063            flow_arn = input.flow_arn
3064        );
3065
3066        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
3067        request.set_content_type("application/x-amz-json-1.1".to_owned());
3068
3069        let mut response = self
3070            .client
3071            .sign_and_dispatch(request)
3072            .await
3073            .map_err(RusotoError::from)?;
3074        if response.status.as_u16() == 202 {
3075            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3076            let result = proto::json::ResponsePayload::new(&response)
3077                .deserialize::<RevokeFlowEntitlementResponse, _>()?;
3078
3079            Ok(result)
3080        } else {
3081            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3082            Err(RevokeFlowEntitlementError::from_response(response))
3083        }
3084    }
3085
3086    /// <p>Starts a flow.</p>
3087    #[allow(unused_mut)]
3088    async fn start_flow(
3089        &self,
3090        input: StartFlowRequest,
3091    ) -> Result<StartFlowResponse, RusotoError<StartFlowError>> {
3092        let request_uri = format!("/v1/flows/start/{flow_arn}", flow_arn = input.flow_arn);
3093
3094        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
3095        request.set_content_type("application/x-amz-json-1.1".to_owned());
3096
3097        let mut response = self
3098            .client
3099            .sign_and_dispatch(request)
3100            .await
3101            .map_err(RusotoError::from)?;
3102        if response.status.as_u16() == 202 {
3103            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3104            let result = proto::json::ResponsePayload::new(&response)
3105                .deserialize::<StartFlowResponse, _>()?;
3106
3107            Ok(result)
3108        } else {
3109            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3110            Err(StartFlowError::from_response(response))
3111        }
3112    }
3113
3114    /// <p>Stops a flow.</p>
3115    #[allow(unused_mut)]
3116    async fn stop_flow(
3117        &self,
3118        input: StopFlowRequest,
3119    ) -> Result<StopFlowResponse, RusotoError<StopFlowError>> {
3120        let request_uri = format!("/v1/flows/stop/{flow_arn}", flow_arn = input.flow_arn);
3121
3122        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
3123        request.set_content_type("application/x-amz-json-1.1".to_owned());
3124
3125        let mut response = self
3126            .client
3127            .sign_and_dispatch(request)
3128            .await
3129            .map_err(RusotoError::from)?;
3130        if response.status.as_u16() == 202 {
3131            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3132            let result = proto::json::ResponsePayload::new(&response)
3133                .deserialize::<StopFlowResponse, _>()?;
3134
3135            Ok(result)
3136        } else {
3137            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3138            Err(StopFlowError::from_response(response))
3139        }
3140    }
3141
3142    /// <p>Associates the specified tags to a resource with the specified resourceArn. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.</p>
3143    #[allow(unused_mut)]
3144    async fn tag_resource(
3145        &self,
3146        input: TagResourceRequest,
3147    ) -> Result<(), RusotoError<TagResourceError>> {
3148        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3149
3150        let mut request = SignedRequest::new("POST", "mediaconnect", &self.region, &request_uri);
3151        request.set_content_type("application/x-amz-json-1.1".to_owned());
3152
3153        let encoded = Some(serde_json::to_vec(&input).unwrap());
3154        request.set_payload(encoded);
3155
3156        let mut response = self
3157            .client
3158            .sign_and_dispatch(request)
3159            .await
3160            .map_err(RusotoError::from)?;
3161        if response.status.as_u16() == 204 {
3162            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3163            let result = ::std::mem::drop(response);
3164
3165            Ok(result)
3166        } else {
3167            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3168            Err(TagResourceError::from_response(response))
3169        }
3170    }
3171
3172    /// <p>Deletes specified tags from a resource.</p>
3173    #[allow(unused_mut)]
3174    async fn untag_resource(
3175        &self,
3176        input: UntagResourceRequest,
3177    ) -> Result<(), RusotoError<UntagResourceError>> {
3178        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3179
3180        let mut request = SignedRequest::new("DELETE", "mediaconnect", &self.region, &request_uri);
3181        request.set_content_type("application/x-amz-json-1.1".to_owned());
3182
3183        let mut params = Params::new();
3184        for item in input.tag_keys.iter() {
3185            params.put("tagKeys", item);
3186        }
3187        request.set_params(params);
3188
3189        let mut response = self
3190            .client
3191            .sign_and_dispatch(request)
3192            .await
3193            .map_err(RusotoError::from)?;
3194        if response.status.as_u16() == 204 {
3195            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3196            let result = ::std::mem::drop(response);
3197
3198            Ok(result)
3199        } else {
3200            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3201            Err(UntagResourceError::from_response(response))
3202        }
3203    }
3204
3205    /// <p>Updates flow</p>
3206    #[allow(unused_mut)]
3207    async fn update_flow(
3208        &self,
3209        input: UpdateFlowRequest,
3210    ) -> Result<UpdateFlowResponse, RusotoError<UpdateFlowError>> {
3211        let request_uri = format!("/v1/flows/{flow_arn}", flow_arn = input.flow_arn);
3212
3213        let mut request = SignedRequest::new("PUT", "mediaconnect", &self.region, &request_uri);
3214        request.set_content_type("application/x-amz-json-1.1".to_owned());
3215
3216        let encoded = Some(serde_json::to_vec(&input).unwrap());
3217        request.set_payload(encoded);
3218
3219        let mut response = self
3220            .client
3221            .sign_and_dispatch(request)
3222            .await
3223            .map_err(RusotoError::from)?;
3224        if response.status.as_u16() == 202 {
3225            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3226            let result = proto::json::ResponsePayload::new(&response)
3227                .deserialize::<UpdateFlowResponse, _>()?;
3228
3229            Ok(result)
3230        } else {
3231            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3232            Err(UpdateFlowError::from_response(response))
3233        }
3234    }
3235
3236    /// <p>You can change an entitlement&#39;s description, subscribers, and encryption. If you change the subscribers, the service will remove the outputs that are are used by the subscribers that are removed.</p>
3237    #[allow(unused_mut)]
3238    async fn update_flow_entitlement(
3239        &self,
3240        input: UpdateFlowEntitlementRequest,
3241    ) -> Result<UpdateFlowEntitlementResponse, RusotoError<UpdateFlowEntitlementError>> {
3242        let request_uri = format!(
3243            "/v1/flows/{flow_arn}/entitlements/{entitlement_arn}",
3244            entitlement_arn = input.entitlement_arn,
3245            flow_arn = input.flow_arn
3246        );
3247
3248        let mut request = SignedRequest::new("PUT", "mediaconnect", &self.region, &request_uri);
3249        request.set_content_type("application/x-amz-json-1.1".to_owned());
3250
3251        let encoded = Some(serde_json::to_vec(&input).unwrap());
3252        request.set_payload(encoded);
3253
3254        let mut response = self
3255            .client
3256            .sign_and_dispatch(request)
3257            .await
3258            .map_err(RusotoError::from)?;
3259        if response.status.as_u16() == 202 {
3260            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3261            let result = proto::json::ResponsePayload::new(&response)
3262                .deserialize::<UpdateFlowEntitlementResponse, _>()?;
3263
3264            Ok(result)
3265        } else {
3266            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3267            Err(UpdateFlowEntitlementError::from_response(response))
3268        }
3269    }
3270
3271    /// <p>Updates an existing flow output.</p>
3272    #[allow(unused_mut)]
3273    async fn update_flow_output(
3274        &self,
3275        input: UpdateFlowOutputRequest,
3276    ) -> Result<UpdateFlowOutputResponse, RusotoError<UpdateFlowOutputError>> {
3277        let request_uri = format!(
3278            "/v1/flows/{flow_arn}/outputs/{output_arn}",
3279            flow_arn = input.flow_arn,
3280            output_arn = input.output_arn
3281        );
3282
3283        let mut request = SignedRequest::new("PUT", "mediaconnect", &self.region, &request_uri);
3284        request.set_content_type("application/x-amz-json-1.1".to_owned());
3285
3286        let encoded = Some(serde_json::to_vec(&input).unwrap());
3287        request.set_payload(encoded);
3288
3289        let mut response = self
3290            .client
3291            .sign_and_dispatch(request)
3292            .await
3293            .map_err(RusotoError::from)?;
3294        if response.status.as_u16() == 202 {
3295            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3296            let result = proto::json::ResponsePayload::new(&response)
3297                .deserialize::<UpdateFlowOutputResponse, _>()?;
3298
3299            Ok(result)
3300        } else {
3301            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3302            Err(UpdateFlowOutputError::from_response(response))
3303        }
3304    }
3305
3306    /// <p>Updates the source of a flow.</p>
3307    #[allow(unused_mut)]
3308    async fn update_flow_source(
3309        &self,
3310        input: UpdateFlowSourceRequest,
3311    ) -> Result<UpdateFlowSourceResponse, RusotoError<UpdateFlowSourceError>> {
3312        let request_uri = format!(
3313            "/v1/flows/{flow_arn}/source/{source_arn}",
3314            flow_arn = input.flow_arn,
3315            source_arn = input.source_arn
3316        );
3317
3318        let mut request = SignedRequest::new("PUT", "mediaconnect", &self.region, &request_uri);
3319        request.set_content_type("application/x-amz-json-1.1".to_owned());
3320
3321        let encoded = Some(serde_json::to_vec(&input).unwrap());
3322        request.set_payload(encoded);
3323
3324        let mut response = self
3325            .client
3326            .sign_and_dispatch(request)
3327            .await
3328            .map_err(RusotoError::from)?;
3329        if response.status.as_u16() == 202 {
3330            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3331            let result = proto::json::ResponsePayload::new(&response)
3332                .deserialize::<UpdateFlowSourceResponse, _>()?;
3333
3334            Ok(result)
3335        } else {
3336            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3337            Err(UpdateFlowSourceError::from_response(response))
3338        }
3339    }
3340}