rusoto_mediapackage/
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>CDN Authorization credentials</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct Authorization {
31    /// <p>The Amazon Resource Name (ARN) for the secret in Secrets Manager that your Content Distribution Network (CDN) uses for authorization to access your endpoint.</p>
32    #[serde(rename = "CdnIdentifierSecret")]
33    pub cdn_identifier_secret: String,
34    /// <p>The Amazon Resource Name (ARN) for the IAM role that allows MediaPackage to communicate with AWS Secrets Manager.</p>
35    #[serde(rename = "SecretsRoleArn")]
36    pub secrets_role_arn: String,
37}
38
39/// <p>A Channel resource configuration.</p>
40#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
41#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
42pub struct Channel {
43    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
44    #[serde(rename = "Arn")]
45    #[serde(skip_serializing_if = "Option::is_none")]
46    pub arn: Option<String>,
47    /// <p>A short text description of the Channel.</p>
48    #[serde(rename = "Description")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub description: Option<String>,
51    #[serde(rename = "HlsIngest")]
52    #[serde(skip_serializing_if = "Option::is_none")]
53    pub hls_ingest: Option<HlsIngest>,
54    /// <p>The ID of the Channel.</p>
55    #[serde(rename = "Id")]
56    #[serde(skip_serializing_if = "Option::is_none")]
57    pub id: Option<String>,
58    #[serde(rename = "Tags")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub tags: Option<::std::collections::HashMap<String, String>>,
61}
62
63/// <p>A Common Media Application Format (CMAF) encryption configuration.</p>
64#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
65pub struct CmafEncryption {
66    /// <p>Time (in seconds) between each encryption key rotation.</p>
67    #[serde(rename = "KeyRotationIntervalSeconds")]
68    #[serde(skip_serializing_if = "Option::is_none")]
69    pub key_rotation_interval_seconds: Option<i64>,
70    #[serde(rename = "SpekeKeyProvider")]
71    pub speke_key_provider: SpekeKeyProvider,
72}
73
74/// <p>A Common Media Application Format (CMAF) packaging configuration.</p>
75#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
76#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
77pub struct CmafPackage {
78    #[serde(rename = "Encryption")]
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub encryption: Option<CmafEncryption>,
81    /// <p>A list of HLS manifest configurations</p>
82    #[serde(rename = "HlsManifests")]
83    #[serde(skip_serializing_if = "Option::is_none")]
84    pub hls_manifests: Option<Vec<HlsManifest>>,
85    /// <p>Duration (in seconds) of each segment. Actual segments will be
86    /// rounded to the nearest multiple of the source segment duration.</p>
87    #[serde(rename = "SegmentDurationSeconds")]
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub segment_duration_seconds: Option<i64>,
90    /// <p>An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.</p>
91    #[serde(rename = "SegmentPrefix")]
92    #[serde(skip_serializing_if = "Option::is_none")]
93    pub segment_prefix: Option<String>,
94    #[serde(rename = "StreamSelection")]
95    #[serde(skip_serializing_if = "Option::is_none")]
96    pub stream_selection: Option<StreamSelection>,
97}
98
99/// <p>A Common Media Application Format (CMAF) packaging configuration.</p>
100#[derive(Clone, Debug, Default, PartialEq, Serialize)]
101#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
102pub struct CmafPackageCreateOrUpdateParameters {
103    #[serde(rename = "Encryption")]
104    #[serde(skip_serializing_if = "Option::is_none")]
105    pub encryption: Option<CmafEncryption>,
106    /// <p>A list of HLS manifest configurations</p>
107    #[serde(rename = "HlsManifests")]
108    #[serde(skip_serializing_if = "Option::is_none")]
109    pub hls_manifests: Option<Vec<HlsManifestCreateOrUpdateParameters>>,
110    /// <p>Duration (in seconds) of each segment. Actual segments will be
111    /// rounded to the nearest multiple of the source segment duration.</p>
112    #[serde(rename = "SegmentDurationSeconds")]
113    #[serde(skip_serializing_if = "Option::is_none")]
114    pub segment_duration_seconds: Option<i64>,
115    /// <p>An optional custom string that is prepended to the name of each segment. If not specified, it defaults to the ChannelId.</p>
116    #[serde(rename = "SegmentPrefix")]
117    #[serde(skip_serializing_if = "Option::is_none")]
118    pub segment_prefix: Option<String>,
119    #[serde(rename = "StreamSelection")]
120    #[serde(skip_serializing_if = "Option::is_none")]
121    pub stream_selection: Option<StreamSelection>,
122}
123
124/// <p>A new Channel configuration.</p>
125#[derive(Clone, Debug, Default, PartialEq, Serialize)]
126#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
127pub struct CreateChannelRequest {
128    /// <p>A short text description of the Channel.</p>
129    #[serde(rename = "Description")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub description: Option<String>,
132    /// <p>The ID of the Channel. The ID must be unique within the region and it
133    /// cannot be changed after a Channel is created.</p>
134    #[serde(rename = "Id")]
135    pub id: String,
136    #[serde(rename = "Tags")]
137    #[serde(skip_serializing_if = "Option::is_none")]
138    pub tags: Option<::std::collections::HashMap<String, String>>,
139}
140
141#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
142#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
143pub struct CreateChannelResponse {
144    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
145    #[serde(rename = "Arn")]
146    #[serde(skip_serializing_if = "Option::is_none")]
147    pub arn: Option<String>,
148    /// <p>A short text description of the Channel.</p>
149    #[serde(rename = "Description")]
150    #[serde(skip_serializing_if = "Option::is_none")]
151    pub description: Option<String>,
152    #[serde(rename = "HlsIngest")]
153    #[serde(skip_serializing_if = "Option::is_none")]
154    pub hls_ingest: Option<HlsIngest>,
155    /// <p>The ID of the Channel.</p>
156    #[serde(rename = "Id")]
157    #[serde(skip_serializing_if = "Option::is_none")]
158    pub id: Option<String>,
159    #[serde(rename = "Tags")]
160    #[serde(skip_serializing_if = "Option::is_none")]
161    pub tags: Option<::std::collections::HashMap<String, String>>,
162}
163
164/// <p>Configuration parameters used to create a new HarvestJob.</p>
165#[derive(Clone, Debug, Default, PartialEq, Serialize)]
166#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
167pub struct CreateHarvestJobRequest {
168    /// <p>The end of the time-window which will be harvested</p>
169    #[serde(rename = "EndTime")]
170    pub end_time: String,
171    /// <p>The ID of the HarvestJob. The ID must be unique within the region
172    /// and it cannot be changed after the HarvestJob is submitted</p>
173    #[serde(rename = "Id")]
174    pub id: String,
175    /// <p>The ID of the OriginEndpoint that the HarvestJob will harvest from.
176    /// This cannot be changed after the HarvestJob is submitted.</p>
177    #[serde(rename = "OriginEndpointId")]
178    pub origin_endpoint_id: String,
179    #[serde(rename = "S3Destination")]
180    pub s3_destination: S3Destination,
181    /// <p>The start of the time-window which will be harvested</p>
182    #[serde(rename = "StartTime")]
183    pub start_time: String,
184}
185
186#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
187#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
188pub struct CreateHarvestJobResponse {
189    /// <p>The Amazon Resource Name (ARN) assigned to the HarvestJob.</p>
190    #[serde(rename = "Arn")]
191    #[serde(skip_serializing_if = "Option::is_none")]
192    pub arn: Option<String>,
193    /// <p>The ID of the Channel that the HarvestJob will harvest from.</p>
194    #[serde(rename = "ChannelId")]
195    #[serde(skip_serializing_if = "Option::is_none")]
196    pub channel_id: Option<String>,
197    /// <p>The time the HarvestJob was submitted</p>
198    #[serde(rename = "CreatedAt")]
199    #[serde(skip_serializing_if = "Option::is_none")]
200    pub created_at: Option<String>,
201    /// <p>The end of the time-window which will be harvested.</p>
202    #[serde(rename = "EndTime")]
203    #[serde(skip_serializing_if = "Option::is_none")]
204    pub end_time: Option<String>,
205    /// <p>The ID of the HarvestJob. The ID must be unique within the region
206    /// and it cannot be changed after the HarvestJob is submitted.</p>
207    #[serde(rename = "Id")]
208    #[serde(skip_serializing_if = "Option::is_none")]
209    pub id: Option<String>,
210    /// <p>The ID of the OriginEndpoint that the HarvestJob will harvest from.
211    /// This cannot be changed after the HarvestJob is submitted.</p>
212    #[serde(rename = "OriginEndpointId")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub origin_endpoint_id: Option<String>,
215    #[serde(rename = "S3Destination")]
216    #[serde(skip_serializing_if = "Option::is_none")]
217    pub s3_destination: Option<S3Destination>,
218    /// <p>The start of the time-window which will be harvested.</p>
219    #[serde(rename = "StartTime")]
220    #[serde(skip_serializing_if = "Option::is_none")]
221    pub start_time: Option<String>,
222    /// <p>The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for
223    /// HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will
224    /// include an explanation of why the HarvestJob failed.</p>
225    #[serde(rename = "Status")]
226    #[serde(skip_serializing_if = "Option::is_none")]
227    pub status: Option<String>,
228}
229
230/// <p>Configuration parameters used to create a new OriginEndpoint.</p>
231#[derive(Clone, Debug, Default, PartialEq, Serialize)]
232#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
233pub struct CreateOriginEndpointRequest {
234    #[serde(rename = "Authorization")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub authorization: Option<Authorization>,
237    /// <p>The ID of the Channel that the OriginEndpoint will be associated with.
238    /// This cannot be changed after the OriginEndpoint is created.</p>
239    #[serde(rename = "ChannelId")]
240    pub channel_id: String,
241    #[serde(rename = "CmafPackage")]
242    #[serde(skip_serializing_if = "Option::is_none")]
243    pub cmaf_package: Option<CmafPackageCreateOrUpdateParameters>,
244    #[serde(rename = "DashPackage")]
245    #[serde(skip_serializing_if = "Option::is_none")]
246    pub dash_package: Option<DashPackage>,
247    /// <p>A short text description of the OriginEndpoint.</p>
248    #[serde(rename = "Description")]
249    #[serde(skip_serializing_if = "Option::is_none")]
250    pub description: Option<String>,
251    #[serde(rename = "HlsPackage")]
252    #[serde(skip_serializing_if = "Option::is_none")]
253    pub hls_package: Option<HlsPackage>,
254    /// <p>The ID of the OriginEndpoint.  The ID must be unique within the region
255    /// and it cannot be changed after the OriginEndpoint is created.</p>
256    #[serde(rename = "Id")]
257    pub id: String,
258    /// <p>A short string that will be used as the filename of the OriginEndpoint URL (defaults to &quot;index&quot;).</p>
259    #[serde(rename = "ManifestName")]
260    #[serde(skip_serializing_if = "Option::is_none")]
261    pub manifest_name: Option<String>,
262    #[serde(rename = "MssPackage")]
263    #[serde(skip_serializing_if = "Option::is_none")]
264    pub mss_package: Option<MssPackage>,
265    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
266    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
267    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
268    #[serde(rename = "Origination")]
269    #[serde(skip_serializing_if = "Option::is_none")]
270    pub origination: Option<String>,
271    /// <p>Maximum duration (seconds) of content to retain for startover playback.
272    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
273    #[serde(rename = "StartoverWindowSeconds")]
274    #[serde(skip_serializing_if = "Option::is_none")]
275    pub startover_window_seconds: Option<i64>,
276    #[serde(rename = "Tags")]
277    #[serde(skip_serializing_if = "Option::is_none")]
278    pub tags: Option<::std::collections::HashMap<String, String>>,
279    /// <p>Amount of delay (seconds) to enforce on the playback of live content.
280    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
281    #[serde(rename = "TimeDelaySeconds")]
282    #[serde(skip_serializing_if = "Option::is_none")]
283    pub time_delay_seconds: Option<i64>,
284    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
285    #[serde(rename = "Whitelist")]
286    #[serde(skip_serializing_if = "Option::is_none")]
287    pub whitelist: Option<Vec<String>>,
288}
289
290#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
291#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
292pub struct CreateOriginEndpointResponse {
293    /// <p>The Amazon Resource Name (ARN) assigned to the OriginEndpoint.</p>
294    #[serde(rename = "Arn")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub arn: Option<String>,
297    #[serde(rename = "Authorization")]
298    #[serde(skip_serializing_if = "Option::is_none")]
299    pub authorization: Option<Authorization>,
300    /// <p>The ID of the Channel the OriginEndpoint is associated with.</p>
301    #[serde(rename = "ChannelId")]
302    #[serde(skip_serializing_if = "Option::is_none")]
303    pub channel_id: Option<String>,
304    #[serde(rename = "CmafPackage")]
305    #[serde(skip_serializing_if = "Option::is_none")]
306    pub cmaf_package: Option<CmafPackage>,
307    #[serde(rename = "DashPackage")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub dash_package: Option<DashPackage>,
310    /// <p>A short text description of the OriginEndpoint.</p>
311    #[serde(rename = "Description")]
312    #[serde(skip_serializing_if = "Option::is_none")]
313    pub description: Option<String>,
314    #[serde(rename = "HlsPackage")]
315    #[serde(skip_serializing_if = "Option::is_none")]
316    pub hls_package: Option<HlsPackage>,
317    /// <p>The ID of the OriginEndpoint.</p>
318    #[serde(rename = "Id")]
319    #[serde(skip_serializing_if = "Option::is_none")]
320    pub id: Option<String>,
321    /// <p>A short string appended to the end of the OriginEndpoint URL.</p>
322    #[serde(rename = "ManifestName")]
323    #[serde(skip_serializing_if = "Option::is_none")]
324    pub manifest_name: Option<String>,
325    #[serde(rename = "MssPackage")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub mss_package: Option<MssPackage>,
328    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
329    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
330    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
331    #[serde(rename = "Origination")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub origination: Option<String>,
334    /// <p>Maximum duration (seconds) of content to retain for startover playback.
335    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
336    #[serde(rename = "StartoverWindowSeconds")]
337    #[serde(skip_serializing_if = "Option::is_none")]
338    pub startover_window_seconds: Option<i64>,
339    #[serde(rename = "Tags")]
340    #[serde(skip_serializing_if = "Option::is_none")]
341    pub tags: Option<::std::collections::HashMap<String, String>>,
342    /// <p>Amount of delay (seconds) to enforce on the playback of live content.
343    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
344    #[serde(rename = "TimeDelaySeconds")]
345    #[serde(skip_serializing_if = "Option::is_none")]
346    pub time_delay_seconds: Option<i64>,
347    /// <p>The URL of the packaged OriginEndpoint for consumption.</p>
348    #[serde(rename = "Url")]
349    #[serde(skip_serializing_if = "Option::is_none")]
350    pub url: Option<String>,
351    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
352    #[serde(rename = "Whitelist")]
353    #[serde(skip_serializing_if = "Option::is_none")]
354    pub whitelist: Option<Vec<String>>,
355}
356
357/// <p>A Dynamic Adaptive Streaming over HTTP (DASH) encryption configuration.</p>
358#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
359pub struct DashEncryption {
360    /// <p>Time (in seconds) between each encryption key rotation.</p>
361    #[serde(rename = "KeyRotationIntervalSeconds")]
362    #[serde(skip_serializing_if = "Option::is_none")]
363    pub key_rotation_interval_seconds: Option<i64>,
364    #[serde(rename = "SpekeKeyProvider")]
365    pub speke_key_provider: SpekeKeyProvider,
366}
367
368/// <p>A Dynamic Adaptive Streaming over HTTP (DASH) packaging configuration.</p>
369#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
370pub struct DashPackage {
371    #[serde(rename = "AdTriggers")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub ad_triggers: Option<Vec<String>>,
374    #[serde(rename = "AdsOnDeliveryRestrictions")]
375    #[serde(skip_serializing_if = "Option::is_none")]
376    pub ads_on_delivery_restrictions: Option<String>,
377    #[serde(rename = "Encryption")]
378    #[serde(skip_serializing_if = "Option::is_none")]
379    pub encryption: Option<DashEncryption>,
380    /// <p>Determines the position of some tags in the Media Presentation Description (MPD).  When set to FULL, elements like SegmentTemplate and ContentProtection are included in each Representation.  When set to COMPACT, duplicate elements are combined and presented at the AdaptationSet level.</p>
381    #[serde(rename = "ManifestLayout")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub manifest_layout: Option<String>,
384    /// <p>Time window (in seconds) contained in each manifest.</p>
385    #[serde(rename = "ManifestWindowSeconds")]
386    #[serde(skip_serializing_if = "Option::is_none")]
387    pub manifest_window_seconds: Option<i64>,
388    /// <p>Minimum duration (in seconds) that a player will buffer media before starting the presentation.</p>
389    #[serde(rename = "MinBufferTimeSeconds")]
390    #[serde(skip_serializing_if = "Option::is_none")]
391    pub min_buffer_time_seconds: Option<i64>,
392    /// <p>Minimum duration (in seconds) between potential changes to the Dynamic Adaptive Streaming over HTTP (DASH) Media Presentation Description (MPD).</p>
393    #[serde(rename = "MinUpdatePeriodSeconds")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub min_update_period_seconds: Option<i64>,
396    /// <p>A list of triggers that controls when the outgoing Dynamic Adaptive Streaming over HTTP (DASH)
397    /// Media Presentation Description (MPD) will be partitioned into multiple periods. If empty, the content will not
398    /// be partitioned into more than one period. If the list contains &quot;ADS&quot;, new periods will be created where
399    /// the Channel source contains SCTE-35 ad markers.</p>
400    #[serde(rename = "PeriodTriggers")]
401    #[serde(skip_serializing_if = "Option::is_none")]
402    pub period_triggers: Option<Vec<String>>,
403    /// <p>The Dynamic Adaptive Streaming over HTTP (DASH) profile type.  When set to &quot;HBBTV<em>1</em>5&quot;, HbbTV 1.5 compliant output is enabled.</p>
404    #[serde(rename = "Profile")]
405    #[serde(skip_serializing_if = "Option::is_none")]
406    pub profile: Option<String>,
407    /// <p>Duration (in seconds) of each segment. Actual segments will be
408    /// rounded to the nearest multiple of the source segment duration.</p>
409    #[serde(rename = "SegmentDurationSeconds")]
410    #[serde(skip_serializing_if = "Option::is_none")]
411    pub segment_duration_seconds: Option<i64>,
412    /// <p>Determines the type of SegmentTemplate included in the Media Presentation Description (MPD).  When set to NUMBER<em>WITH</em>TIMELINE, a full timeline is presented in each SegmentTemplate, with $Number$ media URLs.  When set to TIME<em>WITH</em>TIMELINE, a full timeline is presented in each SegmentTemplate, with $Time$ media URLs. When set to NUMBER<em>WITH</em>DURATION, only a duration is included in each SegmentTemplate, with $Number$ media URLs.</p>
413    #[serde(rename = "SegmentTemplateFormat")]
414    #[serde(skip_serializing_if = "Option::is_none")]
415    pub segment_template_format: Option<String>,
416    #[serde(rename = "StreamSelection")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub stream_selection: Option<StreamSelection>,
419    /// <p>Duration (in seconds) to delay live content before presentation.</p>
420    #[serde(rename = "SuggestedPresentationDelaySeconds")]
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub suggested_presentation_delay_seconds: Option<i64>,
423}
424
425#[derive(Clone, Debug, Default, PartialEq, Serialize)]
426#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
427pub struct DeleteChannelRequest {
428    /// <p>The ID of the Channel to delete.</p>
429    #[serde(rename = "Id")]
430    pub id: String,
431}
432
433#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
434#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
435pub struct DeleteChannelResponse {}
436
437#[derive(Clone, Debug, Default, PartialEq, Serialize)]
438#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
439pub struct DeleteOriginEndpointRequest {
440    /// <p>The ID of the OriginEndpoint to delete.</p>
441    #[serde(rename = "Id")]
442    pub id: String,
443}
444
445#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
446#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
447pub struct DeleteOriginEndpointResponse {}
448
449#[derive(Clone, Debug, Default, PartialEq, Serialize)]
450#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
451pub struct DescribeChannelRequest {
452    /// <p>The ID of a Channel.</p>
453    #[serde(rename = "Id")]
454    pub id: String,
455}
456
457#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
458#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
459pub struct DescribeChannelResponse {
460    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
461    #[serde(rename = "Arn")]
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub arn: Option<String>,
464    /// <p>A short text description of the Channel.</p>
465    #[serde(rename = "Description")]
466    #[serde(skip_serializing_if = "Option::is_none")]
467    pub description: Option<String>,
468    #[serde(rename = "HlsIngest")]
469    #[serde(skip_serializing_if = "Option::is_none")]
470    pub hls_ingest: Option<HlsIngest>,
471    /// <p>The ID of the Channel.</p>
472    #[serde(rename = "Id")]
473    #[serde(skip_serializing_if = "Option::is_none")]
474    pub id: Option<String>,
475    #[serde(rename = "Tags")]
476    #[serde(skip_serializing_if = "Option::is_none")]
477    pub tags: Option<::std::collections::HashMap<String, String>>,
478}
479
480#[derive(Clone, Debug, Default, PartialEq, Serialize)]
481#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
482pub struct DescribeHarvestJobRequest {
483    /// <p>The ID of the HarvestJob.</p>
484    #[serde(rename = "Id")]
485    pub id: String,
486}
487
488#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
489#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
490pub struct DescribeHarvestJobResponse {
491    /// <p>The Amazon Resource Name (ARN) assigned to the HarvestJob.</p>
492    #[serde(rename = "Arn")]
493    #[serde(skip_serializing_if = "Option::is_none")]
494    pub arn: Option<String>,
495    /// <p>The ID of the Channel that the HarvestJob will harvest from.</p>
496    #[serde(rename = "ChannelId")]
497    #[serde(skip_serializing_if = "Option::is_none")]
498    pub channel_id: Option<String>,
499    /// <p>The time the HarvestJob was submitted</p>
500    #[serde(rename = "CreatedAt")]
501    #[serde(skip_serializing_if = "Option::is_none")]
502    pub created_at: Option<String>,
503    /// <p>The end of the time-window which will be harvested.</p>
504    #[serde(rename = "EndTime")]
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub end_time: Option<String>,
507    /// <p>The ID of the HarvestJob. The ID must be unique within the region
508    /// and it cannot be changed after the HarvestJob is submitted.</p>
509    #[serde(rename = "Id")]
510    #[serde(skip_serializing_if = "Option::is_none")]
511    pub id: Option<String>,
512    /// <p>The ID of the OriginEndpoint that the HarvestJob will harvest from.
513    /// This cannot be changed after the HarvestJob is submitted.</p>
514    #[serde(rename = "OriginEndpointId")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub origin_endpoint_id: Option<String>,
517    #[serde(rename = "S3Destination")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub s3_destination: Option<S3Destination>,
520    /// <p>The start of the time-window which will be harvested.</p>
521    #[serde(rename = "StartTime")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub start_time: Option<String>,
524    /// <p>The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for
525    /// HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will
526    /// include an explanation of why the HarvestJob failed.</p>
527    #[serde(rename = "Status")]
528    #[serde(skip_serializing_if = "Option::is_none")]
529    pub status: Option<String>,
530}
531
532#[derive(Clone, Debug, Default, PartialEq, Serialize)]
533#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
534pub struct DescribeOriginEndpointRequest {
535    /// <p>The ID of the OriginEndpoint.</p>
536    #[serde(rename = "Id")]
537    pub id: String,
538}
539
540#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
541#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
542pub struct DescribeOriginEndpointResponse {
543    /// <p>The Amazon Resource Name (ARN) assigned to the OriginEndpoint.</p>
544    #[serde(rename = "Arn")]
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub arn: Option<String>,
547    #[serde(rename = "Authorization")]
548    #[serde(skip_serializing_if = "Option::is_none")]
549    pub authorization: Option<Authorization>,
550    /// <p>The ID of the Channel the OriginEndpoint is associated with.</p>
551    #[serde(rename = "ChannelId")]
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub channel_id: Option<String>,
554    #[serde(rename = "CmafPackage")]
555    #[serde(skip_serializing_if = "Option::is_none")]
556    pub cmaf_package: Option<CmafPackage>,
557    #[serde(rename = "DashPackage")]
558    #[serde(skip_serializing_if = "Option::is_none")]
559    pub dash_package: Option<DashPackage>,
560    /// <p>A short text description of the OriginEndpoint.</p>
561    #[serde(rename = "Description")]
562    #[serde(skip_serializing_if = "Option::is_none")]
563    pub description: Option<String>,
564    #[serde(rename = "HlsPackage")]
565    #[serde(skip_serializing_if = "Option::is_none")]
566    pub hls_package: Option<HlsPackage>,
567    /// <p>The ID of the OriginEndpoint.</p>
568    #[serde(rename = "Id")]
569    #[serde(skip_serializing_if = "Option::is_none")]
570    pub id: Option<String>,
571    /// <p>A short string appended to the end of the OriginEndpoint URL.</p>
572    #[serde(rename = "ManifestName")]
573    #[serde(skip_serializing_if = "Option::is_none")]
574    pub manifest_name: Option<String>,
575    #[serde(rename = "MssPackage")]
576    #[serde(skip_serializing_if = "Option::is_none")]
577    pub mss_package: Option<MssPackage>,
578    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
579    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
580    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
581    #[serde(rename = "Origination")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub origination: Option<String>,
584    /// <p>Maximum duration (seconds) of content to retain for startover playback.
585    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
586    #[serde(rename = "StartoverWindowSeconds")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub startover_window_seconds: Option<i64>,
589    #[serde(rename = "Tags")]
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub tags: Option<::std::collections::HashMap<String, String>>,
592    /// <p>Amount of delay (seconds) to enforce on the playback of live content.
593    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
594    #[serde(rename = "TimeDelaySeconds")]
595    #[serde(skip_serializing_if = "Option::is_none")]
596    pub time_delay_seconds: Option<i64>,
597    /// <p>The URL of the packaged OriginEndpoint for consumption.</p>
598    #[serde(rename = "Url")]
599    #[serde(skip_serializing_if = "Option::is_none")]
600    pub url: Option<String>,
601    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
602    #[serde(rename = "Whitelist")]
603    #[serde(skip_serializing_if = "Option::is_none")]
604    pub whitelist: Option<Vec<String>>,
605}
606
607/// <p>A HarvestJob resource configuration</p>
608#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
609#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
610pub struct HarvestJob {
611    /// <p>The Amazon Resource Name (ARN) assigned to the HarvestJob.</p>
612    #[serde(rename = "Arn")]
613    #[serde(skip_serializing_if = "Option::is_none")]
614    pub arn: Option<String>,
615    /// <p>The ID of the Channel that the HarvestJob will harvest from.</p>
616    #[serde(rename = "ChannelId")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub channel_id: Option<String>,
619    /// <p>The time the HarvestJob was submitted</p>
620    #[serde(rename = "CreatedAt")]
621    #[serde(skip_serializing_if = "Option::is_none")]
622    pub created_at: Option<String>,
623    /// <p>The end of the time-window which will be harvested.</p>
624    #[serde(rename = "EndTime")]
625    #[serde(skip_serializing_if = "Option::is_none")]
626    pub end_time: Option<String>,
627    /// <p>The ID of the HarvestJob. The ID must be unique within the region
628    /// and it cannot be changed after the HarvestJob is submitted.</p>
629    #[serde(rename = "Id")]
630    #[serde(skip_serializing_if = "Option::is_none")]
631    pub id: Option<String>,
632    /// <p>The ID of the OriginEndpoint that the HarvestJob will harvest from.
633    /// This cannot be changed after the HarvestJob is submitted.</p>
634    #[serde(rename = "OriginEndpointId")]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    pub origin_endpoint_id: Option<String>,
637    #[serde(rename = "S3Destination")]
638    #[serde(skip_serializing_if = "Option::is_none")]
639    pub s3_destination: Option<S3Destination>,
640    /// <p>The start of the time-window which will be harvested.</p>
641    #[serde(rename = "StartTime")]
642    #[serde(skip_serializing_if = "Option::is_none")]
643    pub start_time: Option<String>,
644    /// <p>The current status of the HarvestJob. Consider setting up a CloudWatch Event to listen for
645    /// HarvestJobs as they succeed or fail. In the event of failure, the CloudWatch Event will
646    /// include an explanation of why the HarvestJob failed.</p>
647    #[serde(rename = "Status")]
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub status: Option<String>,
650}
651
652/// <p>An HTTP Live Streaming (HLS) encryption configuration.</p>
653#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
654pub struct HlsEncryption {
655    /// <p>A constant initialization vector for encryption (optional).
656    /// When not specified the initialization vector will be periodically rotated.</p>
657    #[serde(rename = "ConstantInitializationVector")]
658    #[serde(skip_serializing_if = "Option::is_none")]
659    pub constant_initialization_vector: Option<String>,
660    /// <p>The encryption method to use.</p>
661    #[serde(rename = "EncryptionMethod")]
662    #[serde(skip_serializing_if = "Option::is_none")]
663    pub encryption_method: Option<String>,
664    /// <p>Interval (in seconds) between each encryption key rotation.</p>
665    #[serde(rename = "KeyRotationIntervalSeconds")]
666    #[serde(skip_serializing_if = "Option::is_none")]
667    pub key_rotation_interval_seconds: Option<i64>,
668    /// <p>When enabled, the EXT-X-KEY tag will be repeated in output manifests.</p>
669    #[serde(rename = "RepeatExtXKey")]
670    #[serde(skip_serializing_if = "Option::is_none")]
671    pub repeat_ext_x_key: Option<bool>,
672    #[serde(rename = "SpekeKeyProvider")]
673    pub speke_key_provider: SpekeKeyProvider,
674}
675
676/// <p>An HTTP Live Streaming (HLS) ingest resource configuration.</p>
677#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
678#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
679pub struct HlsIngest {
680    /// <p>A list of endpoints to which the source stream should be sent.</p>
681    #[serde(rename = "IngestEndpoints")]
682    #[serde(skip_serializing_if = "Option::is_none")]
683    pub ingest_endpoints: Option<Vec<IngestEndpoint>>,
684}
685
686/// <p>A HTTP Live Streaming (HLS) manifest configuration.</p>
687#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
688#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
689pub struct HlsManifest {
690    /// <p>This setting controls how ad markers are included in the packaged OriginEndpoint.
691    /// &quot;NONE&quot; will omit all SCTE-35 ad markers from the output.
692    /// &quot;PASSTHROUGH&quot; causes the manifest to contain a copy of the SCTE-35 ad
693    /// markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest.
694    /// &quot;SCTE35_ENHANCED&quot; generates ad markers and blackout tags based on SCTE-35
695    /// messages in the input source.</p>
696    #[serde(rename = "AdMarkers")]
697    #[serde(skip_serializing_if = "Option::is_none")]
698    pub ad_markers: Option<String>,
699    /// <p>The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.</p>
700    #[serde(rename = "Id")]
701    pub id: String,
702    /// <p>When enabled, an I-Frame only stream will be included in the output.</p>
703    #[serde(rename = "IncludeIframeOnlyStream")]
704    #[serde(skip_serializing_if = "Option::is_none")]
705    pub include_iframe_only_stream: Option<bool>,
706    /// <p>An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.</p>
707    #[serde(rename = "ManifestName")]
708    #[serde(skip_serializing_if = "Option::is_none")]
709    pub manifest_name: Option<String>,
710    /// <p>The HTTP Live Streaming (HLS) playlist type.
711    /// When either &quot;EVENT&quot; or &quot;VOD&quot; is specified, a corresponding EXT-X-PLAYLIST-TYPE
712    /// entry will be included in the media playlist.</p>
713    #[serde(rename = "PlaylistType")]
714    #[serde(skip_serializing_if = "Option::is_none")]
715    pub playlist_type: Option<String>,
716    /// <p>Time window (in seconds) contained in each parent manifest.</p>
717    #[serde(rename = "PlaylistWindowSeconds")]
718    #[serde(skip_serializing_if = "Option::is_none")]
719    pub playlist_window_seconds: Option<i64>,
720    /// <p>The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
721    /// inserted into manifests. Additionally, when an interval is specified
722    /// ID3Timed Metadata messages will be generated every 5 seconds using the
723    /// ingest time of the content.
724    /// If the interval is not specified, or set to 0, then
725    /// no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no
726    /// ID3Timed Metadata messages will be generated. Note that irrespective
727    /// of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input,
728    /// it will be passed through to HLS output.</p>
729    #[serde(rename = "ProgramDateTimeIntervalSeconds")]
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub program_date_time_interval_seconds: Option<i64>,
732    /// <p>The URL of the packaged OriginEndpoint for consumption.</p>
733    #[serde(rename = "Url")]
734    #[serde(skip_serializing_if = "Option::is_none")]
735    pub url: Option<String>,
736}
737
738/// <p>A HTTP Live Streaming (HLS) manifest configuration.</p>
739#[derive(Clone, Debug, Default, PartialEq, Serialize)]
740#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
741pub struct HlsManifestCreateOrUpdateParameters {
742    /// <p>This setting controls how ad markers are included in the packaged OriginEndpoint.
743    /// &quot;NONE&quot; will omit all SCTE-35 ad markers from the output.
744    /// &quot;PASSTHROUGH&quot; causes the manifest to contain a copy of the SCTE-35 ad
745    /// markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest.
746    /// &quot;SCTE35_ENHANCED&quot; generates ad markers and blackout tags based on SCTE-35
747    /// messages in the input source.</p>
748    #[serde(rename = "AdMarkers")]
749    #[serde(skip_serializing_if = "Option::is_none")]
750    pub ad_markers: Option<String>,
751    #[serde(rename = "AdTriggers")]
752    #[serde(skip_serializing_if = "Option::is_none")]
753    pub ad_triggers: Option<Vec<String>>,
754    #[serde(rename = "AdsOnDeliveryRestrictions")]
755    #[serde(skip_serializing_if = "Option::is_none")]
756    pub ads_on_delivery_restrictions: Option<String>,
757    /// <p>The ID of the manifest. The ID must be unique within the OriginEndpoint and it cannot be changed after it is created.</p>
758    #[serde(rename = "Id")]
759    pub id: String,
760    /// <p>When enabled, an I-Frame only stream will be included in the output.</p>
761    #[serde(rename = "IncludeIframeOnlyStream")]
762    #[serde(skip_serializing_if = "Option::is_none")]
763    pub include_iframe_only_stream: Option<bool>,
764    /// <p>An optional short string appended to the end of the OriginEndpoint URL. If not specified, defaults to the manifestName for the OriginEndpoint.</p>
765    #[serde(rename = "ManifestName")]
766    #[serde(skip_serializing_if = "Option::is_none")]
767    pub manifest_name: Option<String>,
768    /// <p>The HTTP Live Streaming (HLS) playlist type.
769    /// When either &quot;EVENT&quot; or &quot;VOD&quot; is specified, a corresponding EXT-X-PLAYLIST-TYPE
770    /// entry will be included in the media playlist.</p>
771    #[serde(rename = "PlaylistType")]
772    #[serde(skip_serializing_if = "Option::is_none")]
773    pub playlist_type: Option<String>,
774    /// <p>Time window (in seconds) contained in each parent manifest.</p>
775    #[serde(rename = "PlaylistWindowSeconds")]
776    #[serde(skip_serializing_if = "Option::is_none")]
777    pub playlist_window_seconds: Option<i64>,
778    /// <p>The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
779    /// inserted into manifests. Additionally, when an interval is specified
780    /// ID3Timed Metadata messages will be generated every 5 seconds using the
781    /// ingest time of the content.
782    /// If the interval is not specified, or set to 0, then
783    /// no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no
784    /// ID3Timed Metadata messages will be generated. Note that irrespective
785    /// of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input,
786    /// it will be passed through to HLS output.</p>
787    #[serde(rename = "ProgramDateTimeIntervalSeconds")]
788    #[serde(skip_serializing_if = "Option::is_none")]
789    pub program_date_time_interval_seconds: Option<i64>,
790}
791
792/// <p>An HTTP Live Streaming (HLS) packaging configuration.</p>
793#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
794pub struct HlsPackage {
795    /// <p>This setting controls how ad markers are included in the packaged OriginEndpoint.
796    /// &quot;NONE&quot; will omit all SCTE-35 ad markers from the output.
797    /// &quot;PASSTHROUGH&quot; causes the manifest to contain a copy of the SCTE-35 ad
798    /// markers (comments) taken directly from the input HTTP Live Streaming (HLS) manifest.
799    /// &quot;SCTE35_ENHANCED&quot; generates ad markers and blackout tags based on SCTE-35
800    /// messages in the input source.</p>
801    #[serde(rename = "AdMarkers")]
802    #[serde(skip_serializing_if = "Option::is_none")]
803    pub ad_markers: Option<String>,
804    #[serde(rename = "AdTriggers")]
805    #[serde(skip_serializing_if = "Option::is_none")]
806    pub ad_triggers: Option<Vec<String>>,
807    #[serde(rename = "AdsOnDeliveryRestrictions")]
808    #[serde(skip_serializing_if = "Option::is_none")]
809    pub ads_on_delivery_restrictions: Option<String>,
810    #[serde(rename = "Encryption")]
811    #[serde(skip_serializing_if = "Option::is_none")]
812    pub encryption: Option<HlsEncryption>,
813    /// <p>When enabled, an I-Frame only stream will be included in the output.</p>
814    #[serde(rename = "IncludeIframeOnlyStream")]
815    #[serde(skip_serializing_if = "Option::is_none")]
816    pub include_iframe_only_stream: Option<bool>,
817    /// <p>The HTTP Live Streaming (HLS) playlist type.
818    /// When either &quot;EVENT&quot; or &quot;VOD&quot; is specified, a corresponding EXT-X-PLAYLIST-TYPE
819    /// entry will be included in the media playlist.</p>
820    #[serde(rename = "PlaylistType")]
821    #[serde(skip_serializing_if = "Option::is_none")]
822    pub playlist_type: Option<String>,
823    /// <p>Time window (in seconds) contained in each parent manifest.</p>
824    #[serde(rename = "PlaylistWindowSeconds")]
825    #[serde(skip_serializing_if = "Option::is_none")]
826    pub playlist_window_seconds: Option<i64>,
827    /// <p>The interval (in seconds) between each EXT-X-PROGRAM-DATE-TIME tag
828    /// inserted into manifests. Additionally, when an interval is specified
829    /// ID3Timed Metadata messages will be generated every 5 seconds using the
830    /// ingest time of the content.
831    /// If the interval is not specified, or set to 0, then
832    /// no EXT-X-PROGRAM-DATE-TIME tags will be inserted into manifests and no
833    /// ID3Timed Metadata messages will be generated. Note that irrespective
834    /// of this parameter, if any ID3 Timed Metadata is found in HTTP Live Streaming (HLS) input,
835    /// it will be passed through to HLS output.</p>
836    #[serde(rename = "ProgramDateTimeIntervalSeconds")]
837    #[serde(skip_serializing_if = "Option::is_none")]
838    pub program_date_time_interval_seconds: Option<i64>,
839    /// <p>Duration (in seconds) of each fragment. Actual fragments will be
840    /// rounded to the nearest multiple of the source fragment duration.</p>
841    #[serde(rename = "SegmentDurationSeconds")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub segment_duration_seconds: Option<i64>,
844    #[serde(rename = "StreamSelection")]
845    #[serde(skip_serializing_if = "Option::is_none")]
846    pub stream_selection: Option<StreamSelection>,
847    /// <p>When enabled, audio streams will be placed in rendition groups in the output.</p>
848    #[serde(rename = "UseAudioRenditionGroup")]
849    #[serde(skip_serializing_if = "Option::is_none")]
850    pub use_audio_rendition_group: Option<bool>,
851}
852
853/// <p>An endpoint for ingesting source content for a Channel.</p>
854#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
855#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
856pub struct IngestEndpoint {
857    /// <p>The system generated unique identifier for the IngestEndpoint</p>
858    #[serde(rename = "Id")]
859    #[serde(skip_serializing_if = "Option::is_none")]
860    pub id: Option<String>,
861    /// <p>The system generated password for ingest authentication.</p>
862    #[serde(rename = "Password")]
863    #[serde(skip_serializing_if = "Option::is_none")]
864    pub password: Option<String>,
865    /// <p>The ingest URL to which the source stream should be sent.</p>
866    #[serde(rename = "Url")]
867    #[serde(skip_serializing_if = "Option::is_none")]
868    pub url: Option<String>,
869    /// <p>The system generated username for ingest authentication.</p>
870    #[serde(rename = "Username")]
871    #[serde(skip_serializing_if = "Option::is_none")]
872    pub username: Option<String>,
873}
874
875#[derive(Clone, Debug, Default, PartialEq, Serialize)]
876#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
877pub struct ListChannelsRequest {
878    /// <p>Upper bound on number of records to return.</p>
879    #[serde(rename = "MaxResults")]
880    #[serde(skip_serializing_if = "Option::is_none")]
881    pub max_results: Option<i64>,
882    /// <p>A token used to resume pagination from the end of a previous request.</p>
883    #[serde(rename = "NextToken")]
884    #[serde(skip_serializing_if = "Option::is_none")]
885    pub next_token: Option<String>,
886}
887
888#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
889#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
890pub struct ListChannelsResponse {
891    /// <p>A list of Channel records.</p>
892    #[serde(rename = "Channels")]
893    #[serde(skip_serializing_if = "Option::is_none")]
894    pub channels: Option<Vec<Channel>>,
895    /// <p>A token that can be used to resume pagination from the end of the collection.</p>
896    #[serde(rename = "NextToken")]
897    #[serde(skip_serializing_if = "Option::is_none")]
898    pub next_token: Option<String>,
899}
900
901#[derive(Clone, Debug, Default, PartialEq, Serialize)]
902#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
903pub struct ListHarvestJobsRequest {
904    /// <p>When specified, the request will return only HarvestJobs associated with the given Channel ID.</p>
905    #[serde(rename = "IncludeChannelId")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub include_channel_id: Option<String>,
908    /// <p>When specified, the request will return only HarvestJobs in the given status.</p>
909    #[serde(rename = "IncludeStatus")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub include_status: Option<String>,
912    /// <p>The upper bound on the number of records to return.</p>
913    #[serde(rename = "MaxResults")]
914    #[serde(skip_serializing_if = "Option::is_none")]
915    pub max_results: Option<i64>,
916    /// <p>A token used to resume pagination from the end of a previous request.</p>
917    #[serde(rename = "NextToken")]
918    #[serde(skip_serializing_if = "Option::is_none")]
919    pub next_token: Option<String>,
920}
921
922#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
923#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
924pub struct ListHarvestJobsResponse {
925    /// <p>A list of HarvestJob records.</p>
926    #[serde(rename = "HarvestJobs")]
927    #[serde(skip_serializing_if = "Option::is_none")]
928    pub harvest_jobs: Option<Vec<HarvestJob>>,
929    /// <p>A token that can be used to resume pagination from the end of the collection.</p>
930    #[serde(rename = "NextToken")]
931    #[serde(skip_serializing_if = "Option::is_none")]
932    pub next_token: Option<String>,
933}
934
935#[derive(Clone, Debug, Default, PartialEq, Serialize)]
936#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
937pub struct ListOriginEndpointsRequest {
938    /// <p>When specified, the request will return only OriginEndpoints associated with the given Channel ID.</p>
939    #[serde(rename = "ChannelId")]
940    #[serde(skip_serializing_if = "Option::is_none")]
941    pub channel_id: Option<String>,
942    /// <p>The upper bound on the number of records to return.</p>
943    #[serde(rename = "MaxResults")]
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub max_results: Option<i64>,
946    /// <p>A token used to resume pagination from the end of a previous request.</p>
947    #[serde(rename = "NextToken")]
948    #[serde(skip_serializing_if = "Option::is_none")]
949    pub next_token: Option<String>,
950}
951
952#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
953#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
954pub struct ListOriginEndpointsResponse {
955    /// <p>A token that can be used to resume pagination from the end of the collection.</p>
956    #[serde(rename = "NextToken")]
957    #[serde(skip_serializing_if = "Option::is_none")]
958    pub next_token: Option<String>,
959    /// <p>A list of OriginEndpoint records.</p>
960    #[serde(rename = "OriginEndpoints")]
961    #[serde(skip_serializing_if = "Option::is_none")]
962    pub origin_endpoints: Option<Vec<OriginEndpoint>>,
963}
964
965#[derive(Clone, Debug, Default, PartialEq, Serialize)]
966#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
967pub struct ListTagsForResourceRequest {
968    #[serde(rename = "ResourceArn")]
969    pub resource_arn: String,
970}
971
972#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
973#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
974pub struct ListTagsForResourceResponse {
975    #[serde(rename = "Tags")]
976    #[serde(skip_serializing_if = "Option::is_none")]
977    pub tags: Option<::std::collections::HashMap<String, String>>,
978}
979
980/// <p>A Microsoft Smooth Streaming (MSS) encryption configuration.</p>
981#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
982pub struct MssEncryption {
983    #[serde(rename = "SpekeKeyProvider")]
984    pub speke_key_provider: SpekeKeyProvider,
985}
986
987/// <p>A Microsoft Smooth Streaming (MSS) packaging configuration.</p>
988#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
989pub struct MssPackage {
990    #[serde(rename = "Encryption")]
991    #[serde(skip_serializing_if = "Option::is_none")]
992    pub encryption: Option<MssEncryption>,
993    /// <p>The time window (in seconds) contained in each manifest.</p>
994    #[serde(rename = "ManifestWindowSeconds")]
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub manifest_window_seconds: Option<i64>,
997    /// <p>The duration (in seconds) of each segment.</p>
998    #[serde(rename = "SegmentDurationSeconds")]
999    #[serde(skip_serializing_if = "Option::is_none")]
1000    pub segment_duration_seconds: Option<i64>,
1001    #[serde(rename = "StreamSelection")]
1002    #[serde(skip_serializing_if = "Option::is_none")]
1003    pub stream_selection: Option<StreamSelection>,
1004}
1005
1006/// <p>An OriginEndpoint resource configuration.</p>
1007#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1008#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1009pub struct OriginEndpoint {
1010    /// <p>The Amazon Resource Name (ARN) assigned to the OriginEndpoint.</p>
1011    #[serde(rename = "Arn")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub arn: Option<String>,
1014    #[serde(rename = "Authorization")]
1015    #[serde(skip_serializing_if = "Option::is_none")]
1016    pub authorization: Option<Authorization>,
1017    /// <p>The ID of the Channel the OriginEndpoint is associated with.</p>
1018    #[serde(rename = "ChannelId")]
1019    #[serde(skip_serializing_if = "Option::is_none")]
1020    pub channel_id: Option<String>,
1021    #[serde(rename = "CmafPackage")]
1022    #[serde(skip_serializing_if = "Option::is_none")]
1023    pub cmaf_package: Option<CmafPackage>,
1024    #[serde(rename = "DashPackage")]
1025    #[serde(skip_serializing_if = "Option::is_none")]
1026    pub dash_package: Option<DashPackage>,
1027    /// <p>A short text description of the OriginEndpoint.</p>
1028    #[serde(rename = "Description")]
1029    #[serde(skip_serializing_if = "Option::is_none")]
1030    pub description: Option<String>,
1031    #[serde(rename = "HlsPackage")]
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub hls_package: Option<HlsPackage>,
1034    /// <p>The ID of the OriginEndpoint.</p>
1035    #[serde(rename = "Id")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub id: Option<String>,
1038    /// <p>A short string appended to the end of the OriginEndpoint URL.</p>
1039    #[serde(rename = "ManifestName")]
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    pub manifest_name: Option<String>,
1042    #[serde(rename = "MssPackage")]
1043    #[serde(skip_serializing_if = "Option::is_none")]
1044    pub mss_package: Option<MssPackage>,
1045    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
1046    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
1047    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
1048    #[serde(rename = "Origination")]
1049    #[serde(skip_serializing_if = "Option::is_none")]
1050    pub origination: Option<String>,
1051    /// <p>Maximum duration (seconds) of content to retain for startover playback.
1052    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
1053    #[serde(rename = "StartoverWindowSeconds")]
1054    #[serde(skip_serializing_if = "Option::is_none")]
1055    pub startover_window_seconds: Option<i64>,
1056    #[serde(rename = "Tags")]
1057    #[serde(skip_serializing_if = "Option::is_none")]
1058    pub tags: Option<::std::collections::HashMap<String, String>>,
1059    /// <p>Amount of delay (seconds) to enforce on the playback of live content.
1060    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
1061    #[serde(rename = "TimeDelaySeconds")]
1062    #[serde(skip_serializing_if = "Option::is_none")]
1063    pub time_delay_seconds: Option<i64>,
1064    /// <p>The URL of the packaged OriginEndpoint for consumption.</p>
1065    #[serde(rename = "Url")]
1066    #[serde(skip_serializing_if = "Option::is_none")]
1067    pub url: Option<String>,
1068    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
1069    #[serde(rename = "Whitelist")]
1070    #[serde(skip_serializing_if = "Option::is_none")]
1071    pub whitelist: Option<Vec<String>>,
1072}
1073
1074#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1075#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1076pub struct RotateChannelCredentialsRequest {
1077    /// <p>The ID of the channel to update.</p>
1078    #[serde(rename = "Id")]
1079    pub id: String,
1080}
1081
1082#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1083#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1084pub struct RotateChannelCredentialsResponse {
1085    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
1086    #[serde(rename = "Arn")]
1087    #[serde(skip_serializing_if = "Option::is_none")]
1088    pub arn: Option<String>,
1089    /// <p>A short text description of the Channel.</p>
1090    #[serde(rename = "Description")]
1091    #[serde(skip_serializing_if = "Option::is_none")]
1092    pub description: Option<String>,
1093    #[serde(rename = "HlsIngest")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub hls_ingest: Option<HlsIngest>,
1096    /// <p>The ID of the Channel.</p>
1097    #[serde(rename = "Id")]
1098    #[serde(skip_serializing_if = "Option::is_none")]
1099    pub id: Option<String>,
1100    #[serde(rename = "Tags")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub tags: Option<::std::collections::HashMap<String, String>>,
1103}
1104
1105#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1106#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1107pub struct RotateIngestEndpointCredentialsRequest {
1108    /// <p>The ID of the channel the IngestEndpoint is on.</p>
1109    #[serde(rename = "Id")]
1110    pub id: String,
1111    /// <p>The id of the IngestEndpoint whose credentials should be rotated</p>
1112    #[serde(rename = "IngestEndpointId")]
1113    pub ingest_endpoint_id: String,
1114}
1115
1116#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1117#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1118pub struct RotateIngestEndpointCredentialsResponse {
1119    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
1120    #[serde(rename = "Arn")]
1121    #[serde(skip_serializing_if = "Option::is_none")]
1122    pub arn: Option<String>,
1123    /// <p>A short text description of the Channel.</p>
1124    #[serde(rename = "Description")]
1125    #[serde(skip_serializing_if = "Option::is_none")]
1126    pub description: Option<String>,
1127    #[serde(rename = "HlsIngest")]
1128    #[serde(skip_serializing_if = "Option::is_none")]
1129    pub hls_ingest: Option<HlsIngest>,
1130    /// <p>The ID of the Channel.</p>
1131    #[serde(rename = "Id")]
1132    #[serde(skip_serializing_if = "Option::is_none")]
1133    pub id: Option<String>,
1134    #[serde(rename = "Tags")]
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub tags: Option<::std::collections::HashMap<String, String>>,
1137}
1138
1139/// <p>Configuration parameters for where in an S3 bucket to place the harvested content</p>
1140#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1141pub struct S3Destination {
1142    /// <p>The name of an S3 bucket within which harvested content will be exported</p>
1143    #[serde(rename = "BucketName")]
1144    pub bucket_name: String,
1145    /// <p>The key in the specified S3 bucket where the harvested top-level manifest will be placed.</p>
1146    #[serde(rename = "ManifestKey")]
1147    pub manifest_key: String,
1148    /// <p>The IAM role used to write to the specified S3 bucket</p>
1149    #[serde(rename = "RoleArn")]
1150    pub role_arn: String,
1151}
1152
1153/// <p>A configuration for accessing an external Secure Packager and Encoder Key Exchange (SPEKE) service that will provide encryption keys.</p>
1154#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1155pub struct SpekeKeyProvider {
1156    /// <p>An Amazon Resource Name (ARN) of a Certificate Manager certificate
1157    /// that MediaPackage will use for enforcing secure end-to-end data
1158    /// transfer with the key provider service.</p>
1159    #[serde(rename = "CertificateArn")]
1160    #[serde(skip_serializing_if = "Option::is_none")]
1161    pub certificate_arn: Option<String>,
1162    /// <p>The resource ID to include in key requests.</p>
1163    #[serde(rename = "ResourceId")]
1164    pub resource_id: String,
1165    /// <p>An Amazon Resource Name (ARN) of an IAM role that AWS Elemental
1166    /// MediaPackage will assume when accessing the key provider service.</p>
1167    #[serde(rename = "RoleArn")]
1168    pub role_arn: String,
1169    /// <p>The system IDs to include in key requests.</p>
1170    #[serde(rename = "SystemIds")]
1171    pub system_ids: Vec<String>,
1172    /// <p>The URL of the external key provider service.</p>
1173    #[serde(rename = "Url")]
1174    pub url: String,
1175}
1176
1177/// <p>A StreamSelection configuration.</p>
1178#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1179pub struct StreamSelection {
1180    /// <p>The maximum video bitrate (bps) to include in output.</p>
1181    #[serde(rename = "MaxVideoBitsPerSecond")]
1182    #[serde(skip_serializing_if = "Option::is_none")]
1183    pub max_video_bits_per_second: Option<i64>,
1184    /// <p>The minimum video bitrate (bps) to include in output.</p>
1185    #[serde(rename = "MinVideoBitsPerSecond")]
1186    #[serde(skip_serializing_if = "Option::is_none")]
1187    pub min_video_bits_per_second: Option<i64>,
1188    /// <p>A directive that determines the order of streams in the output.</p>
1189    #[serde(rename = "StreamOrder")]
1190    #[serde(skip_serializing_if = "Option::is_none")]
1191    pub stream_order: Option<String>,
1192}
1193
1194#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1195#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1196pub struct TagResourceRequest {
1197    #[serde(rename = "ResourceArn")]
1198    pub resource_arn: String,
1199    #[serde(rename = "Tags")]
1200    pub tags: ::std::collections::HashMap<String, String>,
1201}
1202
1203#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1204#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1205pub struct UntagResourceRequest {
1206    #[serde(rename = "ResourceArn")]
1207    pub resource_arn: String,
1208    /// <p>The key(s) of tag to be deleted</p>
1209    #[serde(rename = "TagKeys")]
1210    pub tag_keys: Vec<String>,
1211}
1212
1213/// <p>Configuration parameters used to update the Channel.</p>
1214#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1215#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1216pub struct UpdateChannelRequest {
1217    /// <p>A short text description of the Channel.</p>
1218    #[serde(rename = "Description")]
1219    #[serde(skip_serializing_if = "Option::is_none")]
1220    pub description: Option<String>,
1221    /// <p>The ID of the Channel to update.</p>
1222    #[serde(rename = "Id")]
1223    pub id: String,
1224}
1225
1226#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1227#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1228pub struct UpdateChannelResponse {
1229    /// <p>The Amazon Resource Name (ARN) assigned to the Channel.</p>
1230    #[serde(rename = "Arn")]
1231    #[serde(skip_serializing_if = "Option::is_none")]
1232    pub arn: Option<String>,
1233    /// <p>A short text description of the Channel.</p>
1234    #[serde(rename = "Description")]
1235    #[serde(skip_serializing_if = "Option::is_none")]
1236    pub description: Option<String>,
1237    #[serde(rename = "HlsIngest")]
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    pub hls_ingest: Option<HlsIngest>,
1240    /// <p>The ID of the Channel.</p>
1241    #[serde(rename = "Id")]
1242    #[serde(skip_serializing_if = "Option::is_none")]
1243    pub id: Option<String>,
1244    #[serde(rename = "Tags")]
1245    #[serde(skip_serializing_if = "Option::is_none")]
1246    pub tags: Option<::std::collections::HashMap<String, String>>,
1247}
1248
1249/// <p>Configuration parameters used to update an existing OriginEndpoint.</p>
1250#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1251#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1252pub struct UpdateOriginEndpointRequest {
1253    #[serde(rename = "Authorization")]
1254    #[serde(skip_serializing_if = "Option::is_none")]
1255    pub authorization: Option<Authorization>,
1256    #[serde(rename = "CmafPackage")]
1257    #[serde(skip_serializing_if = "Option::is_none")]
1258    pub cmaf_package: Option<CmafPackageCreateOrUpdateParameters>,
1259    #[serde(rename = "DashPackage")]
1260    #[serde(skip_serializing_if = "Option::is_none")]
1261    pub dash_package: Option<DashPackage>,
1262    /// <p>A short text description of the OriginEndpoint.</p>
1263    #[serde(rename = "Description")]
1264    #[serde(skip_serializing_if = "Option::is_none")]
1265    pub description: Option<String>,
1266    #[serde(rename = "HlsPackage")]
1267    #[serde(skip_serializing_if = "Option::is_none")]
1268    pub hls_package: Option<HlsPackage>,
1269    /// <p>The ID of the OriginEndpoint to update.</p>
1270    #[serde(rename = "Id")]
1271    pub id: String,
1272    /// <p>A short string that will be appended to the end of the Endpoint URL.</p>
1273    #[serde(rename = "ManifestName")]
1274    #[serde(skip_serializing_if = "Option::is_none")]
1275    pub manifest_name: Option<String>,
1276    #[serde(rename = "MssPackage")]
1277    #[serde(skip_serializing_if = "Option::is_none")]
1278    pub mss_package: Option<MssPackage>,
1279    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
1280    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
1281    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
1282    #[serde(rename = "Origination")]
1283    #[serde(skip_serializing_if = "Option::is_none")]
1284    pub origination: Option<String>,
1285    /// <p>Maximum duration (in seconds) of content to retain for startover playback.
1286    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
1287    #[serde(rename = "StartoverWindowSeconds")]
1288    #[serde(skip_serializing_if = "Option::is_none")]
1289    pub startover_window_seconds: Option<i64>,
1290    /// <p>Amount of delay (in seconds) to enforce on the playback of live content.
1291    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
1292    #[serde(rename = "TimeDelaySeconds")]
1293    #[serde(skip_serializing_if = "Option::is_none")]
1294    pub time_delay_seconds: Option<i64>,
1295    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
1296    #[serde(rename = "Whitelist")]
1297    #[serde(skip_serializing_if = "Option::is_none")]
1298    pub whitelist: Option<Vec<String>>,
1299}
1300
1301#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1302#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1303pub struct UpdateOriginEndpointResponse {
1304    /// <p>The Amazon Resource Name (ARN) assigned to the OriginEndpoint.</p>
1305    #[serde(rename = "Arn")]
1306    #[serde(skip_serializing_if = "Option::is_none")]
1307    pub arn: Option<String>,
1308    #[serde(rename = "Authorization")]
1309    #[serde(skip_serializing_if = "Option::is_none")]
1310    pub authorization: Option<Authorization>,
1311    /// <p>The ID of the Channel the OriginEndpoint is associated with.</p>
1312    #[serde(rename = "ChannelId")]
1313    #[serde(skip_serializing_if = "Option::is_none")]
1314    pub channel_id: Option<String>,
1315    #[serde(rename = "CmafPackage")]
1316    #[serde(skip_serializing_if = "Option::is_none")]
1317    pub cmaf_package: Option<CmafPackage>,
1318    #[serde(rename = "DashPackage")]
1319    #[serde(skip_serializing_if = "Option::is_none")]
1320    pub dash_package: Option<DashPackage>,
1321    /// <p>A short text description of the OriginEndpoint.</p>
1322    #[serde(rename = "Description")]
1323    #[serde(skip_serializing_if = "Option::is_none")]
1324    pub description: Option<String>,
1325    #[serde(rename = "HlsPackage")]
1326    #[serde(skip_serializing_if = "Option::is_none")]
1327    pub hls_package: Option<HlsPackage>,
1328    /// <p>The ID of the OriginEndpoint.</p>
1329    #[serde(rename = "Id")]
1330    #[serde(skip_serializing_if = "Option::is_none")]
1331    pub id: Option<String>,
1332    /// <p>A short string appended to the end of the OriginEndpoint URL.</p>
1333    #[serde(rename = "ManifestName")]
1334    #[serde(skip_serializing_if = "Option::is_none")]
1335    pub manifest_name: Option<String>,
1336    #[serde(rename = "MssPackage")]
1337    #[serde(skip_serializing_if = "Option::is_none")]
1338    pub mss_package: Option<MssPackage>,
1339    /// <p>Control whether origination of video is allowed for this OriginEndpoint. If set to ALLOW, the OriginEndpoint
1340    /// may by requested, pursuant to any other form of access control. If set to DENY, the OriginEndpoint may not be
1341    /// requested. This can be helpful for Live to VOD harvesting, or for temporarily disabling origination</p>
1342    #[serde(rename = "Origination")]
1343    #[serde(skip_serializing_if = "Option::is_none")]
1344    pub origination: Option<String>,
1345    /// <p>Maximum duration (seconds) of content to retain for startover playback.
1346    /// If not specified, startover playback will be disabled for the OriginEndpoint.</p>
1347    #[serde(rename = "StartoverWindowSeconds")]
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    pub startover_window_seconds: Option<i64>,
1350    #[serde(rename = "Tags")]
1351    #[serde(skip_serializing_if = "Option::is_none")]
1352    pub tags: Option<::std::collections::HashMap<String, String>>,
1353    /// <p>Amount of delay (seconds) to enforce on the playback of live content.
1354    /// If not specified, there will be no time delay in effect for the OriginEndpoint.</p>
1355    #[serde(rename = "TimeDelaySeconds")]
1356    #[serde(skip_serializing_if = "Option::is_none")]
1357    pub time_delay_seconds: Option<i64>,
1358    /// <p>The URL of the packaged OriginEndpoint for consumption.</p>
1359    #[serde(rename = "Url")]
1360    #[serde(skip_serializing_if = "Option::is_none")]
1361    pub url: Option<String>,
1362    /// <p>A list of source IP CIDR blocks that will be allowed to access the OriginEndpoint.</p>
1363    #[serde(rename = "Whitelist")]
1364    #[serde(skip_serializing_if = "Option::is_none")]
1365    pub whitelist: Option<Vec<String>>,
1366}
1367
1368/// Errors returned by CreateChannel
1369#[derive(Debug, PartialEq)]
1370pub enum CreateChannelError {
1371    /// <p>The client is not authorized to access the requested resource.</p>
1372    Forbidden(String),
1373    /// <p>An unexpected error occurred.</p>
1374    InternalServerError(String),
1375    /// <p>The requested resource does not exist.</p>
1376    NotFound(String),
1377    /// <p>An unexpected error occurred.</p>
1378    ServiceUnavailable(String),
1379    /// <p>The client has exceeded their resource or throttling limits.</p>
1380    TooManyRequests(String),
1381    /// <p>The parameters sent in the request are not valid.</p>
1382    UnprocessableEntity(String),
1383}
1384
1385impl CreateChannelError {
1386    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateChannelError> {
1387        if let Some(err) = proto::json::Error::parse_rest(&res) {
1388            match err.typ.as_str() {
1389                "ForbiddenException" => {
1390                    return RusotoError::Service(CreateChannelError::Forbidden(err.msg))
1391                }
1392                "InternalServerErrorException" => {
1393                    return RusotoError::Service(CreateChannelError::InternalServerError(err.msg))
1394                }
1395                "NotFoundException" => {
1396                    return RusotoError::Service(CreateChannelError::NotFound(err.msg))
1397                }
1398                "ServiceUnavailableException" => {
1399                    return RusotoError::Service(CreateChannelError::ServiceUnavailable(err.msg))
1400                }
1401                "TooManyRequestsException" => {
1402                    return RusotoError::Service(CreateChannelError::TooManyRequests(err.msg))
1403                }
1404                "UnprocessableEntityException" => {
1405                    return RusotoError::Service(CreateChannelError::UnprocessableEntity(err.msg))
1406                }
1407                "ValidationException" => return RusotoError::Validation(err.msg),
1408                _ => {}
1409            }
1410        }
1411        RusotoError::Unknown(res)
1412    }
1413}
1414impl fmt::Display for CreateChannelError {
1415    #[allow(unused_variables)]
1416    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1417        match *self {
1418            CreateChannelError::Forbidden(ref cause) => write!(f, "{}", cause),
1419            CreateChannelError::InternalServerError(ref cause) => write!(f, "{}", cause),
1420            CreateChannelError::NotFound(ref cause) => write!(f, "{}", cause),
1421            CreateChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1422            CreateChannelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1423            CreateChannelError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1424        }
1425    }
1426}
1427impl Error for CreateChannelError {}
1428/// Errors returned by CreateHarvestJob
1429#[derive(Debug, PartialEq)]
1430pub enum CreateHarvestJobError {
1431    /// <p>The client is not authorized to access the requested resource.</p>
1432    Forbidden(String),
1433    /// <p>An unexpected error occurred.</p>
1434    InternalServerError(String),
1435    /// <p>The requested resource does not exist.</p>
1436    NotFound(String),
1437    /// <p>An unexpected error occurred.</p>
1438    ServiceUnavailable(String),
1439    /// <p>The client has exceeded their resource or throttling limits.</p>
1440    TooManyRequests(String),
1441    /// <p>The parameters sent in the request are not valid.</p>
1442    UnprocessableEntity(String),
1443}
1444
1445impl CreateHarvestJobError {
1446    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateHarvestJobError> {
1447        if let Some(err) = proto::json::Error::parse_rest(&res) {
1448            match err.typ.as_str() {
1449                "ForbiddenException" => {
1450                    return RusotoError::Service(CreateHarvestJobError::Forbidden(err.msg))
1451                }
1452                "InternalServerErrorException" => {
1453                    return RusotoError::Service(CreateHarvestJobError::InternalServerError(
1454                        err.msg,
1455                    ))
1456                }
1457                "NotFoundException" => {
1458                    return RusotoError::Service(CreateHarvestJobError::NotFound(err.msg))
1459                }
1460                "ServiceUnavailableException" => {
1461                    return RusotoError::Service(CreateHarvestJobError::ServiceUnavailable(err.msg))
1462                }
1463                "TooManyRequestsException" => {
1464                    return RusotoError::Service(CreateHarvestJobError::TooManyRequests(err.msg))
1465                }
1466                "UnprocessableEntityException" => {
1467                    return RusotoError::Service(CreateHarvestJobError::UnprocessableEntity(
1468                        err.msg,
1469                    ))
1470                }
1471                "ValidationException" => return RusotoError::Validation(err.msg),
1472                _ => {}
1473            }
1474        }
1475        RusotoError::Unknown(res)
1476    }
1477}
1478impl fmt::Display for CreateHarvestJobError {
1479    #[allow(unused_variables)]
1480    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1481        match *self {
1482            CreateHarvestJobError::Forbidden(ref cause) => write!(f, "{}", cause),
1483            CreateHarvestJobError::InternalServerError(ref cause) => write!(f, "{}", cause),
1484            CreateHarvestJobError::NotFound(ref cause) => write!(f, "{}", cause),
1485            CreateHarvestJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1486            CreateHarvestJobError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1487            CreateHarvestJobError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1488        }
1489    }
1490}
1491impl Error for CreateHarvestJobError {}
1492/// Errors returned by CreateOriginEndpoint
1493#[derive(Debug, PartialEq)]
1494pub enum CreateOriginEndpointError {
1495    /// <p>The client is not authorized to access the requested resource.</p>
1496    Forbidden(String),
1497    /// <p>An unexpected error occurred.</p>
1498    InternalServerError(String),
1499    /// <p>The requested resource does not exist.</p>
1500    NotFound(String),
1501    /// <p>An unexpected error occurred.</p>
1502    ServiceUnavailable(String),
1503    /// <p>The client has exceeded their resource or throttling limits.</p>
1504    TooManyRequests(String),
1505    /// <p>The parameters sent in the request are not valid.</p>
1506    UnprocessableEntity(String),
1507}
1508
1509impl CreateOriginEndpointError {
1510    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateOriginEndpointError> {
1511        if let Some(err) = proto::json::Error::parse_rest(&res) {
1512            match err.typ.as_str() {
1513                "ForbiddenException" => {
1514                    return RusotoError::Service(CreateOriginEndpointError::Forbidden(err.msg))
1515                }
1516                "InternalServerErrorException" => {
1517                    return RusotoError::Service(CreateOriginEndpointError::InternalServerError(
1518                        err.msg,
1519                    ))
1520                }
1521                "NotFoundException" => {
1522                    return RusotoError::Service(CreateOriginEndpointError::NotFound(err.msg))
1523                }
1524                "ServiceUnavailableException" => {
1525                    return RusotoError::Service(CreateOriginEndpointError::ServiceUnavailable(
1526                        err.msg,
1527                    ))
1528                }
1529                "TooManyRequestsException" => {
1530                    return RusotoError::Service(CreateOriginEndpointError::TooManyRequests(
1531                        err.msg,
1532                    ))
1533                }
1534                "UnprocessableEntityException" => {
1535                    return RusotoError::Service(CreateOriginEndpointError::UnprocessableEntity(
1536                        err.msg,
1537                    ))
1538                }
1539                "ValidationException" => return RusotoError::Validation(err.msg),
1540                _ => {}
1541            }
1542        }
1543        RusotoError::Unknown(res)
1544    }
1545}
1546impl fmt::Display for CreateOriginEndpointError {
1547    #[allow(unused_variables)]
1548    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1549        match *self {
1550            CreateOriginEndpointError::Forbidden(ref cause) => write!(f, "{}", cause),
1551            CreateOriginEndpointError::InternalServerError(ref cause) => write!(f, "{}", cause),
1552            CreateOriginEndpointError::NotFound(ref cause) => write!(f, "{}", cause),
1553            CreateOriginEndpointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1554            CreateOriginEndpointError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1555            CreateOriginEndpointError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1556        }
1557    }
1558}
1559impl Error for CreateOriginEndpointError {}
1560/// Errors returned by DeleteChannel
1561#[derive(Debug, PartialEq)]
1562pub enum DeleteChannelError {
1563    /// <p>The client is not authorized to access the requested resource.</p>
1564    Forbidden(String),
1565    /// <p>An unexpected error occurred.</p>
1566    InternalServerError(String),
1567    /// <p>The requested resource does not exist.</p>
1568    NotFound(String),
1569    /// <p>An unexpected error occurred.</p>
1570    ServiceUnavailable(String),
1571    /// <p>The client has exceeded their resource or throttling limits.</p>
1572    TooManyRequests(String),
1573    /// <p>The parameters sent in the request are not valid.</p>
1574    UnprocessableEntity(String),
1575}
1576
1577impl DeleteChannelError {
1578    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteChannelError> {
1579        if let Some(err) = proto::json::Error::parse_rest(&res) {
1580            match err.typ.as_str() {
1581                "ForbiddenException" => {
1582                    return RusotoError::Service(DeleteChannelError::Forbidden(err.msg))
1583                }
1584                "InternalServerErrorException" => {
1585                    return RusotoError::Service(DeleteChannelError::InternalServerError(err.msg))
1586                }
1587                "NotFoundException" => {
1588                    return RusotoError::Service(DeleteChannelError::NotFound(err.msg))
1589                }
1590                "ServiceUnavailableException" => {
1591                    return RusotoError::Service(DeleteChannelError::ServiceUnavailable(err.msg))
1592                }
1593                "TooManyRequestsException" => {
1594                    return RusotoError::Service(DeleteChannelError::TooManyRequests(err.msg))
1595                }
1596                "UnprocessableEntityException" => {
1597                    return RusotoError::Service(DeleteChannelError::UnprocessableEntity(err.msg))
1598                }
1599                "ValidationException" => return RusotoError::Validation(err.msg),
1600                _ => {}
1601            }
1602        }
1603        RusotoError::Unknown(res)
1604    }
1605}
1606impl fmt::Display for DeleteChannelError {
1607    #[allow(unused_variables)]
1608    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1609        match *self {
1610            DeleteChannelError::Forbidden(ref cause) => write!(f, "{}", cause),
1611            DeleteChannelError::InternalServerError(ref cause) => write!(f, "{}", cause),
1612            DeleteChannelError::NotFound(ref cause) => write!(f, "{}", cause),
1613            DeleteChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1614            DeleteChannelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1615            DeleteChannelError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1616        }
1617    }
1618}
1619impl Error for DeleteChannelError {}
1620/// Errors returned by DeleteOriginEndpoint
1621#[derive(Debug, PartialEq)]
1622pub enum DeleteOriginEndpointError {
1623    /// <p>The client is not authorized to access the requested resource.</p>
1624    Forbidden(String),
1625    /// <p>An unexpected error occurred.</p>
1626    InternalServerError(String),
1627    /// <p>The requested resource does not exist.</p>
1628    NotFound(String),
1629    /// <p>An unexpected error occurred.</p>
1630    ServiceUnavailable(String),
1631    /// <p>The client has exceeded their resource or throttling limits.</p>
1632    TooManyRequests(String),
1633    /// <p>The parameters sent in the request are not valid.</p>
1634    UnprocessableEntity(String),
1635}
1636
1637impl DeleteOriginEndpointError {
1638    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteOriginEndpointError> {
1639        if let Some(err) = proto::json::Error::parse_rest(&res) {
1640            match err.typ.as_str() {
1641                "ForbiddenException" => {
1642                    return RusotoError::Service(DeleteOriginEndpointError::Forbidden(err.msg))
1643                }
1644                "InternalServerErrorException" => {
1645                    return RusotoError::Service(DeleteOriginEndpointError::InternalServerError(
1646                        err.msg,
1647                    ))
1648                }
1649                "NotFoundException" => {
1650                    return RusotoError::Service(DeleteOriginEndpointError::NotFound(err.msg))
1651                }
1652                "ServiceUnavailableException" => {
1653                    return RusotoError::Service(DeleteOriginEndpointError::ServiceUnavailable(
1654                        err.msg,
1655                    ))
1656                }
1657                "TooManyRequestsException" => {
1658                    return RusotoError::Service(DeleteOriginEndpointError::TooManyRequests(
1659                        err.msg,
1660                    ))
1661                }
1662                "UnprocessableEntityException" => {
1663                    return RusotoError::Service(DeleteOriginEndpointError::UnprocessableEntity(
1664                        err.msg,
1665                    ))
1666                }
1667                "ValidationException" => return RusotoError::Validation(err.msg),
1668                _ => {}
1669            }
1670        }
1671        RusotoError::Unknown(res)
1672    }
1673}
1674impl fmt::Display for DeleteOriginEndpointError {
1675    #[allow(unused_variables)]
1676    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1677        match *self {
1678            DeleteOriginEndpointError::Forbidden(ref cause) => write!(f, "{}", cause),
1679            DeleteOriginEndpointError::InternalServerError(ref cause) => write!(f, "{}", cause),
1680            DeleteOriginEndpointError::NotFound(ref cause) => write!(f, "{}", cause),
1681            DeleteOriginEndpointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1682            DeleteOriginEndpointError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1683            DeleteOriginEndpointError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1684        }
1685    }
1686}
1687impl Error for DeleteOriginEndpointError {}
1688/// Errors returned by DescribeChannel
1689#[derive(Debug, PartialEq)]
1690pub enum DescribeChannelError {
1691    /// <p>The client is not authorized to access the requested resource.</p>
1692    Forbidden(String),
1693    /// <p>An unexpected error occurred.</p>
1694    InternalServerError(String),
1695    /// <p>The requested resource does not exist.</p>
1696    NotFound(String),
1697    /// <p>An unexpected error occurred.</p>
1698    ServiceUnavailable(String),
1699    /// <p>The client has exceeded their resource or throttling limits.</p>
1700    TooManyRequests(String),
1701    /// <p>The parameters sent in the request are not valid.</p>
1702    UnprocessableEntity(String),
1703}
1704
1705impl DescribeChannelError {
1706    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeChannelError> {
1707        if let Some(err) = proto::json::Error::parse_rest(&res) {
1708            match err.typ.as_str() {
1709                "ForbiddenException" => {
1710                    return RusotoError::Service(DescribeChannelError::Forbidden(err.msg))
1711                }
1712                "InternalServerErrorException" => {
1713                    return RusotoError::Service(DescribeChannelError::InternalServerError(err.msg))
1714                }
1715                "NotFoundException" => {
1716                    return RusotoError::Service(DescribeChannelError::NotFound(err.msg))
1717                }
1718                "ServiceUnavailableException" => {
1719                    return RusotoError::Service(DescribeChannelError::ServiceUnavailable(err.msg))
1720                }
1721                "TooManyRequestsException" => {
1722                    return RusotoError::Service(DescribeChannelError::TooManyRequests(err.msg))
1723                }
1724                "UnprocessableEntityException" => {
1725                    return RusotoError::Service(DescribeChannelError::UnprocessableEntity(err.msg))
1726                }
1727                "ValidationException" => return RusotoError::Validation(err.msg),
1728                _ => {}
1729            }
1730        }
1731        RusotoError::Unknown(res)
1732    }
1733}
1734impl fmt::Display for DescribeChannelError {
1735    #[allow(unused_variables)]
1736    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1737        match *self {
1738            DescribeChannelError::Forbidden(ref cause) => write!(f, "{}", cause),
1739            DescribeChannelError::InternalServerError(ref cause) => write!(f, "{}", cause),
1740            DescribeChannelError::NotFound(ref cause) => write!(f, "{}", cause),
1741            DescribeChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1742            DescribeChannelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1743            DescribeChannelError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1744        }
1745    }
1746}
1747impl Error for DescribeChannelError {}
1748/// Errors returned by DescribeHarvestJob
1749#[derive(Debug, PartialEq)]
1750pub enum DescribeHarvestJobError {
1751    /// <p>The client is not authorized to access the requested resource.</p>
1752    Forbidden(String),
1753    /// <p>An unexpected error occurred.</p>
1754    InternalServerError(String),
1755    /// <p>The requested resource does not exist.</p>
1756    NotFound(String),
1757    /// <p>An unexpected error occurred.</p>
1758    ServiceUnavailable(String),
1759    /// <p>The client has exceeded their resource or throttling limits.</p>
1760    TooManyRequests(String),
1761    /// <p>The parameters sent in the request are not valid.</p>
1762    UnprocessableEntity(String),
1763}
1764
1765impl DescribeHarvestJobError {
1766    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeHarvestJobError> {
1767        if let Some(err) = proto::json::Error::parse_rest(&res) {
1768            match err.typ.as_str() {
1769                "ForbiddenException" => {
1770                    return RusotoError::Service(DescribeHarvestJobError::Forbidden(err.msg))
1771                }
1772                "InternalServerErrorException" => {
1773                    return RusotoError::Service(DescribeHarvestJobError::InternalServerError(
1774                        err.msg,
1775                    ))
1776                }
1777                "NotFoundException" => {
1778                    return RusotoError::Service(DescribeHarvestJobError::NotFound(err.msg))
1779                }
1780                "ServiceUnavailableException" => {
1781                    return RusotoError::Service(DescribeHarvestJobError::ServiceUnavailable(
1782                        err.msg,
1783                    ))
1784                }
1785                "TooManyRequestsException" => {
1786                    return RusotoError::Service(DescribeHarvestJobError::TooManyRequests(err.msg))
1787                }
1788                "UnprocessableEntityException" => {
1789                    return RusotoError::Service(DescribeHarvestJobError::UnprocessableEntity(
1790                        err.msg,
1791                    ))
1792                }
1793                "ValidationException" => return RusotoError::Validation(err.msg),
1794                _ => {}
1795            }
1796        }
1797        RusotoError::Unknown(res)
1798    }
1799}
1800impl fmt::Display for DescribeHarvestJobError {
1801    #[allow(unused_variables)]
1802    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1803        match *self {
1804            DescribeHarvestJobError::Forbidden(ref cause) => write!(f, "{}", cause),
1805            DescribeHarvestJobError::InternalServerError(ref cause) => write!(f, "{}", cause),
1806            DescribeHarvestJobError::NotFound(ref cause) => write!(f, "{}", cause),
1807            DescribeHarvestJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1808            DescribeHarvestJobError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1809            DescribeHarvestJobError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1810        }
1811    }
1812}
1813impl Error for DescribeHarvestJobError {}
1814/// Errors returned by DescribeOriginEndpoint
1815#[derive(Debug, PartialEq)]
1816pub enum DescribeOriginEndpointError {
1817    /// <p>The client is not authorized to access the requested resource.</p>
1818    Forbidden(String),
1819    /// <p>An unexpected error occurred.</p>
1820    InternalServerError(String),
1821    /// <p>The requested resource does not exist.</p>
1822    NotFound(String),
1823    /// <p>An unexpected error occurred.</p>
1824    ServiceUnavailable(String),
1825    /// <p>The client has exceeded their resource or throttling limits.</p>
1826    TooManyRequests(String),
1827    /// <p>The parameters sent in the request are not valid.</p>
1828    UnprocessableEntity(String),
1829}
1830
1831impl DescribeOriginEndpointError {
1832    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeOriginEndpointError> {
1833        if let Some(err) = proto::json::Error::parse_rest(&res) {
1834            match err.typ.as_str() {
1835                "ForbiddenException" => {
1836                    return RusotoError::Service(DescribeOriginEndpointError::Forbidden(err.msg))
1837                }
1838                "InternalServerErrorException" => {
1839                    return RusotoError::Service(DescribeOriginEndpointError::InternalServerError(
1840                        err.msg,
1841                    ))
1842                }
1843                "NotFoundException" => {
1844                    return RusotoError::Service(DescribeOriginEndpointError::NotFound(err.msg))
1845                }
1846                "ServiceUnavailableException" => {
1847                    return RusotoError::Service(DescribeOriginEndpointError::ServiceUnavailable(
1848                        err.msg,
1849                    ))
1850                }
1851                "TooManyRequestsException" => {
1852                    return RusotoError::Service(DescribeOriginEndpointError::TooManyRequests(
1853                        err.msg,
1854                    ))
1855                }
1856                "UnprocessableEntityException" => {
1857                    return RusotoError::Service(DescribeOriginEndpointError::UnprocessableEntity(
1858                        err.msg,
1859                    ))
1860                }
1861                "ValidationException" => return RusotoError::Validation(err.msg),
1862                _ => {}
1863            }
1864        }
1865        RusotoError::Unknown(res)
1866    }
1867}
1868impl fmt::Display for DescribeOriginEndpointError {
1869    #[allow(unused_variables)]
1870    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1871        match *self {
1872            DescribeOriginEndpointError::Forbidden(ref cause) => write!(f, "{}", cause),
1873            DescribeOriginEndpointError::InternalServerError(ref cause) => write!(f, "{}", cause),
1874            DescribeOriginEndpointError::NotFound(ref cause) => write!(f, "{}", cause),
1875            DescribeOriginEndpointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1876            DescribeOriginEndpointError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1877            DescribeOriginEndpointError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1878        }
1879    }
1880}
1881impl Error for DescribeOriginEndpointError {}
1882/// Errors returned by ListChannels
1883#[derive(Debug, PartialEq)]
1884pub enum ListChannelsError {
1885    /// <p>The client is not authorized to access the requested resource.</p>
1886    Forbidden(String),
1887    /// <p>An unexpected error occurred.</p>
1888    InternalServerError(String),
1889    /// <p>The requested resource does not exist.</p>
1890    NotFound(String),
1891    /// <p>An unexpected error occurred.</p>
1892    ServiceUnavailable(String),
1893    /// <p>The client has exceeded their resource or throttling limits.</p>
1894    TooManyRequests(String),
1895    /// <p>The parameters sent in the request are not valid.</p>
1896    UnprocessableEntity(String),
1897}
1898
1899impl ListChannelsError {
1900    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListChannelsError> {
1901        if let Some(err) = proto::json::Error::parse_rest(&res) {
1902            match err.typ.as_str() {
1903                "ForbiddenException" => {
1904                    return RusotoError::Service(ListChannelsError::Forbidden(err.msg))
1905                }
1906                "InternalServerErrorException" => {
1907                    return RusotoError::Service(ListChannelsError::InternalServerError(err.msg))
1908                }
1909                "NotFoundException" => {
1910                    return RusotoError::Service(ListChannelsError::NotFound(err.msg))
1911                }
1912                "ServiceUnavailableException" => {
1913                    return RusotoError::Service(ListChannelsError::ServiceUnavailable(err.msg))
1914                }
1915                "TooManyRequestsException" => {
1916                    return RusotoError::Service(ListChannelsError::TooManyRequests(err.msg))
1917                }
1918                "UnprocessableEntityException" => {
1919                    return RusotoError::Service(ListChannelsError::UnprocessableEntity(err.msg))
1920                }
1921                "ValidationException" => return RusotoError::Validation(err.msg),
1922                _ => {}
1923            }
1924        }
1925        RusotoError::Unknown(res)
1926    }
1927}
1928impl fmt::Display for ListChannelsError {
1929    #[allow(unused_variables)]
1930    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1931        match *self {
1932            ListChannelsError::Forbidden(ref cause) => write!(f, "{}", cause),
1933            ListChannelsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1934            ListChannelsError::NotFound(ref cause) => write!(f, "{}", cause),
1935            ListChannelsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1936            ListChannelsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1937            ListChannelsError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1938        }
1939    }
1940}
1941impl Error for ListChannelsError {}
1942/// Errors returned by ListHarvestJobs
1943#[derive(Debug, PartialEq)]
1944pub enum ListHarvestJobsError {
1945    /// <p>The client is not authorized to access the requested resource.</p>
1946    Forbidden(String),
1947    /// <p>An unexpected error occurred.</p>
1948    InternalServerError(String),
1949    /// <p>The requested resource does not exist.</p>
1950    NotFound(String),
1951    /// <p>An unexpected error occurred.</p>
1952    ServiceUnavailable(String),
1953    /// <p>The client has exceeded their resource or throttling limits.</p>
1954    TooManyRequests(String),
1955    /// <p>The parameters sent in the request are not valid.</p>
1956    UnprocessableEntity(String),
1957}
1958
1959impl ListHarvestJobsError {
1960    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListHarvestJobsError> {
1961        if let Some(err) = proto::json::Error::parse_rest(&res) {
1962            match err.typ.as_str() {
1963                "ForbiddenException" => {
1964                    return RusotoError::Service(ListHarvestJobsError::Forbidden(err.msg))
1965                }
1966                "InternalServerErrorException" => {
1967                    return RusotoError::Service(ListHarvestJobsError::InternalServerError(err.msg))
1968                }
1969                "NotFoundException" => {
1970                    return RusotoError::Service(ListHarvestJobsError::NotFound(err.msg))
1971                }
1972                "ServiceUnavailableException" => {
1973                    return RusotoError::Service(ListHarvestJobsError::ServiceUnavailable(err.msg))
1974                }
1975                "TooManyRequestsException" => {
1976                    return RusotoError::Service(ListHarvestJobsError::TooManyRequests(err.msg))
1977                }
1978                "UnprocessableEntityException" => {
1979                    return RusotoError::Service(ListHarvestJobsError::UnprocessableEntity(err.msg))
1980                }
1981                "ValidationException" => return RusotoError::Validation(err.msg),
1982                _ => {}
1983            }
1984        }
1985        RusotoError::Unknown(res)
1986    }
1987}
1988impl fmt::Display for ListHarvestJobsError {
1989    #[allow(unused_variables)]
1990    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1991        match *self {
1992            ListHarvestJobsError::Forbidden(ref cause) => write!(f, "{}", cause),
1993            ListHarvestJobsError::InternalServerError(ref cause) => write!(f, "{}", cause),
1994            ListHarvestJobsError::NotFound(ref cause) => write!(f, "{}", cause),
1995            ListHarvestJobsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1996            ListHarvestJobsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
1997            ListHarvestJobsError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
1998        }
1999    }
2000}
2001impl Error for ListHarvestJobsError {}
2002/// Errors returned by ListOriginEndpoints
2003#[derive(Debug, PartialEq)]
2004pub enum ListOriginEndpointsError {
2005    /// <p>The client is not authorized to access the requested resource.</p>
2006    Forbidden(String),
2007    /// <p>An unexpected error occurred.</p>
2008    InternalServerError(String),
2009    /// <p>The requested resource does not exist.</p>
2010    NotFound(String),
2011    /// <p>An unexpected error occurred.</p>
2012    ServiceUnavailable(String),
2013    /// <p>The client has exceeded their resource or throttling limits.</p>
2014    TooManyRequests(String),
2015    /// <p>The parameters sent in the request are not valid.</p>
2016    UnprocessableEntity(String),
2017}
2018
2019impl ListOriginEndpointsError {
2020    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListOriginEndpointsError> {
2021        if let Some(err) = proto::json::Error::parse_rest(&res) {
2022            match err.typ.as_str() {
2023                "ForbiddenException" => {
2024                    return RusotoError::Service(ListOriginEndpointsError::Forbidden(err.msg))
2025                }
2026                "InternalServerErrorException" => {
2027                    return RusotoError::Service(ListOriginEndpointsError::InternalServerError(
2028                        err.msg,
2029                    ))
2030                }
2031                "NotFoundException" => {
2032                    return RusotoError::Service(ListOriginEndpointsError::NotFound(err.msg))
2033                }
2034                "ServiceUnavailableException" => {
2035                    return RusotoError::Service(ListOriginEndpointsError::ServiceUnavailable(
2036                        err.msg,
2037                    ))
2038                }
2039                "TooManyRequestsException" => {
2040                    return RusotoError::Service(ListOriginEndpointsError::TooManyRequests(err.msg))
2041                }
2042                "UnprocessableEntityException" => {
2043                    return RusotoError::Service(ListOriginEndpointsError::UnprocessableEntity(
2044                        err.msg,
2045                    ))
2046                }
2047                "ValidationException" => return RusotoError::Validation(err.msg),
2048                _ => {}
2049            }
2050        }
2051        RusotoError::Unknown(res)
2052    }
2053}
2054impl fmt::Display for ListOriginEndpointsError {
2055    #[allow(unused_variables)]
2056    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2057        match *self {
2058            ListOriginEndpointsError::Forbidden(ref cause) => write!(f, "{}", cause),
2059            ListOriginEndpointsError::InternalServerError(ref cause) => write!(f, "{}", cause),
2060            ListOriginEndpointsError::NotFound(ref cause) => write!(f, "{}", cause),
2061            ListOriginEndpointsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2062            ListOriginEndpointsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2063            ListOriginEndpointsError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
2064        }
2065    }
2066}
2067impl Error for ListOriginEndpointsError {}
2068/// Errors returned by ListTagsForResource
2069#[derive(Debug, PartialEq)]
2070pub enum ListTagsForResourceError {}
2071
2072impl ListTagsForResourceError {
2073    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
2074        if let Some(err) = proto::json::Error::parse_rest(&res) {
2075            match err.typ.as_str() {
2076                "ValidationException" => return RusotoError::Validation(err.msg),
2077                _ => {}
2078            }
2079        }
2080        RusotoError::Unknown(res)
2081    }
2082}
2083impl fmt::Display for ListTagsForResourceError {
2084    #[allow(unused_variables)]
2085    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2086        match *self {}
2087    }
2088}
2089impl Error for ListTagsForResourceError {}
2090/// Errors returned by RotateChannelCredentials
2091#[derive(Debug, PartialEq)]
2092pub enum RotateChannelCredentialsError {
2093    /// <p>The client is not authorized to access the requested resource.</p>
2094    Forbidden(String),
2095    /// <p>An unexpected error occurred.</p>
2096    InternalServerError(String),
2097    /// <p>The requested resource does not exist.</p>
2098    NotFound(String),
2099    /// <p>An unexpected error occurred.</p>
2100    ServiceUnavailable(String),
2101    /// <p>The client has exceeded their resource or throttling limits.</p>
2102    TooManyRequests(String),
2103    /// <p>The parameters sent in the request are not valid.</p>
2104    UnprocessableEntity(String),
2105}
2106
2107impl RotateChannelCredentialsError {
2108    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RotateChannelCredentialsError> {
2109        if let Some(err) = proto::json::Error::parse_rest(&res) {
2110            match err.typ.as_str() {
2111                "ForbiddenException" => {
2112                    return RusotoError::Service(RotateChannelCredentialsError::Forbidden(err.msg))
2113                }
2114                "InternalServerErrorException" => {
2115                    return RusotoError::Service(
2116                        RotateChannelCredentialsError::InternalServerError(err.msg),
2117                    )
2118                }
2119                "NotFoundException" => {
2120                    return RusotoError::Service(RotateChannelCredentialsError::NotFound(err.msg))
2121                }
2122                "ServiceUnavailableException" => {
2123                    return RusotoError::Service(RotateChannelCredentialsError::ServiceUnavailable(
2124                        err.msg,
2125                    ))
2126                }
2127                "TooManyRequestsException" => {
2128                    return RusotoError::Service(RotateChannelCredentialsError::TooManyRequests(
2129                        err.msg,
2130                    ))
2131                }
2132                "UnprocessableEntityException" => {
2133                    return RusotoError::Service(
2134                        RotateChannelCredentialsError::UnprocessableEntity(err.msg),
2135                    )
2136                }
2137                "ValidationException" => return RusotoError::Validation(err.msg),
2138                _ => {}
2139            }
2140        }
2141        RusotoError::Unknown(res)
2142    }
2143}
2144impl fmt::Display for RotateChannelCredentialsError {
2145    #[allow(unused_variables)]
2146    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2147        match *self {
2148            RotateChannelCredentialsError::Forbidden(ref cause) => write!(f, "{}", cause),
2149            RotateChannelCredentialsError::InternalServerError(ref cause) => write!(f, "{}", cause),
2150            RotateChannelCredentialsError::NotFound(ref cause) => write!(f, "{}", cause),
2151            RotateChannelCredentialsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2152            RotateChannelCredentialsError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2153            RotateChannelCredentialsError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
2154        }
2155    }
2156}
2157impl Error for RotateChannelCredentialsError {}
2158/// Errors returned by RotateIngestEndpointCredentials
2159#[derive(Debug, PartialEq)]
2160pub enum RotateIngestEndpointCredentialsError {
2161    /// <p>The client is not authorized to access the requested resource.</p>
2162    Forbidden(String),
2163    /// <p>An unexpected error occurred.</p>
2164    InternalServerError(String),
2165    /// <p>The requested resource does not exist.</p>
2166    NotFound(String),
2167    /// <p>An unexpected error occurred.</p>
2168    ServiceUnavailable(String),
2169    /// <p>The client has exceeded their resource or throttling limits.</p>
2170    TooManyRequests(String),
2171    /// <p>The parameters sent in the request are not valid.</p>
2172    UnprocessableEntity(String),
2173}
2174
2175impl RotateIngestEndpointCredentialsError {
2176    pub fn from_response(
2177        res: BufferedHttpResponse,
2178    ) -> RusotoError<RotateIngestEndpointCredentialsError> {
2179        if let Some(err) = proto::json::Error::parse_rest(&res) {
2180            match err.typ.as_str() {
2181                "ForbiddenException" => {
2182                    return RusotoError::Service(RotateIngestEndpointCredentialsError::Forbidden(
2183                        err.msg,
2184                    ))
2185                }
2186                "InternalServerErrorException" => {
2187                    return RusotoError::Service(
2188                        RotateIngestEndpointCredentialsError::InternalServerError(err.msg),
2189                    )
2190                }
2191                "NotFoundException" => {
2192                    return RusotoError::Service(RotateIngestEndpointCredentialsError::NotFound(
2193                        err.msg,
2194                    ))
2195                }
2196                "ServiceUnavailableException" => {
2197                    return RusotoError::Service(
2198                        RotateIngestEndpointCredentialsError::ServiceUnavailable(err.msg),
2199                    )
2200                }
2201                "TooManyRequestsException" => {
2202                    return RusotoError::Service(
2203                        RotateIngestEndpointCredentialsError::TooManyRequests(err.msg),
2204                    )
2205                }
2206                "UnprocessableEntityException" => {
2207                    return RusotoError::Service(
2208                        RotateIngestEndpointCredentialsError::UnprocessableEntity(err.msg),
2209                    )
2210                }
2211                "ValidationException" => return RusotoError::Validation(err.msg),
2212                _ => {}
2213            }
2214        }
2215        RusotoError::Unknown(res)
2216    }
2217}
2218impl fmt::Display for RotateIngestEndpointCredentialsError {
2219    #[allow(unused_variables)]
2220    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2221        match *self {
2222            RotateIngestEndpointCredentialsError::Forbidden(ref cause) => write!(f, "{}", cause),
2223            RotateIngestEndpointCredentialsError::InternalServerError(ref cause) => {
2224                write!(f, "{}", cause)
2225            }
2226            RotateIngestEndpointCredentialsError::NotFound(ref cause) => write!(f, "{}", cause),
2227            RotateIngestEndpointCredentialsError::ServiceUnavailable(ref cause) => {
2228                write!(f, "{}", cause)
2229            }
2230            RotateIngestEndpointCredentialsError::TooManyRequests(ref cause) => {
2231                write!(f, "{}", cause)
2232            }
2233            RotateIngestEndpointCredentialsError::UnprocessableEntity(ref cause) => {
2234                write!(f, "{}", cause)
2235            }
2236        }
2237    }
2238}
2239impl Error for RotateIngestEndpointCredentialsError {}
2240/// Errors returned by TagResource
2241#[derive(Debug, PartialEq)]
2242pub enum TagResourceError {}
2243
2244impl TagResourceError {
2245    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2246        if let Some(err) = proto::json::Error::parse_rest(&res) {
2247            match err.typ.as_str() {
2248                "ValidationException" => return RusotoError::Validation(err.msg),
2249                _ => {}
2250            }
2251        }
2252        RusotoError::Unknown(res)
2253    }
2254}
2255impl fmt::Display for TagResourceError {
2256    #[allow(unused_variables)]
2257    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2258        match *self {}
2259    }
2260}
2261impl Error for TagResourceError {}
2262/// Errors returned by UntagResource
2263#[derive(Debug, PartialEq)]
2264pub enum UntagResourceError {}
2265
2266impl UntagResourceError {
2267    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2268        if let Some(err) = proto::json::Error::parse_rest(&res) {
2269            match err.typ.as_str() {
2270                "ValidationException" => return RusotoError::Validation(err.msg),
2271                _ => {}
2272            }
2273        }
2274        RusotoError::Unknown(res)
2275    }
2276}
2277impl fmt::Display for UntagResourceError {
2278    #[allow(unused_variables)]
2279    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2280        match *self {}
2281    }
2282}
2283impl Error for UntagResourceError {}
2284/// Errors returned by UpdateChannel
2285#[derive(Debug, PartialEq)]
2286pub enum UpdateChannelError {
2287    /// <p>The client is not authorized to access the requested resource.</p>
2288    Forbidden(String),
2289    /// <p>An unexpected error occurred.</p>
2290    InternalServerError(String),
2291    /// <p>The requested resource does not exist.</p>
2292    NotFound(String),
2293    /// <p>An unexpected error occurred.</p>
2294    ServiceUnavailable(String),
2295    /// <p>The client has exceeded their resource or throttling limits.</p>
2296    TooManyRequests(String),
2297    /// <p>The parameters sent in the request are not valid.</p>
2298    UnprocessableEntity(String),
2299}
2300
2301impl UpdateChannelError {
2302    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateChannelError> {
2303        if let Some(err) = proto::json::Error::parse_rest(&res) {
2304            match err.typ.as_str() {
2305                "ForbiddenException" => {
2306                    return RusotoError::Service(UpdateChannelError::Forbidden(err.msg))
2307                }
2308                "InternalServerErrorException" => {
2309                    return RusotoError::Service(UpdateChannelError::InternalServerError(err.msg))
2310                }
2311                "NotFoundException" => {
2312                    return RusotoError::Service(UpdateChannelError::NotFound(err.msg))
2313                }
2314                "ServiceUnavailableException" => {
2315                    return RusotoError::Service(UpdateChannelError::ServiceUnavailable(err.msg))
2316                }
2317                "TooManyRequestsException" => {
2318                    return RusotoError::Service(UpdateChannelError::TooManyRequests(err.msg))
2319                }
2320                "UnprocessableEntityException" => {
2321                    return RusotoError::Service(UpdateChannelError::UnprocessableEntity(err.msg))
2322                }
2323                "ValidationException" => return RusotoError::Validation(err.msg),
2324                _ => {}
2325            }
2326        }
2327        RusotoError::Unknown(res)
2328    }
2329}
2330impl fmt::Display for UpdateChannelError {
2331    #[allow(unused_variables)]
2332    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2333        match *self {
2334            UpdateChannelError::Forbidden(ref cause) => write!(f, "{}", cause),
2335            UpdateChannelError::InternalServerError(ref cause) => write!(f, "{}", cause),
2336            UpdateChannelError::NotFound(ref cause) => write!(f, "{}", cause),
2337            UpdateChannelError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2338            UpdateChannelError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2339            UpdateChannelError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
2340        }
2341    }
2342}
2343impl Error for UpdateChannelError {}
2344/// Errors returned by UpdateOriginEndpoint
2345#[derive(Debug, PartialEq)]
2346pub enum UpdateOriginEndpointError {
2347    /// <p>The client is not authorized to access the requested resource.</p>
2348    Forbidden(String),
2349    /// <p>An unexpected error occurred.</p>
2350    InternalServerError(String),
2351    /// <p>The requested resource does not exist.</p>
2352    NotFound(String),
2353    /// <p>An unexpected error occurred.</p>
2354    ServiceUnavailable(String),
2355    /// <p>The client has exceeded their resource or throttling limits.</p>
2356    TooManyRequests(String),
2357    /// <p>The parameters sent in the request are not valid.</p>
2358    UnprocessableEntity(String),
2359}
2360
2361impl UpdateOriginEndpointError {
2362    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateOriginEndpointError> {
2363        if let Some(err) = proto::json::Error::parse_rest(&res) {
2364            match err.typ.as_str() {
2365                "ForbiddenException" => {
2366                    return RusotoError::Service(UpdateOriginEndpointError::Forbidden(err.msg))
2367                }
2368                "InternalServerErrorException" => {
2369                    return RusotoError::Service(UpdateOriginEndpointError::InternalServerError(
2370                        err.msg,
2371                    ))
2372                }
2373                "NotFoundException" => {
2374                    return RusotoError::Service(UpdateOriginEndpointError::NotFound(err.msg))
2375                }
2376                "ServiceUnavailableException" => {
2377                    return RusotoError::Service(UpdateOriginEndpointError::ServiceUnavailable(
2378                        err.msg,
2379                    ))
2380                }
2381                "TooManyRequestsException" => {
2382                    return RusotoError::Service(UpdateOriginEndpointError::TooManyRequests(
2383                        err.msg,
2384                    ))
2385                }
2386                "UnprocessableEntityException" => {
2387                    return RusotoError::Service(UpdateOriginEndpointError::UnprocessableEntity(
2388                        err.msg,
2389                    ))
2390                }
2391                "ValidationException" => return RusotoError::Validation(err.msg),
2392                _ => {}
2393            }
2394        }
2395        RusotoError::Unknown(res)
2396    }
2397}
2398impl fmt::Display for UpdateOriginEndpointError {
2399    #[allow(unused_variables)]
2400    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2401        match *self {
2402            UpdateOriginEndpointError::Forbidden(ref cause) => write!(f, "{}", cause),
2403            UpdateOriginEndpointError::InternalServerError(ref cause) => write!(f, "{}", cause),
2404            UpdateOriginEndpointError::NotFound(ref cause) => write!(f, "{}", cause),
2405            UpdateOriginEndpointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2406            UpdateOriginEndpointError::TooManyRequests(ref cause) => write!(f, "{}", cause),
2407            UpdateOriginEndpointError::UnprocessableEntity(ref cause) => write!(f, "{}", cause),
2408        }
2409    }
2410}
2411impl Error for UpdateOriginEndpointError {}
2412/// Trait representing the capabilities of the MediaPackage API. MediaPackage clients implement this trait.
2413#[async_trait]
2414pub trait MediaPackage {
2415    /// <p>Creates a new Channel.</p>
2416    async fn create_channel(
2417        &self,
2418        input: CreateChannelRequest,
2419    ) -> Result<CreateChannelResponse, RusotoError<CreateChannelError>>;
2420
2421    /// <p>Creates a new HarvestJob record.</p>
2422    async fn create_harvest_job(
2423        &self,
2424        input: CreateHarvestJobRequest,
2425    ) -> Result<CreateHarvestJobResponse, RusotoError<CreateHarvestJobError>>;
2426
2427    /// <p>Creates a new OriginEndpoint record.</p>
2428    async fn create_origin_endpoint(
2429        &self,
2430        input: CreateOriginEndpointRequest,
2431    ) -> Result<CreateOriginEndpointResponse, RusotoError<CreateOriginEndpointError>>;
2432
2433    /// <p>Deletes an existing Channel.</p>
2434    async fn delete_channel(
2435        &self,
2436        input: DeleteChannelRequest,
2437    ) -> Result<DeleteChannelResponse, RusotoError<DeleteChannelError>>;
2438
2439    /// <p>Deletes an existing OriginEndpoint.</p>
2440    async fn delete_origin_endpoint(
2441        &self,
2442        input: DeleteOriginEndpointRequest,
2443    ) -> Result<DeleteOriginEndpointResponse, RusotoError<DeleteOriginEndpointError>>;
2444
2445    /// <p>Gets details about a Channel.</p>
2446    async fn describe_channel(
2447        &self,
2448        input: DescribeChannelRequest,
2449    ) -> Result<DescribeChannelResponse, RusotoError<DescribeChannelError>>;
2450
2451    /// <p>Gets details about an existing HarvestJob.</p>
2452    async fn describe_harvest_job(
2453        &self,
2454        input: DescribeHarvestJobRequest,
2455    ) -> Result<DescribeHarvestJobResponse, RusotoError<DescribeHarvestJobError>>;
2456
2457    /// <p>Gets details about an existing OriginEndpoint.</p>
2458    async fn describe_origin_endpoint(
2459        &self,
2460        input: DescribeOriginEndpointRequest,
2461    ) -> Result<DescribeOriginEndpointResponse, RusotoError<DescribeOriginEndpointError>>;
2462
2463    /// <p>Returns a collection of Channels.</p>
2464    async fn list_channels(
2465        &self,
2466        input: ListChannelsRequest,
2467    ) -> Result<ListChannelsResponse, RusotoError<ListChannelsError>>;
2468
2469    /// <p>Returns a collection of HarvestJob records.</p>
2470    async fn list_harvest_jobs(
2471        &self,
2472        input: ListHarvestJobsRequest,
2473    ) -> Result<ListHarvestJobsResponse, RusotoError<ListHarvestJobsError>>;
2474
2475    /// <p>Returns a collection of OriginEndpoint records.</p>
2476    async fn list_origin_endpoints(
2477        &self,
2478        input: ListOriginEndpointsRequest,
2479    ) -> Result<ListOriginEndpointsResponse, RusotoError<ListOriginEndpointsError>>;
2480
2481    async fn list_tags_for_resource(
2482        &self,
2483        input: ListTagsForResourceRequest,
2484    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2485
2486    /// <p>Changes the Channel&#39;s first IngestEndpoint&#39;s username and password. WARNING - This API is deprecated. Please use RotateIngestEndpointCredentials instead</p>
2487    async fn rotate_channel_credentials(
2488        &self,
2489        input: RotateChannelCredentialsRequest,
2490    ) -> Result<RotateChannelCredentialsResponse, RusotoError<RotateChannelCredentialsError>>;
2491
2492    /// <p>Rotate the IngestEndpoint&#39;s username and password, as specified by the IngestEndpoint&#39;s id.</p>
2493    async fn rotate_ingest_endpoint_credentials(
2494        &self,
2495        input: RotateIngestEndpointCredentialsRequest,
2496    ) -> Result<
2497        RotateIngestEndpointCredentialsResponse,
2498        RusotoError<RotateIngestEndpointCredentialsError>,
2499    >;
2500
2501    async fn tag_resource(
2502        &self,
2503        input: TagResourceRequest,
2504    ) -> Result<(), RusotoError<TagResourceError>>;
2505
2506    async fn untag_resource(
2507        &self,
2508        input: UntagResourceRequest,
2509    ) -> Result<(), RusotoError<UntagResourceError>>;
2510
2511    /// <p>Updates an existing Channel.</p>
2512    async fn update_channel(
2513        &self,
2514        input: UpdateChannelRequest,
2515    ) -> Result<UpdateChannelResponse, RusotoError<UpdateChannelError>>;
2516
2517    /// <p>Updates an existing OriginEndpoint.</p>
2518    async fn update_origin_endpoint(
2519        &self,
2520        input: UpdateOriginEndpointRequest,
2521    ) -> Result<UpdateOriginEndpointResponse, RusotoError<UpdateOriginEndpointError>>;
2522}
2523/// A client for the MediaPackage API.
2524#[derive(Clone)]
2525pub struct MediaPackageClient {
2526    client: Client,
2527    region: region::Region,
2528}
2529
2530impl MediaPackageClient {
2531    /// Creates a client backed by the default tokio event loop.
2532    ///
2533    /// The client will use the default credentials provider and tls client.
2534    pub fn new(region: region::Region) -> MediaPackageClient {
2535        MediaPackageClient {
2536            client: Client::shared(),
2537            region,
2538        }
2539    }
2540
2541    pub fn new_with<P, D>(
2542        request_dispatcher: D,
2543        credentials_provider: P,
2544        region: region::Region,
2545    ) -> MediaPackageClient
2546    where
2547        P: ProvideAwsCredentials + Send + Sync + 'static,
2548        D: DispatchSignedRequest + Send + Sync + 'static,
2549    {
2550        MediaPackageClient {
2551            client: Client::new_with(credentials_provider, request_dispatcher),
2552            region,
2553        }
2554    }
2555
2556    pub fn new_with_client(client: Client, region: region::Region) -> MediaPackageClient {
2557        MediaPackageClient { client, region }
2558    }
2559}
2560
2561#[async_trait]
2562impl MediaPackage for MediaPackageClient {
2563    /// <p>Creates a new Channel.</p>
2564    #[allow(unused_mut)]
2565    async fn create_channel(
2566        &self,
2567        input: CreateChannelRequest,
2568    ) -> Result<CreateChannelResponse, RusotoError<CreateChannelError>> {
2569        let request_uri = "/channels";
2570
2571        let mut request = SignedRequest::new("POST", "mediapackage", &self.region, &request_uri);
2572        request.set_content_type("application/x-amz-json-1.1".to_owned());
2573
2574        let encoded = Some(serde_json::to_vec(&input).unwrap());
2575        request.set_payload(encoded);
2576
2577        let mut response = self
2578            .client
2579            .sign_and_dispatch(request)
2580            .await
2581            .map_err(RusotoError::from)?;
2582        if response.status.as_u16() == 200 {
2583            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2584            let result = proto::json::ResponsePayload::new(&response)
2585                .deserialize::<CreateChannelResponse, _>()?;
2586
2587            Ok(result)
2588        } else {
2589            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2590            Err(CreateChannelError::from_response(response))
2591        }
2592    }
2593
2594    /// <p>Creates a new HarvestJob record.</p>
2595    #[allow(unused_mut)]
2596    async fn create_harvest_job(
2597        &self,
2598        input: CreateHarvestJobRequest,
2599    ) -> Result<CreateHarvestJobResponse, RusotoError<CreateHarvestJobError>> {
2600        let request_uri = "/harvest_jobs";
2601
2602        let mut request = SignedRequest::new("POST", "mediapackage", &self.region, &request_uri);
2603        request.set_content_type("application/x-amz-json-1.1".to_owned());
2604
2605        let encoded = Some(serde_json::to_vec(&input).unwrap());
2606        request.set_payload(encoded);
2607
2608        let mut response = self
2609            .client
2610            .sign_and_dispatch(request)
2611            .await
2612            .map_err(RusotoError::from)?;
2613        if response.status.as_u16() == 200 {
2614            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2615            let result = proto::json::ResponsePayload::new(&response)
2616                .deserialize::<CreateHarvestJobResponse, _>()?;
2617
2618            Ok(result)
2619        } else {
2620            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2621            Err(CreateHarvestJobError::from_response(response))
2622        }
2623    }
2624
2625    /// <p>Creates a new OriginEndpoint record.</p>
2626    #[allow(unused_mut)]
2627    async fn create_origin_endpoint(
2628        &self,
2629        input: CreateOriginEndpointRequest,
2630    ) -> Result<CreateOriginEndpointResponse, RusotoError<CreateOriginEndpointError>> {
2631        let request_uri = "/origin_endpoints";
2632
2633        let mut request = SignedRequest::new("POST", "mediapackage", &self.region, &request_uri);
2634        request.set_content_type("application/x-amz-json-1.1".to_owned());
2635
2636        let encoded = Some(serde_json::to_vec(&input).unwrap());
2637        request.set_payload(encoded);
2638
2639        let mut response = self
2640            .client
2641            .sign_and_dispatch(request)
2642            .await
2643            .map_err(RusotoError::from)?;
2644        if response.status.as_u16() == 200 {
2645            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2646            let result = proto::json::ResponsePayload::new(&response)
2647                .deserialize::<CreateOriginEndpointResponse, _>()?;
2648
2649            Ok(result)
2650        } else {
2651            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2652            Err(CreateOriginEndpointError::from_response(response))
2653        }
2654    }
2655
2656    /// <p>Deletes an existing Channel.</p>
2657    #[allow(unused_mut)]
2658    async fn delete_channel(
2659        &self,
2660        input: DeleteChannelRequest,
2661    ) -> Result<DeleteChannelResponse, RusotoError<DeleteChannelError>> {
2662        let request_uri = format!("/channels/{id}", id = input.id);
2663
2664        let mut request = SignedRequest::new("DELETE", "mediapackage", &self.region, &request_uri);
2665        request.set_content_type("application/x-amz-json-1.1".to_owned());
2666
2667        let mut response = self
2668            .client
2669            .sign_and_dispatch(request)
2670            .await
2671            .map_err(RusotoError::from)?;
2672        if response.status.as_u16() == 202 {
2673            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2674            let result = proto::json::ResponsePayload::new(&response)
2675                .deserialize::<DeleteChannelResponse, _>()?;
2676
2677            Ok(result)
2678        } else {
2679            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2680            Err(DeleteChannelError::from_response(response))
2681        }
2682    }
2683
2684    /// <p>Deletes an existing OriginEndpoint.</p>
2685    #[allow(unused_mut)]
2686    async fn delete_origin_endpoint(
2687        &self,
2688        input: DeleteOriginEndpointRequest,
2689    ) -> Result<DeleteOriginEndpointResponse, RusotoError<DeleteOriginEndpointError>> {
2690        let request_uri = format!("/origin_endpoints/{id}", id = input.id);
2691
2692        let mut request = SignedRequest::new("DELETE", "mediapackage", &self.region, &request_uri);
2693        request.set_content_type("application/x-amz-json-1.1".to_owned());
2694
2695        let mut response = self
2696            .client
2697            .sign_and_dispatch(request)
2698            .await
2699            .map_err(RusotoError::from)?;
2700        if response.status.as_u16() == 202 {
2701            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2702            let result = proto::json::ResponsePayload::new(&response)
2703                .deserialize::<DeleteOriginEndpointResponse, _>()?;
2704
2705            Ok(result)
2706        } else {
2707            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2708            Err(DeleteOriginEndpointError::from_response(response))
2709        }
2710    }
2711
2712    /// <p>Gets details about a Channel.</p>
2713    #[allow(unused_mut)]
2714    async fn describe_channel(
2715        &self,
2716        input: DescribeChannelRequest,
2717    ) -> Result<DescribeChannelResponse, RusotoError<DescribeChannelError>> {
2718        let request_uri = format!("/channels/{id}", id = input.id);
2719
2720        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2721        request.set_content_type("application/x-amz-json-1.1".to_owned());
2722
2723        let mut response = self
2724            .client
2725            .sign_and_dispatch(request)
2726            .await
2727            .map_err(RusotoError::from)?;
2728        if response.status.as_u16() == 200 {
2729            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2730            let result = proto::json::ResponsePayload::new(&response)
2731                .deserialize::<DescribeChannelResponse, _>()?;
2732
2733            Ok(result)
2734        } else {
2735            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2736            Err(DescribeChannelError::from_response(response))
2737        }
2738    }
2739
2740    /// <p>Gets details about an existing HarvestJob.</p>
2741    #[allow(unused_mut)]
2742    async fn describe_harvest_job(
2743        &self,
2744        input: DescribeHarvestJobRequest,
2745    ) -> Result<DescribeHarvestJobResponse, RusotoError<DescribeHarvestJobError>> {
2746        let request_uri = format!("/harvest_jobs/{id}", id = input.id);
2747
2748        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2749        request.set_content_type("application/x-amz-json-1.1".to_owned());
2750
2751        let mut response = self
2752            .client
2753            .sign_and_dispatch(request)
2754            .await
2755            .map_err(RusotoError::from)?;
2756        if response.status.as_u16() == 200 {
2757            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2758            let result = proto::json::ResponsePayload::new(&response)
2759                .deserialize::<DescribeHarvestJobResponse, _>()?;
2760
2761            Ok(result)
2762        } else {
2763            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2764            Err(DescribeHarvestJobError::from_response(response))
2765        }
2766    }
2767
2768    /// <p>Gets details about an existing OriginEndpoint.</p>
2769    #[allow(unused_mut)]
2770    async fn describe_origin_endpoint(
2771        &self,
2772        input: DescribeOriginEndpointRequest,
2773    ) -> Result<DescribeOriginEndpointResponse, RusotoError<DescribeOriginEndpointError>> {
2774        let request_uri = format!("/origin_endpoints/{id}", id = input.id);
2775
2776        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2777        request.set_content_type("application/x-amz-json-1.1".to_owned());
2778
2779        let mut response = self
2780            .client
2781            .sign_and_dispatch(request)
2782            .await
2783            .map_err(RusotoError::from)?;
2784        if response.status.as_u16() == 200 {
2785            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2786            let result = proto::json::ResponsePayload::new(&response)
2787                .deserialize::<DescribeOriginEndpointResponse, _>()?;
2788
2789            Ok(result)
2790        } else {
2791            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2792            Err(DescribeOriginEndpointError::from_response(response))
2793        }
2794    }
2795
2796    /// <p>Returns a collection of Channels.</p>
2797    #[allow(unused_mut)]
2798    async fn list_channels(
2799        &self,
2800        input: ListChannelsRequest,
2801    ) -> Result<ListChannelsResponse, RusotoError<ListChannelsError>> {
2802        let request_uri = "/channels";
2803
2804        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2805        request.set_content_type("application/x-amz-json-1.1".to_owned());
2806
2807        let mut params = Params::new();
2808        if let Some(ref x) = input.max_results {
2809            params.put("maxResults", x);
2810        }
2811        if let Some(ref x) = input.next_token {
2812            params.put("nextToken", x);
2813        }
2814        request.set_params(params);
2815
2816        let mut response = self
2817            .client
2818            .sign_and_dispatch(request)
2819            .await
2820            .map_err(RusotoError::from)?;
2821        if response.status.as_u16() == 200 {
2822            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2823            let result = proto::json::ResponsePayload::new(&response)
2824                .deserialize::<ListChannelsResponse, _>()?;
2825
2826            Ok(result)
2827        } else {
2828            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2829            Err(ListChannelsError::from_response(response))
2830        }
2831    }
2832
2833    /// <p>Returns a collection of HarvestJob records.</p>
2834    #[allow(unused_mut)]
2835    async fn list_harvest_jobs(
2836        &self,
2837        input: ListHarvestJobsRequest,
2838    ) -> Result<ListHarvestJobsResponse, RusotoError<ListHarvestJobsError>> {
2839        let request_uri = "/harvest_jobs";
2840
2841        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2842        request.set_content_type("application/x-amz-json-1.1".to_owned());
2843
2844        let mut params = Params::new();
2845        if let Some(ref x) = input.include_channel_id {
2846            params.put("includeChannelId", x);
2847        }
2848        if let Some(ref x) = input.include_status {
2849            params.put("includeStatus", x);
2850        }
2851        if let Some(ref x) = input.max_results {
2852            params.put("maxResults", x);
2853        }
2854        if let Some(ref x) = input.next_token {
2855            params.put("nextToken", x);
2856        }
2857        request.set_params(params);
2858
2859        let mut response = self
2860            .client
2861            .sign_and_dispatch(request)
2862            .await
2863            .map_err(RusotoError::from)?;
2864        if response.status.as_u16() == 200 {
2865            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2866            let result = proto::json::ResponsePayload::new(&response)
2867                .deserialize::<ListHarvestJobsResponse, _>()?;
2868
2869            Ok(result)
2870        } else {
2871            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2872            Err(ListHarvestJobsError::from_response(response))
2873        }
2874    }
2875
2876    /// <p>Returns a collection of OriginEndpoint records.</p>
2877    #[allow(unused_mut)]
2878    async fn list_origin_endpoints(
2879        &self,
2880        input: ListOriginEndpointsRequest,
2881    ) -> Result<ListOriginEndpointsResponse, RusotoError<ListOriginEndpointsError>> {
2882        let request_uri = "/origin_endpoints";
2883
2884        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2885        request.set_content_type("application/x-amz-json-1.1".to_owned());
2886
2887        let mut params = Params::new();
2888        if let Some(ref x) = input.channel_id {
2889            params.put("channelId", x);
2890        }
2891        if let Some(ref x) = input.max_results {
2892            params.put("maxResults", x);
2893        }
2894        if let Some(ref x) = input.next_token {
2895            params.put("nextToken", x);
2896        }
2897        request.set_params(params);
2898
2899        let mut response = self
2900            .client
2901            .sign_and_dispatch(request)
2902            .await
2903            .map_err(RusotoError::from)?;
2904        if response.status.as_u16() == 200 {
2905            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2906            let result = proto::json::ResponsePayload::new(&response)
2907                .deserialize::<ListOriginEndpointsResponse, _>()?;
2908
2909            Ok(result)
2910        } else {
2911            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2912            Err(ListOriginEndpointsError::from_response(response))
2913        }
2914    }
2915
2916    #[allow(unused_mut)]
2917    async fn list_tags_for_resource(
2918        &self,
2919        input: ListTagsForResourceRequest,
2920    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2921        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
2922
2923        let mut request = SignedRequest::new("GET", "mediapackage", &self.region, &request_uri);
2924        request.set_content_type("application/x-amz-json-1.1".to_owned());
2925
2926        let mut response = self
2927            .client
2928            .sign_and_dispatch(request)
2929            .await
2930            .map_err(RusotoError::from)?;
2931        if response.status.as_u16() == 200 {
2932            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2933            let result = proto::json::ResponsePayload::new(&response)
2934                .deserialize::<ListTagsForResourceResponse, _>()?;
2935
2936            Ok(result)
2937        } else {
2938            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2939            Err(ListTagsForResourceError::from_response(response))
2940        }
2941    }
2942
2943    /// <p>Changes the Channel&#39;s first IngestEndpoint&#39;s username and password. WARNING - This API is deprecated. Please use RotateIngestEndpointCredentials instead</p>
2944    #[allow(unused_mut)]
2945    async fn rotate_channel_credentials(
2946        &self,
2947        input: RotateChannelCredentialsRequest,
2948    ) -> Result<RotateChannelCredentialsResponse, RusotoError<RotateChannelCredentialsError>> {
2949        let request_uri = format!("/channels/{id}/credentials", id = input.id);
2950
2951        let mut request = SignedRequest::new("PUT", "mediapackage", &self.region, &request_uri);
2952        request.set_content_type("application/x-amz-json-1.1".to_owned());
2953
2954        let mut response = self
2955            .client
2956            .sign_and_dispatch(request)
2957            .await
2958            .map_err(RusotoError::from)?;
2959        if response.status.as_u16() == 200 {
2960            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2961            let result = proto::json::ResponsePayload::new(&response)
2962                .deserialize::<RotateChannelCredentialsResponse, _>()?;
2963
2964            Ok(result)
2965        } else {
2966            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2967            Err(RotateChannelCredentialsError::from_response(response))
2968        }
2969    }
2970
2971    /// <p>Rotate the IngestEndpoint&#39;s username and password, as specified by the IngestEndpoint&#39;s id.</p>
2972    #[allow(unused_mut)]
2973    async fn rotate_ingest_endpoint_credentials(
2974        &self,
2975        input: RotateIngestEndpointCredentialsRequest,
2976    ) -> Result<
2977        RotateIngestEndpointCredentialsResponse,
2978        RusotoError<RotateIngestEndpointCredentialsError>,
2979    > {
2980        let request_uri = format!(
2981            "/channels/{id}/ingest_endpoints/{ingest_endpoint_id}/credentials",
2982            id = input.id,
2983            ingest_endpoint_id = input.ingest_endpoint_id
2984        );
2985
2986        let mut request = SignedRequest::new("PUT", "mediapackage", &self.region, &request_uri);
2987        request.set_content_type("application/x-amz-json-1.1".to_owned());
2988
2989        let mut response = self
2990            .client
2991            .sign_and_dispatch(request)
2992            .await
2993            .map_err(RusotoError::from)?;
2994        if response.status.as_u16() == 200 {
2995            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2996            let result = proto::json::ResponsePayload::new(&response)
2997                .deserialize::<RotateIngestEndpointCredentialsResponse, _>()?;
2998
2999            Ok(result)
3000        } else {
3001            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3002            Err(RotateIngestEndpointCredentialsError::from_response(
3003                response,
3004            ))
3005        }
3006    }
3007
3008    #[allow(unused_mut)]
3009    async fn tag_resource(
3010        &self,
3011        input: TagResourceRequest,
3012    ) -> Result<(), RusotoError<TagResourceError>> {
3013        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3014
3015        let mut request = SignedRequest::new("POST", "mediapackage", &self.region, &request_uri);
3016        request.set_content_type("application/x-amz-json-1.1".to_owned());
3017
3018        let encoded = Some(serde_json::to_vec(&input).unwrap());
3019        request.set_payload(encoded);
3020
3021        let mut response = self
3022            .client
3023            .sign_and_dispatch(request)
3024            .await
3025            .map_err(RusotoError::from)?;
3026        if response.status.as_u16() == 204 {
3027            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3028            let result = ::std::mem::drop(response);
3029
3030            Ok(result)
3031        } else {
3032            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3033            Err(TagResourceError::from_response(response))
3034        }
3035    }
3036
3037    #[allow(unused_mut)]
3038    async fn untag_resource(
3039        &self,
3040        input: UntagResourceRequest,
3041    ) -> Result<(), RusotoError<UntagResourceError>> {
3042        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
3043
3044        let mut request = SignedRequest::new("DELETE", "mediapackage", &self.region, &request_uri);
3045        request.set_content_type("application/x-amz-json-1.1".to_owned());
3046
3047        let mut params = Params::new();
3048        for item in input.tag_keys.iter() {
3049            params.put("tagKeys", item);
3050        }
3051        request.set_params(params);
3052
3053        let mut response = self
3054            .client
3055            .sign_and_dispatch(request)
3056            .await
3057            .map_err(RusotoError::from)?;
3058        if response.status.as_u16() == 204 {
3059            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3060            let result = ::std::mem::drop(response);
3061
3062            Ok(result)
3063        } else {
3064            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3065            Err(UntagResourceError::from_response(response))
3066        }
3067    }
3068
3069    /// <p>Updates an existing Channel.</p>
3070    #[allow(unused_mut)]
3071    async fn update_channel(
3072        &self,
3073        input: UpdateChannelRequest,
3074    ) -> Result<UpdateChannelResponse, RusotoError<UpdateChannelError>> {
3075        let request_uri = format!("/channels/{id}", id = input.id);
3076
3077        let mut request = SignedRequest::new("PUT", "mediapackage", &self.region, &request_uri);
3078        request.set_content_type("application/x-amz-json-1.1".to_owned());
3079
3080        let encoded = Some(serde_json::to_vec(&input).unwrap());
3081        request.set_payload(encoded);
3082
3083        let mut response = self
3084            .client
3085            .sign_and_dispatch(request)
3086            .await
3087            .map_err(RusotoError::from)?;
3088        if response.status.as_u16() == 200 {
3089            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3090            let result = proto::json::ResponsePayload::new(&response)
3091                .deserialize::<UpdateChannelResponse, _>()?;
3092
3093            Ok(result)
3094        } else {
3095            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3096            Err(UpdateChannelError::from_response(response))
3097        }
3098    }
3099
3100    /// <p>Updates an existing OriginEndpoint.</p>
3101    #[allow(unused_mut)]
3102    async fn update_origin_endpoint(
3103        &self,
3104        input: UpdateOriginEndpointRequest,
3105    ) -> Result<UpdateOriginEndpointResponse, RusotoError<UpdateOriginEndpointError>> {
3106        let request_uri = format!("/origin_endpoints/{id}", id = input.id);
3107
3108        let mut request = SignedRequest::new("PUT", "mediapackage", &self.region, &request_uri);
3109        request.set_content_type("application/x-amz-json-1.1".to_owned());
3110
3111        let encoded = Some(serde_json::to_vec(&input).unwrap());
3112        request.set_payload(encoded);
3113
3114        let mut response = self
3115            .client
3116            .sign_and_dispatch(request)
3117            .await
3118            .map_err(RusotoError::from)?;
3119        if response.status.as_u16() == 200 {
3120            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3121            let result = proto::json::ResponsePayload::new(&response)
3122                .deserialize::<UpdateOriginEndpointResponse, _>()?;
3123
3124            Ok(result)
3125        } else {
3126            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3127            Err(UpdateOriginEndpointError::from_response(response))
3128        }
3129    }
3130}