1use 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#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct Authorization {
31 #[serde(rename = "CdnIdentifierSecret")]
33 pub cdn_identifier_secret: String,
34 #[serde(rename = "SecretsRoleArn")]
36 pub secrets_role_arn: String,
37}
38
39#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
41#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
42pub struct Channel {
43 #[serde(rename = "Arn")]
45 #[serde(skip_serializing_if = "Option::is_none")]
46 pub arn: Option<String>,
47 #[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 #[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#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
65pub struct CmafEncryption {
66 #[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#[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 #[serde(rename = "HlsManifests")]
83 #[serde(skip_serializing_if = "Option::is_none")]
84 pub hls_manifests: Option<Vec<HlsManifest>>,
85 #[serde(rename = "SegmentDurationSeconds")]
88 #[serde(skip_serializing_if = "Option::is_none")]
89 pub segment_duration_seconds: Option<i64>,
90 #[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#[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 #[serde(rename = "HlsManifests")]
108 #[serde(skip_serializing_if = "Option::is_none")]
109 pub hls_manifests: Option<Vec<HlsManifestCreateOrUpdateParameters>>,
110 #[serde(rename = "SegmentDurationSeconds")]
113 #[serde(skip_serializing_if = "Option::is_none")]
114 pub segment_duration_seconds: Option<i64>,
115 #[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#[derive(Clone, Debug, Default, PartialEq, Serialize)]
126#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
127pub struct CreateChannelRequest {
128 #[serde(rename = "Description")]
130 #[serde(skip_serializing_if = "Option::is_none")]
131 pub description: Option<String>,
132 #[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 #[serde(rename = "Arn")]
146 #[serde(skip_serializing_if = "Option::is_none")]
147 pub arn: Option<String>,
148 #[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 #[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#[derive(Clone, Debug, Default, PartialEq, Serialize)]
166#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
167pub struct CreateHarvestJobRequest {
168 #[serde(rename = "EndTime")]
170 pub end_time: String,
171 #[serde(rename = "Id")]
174 pub id: String,
175 #[serde(rename = "OriginEndpointId")]
178 pub origin_endpoint_id: String,
179 #[serde(rename = "S3Destination")]
180 pub s3_destination: S3Destination,
181 #[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 #[serde(rename = "Arn")]
191 #[serde(skip_serializing_if = "Option::is_none")]
192 pub arn: Option<String>,
193 #[serde(rename = "ChannelId")]
195 #[serde(skip_serializing_if = "Option::is_none")]
196 pub channel_id: Option<String>,
197 #[serde(rename = "CreatedAt")]
199 #[serde(skip_serializing_if = "Option::is_none")]
200 pub created_at: Option<String>,
201 #[serde(rename = "EndTime")]
203 #[serde(skip_serializing_if = "Option::is_none")]
204 pub end_time: Option<String>,
205 #[serde(rename = "Id")]
208 #[serde(skip_serializing_if = "Option::is_none")]
209 pub id: Option<String>,
210 #[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 #[serde(rename = "StartTime")]
220 #[serde(skip_serializing_if = "Option::is_none")]
221 pub start_time: Option<String>,
222 #[serde(rename = "Status")]
226 #[serde(skip_serializing_if = "Option::is_none")]
227 pub status: Option<String>,
228}
229
230#[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 #[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 #[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 #[serde(rename = "Id")]
257 pub id: String,
258 #[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 #[serde(rename = "Origination")]
269 #[serde(skip_serializing_if = "Option::is_none")]
270 pub origination: Option<String>,
271 #[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 #[serde(rename = "TimeDelaySeconds")]
282 #[serde(skip_serializing_if = "Option::is_none")]
283 pub time_delay_seconds: Option<i64>,
284 #[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 #[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 #[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 #[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 #[serde(rename = "Id")]
319 #[serde(skip_serializing_if = "Option::is_none")]
320 pub id: Option<String>,
321 #[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 #[serde(rename = "Origination")]
332 #[serde(skip_serializing_if = "Option::is_none")]
333 pub origination: Option<String>,
334 #[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 #[serde(rename = "TimeDelaySeconds")]
345 #[serde(skip_serializing_if = "Option::is_none")]
346 pub time_delay_seconds: Option<i64>,
347 #[serde(rename = "Url")]
349 #[serde(skip_serializing_if = "Option::is_none")]
350 pub url: Option<String>,
351 #[serde(rename = "Whitelist")]
353 #[serde(skip_serializing_if = "Option::is_none")]
354 pub whitelist: Option<Vec<String>>,
355}
356
357#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
359pub struct DashEncryption {
360 #[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#[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 #[serde(rename = "ManifestLayout")]
382 #[serde(skip_serializing_if = "Option::is_none")]
383 pub manifest_layout: Option<String>,
384 #[serde(rename = "ManifestWindowSeconds")]
386 #[serde(skip_serializing_if = "Option::is_none")]
387 pub manifest_window_seconds: Option<i64>,
388 #[serde(rename = "MinBufferTimeSeconds")]
390 #[serde(skip_serializing_if = "Option::is_none")]
391 pub min_buffer_time_seconds: Option<i64>,
392 #[serde(rename = "MinUpdatePeriodSeconds")]
394 #[serde(skip_serializing_if = "Option::is_none")]
395 pub min_update_period_seconds: Option<i64>,
396 #[serde(rename = "PeriodTriggers")]
401 #[serde(skip_serializing_if = "Option::is_none")]
402 pub period_triggers: Option<Vec<String>>,
403 #[serde(rename = "Profile")]
405 #[serde(skip_serializing_if = "Option::is_none")]
406 pub profile: Option<String>,
407 #[serde(rename = "SegmentDurationSeconds")]
410 #[serde(skip_serializing_if = "Option::is_none")]
411 pub segment_duration_seconds: Option<i64>,
412 #[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 #[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 #[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 #[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 #[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 #[serde(rename = "Arn")]
462 #[serde(skip_serializing_if = "Option::is_none")]
463 pub arn: Option<String>,
464 #[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 #[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 #[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 #[serde(rename = "Arn")]
493 #[serde(skip_serializing_if = "Option::is_none")]
494 pub arn: Option<String>,
495 #[serde(rename = "ChannelId")]
497 #[serde(skip_serializing_if = "Option::is_none")]
498 pub channel_id: Option<String>,
499 #[serde(rename = "CreatedAt")]
501 #[serde(skip_serializing_if = "Option::is_none")]
502 pub created_at: Option<String>,
503 #[serde(rename = "EndTime")]
505 #[serde(skip_serializing_if = "Option::is_none")]
506 pub end_time: Option<String>,
507 #[serde(rename = "Id")]
510 #[serde(skip_serializing_if = "Option::is_none")]
511 pub id: Option<String>,
512 #[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 #[serde(rename = "StartTime")]
522 #[serde(skip_serializing_if = "Option::is_none")]
523 pub start_time: Option<String>,
524 #[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 #[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 #[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 #[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 #[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 #[serde(rename = "Id")]
569 #[serde(skip_serializing_if = "Option::is_none")]
570 pub id: Option<String>,
571 #[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 #[serde(rename = "Origination")]
582 #[serde(skip_serializing_if = "Option::is_none")]
583 pub origination: Option<String>,
584 #[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 #[serde(rename = "TimeDelaySeconds")]
595 #[serde(skip_serializing_if = "Option::is_none")]
596 pub time_delay_seconds: Option<i64>,
597 #[serde(rename = "Url")]
599 #[serde(skip_serializing_if = "Option::is_none")]
600 pub url: Option<String>,
601 #[serde(rename = "Whitelist")]
603 #[serde(skip_serializing_if = "Option::is_none")]
604 pub whitelist: Option<Vec<String>>,
605}
606
607#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
609#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
610pub struct HarvestJob {
611 #[serde(rename = "Arn")]
613 #[serde(skip_serializing_if = "Option::is_none")]
614 pub arn: Option<String>,
615 #[serde(rename = "ChannelId")]
617 #[serde(skip_serializing_if = "Option::is_none")]
618 pub channel_id: Option<String>,
619 #[serde(rename = "CreatedAt")]
621 #[serde(skip_serializing_if = "Option::is_none")]
622 pub created_at: Option<String>,
623 #[serde(rename = "EndTime")]
625 #[serde(skip_serializing_if = "Option::is_none")]
626 pub end_time: Option<String>,
627 #[serde(rename = "Id")]
630 #[serde(skip_serializing_if = "Option::is_none")]
631 pub id: Option<String>,
632 #[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 #[serde(rename = "StartTime")]
642 #[serde(skip_serializing_if = "Option::is_none")]
643 pub start_time: Option<String>,
644 #[serde(rename = "Status")]
648 #[serde(skip_serializing_if = "Option::is_none")]
649 pub status: Option<String>,
650}
651
652#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
654pub struct HlsEncryption {
655 #[serde(rename = "ConstantInitializationVector")]
658 #[serde(skip_serializing_if = "Option::is_none")]
659 pub constant_initialization_vector: Option<String>,
660 #[serde(rename = "EncryptionMethod")]
662 #[serde(skip_serializing_if = "Option::is_none")]
663 pub encryption_method: Option<String>,
664 #[serde(rename = "KeyRotationIntervalSeconds")]
666 #[serde(skip_serializing_if = "Option::is_none")]
667 pub key_rotation_interval_seconds: Option<i64>,
668 #[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#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
678#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
679pub struct HlsIngest {
680 #[serde(rename = "IngestEndpoints")]
682 #[serde(skip_serializing_if = "Option::is_none")]
683 pub ingest_endpoints: Option<Vec<IngestEndpoint>>,
684}
685
686#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
688#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
689pub struct HlsManifest {
690 #[serde(rename = "AdMarkers")]
697 #[serde(skip_serializing_if = "Option::is_none")]
698 pub ad_markers: Option<String>,
699 #[serde(rename = "Id")]
701 pub id: String,
702 #[serde(rename = "IncludeIframeOnlyStream")]
704 #[serde(skip_serializing_if = "Option::is_none")]
705 pub include_iframe_only_stream: Option<bool>,
706 #[serde(rename = "ManifestName")]
708 #[serde(skip_serializing_if = "Option::is_none")]
709 pub manifest_name: Option<String>,
710 #[serde(rename = "PlaylistType")]
714 #[serde(skip_serializing_if = "Option::is_none")]
715 pub playlist_type: Option<String>,
716 #[serde(rename = "PlaylistWindowSeconds")]
718 #[serde(skip_serializing_if = "Option::is_none")]
719 pub playlist_window_seconds: Option<i64>,
720 #[serde(rename = "ProgramDateTimeIntervalSeconds")]
730 #[serde(skip_serializing_if = "Option::is_none")]
731 pub program_date_time_interval_seconds: Option<i64>,
732 #[serde(rename = "Url")]
734 #[serde(skip_serializing_if = "Option::is_none")]
735 pub url: Option<String>,
736}
737
738#[derive(Clone, Debug, Default, PartialEq, Serialize)]
740#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
741pub struct HlsManifestCreateOrUpdateParameters {
742 #[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 #[serde(rename = "Id")]
759 pub id: String,
760 #[serde(rename = "IncludeIframeOnlyStream")]
762 #[serde(skip_serializing_if = "Option::is_none")]
763 pub include_iframe_only_stream: Option<bool>,
764 #[serde(rename = "ManifestName")]
766 #[serde(skip_serializing_if = "Option::is_none")]
767 pub manifest_name: Option<String>,
768 #[serde(rename = "PlaylistType")]
772 #[serde(skip_serializing_if = "Option::is_none")]
773 pub playlist_type: Option<String>,
774 #[serde(rename = "PlaylistWindowSeconds")]
776 #[serde(skip_serializing_if = "Option::is_none")]
777 pub playlist_window_seconds: Option<i64>,
778 #[serde(rename = "ProgramDateTimeIntervalSeconds")]
788 #[serde(skip_serializing_if = "Option::is_none")]
789 pub program_date_time_interval_seconds: Option<i64>,
790}
791
792#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
794pub struct HlsPackage {
795 #[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 #[serde(rename = "IncludeIframeOnlyStream")]
815 #[serde(skip_serializing_if = "Option::is_none")]
816 pub include_iframe_only_stream: Option<bool>,
817 #[serde(rename = "PlaylistType")]
821 #[serde(skip_serializing_if = "Option::is_none")]
822 pub playlist_type: Option<String>,
823 #[serde(rename = "PlaylistWindowSeconds")]
825 #[serde(skip_serializing_if = "Option::is_none")]
826 pub playlist_window_seconds: Option<i64>,
827 #[serde(rename = "ProgramDateTimeIntervalSeconds")]
837 #[serde(skip_serializing_if = "Option::is_none")]
838 pub program_date_time_interval_seconds: Option<i64>,
839 #[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 #[serde(rename = "UseAudioRenditionGroup")]
849 #[serde(skip_serializing_if = "Option::is_none")]
850 pub use_audio_rendition_group: Option<bool>,
851}
852
853#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
855#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
856pub struct IngestEndpoint {
857 #[serde(rename = "Id")]
859 #[serde(skip_serializing_if = "Option::is_none")]
860 pub id: Option<String>,
861 #[serde(rename = "Password")]
863 #[serde(skip_serializing_if = "Option::is_none")]
864 pub password: Option<String>,
865 #[serde(rename = "Url")]
867 #[serde(skip_serializing_if = "Option::is_none")]
868 pub url: Option<String>,
869 #[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 #[serde(rename = "MaxResults")]
880 #[serde(skip_serializing_if = "Option::is_none")]
881 pub max_results: Option<i64>,
882 #[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 #[serde(rename = "Channels")]
893 #[serde(skip_serializing_if = "Option::is_none")]
894 pub channels: Option<Vec<Channel>>,
895 #[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 #[serde(rename = "IncludeChannelId")]
906 #[serde(skip_serializing_if = "Option::is_none")]
907 pub include_channel_id: Option<String>,
908 #[serde(rename = "IncludeStatus")]
910 #[serde(skip_serializing_if = "Option::is_none")]
911 pub include_status: Option<String>,
912 #[serde(rename = "MaxResults")]
914 #[serde(skip_serializing_if = "Option::is_none")]
915 pub max_results: Option<i64>,
916 #[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 #[serde(rename = "HarvestJobs")]
927 #[serde(skip_serializing_if = "Option::is_none")]
928 pub harvest_jobs: Option<Vec<HarvestJob>>,
929 #[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 #[serde(rename = "ChannelId")]
940 #[serde(skip_serializing_if = "Option::is_none")]
941 pub channel_id: Option<String>,
942 #[serde(rename = "MaxResults")]
944 #[serde(skip_serializing_if = "Option::is_none")]
945 pub max_results: Option<i64>,
946 #[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 #[serde(rename = "NextToken")]
957 #[serde(skip_serializing_if = "Option::is_none")]
958 pub next_token: Option<String>,
959 #[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#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
982pub struct MssEncryption {
983 #[serde(rename = "SpekeKeyProvider")]
984 pub speke_key_provider: SpekeKeyProvider,
985}
986
987#[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 #[serde(rename = "ManifestWindowSeconds")]
995 #[serde(skip_serializing_if = "Option::is_none")]
996 pub manifest_window_seconds: Option<i64>,
997 #[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#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1008#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1009pub struct OriginEndpoint {
1010 #[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 #[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 #[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 #[serde(rename = "Id")]
1036 #[serde(skip_serializing_if = "Option::is_none")]
1037 pub id: Option<String>,
1038 #[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 #[serde(rename = "Origination")]
1049 #[serde(skip_serializing_if = "Option::is_none")]
1050 pub origination: Option<String>,
1051 #[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 #[serde(rename = "TimeDelaySeconds")]
1062 #[serde(skip_serializing_if = "Option::is_none")]
1063 pub time_delay_seconds: Option<i64>,
1064 #[serde(rename = "Url")]
1066 #[serde(skip_serializing_if = "Option::is_none")]
1067 pub url: Option<String>,
1068 #[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 #[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 #[serde(rename = "Arn")]
1087 #[serde(skip_serializing_if = "Option::is_none")]
1088 pub arn: Option<String>,
1089 #[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 #[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 #[serde(rename = "Id")]
1110 pub id: String,
1111 #[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 #[serde(rename = "Arn")]
1121 #[serde(skip_serializing_if = "Option::is_none")]
1122 pub arn: Option<String>,
1123 #[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 #[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#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1141pub struct S3Destination {
1142 #[serde(rename = "BucketName")]
1144 pub bucket_name: String,
1145 #[serde(rename = "ManifestKey")]
1147 pub manifest_key: String,
1148 #[serde(rename = "RoleArn")]
1150 pub role_arn: String,
1151}
1152
1153#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1155pub struct SpekeKeyProvider {
1156 #[serde(rename = "CertificateArn")]
1160 #[serde(skip_serializing_if = "Option::is_none")]
1161 pub certificate_arn: Option<String>,
1162 #[serde(rename = "ResourceId")]
1164 pub resource_id: String,
1165 #[serde(rename = "RoleArn")]
1168 pub role_arn: String,
1169 #[serde(rename = "SystemIds")]
1171 pub system_ids: Vec<String>,
1172 #[serde(rename = "Url")]
1174 pub url: String,
1175}
1176
1177#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1179pub struct StreamSelection {
1180 #[serde(rename = "MaxVideoBitsPerSecond")]
1182 #[serde(skip_serializing_if = "Option::is_none")]
1183 pub max_video_bits_per_second: Option<i64>,
1184 #[serde(rename = "MinVideoBitsPerSecond")]
1186 #[serde(skip_serializing_if = "Option::is_none")]
1187 pub min_video_bits_per_second: Option<i64>,
1188 #[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 #[serde(rename = "TagKeys")]
1210 pub tag_keys: Vec<String>,
1211}
1212
1213#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1215#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1216pub struct UpdateChannelRequest {
1217 #[serde(rename = "Description")]
1219 #[serde(skip_serializing_if = "Option::is_none")]
1220 pub description: Option<String>,
1221 #[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 #[serde(rename = "Arn")]
1231 #[serde(skip_serializing_if = "Option::is_none")]
1232 pub arn: Option<String>,
1233 #[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 #[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#[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 #[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 #[serde(rename = "Id")]
1271 pub id: String,
1272 #[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 #[serde(rename = "Origination")]
1283 #[serde(skip_serializing_if = "Option::is_none")]
1284 pub origination: Option<String>,
1285 #[serde(rename = "StartoverWindowSeconds")]
1288 #[serde(skip_serializing_if = "Option::is_none")]
1289 pub startover_window_seconds: Option<i64>,
1290 #[serde(rename = "TimeDelaySeconds")]
1293 #[serde(skip_serializing_if = "Option::is_none")]
1294 pub time_delay_seconds: Option<i64>,
1295 #[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 #[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 #[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 #[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 #[serde(rename = "Id")]
1330 #[serde(skip_serializing_if = "Option::is_none")]
1331 pub id: Option<String>,
1332 #[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 #[serde(rename = "Origination")]
1343 #[serde(skip_serializing_if = "Option::is_none")]
1344 pub origination: Option<String>,
1345 #[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 #[serde(rename = "TimeDelaySeconds")]
1356 #[serde(skip_serializing_if = "Option::is_none")]
1357 pub time_delay_seconds: Option<i64>,
1358 #[serde(rename = "Url")]
1360 #[serde(skip_serializing_if = "Option::is_none")]
1361 pub url: Option<String>,
1362 #[serde(rename = "Whitelist")]
1364 #[serde(skip_serializing_if = "Option::is_none")]
1365 pub whitelist: Option<Vec<String>>,
1366}
1367
1368#[derive(Debug, PartialEq)]
1370pub enum CreateChannelError {
1371 Forbidden(String),
1373 InternalServerError(String),
1375 NotFound(String),
1377 ServiceUnavailable(String),
1379 TooManyRequests(String),
1381 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#[derive(Debug, PartialEq)]
1430pub enum CreateHarvestJobError {
1431 Forbidden(String),
1433 InternalServerError(String),
1435 NotFound(String),
1437 ServiceUnavailable(String),
1439 TooManyRequests(String),
1441 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#[derive(Debug, PartialEq)]
1494pub enum CreateOriginEndpointError {
1495 Forbidden(String),
1497 InternalServerError(String),
1499 NotFound(String),
1501 ServiceUnavailable(String),
1503 TooManyRequests(String),
1505 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#[derive(Debug, PartialEq)]
1562pub enum DeleteChannelError {
1563 Forbidden(String),
1565 InternalServerError(String),
1567 NotFound(String),
1569 ServiceUnavailable(String),
1571 TooManyRequests(String),
1573 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#[derive(Debug, PartialEq)]
1622pub enum DeleteOriginEndpointError {
1623 Forbidden(String),
1625 InternalServerError(String),
1627 NotFound(String),
1629 ServiceUnavailable(String),
1631 TooManyRequests(String),
1633 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#[derive(Debug, PartialEq)]
1690pub enum DescribeChannelError {
1691 Forbidden(String),
1693 InternalServerError(String),
1695 NotFound(String),
1697 ServiceUnavailable(String),
1699 TooManyRequests(String),
1701 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#[derive(Debug, PartialEq)]
1750pub enum DescribeHarvestJobError {
1751 Forbidden(String),
1753 InternalServerError(String),
1755 NotFound(String),
1757 ServiceUnavailable(String),
1759 TooManyRequests(String),
1761 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#[derive(Debug, PartialEq)]
1816pub enum DescribeOriginEndpointError {
1817 Forbidden(String),
1819 InternalServerError(String),
1821 NotFound(String),
1823 ServiceUnavailable(String),
1825 TooManyRequests(String),
1827 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#[derive(Debug, PartialEq)]
1884pub enum ListChannelsError {
1885 Forbidden(String),
1887 InternalServerError(String),
1889 NotFound(String),
1891 ServiceUnavailable(String),
1893 TooManyRequests(String),
1895 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#[derive(Debug, PartialEq)]
1944pub enum ListHarvestJobsError {
1945 Forbidden(String),
1947 InternalServerError(String),
1949 NotFound(String),
1951 ServiceUnavailable(String),
1953 TooManyRequests(String),
1955 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#[derive(Debug, PartialEq)]
2004pub enum ListOriginEndpointsError {
2005 Forbidden(String),
2007 InternalServerError(String),
2009 NotFound(String),
2011 ServiceUnavailable(String),
2013 TooManyRequests(String),
2015 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#[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#[derive(Debug, PartialEq)]
2092pub enum RotateChannelCredentialsError {
2093 Forbidden(String),
2095 InternalServerError(String),
2097 NotFound(String),
2099 ServiceUnavailable(String),
2101 TooManyRequests(String),
2103 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#[derive(Debug, PartialEq)]
2160pub enum RotateIngestEndpointCredentialsError {
2161 Forbidden(String),
2163 InternalServerError(String),
2165 NotFound(String),
2167 ServiceUnavailable(String),
2169 TooManyRequests(String),
2171 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#[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#[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#[derive(Debug, PartialEq)]
2286pub enum UpdateChannelError {
2287 Forbidden(String),
2289 InternalServerError(String),
2291 NotFound(String),
2293 ServiceUnavailable(String),
2295 TooManyRequests(String),
2297 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#[derive(Debug, PartialEq)]
2346pub enum UpdateOriginEndpointError {
2347 Forbidden(String),
2349 InternalServerError(String),
2351 NotFound(String),
2353 ServiceUnavailable(String),
2355 TooManyRequests(String),
2357 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#[async_trait]
2414pub trait MediaPackage {
2415 async fn create_channel(
2417 &self,
2418 input: CreateChannelRequest,
2419 ) -> Result<CreateChannelResponse, RusotoError<CreateChannelError>>;
2420
2421 async fn create_harvest_job(
2423 &self,
2424 input: CreateHarvestJobRequest,
2425 ) -> Result<CreateHarvestJobResponse, RusotoError<CreateHarvestJobError>>;
2426
2427 async fn create_origin_endpoint(
2429 &self,
2430 input: CreateOriginEndpointRequest,
2431 ) -> Result<CreateOriginEndpointResponse, RusotoError<CreateOriginEndpointError>>;
2432
2433 async fn delete_channel(
2435 &self,
2436 input: DeleteChannelRequest,
2437 ) -> Result<DeleteChannelResponse, RusotoError<DeleteChannelError>>;
2438
2439 async fn delete_origin_endpoint(
2441 &self,
2442 input: DeleteOriginEndpointRequest,
2443 ) -> Result<DeleteOriginEndpointResponse, RusotoError<DeleteOriginEndpointError>>;
2444
2445 async fn describe_channel(
2447 &self,
2448 input: DescribeChannelRequest,
2449 ) -> Result<DescribeChannelResponse, RusotoError<DescribeChannelError>>;
2450
2451 async fn describe_harvest_job(
2453 &self,
2454 input: DescribeHarvestJobRequest,
2455 ) -> Result<DescribeHarvestJobResponse, RusotoError<DescribeHarvestJobError>>;
2456
2457 async fn describe_origin_endpoint(
2459 &self,
2460 input: DescribeOriginEndpointRequest,
2461 ) -> Result<DescribeOriginEndpointResponse, RusotoError<DescribeOriginEndpointError>>;
2462
2463 async fn list_channels(
2465 &self,
2466 input: ListChannelsRequest,
2467 ) -> Result<ListChannelsResponse, RusotoError<ListChannelsError>>;
2468
2469 async fn list_harvest_jobs(
2471 &self,
2472 input: ListHarvestJobsRequest,
2473 ) -> Result<ListHarvestJobsResponse, RusotoError<ListHarvestJobsError>>;
2474
2475 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 async fn rotate_channel_credentials(
2488 &self,
2489 input: RotateChannelCredentialsRequest,
2490 ) -> Result<RotateChannelCredentialsResponse, RusotoError<RotateChannelCredentialsError>>;
2491
2492 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 async fn update_channel(
2513 &self,
2514 input: UpdateChannelRequest,
2515 ) -> Result<UpdateChannelResponse, RusotoError<UpdateChannelError>>;
2516
2517 async fn update_origin_endpoint(
2519 &self,
2520 input: UpdateOriginEndpointRequest,
2521 ) -> Result<UpdateOriginEndpointResponse, RusotoError<UpdateOriginEndpointError>>;
2522}
2523#[derive(Clone)]
2525pub struct MediaPackageClient {
2526 client: Client,
2527 region: region::Region,
2528}
2529
2530impl MediaPackageClient {
2531 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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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 #[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}