rusoto_elastictranscoder/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20.</p> <p>To remove artwork or leave the artwork empty, you can either set <code>Artwork</code> to null, or set the <code>Merge Policy</code> to "Replace" and use an empty <code>Artwork</code> array.</p> <p>To pass through existing artwork unchanged, set the <code>Merge Policy</code> to "Prepend", "Append", or "Fallback", and use an empty <code>Artwork</code> array.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
30pub struct Artwork {
31    /// <p>The format of album art, if any. Valid formats are <code>.jpg</code> and <code>.png</code>.</p>
32    #[serde(rename = "AlbumArtFormat")]
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub album_art_format: Option<String>,
35    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your artwork.</p>
36    #[serde(rename = "Encryption")]
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub encryption: Option<Encryption>,
39    /// <p>The name of the file to be used as album art. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by <code>PipelineId</code>; the <code>InputBucket</code> object in that pipeline identifies the bucket.</p> <p>If the file name includes a prefix, for example, <code>cooking/pie.jpg</code>, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.</p>
40    #[serde(rename = "InputKey")]
41    #[serde(skip_serializing_if = "Option::is_none")]
42    pub input_key: Option<String>,
43    /// <p>The maximum height of the output album art in pixels. If you specify <code>auto</code>, Elastic Transcoder uses 600 as the default value. If you specify a numeric value, enter an even integer between 32 and 3072, inclusive.</p>
44    #[serde(rename = "MaxHeight")]
45    #[serde(skip_serializing_if = "Option::is_none")]
46    pub max_height: Option<String>,
47    /// <p>The maximum width of the output album art in pixels. If you specify <code>auto</code>, Elastic Transcoder uses 600 as the default value. If you specify a numeric value, enter an even integer between 32 and 4096, inclusive.</p>
48    #[serde(rename = "MaxWidth")]
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub max_width: Option<String>,
51    /// <p>When you set <code>PaddingPolicy</code> to <code>Pad</code>, Elastic Transcoder may add white bars to the top and bottom and/or left and right sides of the output album art to make the total size of the output art match the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>.</p>
52    #[serde(rename = "PaddingPolicy")]
53    #[serde(skip_serializing_if = "Option::is_none")]
54    pub padding_policy: Option<String>,
55    /// <p><p>Specify one of the following values to control scaling of the output album art:</p> <ul> <li> <p> <code>Fit:</code> Elastic Transcoder scales the output art so it matches the value that you specified in either <code>MaxWidth</code> or <code>MaxHeight</code> without exceeding the other value.</p> </li> <li> <p> <code>Fill:</code> Elastic Transcoder scales the output art so it matches the value that you specified in either <code>MaxWidth</code> or <code>MaxHeight</code> and matches or exceeds the other value. Elastic Transcoder centers the output art and then crops it in the dimension (if any) that exceeds the maximum value. </p> </li> <li> <p> <code>Stretch:</code> Elastic Transcoder stretches the output art to match the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>. If the relative proportions of the input art and the output art are different, the output art will be distorted.</p> </li> <li> <p> <code>Keep:</code> Elastic Transcoder does not scale the output art. If either dimension of the input art exceeds the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>, Elastic Transcoder crops the output art.</p> </li> <li> <p> <code>ShrinkToFit:</code> Elastic Transcoder scales the output art down so that its dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without exceeding either value. If you specify this option, Elastic Transcoder does not scale the art up.</p> </li> <li> <p> <code>ShrinkToFill</code> Elastic Transcoder scales the output art down so that its dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without dropping below either value. If you specify this option, Elastic Transcoder does not scale the art up.</p> </li> </ul></p>
56    #[serde(rename = "SizingPolicy")]
57    #[serde(skip_serializing_if = "Option::is_none")]
58    pub sizing_policy: Option<String>,
59}
60
61/// <p>Options associated with your audio codec.</p>
62#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
63pub struct AudioCodecOptions {
64    /// <p>You can only choose an audio bit depth when you specify <code>flac</code> or <code>pcm</code> for the value of Audio:Codec.</p> <p>The bit depth of a sample is how many bits of information are included in the audio samples. The higher the bit depth, the better the audio, but the larger the file.</p> <p>Valid values are <code>16</code> and <code>24</code>.</p> <p>The most common bit depth is <code>24</code>.</p>
65    #[serde(rename = "BitDepth")]
66    #[serde(skip_serializing_if = "Option::is_none")]
67    pub bit_depth: Option<String>,
68    /// <p>You can only choose an audio bit order when you specify <code>pcm</code> for the value of Audio:Codec.</p> <p>The order the bits of a PCM sample are stored in.</p> <p>The supported value is <code>LittleEndian</code>.</p>
69    #[serde(rename = "BitOrder")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub bit_order: Option<String>,
72    /// <p><p>You can only choose an audio profile when you specify AAC for the value of Audio:Codec.</p> <p>Specify the AAC profile for the output file. Elastic Transcoder supports the following profiles:</p> <ul> <li> <p> <code>auto</code>: If you specify <code>auto</code>, Elastic Transcoder selects the profile based on the bit rate selected for the output file.</p> </li> <li> <p> <code>AAC-LC</code>: The most common AAC profile. Use for bit rates larger than 64 kbps.</p> </li> <li> <p> <code>HE-AAC</code>: Not supported on some older players and devices. Use for bit rates between 40 and 80 kbps.</p> </li> <li> <p> <code>HE-AACv2</code>: Not supported on some players and devices. Use for bit rates less than 48 kbps.</p> </li> </ul> <p>All outputs in a <code>Smooth</code> playlist must have the same value for <code>Profile</code>.</p> <note> <p>If you created any presets before AAC profiles were added, Elastic Transcoder automatically updated your presets to use AAC-LC. You can change the value as required.</p> </note></p>
73    #[serde(rename = "Profile")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub profile: Option<String>,
76    /// <p>You can only choose whether an audio sample is signed when you specify <code>pcm</code> for the value of Audio:Codec.</p> <p>Whether audio samples are represented with negative and positive numbers (signed) or only positive numbers (unsigned).</p> <p>The supported value is <code>Signed</code>.</p>
77    #[serde(rename = "Signed")]
78    #[serde(skip_serializing_if = "Option::is_none")]
79    pub signed: Option<String>,
80}
81
82/// <p>Parameters required for transcoding audio.</p>
83#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
84pub struct AudioParameters {
85    /// <p><p>The method of organizing audio channels and tracks. Use <code>Audio:Channels</code> to specify the number of channels in your output, and <code>Audio:AudioPackingMode</code> to specify the number of tracks and their relation to the channels. If you do not specify an <code>Audio:AudioPackingMode</code>, Elastic Transcoder uses <code>SingleTrack</code>.</p> <p>The following values are valid:</p> <p> <code>SingleTrack</code>, <code>OneChannelPerTrack</code>, and <code>OneChannelPerTrackWithMosTo8Tracks</code> </p> <p>When you specify <code>SingleTrack</code>, Elastic Transcoder creates a single track for your output. The track can have up to eight channels. Use <code>SingleTrack</code> for all non-<code>mxf</code> containers.</p> <p>The outputs of <code>SingleTrack</code> for a specific channel value and inputs are as follows:</p> <ul> <li> <p> <code>0</code> <b> channels with any input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1, 2, or auto </code> <b>channels with no audio input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1 </code> <b>channel with any input with audio:</b> One track with one channel, downmixed if necessary</p> </li> <li> <p> <code>2 </code> <b>channels with one track with one channel:</b> One track with two identical channels</p> </li> <li> <p> <code>2 or auto </code> <b>channels with two tracks with one channel each:</b> One track with two channels</p> </li> <li> <p> <code>2 or auto </code> <b>channels with one track with two channels:</b> One track with two channels</p> </li> <li> <p> <code>2 </code> <b>channels with one track with multiple channels:</b> One track with two channels</p> </li> <li> <p> <code>auto </code> <b>channels with one track with one channel:</b> One track with one channel</p> </li> <li> <p> <code>auto </code> <b>channels with one track with multiple channels:</b> One track with multiple channels</p> </li> </ul> <p>When you specify <code>OneChannelPerTrack</code>, Elastic Transcoder creates a new track for every channel in your output. Your output can have up to eight single-channel tracks.</p> <p>The outputs of <code>OneChannelPerTrack</code> for a specific channel value and inputs are as follows:</p> <ul> <li> <p> <code>0 </code> <b>channels with any input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1, 2, or auto </code> <b>channels with no audio input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1 </code> <b>channel with any input with audio:</b> One track with one channel, downmixed if necessary</p> </li> <li> <p> <code>2 </code> <b>channels with one track with one channel:</b> Two tracks with one identical channel each</p> </li> <li> <p> <code>2 or auto </code> <b>channels with two tracks with one channel each:</b> Two tracks with one channel each</p> </li> <li> <p> <code>2 or auto </code> <b>channels with one track with two channels:</b> Two tracks with one channel each</p> </li> <li> <p> <code>2 </code> <b>channels with one track with multiple channels:</b> Two tracks with one channel each</p> </li> <li> <p> <code>auto </code> <b>channels with one track with one channel:</b> One track with one channel</p> </li> <li> <p> <code>auto </code> <b>channels with one track with multiple channels:</b> Up to eight tracks with one channel each</p> </li> </ul> <p>When you specify <code>OneChannelPerTrackWithMosTo8Tracks</code>, Elastic Transcoder creates eight single-channel tracks for your output. All tracks that do not contain audio data from an input channel are MOS, or Mit Out Sound, tracks.</p> <p>The outputs of <code>OneChannelPerTrackWithMosTo8Tracks</code> for a specific channel value and inputs are as follows:</p> <ul> <li> <p> <code>0 </code> <b>channels with any input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1, 2, or auto </code> <b>channels with no audio input:</b> Audio omitted from the output</p> </li> <li> <p> <code>1 </code> <b>channel with any input with audio:</b> One track with one channel, downmixed if necessary, plus six MOS tracks</p> </li> <li> <p> <code>2 </code> <b>channels with one track with one channel:</b> Two tracks with one identical channel each, plus six MOS tracks</p> </li> <li> <p> <code>2 or auto </code> <b>channels with two tracks with one channel each:</b> Two tracks with one channel each, plus six MOS tracks</p> </li> <li> <p> <code>2 or auto </code> <b>channels with one track with two channels:</b> Two tracks with one channel each, plus six MOS tracks</p> </li> <li> <p> <code>2 </code> <b>channels with one track with multiple channels:</b> Two tracks with one channel each, plus six MOS tracks</p> </li> <li> <p> <code>auto </code> <b>channels with one track with one channel:</b> One track with one channel, plus seven MOS tracks</p> </li> <li> <p> <code>auto </code> <b>channels with one track with multiple channels:</b> Up to eight tracks with one channel each, plus MOS tracks until there are eight tracks in all</p> </li> </ul></p>
86    #[serde(rename = "AudioPackingMode")]
87    #[serde(skip_serializing_if = "Option::is_none")]
88    pub audio_packing_mode: Option<String>,
89    /// <p>The bit rate of the audio stream in the output file, in kilobits/second. Enter an integer between 64 and 320, inclusive.</p>
90    #[serde(rename = "BitRate")]
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub bit_rate: Option<String>,
93    /// <p>The number of audio channels in the output file. The following values are valid:</p> <p> <code>auto</code>, <code>0</code>, <code>1</code>, <code>2</code> </p> <p>One channel carries the information played by a single speaker. For example, a stereo track with two channels sends one channel to the left speaker, and the other channel to the right speaker. The output channels are organized into tracks. If you want Elastic Transcoder to automatically detect the number of audio channels in the input file and use that value for the output file, select <code>auto</code>.</p> <p>The output of a specific channel value and inputs are as follows:</p> <ul> <li> <p> <code>auto</code> <b> channel specified, with any input:</b> Pass through up to eight input channels.</p> </li> <li> <p> <code>0</code> <b> channels specified, with any input:</b> Audio omitted from the output.</p> </li> <li> <p> <code>1</code> <b> channel specified, with at least one input channel:</b> Mono sound.</p> </li> <li> <p> <code>2</code> <b> channels specified, with any input:</b> Two identical mono channels or stereo. For more information about tracks, see <code>Audio:AudioPackingMode.</code> </p> </li> </ul> <p> For more information about how Elastic Transcoder organizes channels and tracks, see <code>Audio:AudioPackingMode</code>.</p>
94    #[serde(rename = "Channels")]
95    #[serde(skip_serializing_if = "Option::is_none")]
96    pub channels: Option<String>,
97    /// <p>The audio codec for the output file. Valid values include <code>aac</code>, <code>flac</code>, <code>mp2</code>, <code>mp3</code>, <code>pcm</code>, and <code>vorbis</code>.</p>
98    #[serde(rename = "Codec")]
99    #[serde(skip_serializing_if = "Option::is_none")]
100    pub codec: Option<String>,
101    /// <p>If you specified <code>AAC</code> for <code>Audio:Codec</code>, this is the <code>AAC</code> compression profile to use. Valid values include:</p> <p> <code>auto</code>, <code>AAC-LC</code>, <code>HE-AAC</code>, <code>HE-AACv2</code> </p> <p>If you specify <code>auto</code>, Elastic Transcoder chooses a profile based on the bit rate of the output file.</p>
102    #[serde(rename = "CodecOptions")]
103    #[serde(skip_serializing_if = "Option::is_none")]
104    pub codec_options: Option<AudioCodecOptions>,
105    /// <p>The sample rate of the audio stream in the output file, in Hertz. Valid values include:</p> <p> <code>auto</code>, <code>22050</code>, <code>32000</code>, <code>44100</code>, <code>48000</code>, <code>96000</code> </p> <p>If you specify <code>auto</code>, Elastic Transcoder automatically detects the sample rate.</p>
106    #[serde(rename = "SampleRate")]
107    #[serde(skip_serializing_if = "Option::is_none")]
108    pub sample_rate: Option<String>,
109}
110
111/// <p>The <code>CancelJobRequest</code> structure.</p>
112#[derive(Clone, Debug, Default, PartialEq, Serialize)]
113#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
114pub struct CancelJobRequest {
115    /// <p>The identifier of the job that you want to cancel.</p> <p>To get a list of the jobs (including their <code>jobId</code>) that have a status of <code>Submitted</code>, use the <a>ListJobsByStatus</a> API action.</p>
116    #[serde(rename = "Id")]
117    pub id: String,
118}
119
120/// <p>The response body contains a JSON object. If the job is successfully canceled, the value of <code>Success</code> is <code>true</code>.</p>
121#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
122#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
123pub struct CancelJobResponse {}
124
125/// <p>The file format of the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
126#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
127pub struct CaptionFormat {
128    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your caption formats.</p>
129    #[serde(rename = "Encryption")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub encryption: Option<Encryption>,
132    /// <p><p>The format you specify determines whether Elastic Transcoder generates an embedded or sidecar caption for this output.</p> <ul> <li> <p> <b>Valid Embedded Caption Formats:</b> </p> <ul> <li> <p> <b>for FLAC</b>: None</p> </li> <li> <p> <b>For MP3</b>: None</p> </li> <li> <p> <b>For MP4</b>: mov-text</p> </li> <li> <p> <b>For MPEG-TS</b>: None</p> </li> <li> <p> <b>For ogg</b>: None</p> </li> <li> <p> <b>For webm</b>: None</p> </li> </ul> </li> <li> <p> <b>Valid Sidecar Caption Formats:</b> Elastic Transcoder supports dfxp (first div element only), scc, srt, and webvtt. If you want ttml or smpte-tt compatible captions, specify dfxp as your output format.</p> <ul> <li> <p> <b>For FMP4</b>: dfxp</p> </li> <li> <p> <b>Non-FMP4 outputs</b>: All sidecar types</p> </li> </ul> <p> <code>fmp4</code> captions have an extension of <code>.ismt</code> </p> </li> </ul></p>
133    #[serde(rename = "Format")]
134    #[serde(skip_serializing_if = "Option::is_none")]
135    pub format: Option<String>,
136    /// <p>The prefix for caption filenames, in the form <i>description</i>-<code>{language}</code>, where:</p> <ul> <li> <p> <i>description</i> is a description of the video.</p> </li> <li> <p> <code>{language}</code> is a literal value that Elastic Transcoder replaces with the two- or three-letter code for the language of the caption in the output file names.</p> </li> </ul> <p>If you don't include <code>{language}</code> in the file name pattern, Elastic Transcoder automatically appends "<code>{language}</code>" to the value that you specify for the description. In addition, Elastic Transcoder automatically appends the count to the end of the segment files.</p> <p>For example, suppose you're transcoding into srt format. When you enter "Sydney-{language}-sunrise", and the language of the captions is English (en), the name of the first caption file is be Sydney-en-sunrise00000.srt.</p>
137    #[serde(rename = "Pattern")]
138    #[serde(skip_serializing_if = "Option::is_none")]
139    pub pattern: Option<String>,
140}
141
142/// <p>A source file for the input sidecar captions used during the transcoding process.</p>
143#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
144pub struct CaptionSource {
145    /// <p>The encryption settings, if any, that Elastic Transcoder needs to decyrpt your caption sources, or that you want Elastic Transcoder to apply to your caption sources.</p>
146    #[serde(rename = "Encryption")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub encryption: Option<Encryption>,
149    /// <p>The name of the sidecar caption file that you want Elastic Transcoder to include in the output file.</p>
150    #[serde(rename = "Key")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub key: Option<String>,
153    /// <p>The label of the caption shown in the player when choosing a language. We recommend that you put the caption language name here, in the language of the captions.</p>
154    #[serde(rename = "Label")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub label: Option<String>,
157    /// <p>A string that specifies the language of the caption. If you specified multiple inputs with captions, the caption language must match in order to be included in the output. Specify this as one of:</p> <ul> <li> <p>2-character ISO 639-1 code</p> </li> <li> <p>3-character ISO 639-2 code</p> </li> </ul> <p>For more information on ISO language codes and language names, see the List of ISO 639-1 codes.</p>
158    #[serde(rename = "Language")]
159    #[serde(skip_serializing_if = "Option::is_none")]
160    pub language: Option<String>,
161    /// <p>For clip generation or captions that do not start at the same time as the associated video file, the <code>TimeOffset</code> tells Elastic Transcoder how much of the video to encode before including captions.</p> <p>Specify the TimeOffset in the form [+-]SS.sss or [+-]HH:mm:SS.ss.</p>
162    #[serde(rename = "TimeOffset")]
163    #[serde(skip_serializing_if = "Option::is_none")]
164    pub time_offset: Option<String>,
165}
166
167/// <p>The captions to be created, if any.</p>
168#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
169pub struct Captions {
170    /// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
171    #[serde(rename = "CaptionFormats")]
172    #[serde(skip_serializing_if = "Option::is_none")]
173    pub caption_formats: Option<Vec<CaptionFormat>>,
174}
175
176/// <p>Settings for one clip in a composition. All jobs in a playlist must have the same clip settings.</p>
177#[derive(Clone, Debug, Default, PartialEq)]
178pub struct Clip {
179    /// <p>Settings that determine when a clip begins and how long it lasts.</p>
180    pub time_span: Option<TimeSpan>,
181}
182
183/// <p>The <code>CreateJobOutput</code> structure.</p>
184#[derive(Clone, Debug, Default, PartialEq, Serialize)]
185#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
186pub struct CreateJobOutput {
187    /// <p>Information about the album art that you want Elastic Transcoder to add to the file during transcoding. You can specify up to twenty album artworks for each output. Settings for each artwork must be defined in the job for the current output.</p>
188    #[serde(rename = "AlbumArt")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub album_art: Option<JobAlbumArt>,
191    /// <p>You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All captions must be in UTF-8. Elastic Transcoder supports two types of captions:</p> <ul> <li> <p> <b>Embedded:</b> Embedded captions are included in the same file as the audio and video. Elastic Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per file.</p> <p>Valid input values include: <code>CEA-608 (EIA-608</code>, first non-empty channel only), <code>CEA-708 (EIA-708</code>, first non-empty channel only), and <code>mov-text</code> </p> <p>Valid outputs include: <code>mov-text</code> </p> <p>Elastic Transcoder supports a maximum of one embedded format per output.</p> </li> <li> <p> <b>Sidecar:</b> Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar captions require a player that is capable of understanding the relationship between the video file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar captions per file.</p> <p>Valid input values include: <code>dfxp</code> (first div element only), <code>ebu-tt</code>, <code>scc</code>, <code>smpt</code>, <code>srt</code>, <code>ttml</code> (first div element only), and <code>webvtt</code> </p> <p>Valid outputs include: <code>dfxp</code> (first div element only), <code>scc</code>, <code>srt</code>, and <code>webvtt</code>.</p> </li> </ul> <p>If you want ttml or smpte-tt compatible captions, specify dfxp as your output format.</p> <p>Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve text formatting (for example, italics) during the transcoding process.</p> <p>To remove captions or leave the captions empty, set <code>Captions</code> to null. To pass through existing captions unchanged, set the <code>MergePolicy</code> to <code>MergeRetain</code>, and pass in a null <code>CaptionSources</code> array.</p> <p>For more information on embedded files, see the Subtitles Wikipedia page.</p> <p>For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages.</p>
192    #[serde(rename = "Captions")]
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub captions: Option<Captions>,
195    /// <p>You can specify encryption settings for any output files that you want to use for a transcoding job. This includes the output file and any watermarks, thumbnails, album art, or captions that you want to use. You must specify encryption settings for each file individually.</p>
196    #[serde(rename = "Encryption")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub encryption: Option<Encryption>,
199    /// <p> The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket specified by the <code>OutputBucket</code> object in the pipeline that is specified by the pipeline ID. If a file with the specified name already exists in the output bucket, the job fails. </p>
200    #[serde(rename = "Key")]
201    #[serde(skip_serializing_if = "Option::is_none")]
202    pub key: Option<String>,
203    /// <p> The <code>Id</code> of the preset to use for this job. The preset determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. </p>
204    #[serde(rename = "PresetId")]
205    #[serde(skip_serializing_if = "Option::is_none")]
206    pub preset_id: Option<String>,
207    /// <p> The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the input. Enter one of the following values: <code>auto</code>, <code>0</code>, <code>90</code>, <code>180</code>, <code>270</code>. The value <code>auto</code> generally works only if the file that you're transcoding contains rotation metadata. </p>
208    #[serde(rename = "Rotate")]
209    #[serde(skip_serializing_if = "Option::is_none")]
210    pub rotate: Option<String>,
211    /// <p><important> <p>(Outputs in Fragmented MP4 or MPEG-TS format only.</p> </important> <p>If you specify a preset in <code>PresetId</code> for which the value of <code>Container</code> is <code>fmp4</code> (Fragmented MP4) or <code>ts</code> (MPEG-TS), <code>SegmentDuration</code> is the target maximum duration of each segment in seconds. For <code>HLSv3</code> format playlists, each media segment is stored in a separate <code>.ts</code> file. For <code>HLSv4</code> and <code>Smooth</code> playlists, all media segments for an output are stored in a single file. Each segment is approximately the length of the <code>SegmentDuration</code>, though individual segments might be shorter or longer.</p> <p>The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by <code>SegmentDuration</code>, the duration of the last segment is the remainder of total length/SegmentDuration.</p> <p>Elastic Transcoder creates an output-specific playlist for each output <code>HLS</code> output that you specify in OutputKeys. To add an output to the master playlist for this job, include it in the <code>OutputKeys</code> of the associated playlist.</p></p>
212    #[serde(rename = "SegmentDuration")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub segment_duration: Option<String>,
215    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail.</p>
216    #[serde(rename = "ThumbnailEncryption")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub thumbnail_encryption: Option<Encryption>,
219    /// <p>Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want Elastic Transcoder to name the files.</p> <p>If you don't want Elastic Transcoder to create thumbnails, specify "".</p> <p>If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include in the file name for each thumbnail. You can specify the following values in any sequence:</p> <ul> <li> <p> <b> <code>{count}</code> (Required)</b>: If you want to create thumbnails, you must include <code>{count}</code> in the <code>ThumbnailPattern</code> object. Wherever you specify <code>{count}</code>, Elastic Transcoder adds a five-digit sequence number (beginning with <b>00001</b>) to thumbnail file names. The number indicates where a given thumbnail appears in the sequence of thumbnails for a transcoded file. </p> <important> <p>If you specify a literal value and/or <code>{resolution}</code> but you omit <code>{count}</code>, Elastic Transcoder returns a validation error and does not create the job.</p> </important> </li> <li> <p> <b>Literal values (Optional)</b>: You can specify literal values anywhere in the <code>ThumbnailPattern</code> object. For example, you can include them as a file name prefix or as a delimiter between <code>{resolution}</code> and <code>{count}</code>. </p> </li> <li> <p> <b> <code>{resolution}</code> (Optional)</b>: If you want Elastic Transcoder to include the resolution in the file name, include <code>{resolution}</code> in the <code>ThumbnailPattern</code> object. </p> </li> </ul> <p>When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) that appears in the preset that you specified in the <code>PresetID</code> value of <code>CreateJobOutput</code>. Elastic Transcoder also appends the applicable file name extension.</p>
220    #[serde(rename = "ThumbnailPattern")]
221    #[serde(skip_serializing_if = "Option::is_none")]
222    pub thumbnail_pattern: Option<String>,
223    /// <p>Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset for the current output.</p>
224    #[serde(rename = "Watermarks")]
225    #[serde(skip_serializing_if = "Option::is_none")]
226    pub watermarks: Option<Vec<JobWatermark>>,
227}
228
229/// <p>Information about the master playlist.</p>
230#[derive(Clone, Debug, Default, PartialEq, Serialize)]
231#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
232pub struct CreateJobPlaylist {
233    /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
234    #[serde(rename = "Format")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub format: Option<String>,
237    /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
238    #[serde(rename = "HlsContentProtection")]
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub hls_content_protection: Option<HlsContentProtection>,
241    /// <p><p>The name that you want Elastic Transcoder to assign to the master playlist, for example, nyc-vacation.m3u8. If the name includes a <code>/</code> character, the section of the name before the last <code>/</code> must be identical for all <code>Name</code> objects. If you create more than one master playlist, the values of all <code>Name</code> objects must be unique.</p> <note> <p> Elastic Transcoder automatically appends the relevant file extension to the file name (<code>.m3u8</code> for <code>HLSv3</code> and <code>HLSv4</code> playlists, and <code>.ism</code> and <code>.ismc</code> for <code>Smooth</code> playlists). If you include a file extension in <code>Name</code>, the file name will have two extensions.</p> </note></p>
242    #[serde(rename = "Name")]
243    #[serde(skip_serializing_if = "Option::is_none")]
244    pub name: Option<String>,
245    /// <p>For each output in this job that you want to include in a master playlist, the value of the <code>Outputs:Key</code> object. </p> <ul> <li> <p>If your output is not <code>HLS</code> or does not have a segment duration set, the name of the output file is a concatenation of <code>OutputKeyPrefix</code> and <code>Outputs:Key</code>:</p> <p>OutputKeyPrefix<code>Outputs:Key</code> </p> </li> <li> <p>If your output is <code>HLSv3</code> and has a segment duration set, or is not included in a playlist, Elastic Transcoder creates an output playlist file with a file extension of <code>.m3u8</code>, and a series of <code>.ts</code> files that include a five-digit sequential counter beginning with 00000:</p> <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p> </li> <li> <p>If your output is <code>HLSv4</code>, has a segment duration set, and is included in an <code>HLSv4</code> playlist, Elastic Transcoder creates an output playlist file with a file extension of <code>_v4.m3u8</code>. If the output is video, Elastic Transcoder also creates an output file with an extension of <code>_iframe.m3u8</code>:</p> <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p> </li> </ul> <p>Elastic Transcoder automatically appends the relevant file extension to the file name. If you include a file extension in Output Key, the file name will have two extensions.</p> <p>If you include more than one output in a playlist, any segment duration settings, clip settings, or caption settings must be the same for all outputs in the playlist. For <code>Smooth</code> playlists, the <code>Audio:Profile</code>, <code>Video:Profile</code>, and <code>Video:FrameRate</code> to <code>Video:KeyframesMaxDist</code> ratio must be the same for all outputs.</p>
246    #[serde(rename = "OutputKeys")]
247    #[serde(skip_serializing_if = "Option::is_none")]
248    pub output_keys: Option<Vec<String>>,
249    /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
250    #[serde(rename = "PlayReadyDrm")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    pub play_ready_drm: Option<PlayReadyDrm>,
253}
254
255/// <p>The <code>CreateJobRequest</code> structure.</p>
256#[derive(Clone, Debug, Default, PartialEq, Serialize)]
257#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
258pub struct CreateJobRequest {
259    /// <p>A section of the request body that provides information about the file that is being transcoded.</p>
260    #[serde(rename = "Input")]
261    #[serde(skip_serializing_if = "Option::is_none")]
262    pub input: Option<JobInput>,
263    /// <p>A section of the request body that provides information about the files that are being transcoded.</p>
264    #[serde(rename = "Inputs")]
265    #[serde(skip_serializing_if = "Option::is_none")]
266    pub inputs: Option<Vec<JobInput>>,
267    /// <p> A section of the request body that provides information about the transcoded (target) file. We strongly recommend that you use the <code>Outputs</code> syntax instead of the <code>Output</code> syntax. </p>
268    #[serde(rename = "Output")]
269    #[serde(skip_serializing_if = "Option::is_none")]
270    pub output: Option<CreateJobOutput>,
271    /// <p>The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job creates, including output files, thumbnails, and playlists.</p>
272    #[serde(rename = "OutputKeyPrefix")]
273    #[serde(skip_serializing_if = "Option::is_none")]
274    pub output_key_prefix: Option<String>,
275    /// <p> A section of the request body that provides information about the transcoded (target) files. We recommend that you use the <code>Outputs</code> syntax instead of the <code>Output</code> syntax. </p>
276    #[serde(rename = "Outputs")]
277    #[serde(skip_serializing_if = "Option::is_none")]
278    pub outputs: Option<Vec<CreateJobOutput>>,
279    /// <p>The <code>Id</code> of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files to transcode and the bucket into which Elastic Transcoder puts the transcoded files.</p>
280    #[serde(rename = "PipelineId")]
281    pub pipeline_id: String,
282    /// <p>If you specify a preset in <code>PresetId</code> for which the value of <code>Container</code> is fmp4 (Fragmented MP4) or ts (MPEG-TS), Playlists contains information about the master playlists that you want Elastic Transcoder to create.</p> <p>The maximum number of master playlists in a job is 30.</p>
283    #[serde(rename = "Playlists")]
284    #[serde(skip_serializing_if = "Option::is_none")]
285    pub playlists: Option<Vec<CreateJobPlaylist>>,
286    /// <p>User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata in <code>key/value</code> pairs, and you can add up to 10 <code>key/value</code> pairs per job. Elastic Transcoder does not guarantee that <code>key/value</code> pairs are returned in the same order in which you specify them.</p>
287    #[serde(rename = "UserMetadata")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub user_metadata: Option<::std::collections::HashMap<String, String>>,
290}
291
292/// <p>The CreateJobResponse structure.</p>
293#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
294#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
295pub struct CreateJobResponse {
296    /// <p>A section of the response body that provides information about the job that is created.</p>
297    #[serde(rename = "Job")]
298    #[serde(skip_serializing_if = "Option::is_none")]
299    pub job: Option<Job>,
300}
301
302/// <p>The <code>CreatePipelineRequest</code> structure.</p>
303#[derive(Clone, Debug, Default, PartialEq, Serialize)]
304#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
305pub struct CreatePipelineRequest {
306    /// <p>The AWS Key Management Service (AWS KMS) key that you want to use with this pipeline.</p> <p>If you use either <code>s3</code> or <code>s3-aws-kms</code> as your <code>Encryption:Mode</code>, you don't need to provide a key with your job because a default key, known as an AWS-KMS key, is created for you automatically. You need to provide an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if you are using an <code>Encryption:Mode</code> of <code>aes-cbc-pkcs7</code>, <code>aes-ctr</code>, or <code>aes-gcm</code>.</p>
307    #[serde(rename = "AwsKmsKeyArn")]
308    #[serde(skip_serializing_if = "Option::is_none")]
309    pub aws_kms_key_arn: Option<String>,
310    /// <p><p>The optional <code>ContentConfig</code> object specifies information about the Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists: which bucket to use, which users you want to have access to the files, the type of access you want users to have, and the storage class that you want to assign to the files.</p> <p>If you specify values for <code>ContentConfig</code>, you must also specify values for <code>ThumbnailConfig</code>.</p> <p>If you specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code>, omit the <code>OutputBucket</code> object.</p> <ul> <li> <p> <b>Bucket</b>: The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists.</p> </li> <li> <p> <b>Permissions</b> (Optional): The Permissions object specifies which users you want to have access to transcoded files and the type of access you want them to have. You can grant permissions to a maximum of 30 users and/or predefined Amazon S3 groups.</p> </li> <li> <p> <b>Grantee Type</b>: Specify the type of value that appears in the <code>Grantee</code> object: </p> <ul> <li> <p> <b>Canonical</b>: The value in the <code>Grantee</code> object is either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution. For more information about canonical user IDs, see Access Control List (ACL) Overview in the Amazon Simple Storage Service Developer Guide. For more information about using CloudFront origin access identities to require that users use CloudFront URLs instead of Amazon S3 URLs, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <b>Email</b>: The value in the <code>Grantee</code> object is the registered email address of an AWS account.</p> </li> <li> <p> <b>Group</b>: The value in the <code>Grantee</code> object is one of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <b>Grantee</b>: The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group </p> </li> <li> <p> <b>Access</b>: The permission that you want to give to the AWS user that you specified in <code>Grantee</code>. Permissions are granted on the files that Elastic Transcoder adds to the bucket, including playlists and video files. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the objects and metadata for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has <code>READ</code>, <code>READ</em>ACP</code>, and <code>WRITE_ACP</code> permissions for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul> </li> <li> <p> <b>StorageClass</b>: The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the video files and playlists that it stores in your Amazon S3 bucket.</p> </li> </ul></p>
311    #[serde(rename = "ContentConfig")]
312    #[serde(skip_serializing_if = "Option::is_none")]
313    pub content_config: Option<PipelineOutputConfig>,
314    /// <p>The Amazon S3 bucket in which you saved the media files that you want to transcode.</p>
315    #[serde(rename = "InputBucket")]
316    pub input_bucket: String,
317    /// <p>The name of the pipeline. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.</p> <p>Constraints: Maximum 40 characters.</p>
318    #[serde(rename = "Name")]
319    pub name: String,
320    /// <p><p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify to report job status.</p> <important> <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p> </important> <ul> <li> <p> <b>Progressing</b>: The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process a job in this pipeline. This is the ARN that Amazon SNS returned when you created the topic. For more information, see Create a Topic in the Amazon Simple Notification Service Developer Guide.</p> </li> <li> <p> <b>Complete</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing a job in this pipeline. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Warning</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition while processing a job in this pipeline. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Error</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition while processing a job in this pipeline. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> </ul></p>
321    #[serde(rename = "Notifications")]
322    #[serde(skip_serializing_if = "Option::is_none")]
323    pub notifications: Option<Notifications>,
324    /// <p>The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded files. (Use this, or use ContentConfig:Bucket plus ThumbnailConfig:Bucket.)</p> <p>Specify this value when all of the following are true:</p> <ul> <li> <p>You want to save transcoded files, thumbnails (if any), and playlists (if any) together in one bucket.</p> </li> <li> <p>You do not want to specify the users or groups who have access to the transcoded files, thumbnails, and playlists.</p> </li> <li> <p>You do not want to specify the permissions that Elastic Transcoder grants to the files. </p> <important> <p>When Elastic Transcoder saves files in <code>OutputBucket</code>, it grants full control over the files only to the AWS account that owns the role that is specified by <code>Role</code>.</p> </important> </li> <li> <p>You want to associate the transcoded files and thumbnails with the Amazon S3 Standard storage class.</p> </li> </ul> <p>If you want to save transcoded files and playlists in one bucket and thumbnails in another bucket, specify which users can access the transcoded files or the permissions the users have, or change the Amazon S3 storage class, omit <code>OutputBucket</code> and specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code> instead.</p>
325    #[serde(rename = "OutputBucket")]
326    #[serde(skip_serializing_if = "Option::is_none")]
327    pub output_bucket: Option<String>,
328    /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to use to create the pipeline.</p>
329    #[serde(rename = "Role")]
330    pub role: String,
331    /// <p><p>The <code>ThumbnailConfig</code> object specifies several values, including the Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files, which users you want to have access to the files, the type of access you want users to have, and the storage class that you want to assign to the files.</p> <p>If you specify values for <code>ContentConfig</code>, you must also specify values for <code>ThumbnailConfig</code> even if you don&#39;t want to create thumbnails.</p> <p>If you specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code>, omit the <code>OutputBucket</code> object.</p> <ul> <li> <p> <b>Bucket</b>: The Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files.</p> </li> <li> <p> <b>Permissions</b> (Optional): The <code>Permissions</code> object specifies which users and/or predefined Amazon S3 groups you want to have access to thumbnail files, and the type of access you want them to have. You can grant permissions to a maximum of 30 users and/or predefined Amazon S3 groups.</p> </li> <li> <p> <b>GranteeType</b>: Specify the type of value that appears in the Grantee object: </p> <ul> <li> <p> <b>Canonical</b>: The value in the <code>Grantee</code> object is either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <b>Email</b>: The value in the <code>Grantee</code> object is the registered email address of an AWS account. </p> </li> <li> <p> <b>Group</b>: The value in the <code>Grantee</code> object is one of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <b>Grantee</b>: The AWS user or group that you want to have access to thumbnail files. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group. </p> </li> <li> <p> <b>Access</b>: The permission that you want to give to the AWS user that you specified in <code>Grantee</code>. Permissions are granted on the thumbnail files that Elastic Transcoder adds to the bucket. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the thumbnails and metadata for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has <code>READ</code>, <code>READ</em>ACP</code>, and <code>WRITE_ACP</code> permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul> </li> <li> <p> <b>StorageClass</b>: The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the thumbnails that it stores in your Amazon S3 bucket.</p> </li> </ul></p>
332    #[serde(rename = "ThumbnailConfig")]
333    #[serde(skip_serializing_if = "Option::is_none")]
334    pub thumbnail_config: Option<PipelineOutputConfig>,
335}
336
337/// <p>When you create a pipeline, Elastic Transcoder returns the values that you specified in the request.</p>
338#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
339#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
340pub struct CreatePipelineResponse {
341    /// <p>A section of the response body that provides information about the pipeline that is created.</p>
342    #[serde(rename = "Pipeline")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub pipeline: Option<Pipeline>,
345    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p> <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
346    #[serde(rename = "Warnings")]
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub warnings: Option<Vec<Warning>>,
349}
350
351/// <p>The <code>CreatePresetRequest</code> structure.</p>
352#[derive(Clone, Debug, Default, PartialEq, Serialize)]
353#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
354pub struct CreatePresetRequest {
355    /// <p>A section of the request body that specifies the audio parameters.</p>
356    #[serde(rename = "Audio")]
357    #[serde(skip_serializing_if = "Option::is_none")]
358    pub audio: Option<AudioParameters>,
359    /// <p>The container type for the output file. Valid values include <code>flac</code>, <code>flv</code>, <code>fmp4</code>, <code>gif</code>, <code>mp3</code>, <code>mp4</code>, <code>mpg</code>, <code>mxf</code>, <code>oga</code>, <code>ogg</code>, <code>ts</code>, and <code>webm</code>.</p>
360    #[serde(rename = "Container")]
361    pub container: String,
362    /// <p>A description of the preset.</p>
363    #[serde(rename = "Description")]
364    #[serde(skip_serializing_if = "Option::is_none")]
365    pub description: Option<String>,
366    /// <p>The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.</p>
367    #[serde(rename = "Name")]
368    pub name: String,
369    /// <p>A section of the request body that specifies the thumbnail parameters, if any.</p>
370    #[serde(rename = "Thumbnails")]
371    #[serde(skip_serializing_if = "Option::is_none")]
372    pub thumbnails: Option<Thumbnails>,
373    /// <p>A section of the request body that specifies the video parameters.</p>
374    #[serde(rename = "Video")]
375    #[serde(skip_serializing_if = "Option::is_none")]
376    pub video: Option<VideoParameters>,
377}
378
379/// <p>The <code>CreatePresetResponse</code> structure.</p>
380#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
381#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
382pub struct CreatePresetResponse {
383    /// <p>A section of the response body that provides information about the preset that is created.</p>
384    #[serde(rename = "Preset")]
385    #[serde(skip_serializing_if = "Option::is_none")]
386    pub preset: Option<Preset>,
387    /// <p>If the preset settings don't comply with the standards for the video codec but Elastic Transcoder created the preset, this message explains the reason the preset settings don't meet the standard. Elastic Transcoder created the preset because the settings might produce acceptable output.</p>
388    #[serde(rename = "Warning")]
389    #[serde(skip_serializing_if = "Option::is_none")]
390    pub warning: Option<String>,
391}
392
393/// <p>The <code>DeletePipelineRequest</code> structure.</p>
394#[derive(Clone, Debug, Default, PartialEq, Serialize)]
395#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
396pub struct DeletePipelineRequest {
397    /// <p>The identifier of the pipeline that you want to delete.</p>
398    #[serde(rename = "Id")]
399    pub id: String,
400}
401
402/// <p>The <code>DeletePipelineResponse</code> structure.</p>
403#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
404#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
405pub struct DeletePipelineResponse {}
406
407/// <p>The <code>DeletePresetRequest</code> structure.</p>
408#[derive(Clone, Debug, Default, PartialEq, Serialize)]
409#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
410pub struct DeletePresetRequest {
411    /// <p>The identifier of the preset for which you want to get detailed information.</p>
412    #[serde(rename = "Id")]
413    pub id: String,
414}
415
416/// <p>The <code>DeletePresetResponse</code> structure.</p>
417#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
418#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
419pub struct DeletePresetResponse {}
420
421/// <p>The detected properties of the input file. Elastic Transcoder identifies these values from the input file.</p>
422#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
423pub struct DetectedProperties {
424    /// <p>The detected duration of the input file, in milliseconds.</p>
425    #[serde(rename = "DurationMillis")]
426    #[serde(skip_serializing_if = "Option::is_none")]
427    pub duration_millis: Option<i64>,
428    /// <p>The detected file size of the input file, in bytes.</p>
429    #[serde(rename = "FileSize")]
430    #[serde(skip_serializing_if = "Option::is_none")]
431    pub file_size: Option<i64>,
432    /// <p>The detected frame rate of the input file, in frames per second.</p>
433    #[serde(rename = "FrameRate")]
434    #[serde(skip_serializing_if = "Option::is_none")]
435    pub frame_rate: Option<String>,
436    /// <p>The detected height of the input file, in pixels.</p>
437    #[serde(rename = "Height")]
438    #[serde(skip_serializing_if = "Option::is_none")]
439    pub height: Option<i64>,
440    /// <p>The detected width of the input file, in pixels.</p>
441    #[serde(rename = "Width")]
442    #[serde(skip_serializing_if = "Option::is_none")]
443    pub width: Option<i64>,
444}
445
446/// <p>The encryption settings, if any, that are used for decrypting your input files or encrypting your output files. If your input file is encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file, otherwise you must specify the mode you want Elastic Transcoder to use to encrypt your output files.</p>
447#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
448pub struct Encryption {
449    /// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you used to encrypt your input files or that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
450    #[serde(rename = "InitializationVector")]
451    #[serde(skip_serializing_if = "Option::is_none")]
452    pub initialization_vector: Option<String>,
453    /// <p>The data encryption key that you want Elastic Transcoder to use to encrypt your output file, or that was used to encrypt your input file. The key must be base64-encoded and it must be one of the following bit lengths before being base64-encoded:</p> <p> <code>128</code>, <code>192</code>, or <code>256</code>. </p> <p>The key must also be encrypted by using the Amazon Key Management Service.</p>
454    #[serde(rename = "Key")]
455    #[serde(skip_serializing_if = "Option::is_none")]
456    pub key: Option<String>,
457    /// <p>The MD5 digest of the key that you used to encrypt your input file, or that you want Elastic Transcoder to use to encrypt your output file. Elastic Transcoder uses the key digest as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes long before being base64-encoded.</p>
458    #[serde(rename = "KeyMd5")]
459    #[serde(skip_serializing_if = "Option::is_none")]
460    pub key_md_5: Option<String>,
461    /// <p><p>The specific server-side encryption mode that you want Elastic Transcoder to use when decrypting your input files or encrypting your output files. Elastic Transcoder supports the following options:</p> <ul> <li> <p> <b>s3:</b> Amazon S3 creates and manages the keys used for encrypting your files.</p> </li> <li> <p> <b>s3-aws-kms:</b> Amazon S3 calls the Amazon Key Management Service, which creates and manages the keys that are used for encrypting your files. If you specify <code>s3-aws-kms</code> and you don&#39;t want to use the default key, you must add the AWS-KMS key that you want to use to your pipeline.</p> </li> <li> <p> <b>aes-cbc-pkcs7:</b> A padded cipher-block mode of operation originally used for HLS files.</p> </li> <li> <p> <b>aes-ctr:</b> AES Counter Mode.</p> </li> <li> <p> <b>aes-gcm:</b> AES Galois Counter Mode, a mode of operation that is an authenticated encryption format, meaning that a file, key, or initialization vector that has been tampered with fails the decryption process.</p> </li> </ul> <p>For all three AES options, you must provide the following settings, which must be base64-encoded:</p> <ul> <li> <p> <b>Key</b> </p> </li> <li> <p> <b>Key MD5</b> </p> </li> <li> <p> <b>Initialization Vector</b> </p> </li> </ul> <important> <p>For the AES modes, your private encryption keys and your unencrypted data are never stored by AWS; therefore, it is important that you safely manage your encryption keys. If you lose them, you won&#39;t be able to unencrypt your data.</p> </important></p>
462    #[serde(rename = "Mode")]
463    #[serde(skip_serializing_if = "Option::is_none")]
464    pub mode: Option<String>,
465}
466
467/// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to your output files.</p>
468#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
469pub struct HlsContentProtection {
470    /// <p>If Elastic Transcoder is generating your key for you, you must leave this field blank.</p> <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you want Elastic Transcoder to use to encrypt your output files. The initialization vector must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.</p>
471    #[serde(rename = "InitializationVector")]
472    #[serde(skip_serializing_if = "Option::is_none")]
473    pub initialization_vector: Option<String>,
474    /// <p>If you want Elastic Transcoder to generate a key for you, leave this field blank.</p> <p>If you choose to supply your own key, you must encrypt the key by using AWS KMS. The key must be base64-encoded, and it must be one of the following bit lengths before being base64-encoded:</p> <p> <code>128</code>, <code>192</code>, or <code>256</code>. </p>
475    #[serde(rename = "Key")]
476    #[serde(skip_serializing_if = "Option::is_none")]
477    pub key: Option<String>,
478    /// <p>If Elastic Transcoder is generating your key for you, you must leave this field blank.</p> <p>The MD5 digest of the key that you want Elastic Transcoder to use to encrypt your output file, and that you want Elastic Transcoder to use as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes before being base64- encoded.</p>
479    #[serde(rename = "KeyMd5")]
480    #[serde(skip_serializing_if = "Option::is_none")]
481    pub key_md_5: Option<String>,
482    /// <p>Specify whether you want Elastic Transcoder to write your HLS license key to an Amazon S3 bucket. If you choose <code>WithVariantPlaylists</code>, <code>LicenseAcquisitionUrl</code> must be left blank and Elastic Transcoder writes your data key into the same bucket as the associated playlist.</p>
483    #[serde(rename = "KeyStoragePolicy")]
484    #[serde(skip_serializing_if = "Option::is_none")]
485    pub key_storage_policy: Option<String>,
486    /// <p>The location of the license key required to decrypt your HLS playlist. The URL must be an absolute path, and is referenced in the URI attribute of the EXT-X-KEY metadata tag in the playlist file.</p>
487    #[serde(rename = "LicenseAcquisitionUrl")]
488    #[serde(skip_serializing_if = "Option::is_none")]
489    pub license_acquisition_url: Option<String>,
490    /// <p>The content protection method for your output. The only valid value is: <code>aes-128</code>.</p> <p>This value is written into the method attribute of the <code>EXT-X-KEY</code> metadata tag in the output playlist.</p>
491    #[serde(rename = "Method")]
492    #[serde(skip_serializing_if = "Option::is_none")]
493    pub method: Option<String>,
494}
495
496/// <p>The captions to be created, if any.</p>
497#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
498pub struct InputCaptions {
499    /// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
500    #[serde(rename = "CaptionSources")]
501    #[serde(skip_serializing_if = "Option::is_none")]
502    pub caption_sources: Option<Vec<CaptionSource>>,
503    /// <p>A policy that determines how Elastic Transcoder handles the existence of multiple captions.</p> <ul> <li> <p> <b>MergeOverride:</b> Elastic Transcoder transcodes both embedded and sidecar captions into outputs. If captions for a language are embedded in the input file and also appear in a sidecar file, Elastic Transcoder uses the sidecar captions and ignores the embedded captions for that language.</p> </li> <li> <p> <b>MergeRetain:</b> Elastic Transcoder transcodes both embedded and sidecar captions into outputs. If captions for a language are embedded in the input file and also appear in a sidecar file, Elastic Transcoder uses the embedded captions and ignores the sidecar captions for that language. If <code>CaptionSources</code> is empty, Elastic Transcoder omits all sidecar captions from the output files.</p> </li> <li> <p> <b>Override:</b> Elastic Transcoder transcodes only the sidecar captions that you specify in <code>CaptionSources</code>.</p> </li> </ul> <p> <code>MergePolicy</code> cannot be null.</p>
504    #[serde(rename = "MergePolicy")]
505    #[serde(skip_serializing_if = "Option::is_none")]
506    pub merge_policy: Option<String>,
507}
508
509/// <p>A section of the response body that provides information about the job that is created.</p>
510#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
511#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
512pub struct Job {
513    /// <p>The Amazon Resource Name (ARN) for the job.</p>
514    #[serde(rename = "Arn")]
515    #[serde(skip_serializing_if = "Option::is_none")]
516    pub arn: Option<String>,
517    /// <p>The identifier that Elastic Transcoder assigned to the job. You use this value to get settings for the job or to delete the job.</p>
518    #[serde(rename = "Id")]
519    #[serde(skip_serializing_if = "Option::is_none")]
520    pub id: Option<String>,
521    /// <p>A section of the request or response body that provides information about the file that is being transcoded.</p>
522    #[serde(rename = "Input")]
523    #[serde(skip_serializing_if = "Option::is_none")]
524    pub input: Option<JobInput>,
525    /// <p>Information about the files that you're transcoding. If you specified multiple files for this job, Elastic Transcoder stitches the files together to make one output.</p>
526    #[serde(rename = "Inputs")]
527    #[serde(skip_serializing_if = "Option::is_none")]
528    pub inputs: Option<Vec<JobInput>>,
529    /// <p>If you specified one output for a job, information about that output. If you specified multiple outputs for a job, the Output object lists information about the first output. This duplicates the information that is listed for the first output in the Outputs object.</p> <important> <p>Outputs recommended instead.</p> </important> <p>A section of the request or response body that provides information about the transcoded (target) file. </p>
530    #[serde(rename = "Output")]
531    #[serde(skip_serializing_if = "Option::is_none")]
532    pub output: Option<JobOutput>,
533    /// <p>The value, if any, that you want Elastic Transcoder to prepend to the names of all files that this job creates, including output files, thumbnails, and playlists. We recommend that you add a / or some other delimiter to the end of the <code>OutputKeyPrefix</code>.</p>
534    #[serde(rename = "OutputKeyPrefix")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub output_key_prefix: Option<String>,
537    /// <p>Information about the output files. We recommend that you use the <code>Outputs</code> syntax for all jobs, even when you want Elastic Transcoder to transcode a file into only one format. Do not use both the <code>Outputs</code> and <code>Output</code> syntaxes in the same request. You can create a maximum of 30 outputs per job. </p> <p>If you specify more than one output for a job, Elastic Transcoder creates the files for each output in the order in which you specify them in the job.</p>
538    #[serde(rename = "Outputs")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub outputs: Option<Vec<JobOutput>>,
541    /// <p> The <code>Id</code> of the pipeline that you want Elastic Transcoder to use for transcoding. The pipeline determines several settings, including the Amazon S3 bucket from which Elastic Transcoder gets the files to transcode and the bucket into which Elastic Transcoder puts the transcoded files. </p>
542    #[serde(rename = "PipelineId")]
543    #[serde(skip_serializing_if = "Option::is_none")]
544    pub pipeline_id: Option<String>,
545    /// <p><important> <p>Outputs in Fragmented MP4 or MPEG-TS format only.</p> </important> <p>If you specify a preset in <code>PresetId</code> for which the value of <code>Container</code> is fmp4 (Fragmented MP4) or ts (MPEG-TS), <code>Playlists</code> contains information about the master playlists that you want Elastic Transcoder to create.</p> <p>The maximum number of master playlists in a job is 30.</p></p>
546    #[serde(rename = "Playlists")]
547    #[serde(skip_serializing_if = "Option::is_none")]
548    pub playlists: Option<Vec<Playlist>>,
549    /// <p> The status of the job: <code>Submitted</code>, <code>Progressing</code>, <code>Complete</code>, <code>Canceled</code>, or <code>Error</code>. </p>
550    #[serde(rename = "Status")]
551    #[serde(skip_serializing_if = "Option::is_none")]
552    pub status: Option<String>,
553    /// <p>Details about the timing of a job.</p>
554    #[serde(rename = "Timing")]
555    #[serde(skip_serializing_if = "Option::is_none")]
556    pub timing: Option<Timing>,
557    /// <p><p>User-defined metadata that you want to associate with an Elastic Transcoder job. You specify metadata in <code>key/value</code> pairs, and you can add up to 10 <code>key/value</code> pairs per job. Elastic Transcoder does not guarantee that <code>key/value</code> pairs are returned in the same order in which you specify them.</p> <p>Metadata <code>keys</code> and <code>values</code> must use characters from the following list:</p> <ul> <li> <p> <code>0-9</code> </p> </li> <li> <p> <code>A-Z</code> and <code>a-z</code> </p> </li> <li> <p> <code>Space</code> </p> </li> <li> <p>The following symbols: <code>_.:/=+-%@</code> </p> </li> </ul></p>
558    #[serde(rename = "UserMetadata")]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    pub user_metadata: Option<::std::collections::HashMap<String, String>>,
561}
562
563/// <p>The .jpg or .png file associated with an audio file.</p>
564#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
565pub struct JobAlbumArt {
566    /// <p>The file to be used as album art. There can be multiple artworks associated with an audio file, to a maximum of 20. Valid formats are <code>.jpg</code> and <code>.png</code> </p>
567    #[serde(rename = "Artwork")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub artwork: Option<Vec<Artwork>>,
570    /// <p><p>A policy that determines how Elastic Transcoder handles the existence of multiple album artwork files.</p> <ul> <li> <p> <code>Replace:</code> The specified album art replaces any existing album art.</p> </li> <li> <p> <code>Prepend:</code> The specified album art is placed in front of any existing album art.</p> </li> <li> <p> <code>Append:</code> The specified album art is placed after any existing album art.</p> </li> <li> <p> <code>Fallback:</code> If the original input file contains artwork, Elastic Transcoder uses that artwork for the output. If the original input does not contain artwork, Elastic Transcoder uses the specified album art file.</p> </li> </ul></p>
571    #[serde(rename = "MergePolicy")]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub merge_policy: Option<String>,
574}
575
576/// <p>Information about the file that you're transcoding.</p>
577#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
578pub struct JobInput {
579    /// <p> The aspect ratio of the input file. If you want Elastic Transcoder to automatically detect the aspect ratio of the input file, specify <code>auto</code>. If you want to specify the aspect ratio for the output file, enter one of the following values: </p> <p> <code>1:1</code>, <code>4:3</code>, <code>3:2</code>, <code>16:9</code> </p> <p> If you specify a value other than <code>auto</code>, Elastic Transcoder disables automatic detection of the aspect ratio. </p>
580    #[serde(rename = "AspectRatio")]
581    #[serde(skip_serializing_if = "Option::is_none")]
582    pub aspect_ratio: Option<String>,
583    /// <p>The container type for the input file. If you want Elastic Transcoder to automatically detect the container type of the input file, specify <code>auto</code>. If you want to specify the container type for the input file, enter one of the following values: </p> <p> <code>3gp</code>, <code>aac</code>, <code>asf</code>, <code>avi</code>, <code>divx</code>, <code>flv</code>, <code>m4a</code>, <code>mkv</code>, <code>mov</code>, <code>mp3</code>, <code>mp4</code>, <code>mpeg</code>, <code>mpeg-ps</code>, <code>mpeg-ts</code>, <code>mxf</code>, <code>ogg</code>, <code>vob</code>, <code>wav</code>, <code>webm</code> </p>
584    #[serde(rename = "Container")]
585    #[serde(skip_serializing_if = "Option::is_none")]
586    pub container: Option<String>,
587    /// <p>The detected properties of the input file.</p>
588    #[serde(rename = "DetectedProperties")]
589    #[serde(skip_serializing_if = "Option::is_none")]
590    pub detected_properties: Option<DetectedProperties>,
591    /// <p>The encryption settings, if any, that are used for decrypting your input files. If your input file is encrypted, you must specify the mode that Elastic Transcoder uses to decrypt your file.</p>
592    #[serde(rename = "Encryption")]
593    #[serde(skip_serializing_if = "Option::is_none")]
594    pub encryption: Option<Encryption>,
595    /// <p>The frame rate of the input file. If you want Elastic Transcoder to automatically detect the frame rate of the input file, specify <code>auto</code>. If you want to specify the frame rate for the input file, enter one of the following values: </p> <p> <code>10</code>, <code>15</code>, <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>, <code>30</code>, <code>60</code> </p> <p>If you specify a value other than <code>auto</code>, Elastic Transcoder disables automatic detection of the frame rate.</p>
596    #[serde(rename = "FrameRate")]
597    #[serde(skip_serializing_if = "Option::is_none")]
598    pub frame_rate: Option<String>,
599    /// <p>You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All captions must be in UTF-8. Elastic Transcoder supports two types of captions:</p> <ul> <li> <p> <b>Embedded:</b> Embedded captions are included in the same file as the audio and video. Elastic Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per file.</p> <p>Valid input values include: <code>CEA-608 (EIA-608</code>, first non-empty channel only), <code>CEA-708 (EIA-708</code>, first non-empty channel only), and <code>mov-text</code> </p> <p>Valid outputs include: <code>mov-text</code> </p> <p>Elastic Transcoder supports a maximum of one embedded format per output.</p> </li> <li> <p> <b>Sidecar:</b> Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar captions require a player that is capable of understanding the relationship between the video file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar captions per file.</p> <p>Valid input values include: <code>dfxp</code> (first div element only), <code>ebu-tt</code>, <code>scc</code>, <code>smpt</code>, <code>srt</code>, <code>ttml</code> (first div element only), and <code>webvtt</code> </p> <p>Valid outputs include: <code>dfxp</code> (first div element only), <code>scc</code>, <code>srt</code>, and <code>webvtt</code>.</p> </li> </ul> <p>If you want ttml or smpte-tt compatible captions, specify dfxp as your output format.</p> <p>Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve text formatting (for example, italics) during the transcoding process.</p> <p>To remove captions or leave the captions empty, set <code>Captions</code> to null. To pass through existing captions unchanged, set the <code>MergePolicy</code> to <code>MergeRetain</code>, and pass in a null <code>CaptionSources</code> array.</p> <p>For more information on embedded files, see the Subtitles Wikipedia page.</p> <p>For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages.</p>
600    #[serde(rename = "InputCaptions")]
601    #[serde(skip_serializing_if = "Option::is_none")]
602    pub input_captions: Option<InputCaptions>,
603    /// <p>Whether the input file is interlaced. If you want Elastic Transcoder to automatically detect whether the input file is interlaced, specify <code>auto</code>. If you want to specify whether the input file is interlaced, enter one of the following values:</p> <p> <code>true</code>, <code>false</code> </p> <p>If you specify a value other than <code>auto</code>, Elastic Transcoder disables automatic detection of interlacing.</p>
604    #[serde(rename = "Interlaced")]
605    #[serde(skip_serializing_if = "Option::is_none")]
606    pub interlaced: Option<String>,
607    /// <p> The name of the file to transcode. Elsewhere in the body of the JSON block is the the ID of the pipeline to use for processing the job. The <code>InputBucket</code> object in that pipeline tells Elastic Transcoder which Amazon S3 bucket to get the file from. </p> <p>If the file name includes a prefix, such as <code>cooking/lasagna.mpg</code>, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.</p>
608    #[serde(rename = "Key")]
609    #[serde(skip_serializing_if = "Option::is_none")]
610    pub key: Option<String>,
611    /// <p>This value must be <code>auto</code>, which causes Elastic Transcoder to automatically detect the resolution of the input file.</p>
612    #[serde(rename = "Resolution")]
613    #[serde(skip_serializing_if = "Option::is_none")]
614    pub resolution: Option<String>,
615    /// <p>Settings for clipping an input. Each input can have different clip settings.</p>
616    #[serde(rename = "TimeSpan")]
617    #[serde(skip_serializing_if = "Option::is_none")]
618    pub time_span: Option<TimeSpan>,
619}
620
621/// <p><important> <p>Outputs recommended instead.</p> </important> <p>If you specified one output for a job, information about that output. If you specified multiple outputs for a job, the <code>Output</code> object lists information about the first output. This duplicates the information that is listed for the first output in the <code>Outputs</code> object.</p></p>
622#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
623#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
624pub struct JobOutput {
625    /// <p>The album art to be associated with the output file, if any.</p>
626    #[serde(rename = "AlbumArt")]
627    #[serde(skip_serializing_if = "Option::is_none")]
628    pub album_art: Option<JobAlbumArt>,
629    /// <p>If Elastic Transcoder used a preset with a <code>ColorSpaceConversionMode</code> to transcode the output file, the <code>AppliedColorSpaceConversion</code> parameter shows the conversion used. If no <code>ColorSpaceConversionMode</code> was defined in the preset, this parameter is not be included in the job response.</p>
630    #[serde(rename = "AppliedColorSpaceConversion")]
631    #[serde(skip_serializing_if = "Option::is_none")]
632    pub applied_color_space_conversion: Option<String>,
633    /// <p>You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All captions must be in UTF-8. Elastic Transcoder supports two types of captions:</p> <ul> <li> <p> <b>Embedded:</b> Embedded captions are included in the same file as the audio and video. Elastic Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per file.</p> <p>Valid input values include: <code>CEA-608 (EIA-608</code>, first non-empty channel only), <code>CEA-708 (EIA-708</code>, first non-empty channel only), and <code>mov-text</code> </p> <p>Valid outputs include: <code>mov-text</code> </p> <p>Elastic Transcoder supports a maximum of one embedded format per output.</p> </li> <li> <p> <b>Sidecar:</b> Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar captions require a player that is capable of understanding the relationship between the video file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar captions per file.</p> <p>Valid input values include: <code>dfxp</code> (first div element only), <code>ebu-tt</code>, <code>scc</code>, <code>smpt</code>, <code>srt</code>, <code>ttml</code> (first div element only), and <code>webvtt</code> </p> <p>Valid outputs include: <code>dfxp</code> (first div element only), <code>scc</code>, <code>srt</code>, and <code>webvtt</code>.</p> </li> </ul> <p>If you want ttml or smpte-tt compatible captions, specify dfxp as your output format.</p> <p>Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve text formatting (for example, italics) during the transcoding process.</p> <p>To remove captions or leave the captions empty, set <code>Captions</code> to null. To pass through existing captions unchanged, set the <code>MergePolicy</code> to <code>MergeRetain</code>, and pass in a null <code>CaptionSources</code> array.</p> <p>For more information on embedded files, see the Subtitles Wikipedia page.</p> <p>For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages.</p>
634    #[serde(rename = "Captions")]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    pub captions: Option<Captions>,
637    /// <p>Duration of the output file, in seconds.</p>
638    #[serde(rename = "Duration")]
639    #[serde(skip_serializing_if = "Option::is_none")]
640    pub duration: Option<i64>,
641    /// <p>Duration of the output file, in milliseconds.</p>
642    #[serde(rename = "DurationMillis")]
643    #[serde(skip_serializing_if = "Option::is_none")]
644    pub duration_millis: Option<i64>,
645    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you choose to use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic Transcoder writes an unencrypted file to your Amazon S3 bucket.</p>
646    #[serde(rename = "Encryption")]
647    #[serde(skip_serializing_if = "Option::is_none")]
648    pub encryption: Option<Encryption>,
649    /// <p>File size of the output file, in bytes.</p>
650    #[serde(rename = "FileSize")]
651    #[serde(skip_serializing_if = "Option::is_none")]
652    pub file_size: Option<i64>,
653    /// <p>Frame rate of the output file, in frames per second.</p>
654    #[serde(rename = "FrameRate")]
655    #[serde(skip_serializing_if = "Option::is_none")]
656    pub frame_rate: Option<String>,
657    /// <p>Height of the output file, in pixels.</p>
658    #[serde(rename = "Height")]
659    #[serde(skip_serializing_if = "Option::is_none")]
660    pub height: Option<i64>,
661    /// <p>A sequential counter, starting with 1, that identifies an output among the outputs from the current job. In the Output syntax, this value is always 1.</p>
662    #[serde(rename = "Id")]
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub id: Option<String>,
665    /// <p> The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket specified by the <code>OutputBucket</code> object in the pipeline that is specified by the pipeline ID.</p>
666    #[serde(rename = "Key")]
667    #[serde(skip_serializing_if = "Option::is_none")]
668    pub key: Option<String>,
669    /// <p>The value of the <code>Id</code> object for the preset that you want to use for this job. The preset determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. To use a preset that you created, specify the preset ID that Elastic Transcoder returned in the response when you created the preset. You can also use the Elastic Transcoder system presets, which you can get with <code>ListPresets</code>.</p>
670    #[serde(rename = "PresetId")]
671    #[serde(skip_serializing_if = "Option::is_none")]
672    pub preset_id: Option<String>,
673    /// <p>The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the input. Enter one of the following values:</p> <p> <code>auto</code>, <code>0</code>, <code>90</code>, <code>180</code>, <code>270</code> </p> <p> The value <code>auto</code> generally works only if the file that you're transcoding contains rotation metadata.</p>
674    #[serde(rename = "Rotate")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub rotate: Option<String>,
677    /// <p><important> <p>(Outputs in Fragmented MP4 or MPEG-TS format only.</p> </important> <p>If you specify a preset in <code>PresetId</code> for which the value of <code>Container</code> is <code>fmp4</code> (Fragmented MP4) or <code>ts</code> (MPEG-TS), <code>SegmentDuration</code> is the target maximum duration of each segment in seconds. For <code>HLSv3</code> format playlists, each media segment is stored in a separate <code>.ts</code> file. For <code>HLSv4</code>, <code>MPEG-DASH</code>, and <code>Smooth</code> playlists, all media segments for an output are stored in a single file. Each segment is approximately the length of the <code>SegmentDuration</code>, though individual segments might be shorter or longer.</p> <p>The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by <code>SegmentDuration</code>, the duration of the last segment is the remainder of total length/SegmentDuration.</p> <p>Elastic Transcoder creates an output-specific playlist for each output <code>HLS</code> output that you specify in OutputKeys. To add an output to the master playlist for this job, include it in the <code>OutputKeys</code> of the associated playlist.</p></p>
678    #[serde(rename = "SegmentDuration")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub segment_duration: Option<String>,
681    /// <p> The status of one output in a job. If you specified only one output for the job, <code>Outputs:Status</code> is always the same as <code>Job:Status</code>. If you specified more than one output: </p> <ul> <li> <p> <code>Job:Status</code> and <code>Outputs:Status</code> for all of the outputs is Submitted until Elastic Transcoder starts to process the first output.</p> </li> <li> <p>When Elastic Transcoder starts to process the first output, <code>Outputs:Status</code> for that output and <code>Job:Status</code> both change to Progressing. For each output, the value of <code>Outputs:Status</code> remains Submitted until Elastic Transcoder starts to process the output.</p> </li> <li> <p>Job:Status remains Progressing until all of the outputs reach a terminal status, either Complete or Error.</p> </li> <li> <p>When all of the outputs reach a terminal status, <code>Job:Status</code> changes to Complete only if <code>Outputs:Status</code> for all of the outputs is <code>Complete</code>. If <code>Outputs:Status</code> for one or more outputs is <code>Error</code>, the terminal status for <code>Job:Status</code> is also <code>Error</code>.</p> </li> </ul> <p>The value of <code>Status</code> is one of the following: <code>Submitted</code>, <code>Progressing</code>, <code>Complete</code>, <code>Canceled</code>, or <code>Error</code>. </p>
682    #[serde(rename = "Status")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub status: Option<String>,
685    /// <p>Information that further explains <code>Status</code>.</p>
686    #[serde(rename = "StatusDetail")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub status_detail: Option<String>,
689    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail.</p>
690    #[serde(rename = "ThumbnailEncryption")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub thumbnail_encryption: Option<Encryption>,
693    /// <p>Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want Elastic Transcoder to name the files.</p> <p>If you don't want Elastic Transcoder to create thumbnails, specify "".</p> <p>If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include in the file name for each thumbnail. You can specify the following values in any sequence:</p> <ul> <li> <p> <b> <code>{count}</code> (Required)</b>: If you want to create thumbnails, you must include <code>{count}</code> in the <code>ThumbnailPattern</code> object. Wherever you specify <code>{count}</code>, Elastic Transcoder adds a five-digit sequence number (beginning with <b>00001</b>) to thumbnail file names. The number indicates where a given thumbnail appears in the sequence of thumbnails for a transcoded file. </p> <important> <p>If you specify a literal value and/or <code>{resolution}</code> but you omit <code>{count}</code>, Elastic Transcoder returns a validation error and does not create the job.</p> </important> </li> <li> <p> <b>Literal values (Optional)</b>: You can specify literal values anywhere in the <code>ThumbnailPattern</code> object. For example, you can include them as a file name prefix or as a delimiter between <code>{resolution}</code> and <code>{count}</code>. </p> </li> <li> <p> <b> <code>{resolution}</code> (Optional)</b>: If you want Elastic Transcoder to include the resolution in the file name, include <code>{resolution}</code> in the <code>ThumbnailPattern</code> object. </p> </li> </ul> <p>When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) that appears in the preset that you specified in the <code>PresetID</code> value of <code>CreateJobOutput</code>. Elastic Transcoder also appends the applicable file name extension.</p>
694    #[serde(rename = "ThumbnailPattern")]
695    #[serde(skip_serializing_if = "Option::is_none")]
696    pub thumbnail_pattern: Option<String>,
697    /// <p>Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset that you specify in <code>Preset</code> for the current output.</p> <p>Watermarks are added to the output video in the sequence in which you list them in the job output—the first watermark in the list is added to the output video first, the second watermark in the list is added next, and so on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same location, the second watermark that you add covers the first one, the third one covers the second, and the fourth one covers the third.</p>
698    #[serde(rename = "Watermarks")]
699    #[serde(skip_serializing_if = "Option::is_none")]
700    pub watermarks: Option<Vec<JobWatermark>>,
701    /// <p>Specifies the width of the output file in pixels.</p>
702    #[serde(rename = "Width")]
703    #[serde(skip_serializing_if = "Option::is_none")]
704    pub width: Option<i64>,
705}
706
707/// <p>Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.</p>
708#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
709pub struct JobWatermark {
710    /// <p>The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.</p>
711    #[serde(rename = "Encryption")]
712    #[serde(skip_serializing_if = "Option::is_none")]
713    pub encryption: Option<Encryption>,
714    /// <p> The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by <code>Pipeline</code>; the <code>Input Bucket</code> object in that pipeline identifies the bucket.</p> <p> If the file name includes a prefix, for example, <b>logos/128x64.png</b>, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error. </p>
715    #[serde(rename = "InputKey")]
716    #[serde(skip_serializing_if = "Option::is_none")]
717    pub input_key: Option<String>,
718    /// <p>The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.</p>
719    #[serde(rename = "PresetWatermarkId")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub preset_watermark_id: Option<String>,
722}
723
724/// <p>The <code>ListJobsByPipelineRequest</code> structure.</p>
725#[derive(Clone, Debug, Default, PartialEq, Serialize)]
726#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
727pub struct ListJobsByPipelineRequest {
728    /// <p> To list jobs in chronological order by the date and time that they were submitted, enter <code>true</code>. To list jobs in reverse chronological order, enter <code>false</code>. </p>
729    #[serde(rename = "Ascending")]
730    #[serde(skip_serializing_if = "Option::is_none")]
731    pub ascending: Option<String>,
732    /// <p> When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </p>
733    #[serde(rename = "PageToken")]
734    #[serde(skip_serializing_if = "Option::is_none")]
735    pub page_token: Option<String>,
736    /// <p>The ID of the pipeline for which you want to get job information.</p>
737    #[serde(rename = "PipelineId")]
738    pub pipeline_id: String,
739}
740
741/// <p>The <code>ListJobsByPipelineResponse</code> structure.</p>
742#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
743#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
744pub struct ListJobsByPipelineResponse {
745    /// <p>An array of <code>Job</code> objects that are in the specified pipeline.</p>
746    #[serde(rename = "Jobs")]
747    #[serde(skip_serializing_if = "Option::is_none")]
748    pub jobs: Option<Vec<Job>>,
749    /// <p> A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of <code>NextPageToken</code> is <code>null</code>. </p>
750    #[serde(rename = "NextPageToken")]
751    #[serde(skip_serializing_if = "Option::is_none")]
752    pub next_page_token: Option<String>,
753}
754
755/// <p>The <code>ListJobsByStatusRequest</code> structure.</p>
756#[derive(Clone, Debug, Default, PartialEq, Serialize)]
757#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
758pub struct ListJobsByStatusRequest {
759    /// <p> To list jobs in chronological order by the date and time that they were submitted, enter <code>true</code>. To list jobs in reverse chronological order, enter <code>false</code>. </p>
760    #[serde(rename = "Ascending")]
761    #[serde(skip_serializing_if = "Option::is_none")]
762    pub ascending: Option<String>,
763    /// <p> When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </p>
764    #[serde(rename = "PageToken")]
765    #[serde(skip_serializing_if = "Option::is_none")]
766    pub page_token: Option<String>,
767    /// <p>To get information about all of the jobs associated with the current AWS account that have a given status, specify the following status: <code>Submitted</code>, <code>Progressing</code>, <code>Complete</code>, <code>Canceled</code>, or <code>Error</code>.</p>
768    #[serde(rename = "Status")]
769    pub status: String,
770}
771
772/// <p> The <code>ListJobsByStatusResponse</code> structure. </p>
773#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
774#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
775pub struct ListJobsByStatusResponse {
776    /// <p>An array of <code>Job</code> objects that have the specified status.</p>
777    #[serde(rename = "Jobs")]
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub jobs: Option<Vec<Job>>,
780    /// <p> A value that you use to access the second and subsequent pages of results, if any. When the jobs in the specified pipeline fit on one page or when you've reached the last page of results, the value of <code>NextPageToken</code> is <code>null</code>. </p>
781    #[serde(rename = "NextPageToken")]
782    #[serde(skip_serializing_if = "Option::is_none")]
783    pub next_page_token: Option<String>,
784}
785
786/// <p>The <code>ListPipelineRequest</code> structure.</p>
787#[derive(Clone, Debug, Default, PartialEq, Serialize)]
788#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
789pub struct ListPipelinesRequest {
790    /// <p>To list pipelines in chronological order by the date and time that they were created, enter <code>true</code>. To list pipelines in reverse chronological order, enter <code>false</code>.</p>
791    #[serde(rename = "Ascending")]
792    #[serde(skip_serializing_if = "Option::is_none")]
793    pub ascending: Option<String>,
794    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </p>
795    #[serde(rename = "PageToken")]
796    #[serde(skip_serializing_if = "Option::is_none")]
797    pub page_token: Option<String>,
798}
799
800/// <p>A list of the pipelines associated with the current AWS account.</p>
801#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
802#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
803pub struct ListPipelinesResponse {
804    /// <p>A value that you use to access the second and subsequent pages of results, if any. When the pipelines fit on one page or when you've reached the last page of results, the value of <code>NextPageToken</code> is <code>null</code>.</p>
805    #[serde(rename = "NextPageToken")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    pub next_page_token: Option<String>,
808    /// <p>An array of <code>Pipeline</code> objects.</p>
809    #[serde(rename = "Pipelines")]
810    #[serde(skip_serializing_if = "Option::is_none")]
811    pub pipelines: Option<Vec<Pipeline>>,
812}
813
814/// <p>The <code>ListPresetsRequest</code> structure.</p>
815#[derive(Clone, Debug, Default, PartialEq, Serialize)]
816#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
817pub struct ListPresetsRequest {
818    /// <p>To list presets in chronological order by the date and time that they were created, enter <code>true</code>. To list presets in reverse chronological order, enter <code>false</code>.</p>
819    #[serde(rename = "Ascending")]
820    #[serde(skip_serializing_if = "Option::is_none")]
821    pub ascending: Option<String>,
822    /// <p>When Elastic Transcoder returns more than one page of results, use <code>pageToken</code> in subsequent <code>GET</code> requests to get each successive page of results. </p>
823    #[serde(rename = "PageToken")]
824    #[serde(skip_serializing_if = "Option::is_none")]
825    pub page_token: Option<String>,
826}
827
828/// <p>The <code>ListPresetsResponse</code> structure.</p>
829#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
830#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
831pub struct ListPresetsResponse {
832    /// <p>A value that you use to access the second and subsequent pages of results, if any. When the presets fit on one page or when you've reached the last page of results, the value of <code>NextPageToken</code> is <code>null</code>.</p>
833    #[serde(rename = "NextPageToken")]
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub next_page_token: Option<String>,
836    /// <p>An array of <code>Preset</code> objects.</p>
837    #[serde(rename = "Presets")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub presets: Option<Vec<Preset>>,
840}
841
842/// <p><p>The Amazon Simple Notification Service (Amazon SNS) topic or topics to notify in order to report job status.</p> <important> <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p> </important></p>
843#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
844pub struct Notifications {
845    /// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p>
846    #[serde(rename = "Completed")]
847    #[serde(skip_serializing_if = "Option::is_none")]
848    pub completed: Option<String>,
849    /// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p>
850    #[serde(rename = "Error")]
851    #[serde(skip_serializing_if = "Option::is_none")]
852    pub error: Option<String>,
853    /// <p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p>
854    #[serde(rename = "Progressing")]
855    #[serde(skip_serializing_if = "Option::is_none")]
856    pub progressing: Option<String>,
857    /// <p>The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p>
858    #[serde(rename = "Warning")]
859    #[serde(skip_serializing_if = "Option::is_none")]
860    pub warning: Option<String>,
861}
862
863/// <p>The <code>Permission</code> structure.</p>
864#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
865pub struct Permission {
866    /// <p><p> The permission that you want to give to the AWS user that is listed in Grantee. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has READ, READ</em>ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul></p>
867    #[serde(rename = "Access")]
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub access: Option<Vec<String>>,
870    /// <p>The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group.</p>
871    #[serde(rename = "Grantee")]
872    #[serde(skip_serializing_if = "Option::is_none")]
873    pub grantee: Option<String>,
874    /// <p><p>The type of value that appears in the Grantee object:</p> <ul> <li> <p> <code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <code>Email</code>: The registered email address of an AWS account.</p> </li> <li> <p> <code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul></p>
875    #[serde(rename = "GranteeType")]
876    #[serde(skip_serializing_if = "Option::is_none")]
877    pub grantee_type: Option<String>,
878}
879
880/// <p>The pipeline (queue) that is used to manage jobs.</p>
881#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
882#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
883pub struct Pipeline {
884    /// <p>The Amazon Resource Name (ARN) for the pipeline.</p>
885    #[serde(rename = "Arn")]
886    #[serde(skip_serializing_if = "Option::is_none")]
887    pub arn: Option<String>,
888    /// <p>The AWS Key Management Service (AWS KMS) key that you want to use with this pipeline.</p> <p>If you use either <code>s3</code> or <code>s3-aws-kms</code> as your <code>Encryption:Mode</code>, you don't need to provide a key with your job because a default key, known as an AWS-KMS key, is created for you automatically. You need to provide an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if you are using an <code>Encryption:Mode</code> of <code>aes-cbc-pkcs7</code>, <code>aes-ctr</code>, or <code>aes-gcm</code>.</p>
889    #[serde(rename = "AwsKmsKeyArn")]
890    #[serde(skip_serializing_if = "Option::is_none")]
891    pub aws_kms_key_arn: Option<String>,
892    /// <p><p>Information about the Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists. Either you specify both <code>ContentConfig</code> and <code>ThumbnailConfig</code>, or you specify <code>OutputBucket</code>.</p> <ul> <li> <p> <b>Bucket</b>: The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists.</p> </li> <li> <p> <b>Permissions</b>: A list of the users and/or predefined Amazon S3 groups you want to have access to transcoded files and playlists, and the type of access that you want them to have. </p> <ul> <li> <p>GranteeType: The type of value that appears in the <code>Grantee</code> object: </p> <ul> <li> <p> <code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p> </li> <li> <p> <code>Email</code>: The registered email address of an AWS account.</p> </li> <li> <p> <code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <code>Grantee</code>: The AWS user or group that you want to have access to transcoded files and playlists.</p> </li> <li> <p> <code>Access</code>: The permission that you want to give to the AWS user that is listed in <code>Grantee</code>. Valid values include:</p> <ul> <li> <p> <code>READ</code>: The grantee can read the objects and metadata for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has <code>READ</code>, <code>READ</em>ACP</code>, and <code>WRITE_ACP</code> permissions for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul> </li> </ul> </li> <li> <p> <b>StorageClass</b>: The Amazon S3 storage class, Standard or ReducedRedundancy, that you want Elastic Transcoder to assign to the video files and playlists that it stores in your Amazon S3 bucket. </p> </li> </ul></p>
893    #[serde(rename = "ContentConfig")]
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub content_config: Option<PipelineOutputConfig>,
896    /// <p>The identifier for the pipeline. You use this value to identify the pipeline in which you want to perform a variety of operations, such as creating a job or a preset.</p>
897    #[serde(rename = "Id")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub id: Option<String>,
900    /// <p>The Amazon S3 bucket from which Elastic Transcoder gets media files for transcoding and the graphics files, if any, that you want to use for watermarks.</p>
901    #[serde(rename = "InputBucket")]
902    #[serde(skip_serializing_if = "Option::is_none")]
903    pub input_bucket: Option<String>,
904    /// <p>The name of the pipeline. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.</p> <p>Constraints: Maximum 40 characters</p>
905    #[serde(rename = "Name")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub name: Option<String>,
908    /// <p><p>The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify to report job status.</p> <important> <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p> </important> <ul> <li> <p> <b>Progressing</b> (optional): The Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process the job.</p> </li> <li> <p> <b>Complete</b> (optional): The Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing the job.</p> </li> <li> <p> <b>Warning</b> (optional): The Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition.</p> </li> <li> <p> <b>Error</b> (optional): The Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition.</p> </li> </ul></p>
909    #[serde(rename = "Notifications")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub notifications: Option<Notifications>,
912    /// <p>The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files, thumbnails, and playlists. Either you specify this value, or you specify both <code>ContentConfig</code> and <code>ThumbnailConfig</code>.</p>
913    #[serde(rename = "OutputBucket")]
914    #[serde(skip_serializing_if = "Option::is_none")]
915    pub output_bucket: Option<String>,
916    /// <p>The IAM Amazon Resource Name (ARN) for the role that Elastic Transcoder uses to transcode jobs for this pipeline.</p>
917    #[serde(rename = "Role")]
918    #[serde(skip_serializing_if = "Option::is_none")]
919    pub role: Option<String>,
920    /// <p><p>The current status of the pipeline:</p> <ul> <li> <p> <code>Active</code>: The pipeline is processing jobs.</p> </li> <li> <p> <code>Paused</code>: The pipeline is not currently processing jobs.</p> </li> </ul></p>
921    #[serde(rename = "Status")]
922    #[serde(skip_serializing_if = "Option::is_none")]
923    pub status: Option<String>,
924    /// <p><p>Information about the Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files. Either you specify both <code>ContentConfig</code> and <code>ThumbnailConfig</code>, or you specify <code>OutputBucket</code>.</p> <ul> <li> <p> <code>Bucket</code>: The Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files. </p> </li> <li> <p> <code>Permissions</code>: A list of the users and/or predefined Amazon S3 groups you want to have access to thumbnail files, and the type of access that you want them to have. </p> <ul> <li> <p>GranteeType: The type of value that appears in the Grantee object:</p> <ul> <li> <p> <code>Canonical</code>: Either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <code>Email</code>: The registered email address of an AWS account.</p> </li> <li> <p> <code>Group</code>: One of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <code>Grantee</code>: The AWS user or group that you want to have access to thumbnail files.</p> </li> <li> <p>Access: The permission that you want to give to the AWS user that is listed in Grantee. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the thumbnails and metadata for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has READ, READ</em>ACP, and WRITE_ACP permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul> </li> </ul> </li> <li> <p> <code>StorageClass</code>: The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the thumbnails that it stores in your Amazon S3 bucket.</p> </li> </ul></p>
925    #[serde(rename = "ThumbnailConfig")]
926    #[serde(skip_serializing_if = "Option::is_none")]
927    pub thumbnail_config: Option<PipelineOutputConfig>,
928}
929
930/// <p>The <code>PipelineOutputConfig</code> structure.</p>
931#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
932pub struct PipelineOutputConfig {
933    /// <p> The Amazon S3 bucket in which you want Elastic Transcoder to save the transcoded files. Specify this value when all of the following are true:</p> <ul> <li> <p>You want to save transcoded files, thumbnails (if any), and playlists (if any) together in one bucket.</p> </li> <li> <p>You do not want to specify the users or groups who have access to the transcoded files, thumbnails, and playlists.</p> </li> <li> <p>You do not want to specify the permissions that Elastic Transcoder grants to the files.</p> </li> <li> <p>You want to associate the transcoded files and thumbnails with the Amazon S3 Standard storage class.</p> </li> </ul> <p>If you want to save transcoded files and playlists in one bucket and thumbnails in another bucket, specify which users can access the transcoded files or the permissions the users have, or change the Amazon S3 storage class, omit OutputBucket and specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code> instead. </p>
934    #[serde(rename = "Bucket")]
935    #[serde(skip_serializing_if = "Option::is_none")]
936    pub bucket: Option<String>,
937    /// <p>Optional. The <code>Permissions</code> object specifies which users and/or predefined Amazon S3 groups you want to have access to transcoded files and playlists, and the type of access you want them to have. You can grant permissions to a maximum of 30 users and/or predefined Amazon S3 groups.</p> <p>If you include <code>Permissions</code>, Elastic Transcoder grants only the permissions that you specify. It does not grant full permissions to the owner of the role specified by <code>Role</code>. If you want that user to have full control, you must explicitly grant full control to the user.</p> <p> If you omit <code>Permissions</code>, Elastic Transcoder grants full control over the transcoded files and playlists to the owner of the role specified by <code>Role</code>, and grants no other permissions to any other user or group.</p>
938    #[serde(rename = "Permissions")]
939    #[serde(skip_serializing_if = "Option::is_none")]
940    pub permissions: Option<Vec<Permission>>,
941    /// <p> The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the video files and playlists that it stores in your Amazon S3 bucket. </p>
942    #[serde(rename = "StorageClass")]
943    #[serde(skip_serializing_if = "Option::is_none")]
944    pub storage_class: Option<String>,
945}
946
947/// <p>The PlayReady DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p> <p>PlayReady DRM encrypts your media files using <code>aes-ctr</code> encryption.</p> <p>If you use DRM for an <code>HLSv3</code> playlist, your outputs must have a master playlist.</p>
948#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
949pub struct PlayReadyDrm {
950    /// <p>The type of DRM, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
951    #[serde(rename = "Format")]
952    #[serde(skip_serializing_if = "Option::is_none")]
953    pub format: Option<String>,
954    /// <p>The series of random bits created by a random bit generator, unique for every encryption operation, that you want Elastic Transcoder to use to encrypt your files. The initialization vector must be base64-encoded, and it must be exactly 8 bytes long before being base64-encoded. If no initialization vector is provided, Elastic Transcoder generates one for you.</p>
955    #[serde(rename = "InitializationVector")]
956    #[serde(skip_serializing_if = "Option::is_none")]
957    pub initialization_vector: Option<String>,
958    /// <p>The DRM key for your file, provided by your DRM license provider. The key must be base64-encoded, and it must be one of the following bit lengths before being base64-encoded:</p> <p> <code>128</code>, <code>192</code>, or <code>256</code>. </p> <p>The key must also be encrypted by using AWS KMS.</p>
959    #[serde(rename = "Key")]
960    #[serde(skip_serializing_if = "Option::is_none")]
961    pub key: Option<String>,
962    /// <p>The ID for your DRM key, so that your DRM license provider knows which key to provide.</p> <p>The key ID must be provided in big endian, and Elastic Transcoder converts it to little endian before inserting it into the PlayReady DRM headers. If you are unsure whether your license server provides your key ID in big or little endian, check with your DRM provider.</p>
963    #[serde(rename = "KeyId")]
964    #[serde(skip_serializing_if = "Option::is_none")]
965    pub key_id: Option<String>,
966    /// <p>The MD5 digest of the key used for DRM on your file, and that you want Elastic Transcoder to use as a checksum to make sure your key was not corrupted in transit. The key MD5 must be base64-encoded, and it must be exactly 16 bytes before being base64-encoded.</p>
967    #[serde(rename = "KeyMd5")]
968    #[serde(skip_serializing_if = "Option::is_none")]
969    pub key_md_5: Option<String>,
970    /// <p>The location of the license key required to play DRM content. The URL must be an absolute path, and is referenced by the PlayReady header. The PlayReady header is referenced in the protection header of the client manifest for Smooth Streaming outputs, and in the EXT-X-DXDRM and EXT-XDXDRMINFO metadata tags for HLS playlist outputs. An example URL looks like this: <code>https://www.example.com/exampleKey/</code> </p>
971    #[serde(rename = "LicenseAcquisitionUrl")]
972    #[serde(skip_serializing_if = "Option::is_none")]
973    pub license_acquisition_url: Option<String>,
974}
975
976/// <p> Use Only for Fragmented MP4 or MPEG-TS Outputs. If you specify a preset for which the value of Container is <code>fmp4</code> (Fragmented MP4) or <code>ts</code> (MPEG-TS), Playlists contains information about the master playlists that you want Elastic Transcoder to create. We recommend that you create only one master playlist per output format. The maximum number of master playlists in a job is 30. </p>
977#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
978#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
979pub struct Playlist {
980    /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
981    #[serde(rename = "Format")]
982    #[serde(skip_serializing_if = "Option::is_none")]
983    pub format: Option<String>,
984    /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
985    #[serde(rename = "HlsContentProtection")]
986    #[serde(skip_serializing_if = "Option::is_none")]
987    pub hls_content_protection: Option<HlsContentProtection>,
988    /// <p><p>The name that you want Elastic Transcoder to assign to the master playlist, for example, nyc-vacation.m3u8. If the name includes a <code>/</code> character, the section of the name before the last <code>/</code> must be identical for all <code>Name</code> objects. If you create more than one master playlist, the values of all <code>Name</code> objects must be unique.</p> <note> <p>Elastic Transcoder automatically appends the relevant file extension to the file name (<code>.m3u8</code> for <code>HLSv3</code> and <code>HLSv4</code> playlists, and <code>.ism</code> and <code>.ismc</code> for <code>Smooth</code> playlists). If you include a file extension in <code>Name</code>, the file name will have two extensions.</p> </note></p>
989    #[serde(rename = "Name")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub name: Option<String>,
992    /// <p>For each output in this job that you want to include in a master playlist, the value of the Outputs:Key object.</p> <ul> <li> <p>If your output is not <code>HLS</code> or does not have a segment duration set, the name of the output file is a concatenation of <code>OutputKeyPrefix</code> and <code>Outputs:Key</code>:</p> <p>OutputKeyPrefix<code>Outputs:Key</code> </p> </li> <li> <p>If your output is <code>HLSv3</code> and has a segment duration set, or is not included in a playlist, Elastic Transcoder creates an output playlist file with a file extension of <code>.m3u8</code>, and a series of <code>.ts</code> files that include a five-digit sequential counter beginning with 00000:</p> <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p> </li> <li> <p>If your output is <code>HLSv4</code>, has a segment duration set, and is included in an <code>HLSv4</code> playlist, Elastic Transcoder creates an output playlist file with a file extension of <code>_v4.m3u8</code>. If the output is video, Elastic Transcoder also creates an output file with an extension of <code>_iframe.m3u8</code>:</p> <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p> <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p> </li> </ul> <p>Elastic Transcoder automatically appends the relevant file extension to the file name. If you include a file extension in Output Key, the file name will have two extensions.</p> <p>If you include more than one output in a playlist, any segment duration settings, clip settings, or caption settings must be the same for all outputs in the playlist. For <code>Smooth</code> playlists, the <code>Audio:Profile</code>, <code>Video:Profile</code>, and <code>Video:FrameRate</code> to <code>Video:KeyframesMaxDist</code> ratio must be the same for all outputs.</p>
993    #[serde(rename = "OutputKeys")]
994    #[serde(skip_serializing_if = "Option::is_none")]
995    pub output_keys: Option<Vec<String>>,
996    /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
997    #[serde(rename = "PlayReadyDrm")]
998    #[serde(skip_serializing_if = "Option::is_none")]
999    pub play_ready_drm: Option<PlayReadyDrm>,
1000    /// <p>The status of the job with which the playlist is associated.</p>
1001    #[serde(rename = "Status")]
1002    #[serde(skip_serializing_if = "Option::is_none")]
1003    pub status: Option<String>,
1004    /// <p>Information that further explains the status.</p>
1005    #[serde(rename = "StatusDetail")]
1006    #[serde(skip_serializing_if = "Option::is_none")]
1007    pub status_detail: Option<String>,
1008}
1009
1010/// <p>Presets are templates that contain most of the settings for transcoding media files from one format to another. Elastic Transcoder includes some default presets for common formats, for example, several iPod and iPhone versions. You can also create your own presets for formats that aren't included among the default presets. You specify which preset you want to use when you create a job.</p>
1011#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1012#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1013pub struct Preset {
1014    /// <p>The Amazon Resource Name (ARN) for the preset.</p>
1015    #[serde(rename = "Arn")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub arn: Option<String>,
1018    /// <p>A section of the response body that provides information about the audio preset values.</p>
1019    #[serde(rename = "Audio")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub audio: Option<AudioParameters>,
1022    /// <p>The container type for the output file. Valid values include <code>flac</code>, <code>flv</code>, <code>fmp4</code>, <code>gif</code>, <code>mp3</code>, <code>mp4</code>, <code>mpg</code>, <code>mxf</code>, <code>oga</code>, <code>ogg</code>, <code>ts</code>, and <code>webm</code>.</p>
1023    #[serde(rename = "Container")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub container: Option<String>,
1026    /// <p>A description of the preset.</p>
1027    #[serde(rename = "Description")]
1028    #[serde(skip_serializing_if = "Option::is_none")]
1029    pub description: Option<String>,
1030    /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
1031    #[serde(rename = "Id")]
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub id: Option<String>,
1034    /// <p>The name of the preset.</p>
1035    #[serde(rename = "Name")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub name: Option<String>,
1038    /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
1039    #[serde(rename = "Thumbnails")]
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    pub thumbnails: Option<Thumbnails>,
1042    /// <p>Whether the preset is a default preset provided by Elastic Transcoder (<code>System</code>) or a preset that you have defined (<code>Custom</code>).</p>
1043    #[serde(rename = "Type")]
1044    #[serde(skip_serializing_if = "Option::is_none")]
1045    pub type_: Option<String>,
1046    /// <p>A section of the response body that provides information about the video preset values.</p>
1047    #[serde(rename = "Video")]
1048    #[serde(skip_serializing_if = "Option::is_none")]
1049    pub video: Option<VideoParameters>,
1050}
1051
1052/// <p>Settings for the size, location, and opacity of graphics that you want Elastic Transcoder to overlay over videos that are transcoded using this preset. You can specify settings for up to four watermarks. Watermarks appear in the specified size and location, and with the specified opacity for the duration of the transcoded video.</p> <p>Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.</p> <p>When you create a job that uses this preset, you specify the .png or .jpg graphics that you want Elastic Transcoder to include in the transcoded videos. You can specify fewer graphics in the job than you specify watermark settings in the preset, which allows you to use the same preset for up to four watermarks that have different dimensions.</p>
1053#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1054pub struct PresetWatermark {
1055    /// <p><p>The horizontal position of the watermark unless you specify a non-zero value for <code>HorizontalOffset</code>: </p> <ul> <li> <p> <b>Left</b>: The left edge of the watermark is aligned with the left border of the video.</p> </li> <li> <p> <b>Right</b>: The right edge of the watermark is aligned with the right border of the video.</p> </li> <li> <p> <b>Center</b>: The watermark is centered between the left and right borders.</p> </li> </ul></p>
1056    #[serde(rename = "HorizontalAlign")]
1057    #[serde(skip_serializing_if = "Option::is_none")]
1058    pub horizontal_align: Option<String>,
1059    /// <p>The amount by which you want the horizontal position of the watermark to be offset from the position specified by HorizontalAlign: </p> <ul> <li> <p>number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of MaxWidth.</p> </li> <li> <p>integer percentage (%): The range of valid values is 0 to 100.</p> </li> </ul> <p>For example, if you specify Left for <code>HorizontalAlign</code> and 5px for <code>HorizontalOffset</code>, the left side of the watermark appears 5 pixels from the left border of the output video.</p> <p> <code>HorizontalOffset</code> is only valid when the value of <code>HorizontalAlign</code> is <code>Left</code> or <code>Right</code>. If you specify an offset that causes the watermark to extend beyond the left or right border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.</p> <p>Use the value of <code>Target</code> to specify whether you want to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.</p>
1060    #[serde(rename = "HorizontalOffset")]
1061    #[serde(skip_serializing_if = "Option::is_none")]
1062    pub horizontal_offset: Option<String>,
1063    /// <p> A unique identifier for the settings for one watermark. The value of <code>Id</code> can be up to 40 characters long. </p>
1064    #[serde(rename = "Id")]
1065    #[serde(skip_serializing_if = "Option::is_none")]
1066    pub id: Option<String>,
1067    /// <p>The maximum height of the watermark in one of the following formats: </p> <ul> <li> <p>number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of <code>MaxHeight</code>.</p> </li> <li> <p>integer percentage (%): The range of valid values is 0 to 100. Use the value of <code>Target</code> to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.</p> </li> </ul> <p>If you specify the value in pixels, it must be less than or equal to the value of <code>MaxHeight</code>.</p>
1068    #[serde(rename = "MaxHeight")]
1069    #[serde(skip_serializing_if = "Option::is_none")]
1070    pub max_height: Option<String>,
1071    /// <p><p>The maximum width of the watermark in one of the following formats: </p> <ul> <li> <p>number of pixels (px): The minimum value is 16 pixels, and the maximum value is the value of <code>MaxWidth</code>.</p> </li> <li> <p>integer percentage (%): The range of valid values is 0 to 100. Use the value of <code>Target</code> to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the calculation.</p> <p>If you specify the value in pixels, it must be less than or equal to the value of <code>MaxWidth</code>.</p> </li> </ul></p>
1072    #[serde(rename = "MaxWidth")]
1073    #[serde(skip_serializing_if = "Option::is_none")]
1074    pub max_width: Option<String>,
1075    /// <p>A percentage that indicates how much you want a watermark to obscure the video in the location where it appears. Valid values are 0 (the watermark is invisible) to 100 (the watermark completely obscures the video in the specified location). The datatype of <code>Opacity</code> is float.</p> <p>Elastic Transcoder supports transparent .png graphics. If you use a transparent .png, the transparent portion of the video appears as if you had specified a value of 0 for <code>Opacity</code>. The .jpg file format doesn't support transparency.</p>
1076    #[serde(rename = "Opacity")]
1077    #[serde(skip_serializing_if = "Option::is_none")]
1078    pub opacity: Option<String>,
1079    /// <p><p>A value that controls scaling of the watermark: </p> <ul> <li> <p> <b>Fit</b>: Elastic Transcoder scales the watermark so it matches the value that you specified in either <code>MaxWidth</code> or <code>MaxHeight</code> without exceeding the other value.</p> </li> <li> <p> <b>Stretch</b>: Elastic Transcoder stretches the watermark to match the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>. If the relative proportions of the watermark and the values of <code>MaxWidth</code> and <code>MaxHeight</code> are different, the watermark will be distorted.</p> </li> <li> <p> <b>ShrinkToFit</b>: Elastic Transcoder scales the watermark down so that its dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without exceeding either value. If you specify this option, Elastic Transcoder does not scale the watermark up.</p> </li> </ul></p>
1080    #[serde(rename = "SizingPolicy")]
1081    #[serde(skip_serializing_if = "Option::is_none")]
1082    pub sizing_policy: Option<String>,
1083    /// <p><p>A value that determines how Elastic Transcoder interprets values that you specified for <code>HorizontalOffset</code>, <code>VerticalOffset</code>, <code>MaxWidth</code>, and <code>MaxHeight</code>:</p> <ul> <li> <p> <b>Content</b>: <code>HorizontalOffset</code> and <code>VerticalOffset</code> values are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any. In addition, <code>MaxWidth</code> and <code>MaxHeight</code>, if specified as a percentage, are calculated based on the borders of the video excluding black bars added by Elastic Transcoder, if any.</p> </li> <li> <p> <b>Frame</b>: <code>HorizontalOffset</code> and <code>VerticalOffset</code> values are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any. In addition, <code>MaxWidth</code> and <code>MaxHeight</code>, if specified as a percentage, are calculated based on the borders of the video including black bars added by Elastic Transcoder, if any.</p> </li> </ul></p>
1084    #[serde(rename = "Target")]
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    pub target: Option<String>,
1087    /// <p><p>The vertical position of the watermark unless you specify a non-zero value for <code>VerticalOffset</code>: </p> <ul> <li> <p> <b>Top</b>: The top edge of the watermark is aligned with the top border of the video.</p> </li> <li> <p> <b>Bottom</b>: The bottom edge of the watermark is aligned with the bottom border of the video.</p> </li> <li> <p> <b>Center</b>: The watermark is centered between the top and bottom borders.</p> </li> </ul></p>
1088    #[serde(rename = "VerticalAlign")]
1089    #[serde(skip_serializing_if = "Option::is_none")]
1090    pub vertical_align: Option<String>,
1091    /// <p> <code>VerticalOffset</code> </p> <p>The amount by which you want the vertical position of the watermark to be offset from the position specified by VerticalAlign:</p> <ul> <li> <p>number of pixels (px): The minimum value is 0 pixels, and the maximum value is the value of <code>MaxHeight</code>.</p> </li> <li> <p>integer percentage (%): The range of valid values is 0 to 100.</p> </li> </ul> <p>For example, if you specify <code>Top</code> for <code>VerticalAlign</code> and <code>5px</code> for <code>VerticalOffset</code>, the top of the watermark appears 5 pixels from the top border of the output video.</p> <p> <code>VerticalOffset</code> is only valid when the value of VerticalAlign is Top or Bottom.</p> <p>If you specify an offset that causes the watermark to extend beyond the top or bottom border and Elastic Transcoder has not added black bars, the watermark is cropped. If Elastic Transcoder has added black bars, the watermark extends into the black bars. If the watermark extends beyond the black bars, it is cropped.</p> <p>Use the value of <code>Target</code> to specify whether you want Elastic Transcoder to include the black bars that are added by Elastic Transcoder, if any, in the offset calculation.</p>
1092    #[serde(rename = "VerticalOffset")]
1093    #[serde(skip_serializing_if = "Option::is_none")]
1094    pub vertical_offset: Option<String>,
1095}
1096
1097/// <p>The <code>ReadJobRequest</code> structure.</p>
1098#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1099#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1100pub struct ReadJobRequest {
1101    /// <p>The identifier of the job for which you want to get detailed information.</p>
1102    #[serde(rename = "Id")]
1103    pub id: String,
1104}
1105
1106/// <p>The <code>ReadJobResponse</code> structure.</p>
1107#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1108#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1109pub struct ReadJobResponse {
1110    /// <p>A section of the response body that provides information about the job.</p>
1111    #[serde(rename = "Job")]
1112    #[serde(skip_serializing_if = "Option::is_none")]
1113    pub job: Option<Job>,
1114}
1115
1116/// <p>The <code>ReadPipelineRequest</code> structure.</p>
1117#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1118#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1119pub struct ReadPipelineRequest {
1120    /// <p>The identifier of the pipeline to read.</p>
1121    #[serde(rename = "Id")]
1122    pub id: String,
1123}
1124
1125/// <p>The <code>ReadPipelineResponse</code> structure.</p>
1126#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1127#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1128pub struct ReadPipelineResponse {
1129    /// <p>A section of the response body that provides information about the pipeline.</p>
1130    #[serde(rename = "Pipeline")]
1131    #[serde(skip_serializing_if = "Option::is_none")]
1132    pub pipeline: Option<Pipeline>,
1133    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p> <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
1134    #[serde(rename = "Warnings")]
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub warnings: Option<Vec<Warning>>,
1137}
1138
1139/// <p>The <code>ReadPresetRequest</code> structure.</p>
1140#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1141#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1142pub struct ReadPresetRequest {
1143    /// <p>The identifier of the preset for which you want to get detailed information.</p>
1144    #[serde(rename = "Id")]
1145    pub id: String,
1146}
1147
1148/// <p>The <code>ReadPresetResponse</code> structure.</p>
1149#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1150#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1151pub struct ReadPresetResponse {
1152    /// <p>A section of the response body that provides information about the preset.</p>
1153    #[serde(rename = "Preset")]
1154    #[serde(skip_serializing_if = "Option::is_none")]
1155    pub preset: Option<Preset>,
1156}
1157
1158/// <p> The <code>TestRoleRequest</code> structure. </p>
1159#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1160#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1161pub struct TestRoleRequest {
1162    /// <p>The Amazon S3 bucket that contains media files to be transcoded. The action attempts to read from this bucket.</p>
1163    #[serde(rename = "InputBucket")]
1164    pub input_bucket: String,
1165    /// <p>The Amazon S3 bucket that Elastic Transcoder writes transcoded media files to. The action attempts to read from this bucket.</p>
1166    #[serde(rename = "OutputBucket")]
1167    pub output_bucket: String,
1168    /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to test.</p>
1169    #[serde(rename = "Role")]
1170    pub role: String,
1171    /// <p>The ARNs of one or more Amazon Simple Notification Service (Amazon SNS) topics that you want the action to send a test notification to.</p>
1172    #[serde(rename = "Topics")]
1173    pub topics: Vec<String>,
1174}
1175
1176/// <p>The <code>TestRoleResponse</code> structure.</p>
1177#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1178#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1179pub struct TestRoleResponse {
1180    /// <p>If the <code>Success</code> element contains <code>false</code>, this value is an array of one or more error messages that were generated during the test process.</p>
1181    #[serde(rename = "Messages")]
1182    #[serde(skip_serializing_if = "Option::is_none")]
1183    pub messages: Option<Vec<String>>,
1184    /// <p>If the operation is successful, this value is <code>true</code>; otherwise, the value is <code>false</code>.</p>
1185    #[serde(rename = "Success")]
1186    #[serde(skip_serializing_if = "Option::is_none")]
1187    pub success: Option<String>,
1188}
1189
1190/// <p>Thumbnails for videos.</p>
1191#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1192pub struct Thumbnails {
1193    /// <p><important> <p>To better control resolution and aspect ratio of thumbnails, we recommend that you use the values <code>MaxWidth</code>, <code>MaxHeight</code>, <code>SizingPolicy</code>, and <code>PaddingPolicy</code> instead of <code>Resolution</code> and <code>AspectRatio</code>. The two groups of settings are mutually exclusive. Do not use them together.</p> </important> <p>The aspect ratio of thumbnails. Valid values include:</p> <p> <code>auto</code>, <code>1:1</code>, <code>4:3</code>, <code>3:2</code>, <code>16:9</code> </p> <p>If you specify <code>auto</code>, Elastic Transcoder tries to preserve the aspect ratio of the video in the output file.</p></p>
1194    #[serde(rename = "AspectRatio")]
1195    #[serde(skip_serializing_if = "Option::is_none")]
1196    pub aspect_ratio: Option<String>,
1197    /// <p>The format of thumbnails, if any. Valid values are <code>jpg</code> and <code>png</code>. </p> <p>You specify whether you want Elastic Transcoder to create thumbnails when you create a job.</p>
1198    #[serde(rename = "Format")]
1199    #[serde(skip_serializing_if = "Option::is_none")]
1200    pub format: Option<String>,
1201    /// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
1202    #[serde(rename = "Interval")]
1203    #[serde(skip_serializing_if = "Option::is_none")]
1204    pub interval: Option<String>,
1205    /// <p>The maximum height of thumbnails in pixels. If you specify auto, Elastic Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric value, enter an even integer between 32 and 3072.</p>
1206    #[serde(rename = "MaxHeight")]
1207    #[serde(skip_serializing_if = "Option::is_none")]
1208    pub max_height: Option<String>,
1209    /// <p>The maximum width of thumbnails in pixels. If you specify auto, Elastic Transcoder uses 1920 (Full HD) as the default value. If you specify a numeric value, enter an even integer between 32 and 4096.</p>
1210    #[serde(rename = "MaxWidth")]
1211    #[serde(skip_serializing_if = "Option::is_none")]
1212    pub max_width: Option<String>,
1213    /// <p>When you set <code>PaddingPolicy</code> to <code>Pad</code>, Elastic Transcoder may add black bars to the top and bottom and/or left and right sides of thumbnails to make the total size of the thumbnails match the values that you specified for thumbnail <code>MaxWidth</code> and <code>MaxHeight</code> settings.</p>
1214    #[serde(rename = "PaddingPolicy")]
1215    #[serde(skip_serializing_if = "Option::is_none")]
1216    pub padding_policy: Option<String>,
1217    /// <p><important> <p>To better control resolution and aspect ratio of thumbnails, we recommend that you use the values <code>MaxWidth</code>, <code>MaxHeight</code>, <code>SizingPolicy</code>, and <code>PaddingPolicy</code> instead of <code>Resolution</code> and <code>AspectRatio</code>. The two groups of settings are mutually exclusive. Do not use them together.</p> </important> <p>The width and height of thumbnail files in pixels. Specify a value in the format <code> <i>width</i> </code> x <code> <i>height</i> </code> where both values are even integers. The values cannot exceed the width and height that you specified in the <code>Video:Resolution</code> object.</p></p>
1218    #[serde(rename = "Resolution")]
1219    #[serde(skip_serializing_if = "Option::is_none")]
1220    pub resolution: Option<String>,
1221    /// <p><p>Specify one of the following values to control scaling of thumbnails:</p> <ul> <li> <p> <code>Fit</code>: Elastic Transcoder scales thumbnails so they match the value that you specified in thumbnail MaxWidth or MaxHeight settings without exceeding the other value. </p> </li> <li> <p> <code>Fill</code>: Elastic Transcoder scales thumbnails so they match the value that you specified in thumbnail <code>MaxWidth</code> or <code>MaxHeight</code> settings and matches or exceeds the other value. Elastic Transcoder centers the image in thumbnails and then crops in the dimension (if any) that exceeds the maximum value.</p> </li> <li> <p> <code>Stretch</code>: Elastic Transcoder stretches thumbnails to match the values that you specified for thumbnail <code>MaxWidth</code> and <code>MaxHeight</code> settings. If the relative proportions of the input video and thumbnails are different, the thumbnails will be distorted.</p> </li> <li> <p> <code>Keep</code>: Elastic Transcoder does not scale thumbnails. If either dimension of the input video exceeds the values that you specified for thumbnail <code>MaxWidth</code> and <code>MaxHeight</code> settings, Elastic Transcoder crops the thumbnails.</p> </li> <li> <p> <code>ShrinkToFit</code>: Elastic Transcoder scales thumbnails down so that their dimensions match the values that you specified for at least one of thumbnail <code>MaxWidth</code> and <code>MaxHeight</code> without exceeding either value. If you specify this option, Elastic Transcoder does not scale thumbnails up.</p> </li> <li> <p> <code>ShrinkToFill</code>: Elastic Transcoder scales thumbnails down so that their dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without dropping below either value. If you specify this option, Elastic Transcoder does not scale thumbnails up.</p> </li> </ul></p>
1222    #[serde(rename = "SizingPolicy")]
1223    #[serde(skip_serializing_if = "Option::is_none")]
1224    pub sizing_policy: Option<String>,
1225}
1226
1227/// <p>Settings that determine when a clip begins and how long it lasts.</p>
1228#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1229pub struct TimeSpan {
1230    /// <p>The duration of the clip. The format can be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a value, Elastic Transcoder creates an output file from StartTime to the end of the file.</p> <p>If you specify a value longer than the duration of the input file, Elastic Transcoder transcodes the file and returns a warning message.</p>
1231    #[serde(rename = "Duration")]
1232    #[serde(skip_serializing_if = "Option::is_none")]
1233    pub duration: Option<String>,
1234    /// <p>The place in the input file where you want a clip to start. The format can be either HH:mm:ss.SSS (maximum value: 23:59:59.999; SSS is thousandths of a second) or sssss.SSS (maximum value: 86399.999). If you don't specify a value, Elastic Transcoder starts at the beginning of the input file.</p>
1235    #[serde(rename = "StartTime")]
1236    #[serde(skip_serializing_if = "Option::is_none")]
1237    pub start_time: Option<String>,
1238}
1239
1240/// <p>Details about the timing of a job.</p>
1241#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1242#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1243pub struct Timing {
1244    /// <p>The time the job finished transcoding, in epoch milliseconds.</p>
1245    #[serde(rename = "FinishTimeMillis")]
1246    #[serde(skip_serializing_if = "Option::is_none")]
1247    pub finish_time_millis: Option<i64>,
1248    /// <p>The time the job began transcoding, in epoch milliseconds.</p>
1249    #[serde(rename = "StartTimeMillis")]
1250    #[serde(skip_serializing_if = "Option::is_none")]
1251    pub start_time_millis: Option<i64>,
1252    /// <p>The time the job was submitted to Elastic Transcoder, in epoch milliseconds.</p>
1253    #[serde(rename = "SubmitTimeMillis")]
1254    #[serde(skip_serializing_if = "Option::is_none")]
1255    pub submit_time_millis: Option<i64>,
1256}
1257
1258/// <p>The <code>UpdatePipelineNotificationsRequest</code> structure.</p>
1259#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1260#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1261pub struct UpdatePipelineNotificationsRequest {
1262    /// <p>The identifier of the pipeline for which you want to change notification settings.</p>
1263    #[serde(rename = "Id")]
1264    pub id: String,
1265    /// <p><p>The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic that you want to notify to report job status.</p> <important> <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p> </important> <ul> <li> <p> <b>Progressing</b>: The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process jobs that are added to this pipeline. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Complete</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing a job. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Warning</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Error</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> </ul></p>
1266    #[serde(rename = "Notifications")]
1267    pub notifications: Notifications,
1268}
1269
1270/// <p>The <code>UpdatePipelineNotificationsResponse</code> structure.</p>
1271#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1272#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1273pub struct UpdatePipelineNotificationsResponse {
1274    /// <p>A section of the response body that provides information about the pipeline associated with this notification.</p>
1275    #[serde(rename = "Pipeline")]
1276    #[serde(skip_serializing_if = "Option::is_none")]
1277    pub pipeline: Option<Pipeline>,
1278}
1279
1280/// <p>The <code>UpdatePipelineRequest</code> structure.</p>
1281#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1282#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1283pub struct UpdatePipelineRequest {
1284    /// <p>The AWS Key Management Service (AWS KMS) key that you want to use with this pipeline.</p> <p>If you use either <code>s3</code> or <code>s3-aws-kms</code> as your <code>Encryption:Mode</code>, you don't need to provide a key with your job because a default key, known as an AWS-KMS key, is created for you automatically. You need to provide an AWS-KMS key only if you want to use a non-default AWS-KMS key, or if you are using an <code>Encryption:Mode</code> of <code>aes-cbc-pkcs7</code>, <code>aes-ctr</code>, or <code>aes-gcm</code>.</p>
1285    #[serde(rename = "AwsKmsKeyArn")]
1286    #[serde(skip_serializing_if = "Option::is_none")]
1287    pub aws_kms_key_arn: Option<String>,
1288    /// <p><p>The optional <code>ContentConfig</code> object specifies information about the Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists: which bucket to use, which users you want to have access to the files, the type of access you want users to have, and the storage class that you want to assign to the files.</p> <p>If you specify values for <code>ContentConfig</code>, you must also specify values for <code>ThumbnailConfig</code>.</p> <p>If you specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code>, omit the <code>OutputBucket</code> object.</p> <ul> <li> <p> <b>Bucket</b>: The Amazon S3 bucket in which you want Elastic Transcoder to save transcoded files and playlists.</p> </li> <li> <p> <b>Permissions</b> (Optional): The Permissions object specifies which users you want to have access to transcoded files and the type of access you want them to have. You can grant permissions to a maximum of 30 users and/or predefined Amazon S3 groups.</p> </li> <li> <p> <b>Grantee Type</b>: Specify the type of value that appears in the <code>Grantee</code> object:</p> <ul> <li> <p> <b>Canonical</b>: The value in the <code>Grantee</code> object is either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution. For more information about canonical user IDs, see Access Control List (ACL) Overview in the Amazon Simple Storage Service Developer Guide. For more information about using CloudFront origin access identities to require that users use CloudFront URLs instead of Amazon S3 URLs, see Using an Origin Access Identity to Restrict Access to Your Amazon S3 Content.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <b>Email</b>: The value in the <code>Grantee</code> object is the registered email address of an AWS account.</p> </li> <li> <p> <b>Group</b>: The value in the <code>Grantee</code> object is one of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <b>Grantee</b>: The AWS user or group that you want to have access to transcoded files and playlists. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group </p> </li> <li> <p> <b>Access</b>: The permission that you want to give to the AWS user that you specified in <code>Grantee</code>. Permissions are granted on the files that Elastic Transcoder adds to the bucket, including playlists and video files. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the objects and metadata for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for objects that Elastic Transcoder adds to the Amazon S3 bucket. </p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has <code>READ</code>, <code>READ</em>ACP</code>, and <code>WRITE_ACP</code> permissions for the objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> </ul> </li> <li> <p> <b>StorageClass</b>: The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the video files and playlists that it stores in your Amazon S3 bucket.</p> </li> </ul></p>
1289    #[serde(rename = "ContentConfig")]
1290    #[serde(skip_serializing_if = "Option::is_none")]
1291    pub content_config: Option<PipelineOutputConfig>,
1292    /// <p>The ID of the pipeline that you want to update.</p>
1293    #[serde(rename = "Id")]
1294    pub id: String,
1295    /// <p>The Amazon S3 bucket in which you saved the media files that you want to transcode and the graphics that you want to use as watermarks.</p>
1296    #[serde(rename = "InputBucket")]
1297    #[serde(skip_serializing_if = "Option::is_none")]
1298    pub input_bucket: Option<String>,
1299    /// <p>The name of the pipeline. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.</p> <p>Constraints: Maximum 40 characters</p>
1300    #[serde(rename = "Name")]
1301    #[serde(skip_serializing_if = "Option::is_none")]
1302    pub name: Option<String>,
1303    /// <p><p>The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic that you want to notify to report job status.</p> <important> <p>To receive notifications, you must also subscribe to the new topic in the Amazon SNS console.</p> </important> <ul> <li> <p> <b>Progressing</b>: The topic ARN for the Amazon Simple Notification Service (Amazon SNS) topic that you want to notify when Elastic Transcoder has started to process jobs that are added to this pipeline. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Complete</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder has finished processing a job. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Warning</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters a warning condition. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> <li> <p> <b>Error</b>: The topic ARN for the Amazon SNS topic that you want to notify when Elastic Transcoder encounters an error condition. This is the ARN that Amazon SNS returned when you created the topic.</p> </li> </ul></p>
1304    #[serde(rename = "Notifications")]
1305    #[serde(skip_serializing_if = "Option::is_none")]
1306    pub notifications: Option<Notifications>,
1307    /// <p>The IAM Amazon Resource Name (ARN) for the role that you want Elastic Transcoder to use to transcode jobs for this pipeline.</p>
1308    #[serde(rename = "Role")]
1309    #[serde(skip_serializing_if = "Option::is_none")]
1310    pub role: Option<String>,
1311    /// <p><p>The <code>ThumbnailConfig</code> object specifies several values, including the Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files, which users you want to have access to the files, the type of access you want users to have, and the storage class that you want to assign to the files.</p> <p>If you specify values for <code>ContentConfig</code>, you must also specify values for <code>ThumbnailConfig</code> even if you don&#39;t want to create thumbnails.</p> <p>If you specify values for <code>ContentConfig</code> and <code>ThumbnailConfig</code>, omit the <code>OutputBucket</code> object.</p> <ul> <li> <p> <b>Bucket</b>: The Amazon S3 bucket in which you want Elastic Transcoder to save thumbnail files.</p> </li> <li> <p> <b>Permissions</b> (Optional): The <code>Permissions</code> object specifies which users and/or predefined Amazon S3 groups you want to have access to thumbnail files, and the type of access you want them to have. You can grant permissions to a maximum of 30 users and/or predefined Amazon S3 groups.</p> </li> <li> <p> <b>GranteeType</b>: Specify the type of value that appears in the Grantee object:</p> <ul> <li> <p> <b>Canonical</b>: The value in the <code>Grantee</code> object is either the canonical user ID for an AWS account or an origin access identity for an Amazon CloudFront distribution.</p> <important> <p>A canonical user ID is not the same as an AWS account number.</p> </important> </li> <li> <p> <b>Email</b>: The value in the <code>Grantee</code> object is the registered email address of an AWS account.</p> </li> <li> <p> <b>Group</b>: The value in the <code>Grantee</code> object is one of the following predefined Amazon S3 groups: <code>AllUsers</code>, <code>AuthenticatedUsers</code>, or <code>LogDelivery</code>.</p> </li> </ul> </li> <li> <p> <b>Grantee</b>: The AWS user or group that you want to have access to thumbnail files. To identify the user or group, you can specify the canonical user ID for an AWS account, an origin access identity for a CloudFront distribution, the registered email address of an AWS account, or a predefined Amazon S3 group. </p> </li> <li> <p> <b>Access</b>: The permission that you want to give to the AWS user that you specified in <code>Grantee</code>. Permissions are granted on the thumbnail files that Elastic Transcoder adds to the bucket. Valid values include: </p> <ul> <li> <p> <code>READ</code>: The grantee can read the thumbnails and metadata for objects that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>READ<em>ACP</code>: The grantee can read the object ACL for thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>WRITE</em>ACP</code>: The grantee can write the ACL for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket.</p> </li> <li> <p> <code>FULL<em>CONTROL</code>: The grantee has <code>READ</code>, <code>READ</em>ACP</code>, and <code>WRITE_ACP</code> permissions for the thumbnails that Elastic Transcoder adds to the Amazon S3 bucket. </p> </li> </ul> </li> <li> <p> <b>StorageClass</b>: The Amazon S3 storage class, <code>Standard</code> or <code>ReducedRedundancy</code>, that you want Elastic Transcoder to assign to the thumbnails that it stores in your Amazon S3 bucket.</p> </li> </ul></p>
1312    #[serde(rename = "ThumbnailConfig")]
1313    #[serde(skip_serializing_if = "Option::is_none")]
1314    pub thumbnail_config: Option<PipelineOutputConfig>,
1315}
1316
1317/// <p>When you update a pipeline, Elastic Transcoder returns the values that you specified in the request.</p>
1318#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1319#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1320pub struct UpdatePipelineResponse {
1321    /// <p>The pipeline updated by this <code>UpdatePipelineResponse</code> call.</p>
1322    #[serde(rename = "Pipeline")]
1323    #[serde(skip_serializing_if = "Option::is_none")]
1324    pub pipeline: Option<Pipeline>,
1325    /// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p> <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
1326    #[serde(rename = "Warnings")]
1327    #[serde(skip_serializing_if = "Option::is_none")]
1328    pub warnings: Option<Vec<Warning>>,
1329}
1330
1331/// <p>The <code>UpdatePipelineStatusRequest</code> structure.</p>
1332#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1333#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1334pub struct UpdatePipelineStatusRequest {
1335    /// <p>The identifier of the pipeline to update.</p>
1336    #[serde(rename = "Id")]
1337    pub id: String,
1338    /// <p><p>The desired status of the pipeline:</p> <ul> <li> <p> <code>Active</code>: The pipeline is processing jobs.</p> </li> <li> <p> <code>Paused</code>: The pipeline is not currently processing jobs.</p> </li> </ul></p>
1339    #[serde(rename = "Status")]
1340    pub status: String,
1341}
1342
1343/// <p>When you update status for a pipeline, Elastic Transcoder returns the values that you specified in the request.</p>
1344#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1345#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1346pub struct UpdatePipelineStatusResponse {
1347    /// <p>A section of the response body that provides information about the pipeline.</p>
1348    #[serde(rename = "Pipeline")]
1349    #[serde(skip_serializing_if = "Option::is_none")]
1350    pub pipeline: Option<Pipeline>,
1351}
1352
1353/// <p>The <code>VideoParameters</code> structure.</p>
1354#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1355pub struct VideoParameters {
1356    /// <p><important> <p>To better control resolution and aspect ratio of output videos, we recommend that you use the values <code>MaxWidth</code>, <code>MaxHeight</code>, <code>SizingPolicy</code>, <code>PaddingPolicy</code>, and <code>DisplayAspectRatio</code> instead of <code>Resolution</code> and <code>AspectRatio</code>. The two groups of settings are mutually exclusive. Do not use them together.</p> </important> <p>The display aspect ratio of the video in the output file. Valid values include:</p> <p> <code>auto</code>, <code>1:1</code>, <code>4:3</code>, <code>3:2</code>, <code>16:9</code> </p> <p>If you specify <code>auto</code>, Elastic Transcoder tries to preserve the aspect ratio of the input file.</p> <p>If you specify an aspect ratio for the output file that differs from aspect ratio of the input file, Elastic Transcoder adds pillarboxing (black bars on the sides) or letterboxing (black bars on the top and bottom) to maintain the aspect ratio of the active region of the video.</p></p>
1357    #[serde(rename = "AspectRatio")]
1358    #[serde(skip_serializing_if = "Option::is_none")]
1359    pub aspect_ratio: Option<String>,
1360    /// <p><p>The bit rate of the video stream in the output file, in kilobits/second. Valid values depend on the values of <code>Level</code> and <code>Profile</code>. If you specify <code>auto</code>, Elastic Transcoder uses the detected bit rate of the input source. If you specify a value other than <code>auto</code>, we recommend that you specify a value less than or equal to the maximum H.264-compliant value listed for your level and profile:</p> <p> <i>Level - Maximum video bit rate in kilobits/second (baseline and main Profile) : maximum video bit rate in kilobits/second (high Profile)</i> </p> <ul> <li> <p>1 - 64 : 80</p> </li> <li> <p>1b - 128 : 160</p> </li> <li> <p>1.1 - 192 : 240</p> </li> <li> <p>1.2 - 384 : 480</p> </li> <li> <p>1.3 - 768 : 960</p> </li> <li> <p>2 - 2000 : 2500</p> </li> <li> <p>3 - 10000 : 12500</p> </li> <li> <p>3.1 - 14000 : 17500</p> </li> <li> <p>3.2 - 20000 : 25000</p> </li> <li> <p>4 - 20000 : 25000</p> </li> <li> <p>4.1 - 50000 : 62500</p> </li> </ul></p>
1361    #[serde(rename = "BitRate")]
1362    #[serde(skip_serializing_if = "Option::is_none")]
1363    pub bit_rate: Option<String>,
1364    /// <p>The video codec for the output file. Valid values include <code>gif</code>, <code>H.264</code>, <code>mpeg2</code>, <code>vp8</code>, and <code>vp9</code>. You can only specify <code>vp8</code> and <code>vp9</code> when the container type is <code>webm</code>, <code>gif</code> when the container type is <code>gif</code>, and <code>mpeg2</code> when the container type is <code>mpg</code>.</p>
1365    #[serde(rename = "Codec")]
1366    #[serde(skip_serializing_if = "Option::is_none")]
1367    pub codec: Option<String>,
1368    /// <p> <b>Profile (H.264/VP8/VP9 Only)</b> </p> <p>The H.264 profile that you want to use for the output file. Elastic Transcoder supports the following profiles:</p> <ul> <li> <p> <code>baseline</code>: The profile most commonly used for videoconferencing and for mobile applications.</p> </li> <li> <p> <code>main</code>: The profile used for standard-definition digital TV broadcasts.</p> </li> <li> <p> <code>high</code>: The profile used for high-definition digital TV broadcasts and for Blu-ray discs.</p> </li> </ul> <p> <b>Level (H.264 Only)</b> </p> <p>The H.264 level that you want to use for the output file. Elastic Transcoder supports the following levels:</p> <p> <code>1</code>, <code>1b</code>, <code>1.1</code>, <code>1.2</code>, <code>1.3</code>, <code>2</code>, <code>2.1</code>, <code>2.2</code>, <code>3</code>, <code>3.1</code>, <code>3.2</code>, <code>4</code>, <code>4.1</code> </p> <p> <b>MaxReferenceFrames (H.264 Only)</b> </p> <p>Applicable only when the value of Video:Codec is H.264. The maximum number of previously decoded frames to use as a reference for decoding future frames. Valid values are integers 0 through 16, but we recommend that you not use a value greater than the following:</p> <p> <code>Min(Floor(Maximum decoded picture buffer in macroblocks * 256 / (Width in pixels * Height in pixels)), 16)</code> </p> <p>where <i>Width in pixels</i> and <i>Height in pixels</i> represent either MaxWidth and MaxHeight, or Resolution. <i>Maximum decoded picture buffer in macroblocks</i> depends on the value of the <code>Level</code> object. See the list below. (A macroblock is a block of pixels measuring 16x16.) </p> <ul> <li> <p>1 - 396</p> </li> <li> <p>1b - 396</p> </li> <li> <p>1.1 - 900</p> </li> <li> <p>1.2 - 2376</p> </li> <li> <p>1.3 - 2376</p> </li> <li> <p>2 - 2376</p> </li> <li> <p>2.1 - 4752</p> </li> <li> <p>2.2 - 8100</p> </li> <li> <p>3 - 8100</p> </li> <li> <p>3.1 - 18000</p> </li> <li> <p>3.2 - 20480</p> </li> <li> <p>4 - 32768</p> </li> <li> <p>4.1 - 32768</p> </li> </ul> <p> <b>MaxBitRate (Optional, H.264/MPEG2/VP8/VP9 only)</b> </p> <p>The maximum number of bits per second in a video buffer; the size of the buffer is specified by <code>BufferSize</code>. Specify a value between 16 and 62,500. You can reduce the bandwidth required to stream a video by reducing the maximum bit rate, but this also reduces the quality of the video.</p> <p> <b>BufferSize (Optional, H.264/MPEG2/VP8/VP9 only)</b> </p> <p>The maximum number of bits in any x seconds of the output video. This window is commonly 10 seconds, the standard segment duration when you're using FMP4 or MPEG-TS for the container type of the output video. Specify an integer greater than 0. If you specify <code>MaxBitRate</code> and omit <code>BufferSize</code>, Elastic Transcoder sets <code>BufferSize</code> to 10 times the value of <code>MaxBitRate</code>.</p> <p> <b>InterlacedMode (Optional, H.264/MPEG2 Only)</b> </p> <p>The interlace mode for the output video.</p> <p>Interlaced video is used to double the perceived frame rate for a video by interlacing two fields (one field on every other line, the other field on the other lines) so that the human eye registers multiple pictures per frame. Interlacing reduces the bandwidth required for transmitting a video, but can result in blurred images and flickering.</p> <p>Valid values include <code>Progressive</code> (no interlacing, top to bottom), <code>TopFirst</code> (top field first), <code>BottomFirst</code> (bottom field first), and <code>Auto</code>.</p> <p>If <code>InterlaceMode</code> is not specified, Elastic Transcoder uses <code>Progressive</code> for the output. If <code>Auto</code> is specified, Elastic Transcoder interlaces the output.</p> <p> <b>ColorSpaceConversionMode (Optional, H.264/MPEG2 Only)</b> </p> <p>The color space conversion Elastic Transcoder applies to the output video. Color spaces are the algorithms used by the computer to store information about how to render color. <code>Bt.601</code> is the standard for standard definition video, while <code>Bt.709</code> is the standard for high definition video.</p> <p>Valid values include <code>None</code>, <code>Bt709toBt601</code>, <code>Bt601toBt709</code>, and <code>Auto</code>.</p> <p>If you chose <code>Auto</code> for <code>ColorSpaceConversionMode</code> and your output is interlaced, your frame rate is one of <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>, <code>50</code>, or <code>60</code>, your <code>SegmentDuration</code> is null, and you are using one of the resolution changes from the list below, Elastic Transcoder applies the following color space conversions:</p> <ul> <li> <p> <i>Standard to HD, 720x480 to 1920x1080</i> - Elastic Transcoder applies <code>Bt601ToBt709</code> </p> </li> <li> <p> <i>Standard to HD, 720x576 to 1920x1080</i> - Elastic Transcoder applies <code>Bt601ToBt709</code> </p> </li> <li> <p> <i>HD to Standard, 1920x1080 to 720x480</i> - Elastic Transcoder applies <code>Bt709ToBt601</code> </p> </li> <li> <p> <i>HD to Standard, 1920x1080 to 720x576</i> - Elastic Transcoder applies <code>Bt709ToBt601</code> </p> </li> </ul> <note> <p>Elastic Transcoder may change the behavior of the <code>ColorspaceConversionMode</code> <code>Auto</code> mode in the future. All outputs in a playlist must use the same <code>ColorSpaceConversionMode</code>.</p> </note> <p>If you do not specify a <code>ColorSpaceConversionMode</code>, Elastic Transcoder does not change the color space of a file. If you are unsure what <code>ColorSpaceConversionMode</code> was applied to your output file, you can check the <code>AppliedColorSpaceConversion</code> parameter included in your job response. If your job does not have an <code>AppliedColorSpaceConversion</code> in its response, no <code>ColorSpaceConversionMode</code> was applied.</p> <p> <b>ChromaSubsampling</b> </p> <p>The sampling pattern for the chroma (color) channels of the output video. Valid values include <code>yuv420p</code> and <code>yuv422p</code>.</p> <p> <code>yuv420p</code> samples the chroma information of every other horizontal and every other vertical line, <code>yuv422p</code> samples the color information of every horizontal line and every other vertical line.</p> <p> <b>LoopCount (Gif Only)</b> </p> <p>The number of times you want the output gif to loop. Valid values include <code>Infinite</code> and integers between <code>0</code> and <code>100</code>, inclusive.</p>
1369    #[serde(rename = "CodecOptions")]
1370    #[serde(skip_serializing_if = "Option::is_none")]
1371    pub codec_options: Option<::std::collections::HashMap<String, String>>,
1372    /// <p>The value that Elastic Transcoder adds to the metadata in the output file.</p>
1373    #[serde(rename = "DisplayAspectRatio")]
1374    #[serde(skip_serializing_if = "Option::is_none")]
1375    pub display_aspect_ratio: Option<String>,
1376    /// <p><p>Applicable only when the value of Video:Codec is one of <code>H.264</code>, <code>MPEG2</code>, or <code>VP8</code>.</p> <p>Whether to use a fixed value for <code>FixedGOP</code>. Valid values are <code>true</code> and <code>false</code>:</p> <ul> <li> <p> <code>true</code>: Elastic Transcoder uses the value of <code>KeyframesMaxDist</code> for the distance between key frames (the number of frames in a group of pictures, or GOP).</p> </li> <li> <p> <code>false</code>: The distance between key frames can vary.</p> </li> </ul> <important> <p> <code>FixedGOP</code> must be set to <code>true</code> for <code>fmp4</code> containers.</p> </important></p>
1377    #[serde(rename = "FixedGOP")]
1378    #[serde(skip_serializing_if = "Option::is_none")]
1379    pub fixed_gop: Option<String>,
1380    /// <p><p>The frames per second for the video stream in the output file. Valid values include:</p> <p> <code>auto</code>, <code>10</code>, <code>15</code>, <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>, <code>30</code>, <code>60</code> </p> <p>If you specify <code>auto</code>, Elastic Transcoder uses the detected frame rate of the input source. If you specify a frame rate, we recommend that you perform the following calculation:</p> <p> <code>Frame rate = maximum recommended decoding speed in luma samples/second / (width in pixels * height in pixels)</code> </p> <p>where:</p> <ul> <li> <p> <i>width in pixels</i> and <i>height in pixels</i> represent the Resolution of the output video.</p> </li> <li> <p> <i>maximum recommended decoding speed in Luma samples/second</i> is less than or equal to the maximum value listed in the following table, based on the value that you specified for Level.</p> </li> </ul> <p>The maximum recommended decoding speed in Luma samples/second for each level is described in the following list (<i>Level - Decoding speed</i>):</p> <ul> <li> <p>1 - 380160</p> </li> <li> <p>1b - 380160</p> </li> <li> <p>1.1 - 76800</p> </li> <li> <p>1.2 - 1536000</p> </li> <li> <p>1.3 - 3041280</p> </li> <li> <p>2 - 3041280</p> </li> <li> <p>2.1 - 5068800</p> </li> <li> <p>2.2 - 5184000</p> </li> <li> <p>3 - 10368000</p> </li> <li> <p>3.1 - 27648000</p> </li> <li> <p>3.2 - 55296000</p> </li> <li> <p>4 - 62914560</p> </li> <li> <p>4.1 - 62914560</p> </li> </ul></p>
1381    #[serde(rename = "FrameRate")]
1382    #[serde(skip_serializing_if = "Option::is_none")]
1383    pub frame_rate: Option<String>,
1384    /// <p>Applicable only when the value of Video:Codec is one of <code>H.264</code>, <code>MPEG2</code>, or <code>VP8</code>.</p> <p>The maximum number of frames between key frames. Key frames are fully encoded frames; the frames between key frames are encoded based, in part, on the content of the key frames. The value is an integer formatted as a string; valid values are between 1 (every frame is a key frame) and 100000, inclusive. A higher value results in higher compression but may also discernibly decrease video quality.</p> <p>For <code>Smooth</code> outputs, the <code>FrameRate</code> must have a constant ratio to the <code>KeyframesMaxDist</code>. This allows <code>Smooth</code> playlists to switch between different quality levels while the file is being played.</p> <p>For example, an input file can have a <code>FrameRate</code> of 30 with a <code>KeyframesMaxDist</code> of 90. The output file then needs to have a ratio of 1:3. Valid outputs would have <code>FrameRate</code> of 30, 25, and 10, and <code>KeyframesMaxDist</code> of 90, 75, and 30, respectively.</p> <p>Alternately, this can be achieved by setting <code>FrameRate</code> to auto and having the same values for <code>MaxFrameRate</code> and <code>KeyframesMaxDist</code>.</p>
1385    #[serde(rename = "KeyframesMaxDist")]
1386    #[serde(skip_serializing_if = "Option::is_none")]
1387    pub keyframes_max_dist: Option<String>,
1388    /// <p>If you specify <code>auto</code> for <code>FrameRate</code>, Elastic Transcoder uses the frame rate of the input video for the frame rate of the output video. Specify the maximum frame rate that you want Elastic Transcoder to use when the frame rate of the input video is greater than the desired maximum frame rate of the output video. Valid values include: <code>10</code>, <code>15</code>, <code>23.97</code>, <code>24</code>, <code>25</code>, <code>29.97</code>, <code>30</code>, <code>60</code>.</p>
1389    #[serde(rename = "MaxFrameRate")]
1390    #[serde(skip_serializing_if = "Option::is_none")]
1391    pub max_frame_rate: Option<String>,
1392    /// <p>The maximum height of the output video in pixels. If you specify <code>auto</code>, Elastic Transcoder uses 1080 (Full HD) as the default value. If you specify a numeric value, enter an even integer between 96 and 3072.</p>
1393    #[serde(rename = "MaxHeight")]
1394    #[serde(skip_serializing_if = "Option::is_none")]
1395    pub max_height: Option<String>,
1396    /// <p> The maximum width of the output video in pixels. If you specify <code>auto</code>, Elastic Transcoder uses 1920 (Full HD) as the default value. If you specify a numeric value, enter an even integer between 128 and 4096. </p>
1397    #[serde(rename = "MaxWidth")]
1398    #[serde(skip_serializing_if = "Option::is_none")]
1399    pub max_width: Option<String>,
1400    /// <p>When you set <code>PaddingPolicy</code> to <code>Pad</code>, Elastic Transcoder may add black bars to the top and bottom and/or left and right sides of the output video to make the total size of the output video match the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>.</p>
1401    #[serde(rename = "PaddingPolicy")]
1402    #[serde(skip_serializing_if = "Option::is_none")]
1403    pub padding_policy: Option<String>,
1404    /// <p><important> <p>To better control resolution and aspect ratio of output videos, we recommend that you use the values <code>MaxWidth</code>, <code>MaxHeight</code>, <code>SizingPolicy</code>, <code>PaddingPolicy</code>, and <code>DisplayAspectRatio</code> instead of <code>Resolution</code> and <code>AspectRatio</code>. The two groups of settings are mutually exclusive. Do not use them together.</p> </important> <p>The width and height of the video in the output file, in pixels. Valid values are <code>auto</code> and <i>width</i> x <i>height</i>:</p> <ul> <li> <p> <code>auto</code>: Elastic Transcoder attempts to preserve the width and height of the input file, subject to the following rules.</p> </li> <li> <p> <code> <i>width</i> x <i>height</i> </code>: The width and height of the output video in pixels.</p> </li> </ul> <p>Note the following about specifying the width and height:</p> <ul> <li> <p>The width must be an even integer between 128 and 4096, inclusive.</p> </li> <li> <p>The height must be an even integer between 96 and 3072, inclusive.</p> </li> <li> <p>If you specify a resolution that is less than the resolution of the input file, Elastic Transcoder rescales the output file to the lower resolution.</p> </li> <li> <p>If you specify a resolution that is greater than the resolution of the input file, Elastic Transcoder rescales the output to the higher resolution.</p> </li> <li> <p>We recommend that you specify a resolution for which the product of width and height is less than or equal to the applicable value in the following list (<i>List - Max width x height value</i>):</p> <ul> <li> <p>1 - 25344</p> </li> <li> <p>1b - 25344</p> </li> <li> <p>1.1 - 101376</p> </li> <li> <p>1.2 - 101376</p> </li> <li> <p>1.3 - 101376</p> </li> <li> <p>2 - 101376</p> </li> <li> <p>2.1 - 202752</p> </li> <li> <p>2.2 - 404720</p> </li> <li> <p>3 - 404720</p> </li> <li> <p>3.1 - 921600</p> </li> <li> <p>3.2 - 1310720</p> </li> <li> <p>4 - 2097152</p> </li> <li> <p>4.1 - 2097152</p> </li> </ul> </li> </ul></p>
1405    #[serde(rename = "Resolution")]
1406    #[serde(skip_serializing_if = "Option::is_none")]
1407    pub resolution: Option<String>,
1408    /// <p><p>Specify one of the following values to control scaling of the output video:</p> <ul> <li> <p> <code>Fit</code>: Elastic Transcoder scales the output video so it matches the value that you specified in either <code>MaxWidth</code> or <code>MaxHeight</code> without exceeding the other value.</p> </li> <li> <p> <code>Fill</code>: Elastic Transcoder scales the output video so it matches the value that you specified in either <code>MaxWidth</code> or <code>MaxHeight</code> and matches or exceeds the other value. Elastic Transcoder centers the output video and then crops it in the dimension (if any) that exceeds the maximum value.</p> </li> <li> <p> <code>Stretch</code>: Elastic Transcoder stretches the output video to match the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>. If the relative proportions of the input video and the output video are different, the output video will be distorted.</p> </li> <li> <p> <code>Keep</code>: Elastic Transcoder does not scale the output video. If either dimension of the input video exceeds the values that you specified for <code>MaxWidth</code> and <code>MaxHeight</code>, Elastic Transcoder crops the output video.</p> </li> <li> <p> <code>ShrinkToFit</code>: Elastic Transcoder scales the output video down so that its dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without exceeding either value. If you specify this option, Elastic Transcoder does not scale the video up.</p> </li> <li> <p> <code>ShrinkToFill</code>: Elastic Transcoder scales the output video down so that its dimensions match the values that you specified for at least one of <code>MaxWidth</code> and <code>MaxHeight</code> without dropping below either value. If you specify this option, Elastic Transcoder does not scale the video up.</p> </li> </ul></p>
1409    #[serde(rename = "SizingPolicy")]
1410    #[serde(skip_serializing_if = "Option::is_none")]
1411    pub sizing_policy: Option<String>,
1412    /// <p>Settings for the size, location, and opacity of graphics that you want Elastic Transcoder to overlay over videos that are transcoded using this preset. You can specify settings for up to four watermarks. Watermarks appear in the specified size and location, and with the specified opacity for the duration of the transcoded video.</p> <p>Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.</p> <p>When you create a job that uses this preset, you specify the .png or .jpg graphics that you want Elastic Transcoder to include in the transcoded videos. You can specify fewer graphics in the job than you specify watermark settings in the preset, which allows you to use the same preset for up to four watermarks that have different dimensions.</p>
1413    #[serde(rename = "Watermarks")]
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    pub watermarks: Option<Vec<PresetWatermark>>,
1416}
1417
1418/// <p>Elastic Transcoder returns a warning if the resources used by your pipeline are not in the same region as the pipeline.</p> <p>Using resources in the same region, such as your Amazon S3 buckets, Amazon SNS notification topics, and AWS KMS key, reduces processing time and prevents cross-regional charges.</p>
1419#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1420#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1421pub struct Warning {
1422    /// <p>The code of the cross-regional warning.</p>
1423    #[serde(rename = "Code")]
1424    #[serde(skip_serializing_if = "Option::is_none")]
1425    pub code: Option<String>,
1426    /// <p><p>The message explaining what resources are in a different region from the pipeline.</p> <note> <p>AWS KMS keys must be in the same region as the pipeline.</p> </note></p>
1427    #[serde(rename = "Message")]
1428    #[serde(skip_serializing_if = "Option::is_none")]
1429    pub message: Option<String>,
1430}
1431
1432/// Errors returned by CancelJob
1433#[derive(Debug, PartialEq)]
1434pub enum CancelJobError {
1435    /// <p>General authentication failure. The request was not signed correctly.</p>
1436    AccessDenied(String),
1437
1438    IncompatibleVersion(String),
1439    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1440    InternalService(String),
1441    /// <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</p>
1442    ResourceInUse(String),
1443    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1444    ResourceNotFound(String),
1445}
1446
1447impl CancelJobError {
1448    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelJobError> {
1449        if let Some(err) = proto::json::Error::parse_rest(&res) {
1450            match err.typ.as_str() {
1451                "AccessDeniedException" => {
1452                    return RusotoError::Service(CancelJobError::AccessDenied(err.msg))
1453                }
1454                "IncompatibleVersionException" => {
1455                    return RusotoError::Service(CancelJobError::IncompatibleVersion(err.msg))
1456                }
1457                "InternalServiceException" => {
1458                    return RusotoError::Service(CancelJobError::InternalService(err.msg))
1459                }
1460                "ResourceInUseException" => {
1461                    return RusotoError::Service(CancelJobError::ResourceInUse(err.msg))
1462                }
1463                "ResourceNotFoundException" => {
1464                    return RusotoError::Service(CancelJobError::ResourceNotFound(err.msg))
1465                }
1466                "ValidationException" => return RusotoError::Validation(err.msg),
1467                _ => {}
1468            }
1469        }
1470        RusotoError::Unknown(res)
1471    }
1472}
1473impl fmt::Display for CancelJobError {
1474    #[allow(unused_variables)]
1475    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1476        match *self {
1477            CancelJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
1478            CancelJobError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1479            CancelJobError::InternalService(ref cause) => write!(f, "{}", cause),
1480            CancelJobError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1481            CancelJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1482        }
1483    }
1484}
1485impl Error for CancelJobError {}
1486/// Errors returned by CreateJob
1487#[derive(Debug, PartialEq)]
1488pub enum CreateJobError {
1489    /// <p>General authentication failure. The request was not signed correctly.</p>
1490    AccessDenied(String),
1491
1492    IncompatibleVersion(String),
1493    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1494    InternalService(String),
1495    /// <p>Too many operations for a given AWS account. For example, the number of pipelines exceeds the maximum allowed.</p>
1496    LimitExceeded(String),
1497    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1498    ResourceNotFound(String),
1499}
1500
1501impl CreateJobError {
1502    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateJobError> {
1503        if let Some(err) = proto::json::Error::parse_rest(&res) {
1504            match err.typ.as_str() {
1505                "AccessDeniedException" => {
1506                    return RusotoError::Service(CreateJobError::AccessDenied(err.msg))
1507                }
1508                "IncompatibleVersionException" => {
1509                    return RusotoError::Service(CreateJobError::IncompatibleVersion(err.msg))
1510                }
1511                "InternalServiceException" => {
1512                    return RusotoError::Service(CreateJobError::InternalService(err.msg))
1513                }
1514                "LimitExceededException" => {
1515                    return RusotoError::Service(CreateJobError::LimitExceeded(err.msg))
1516                }
1517                "ResourceNotFoundException" => {
1518                    return RusotoError::Service(CreateJobError::ResourceNotFound(err.msg))
1519                }
1520                "ValidationException" => return RusotoError::Validation(err.msg),
1521                _ => {}
1522            }
1523        }
1524        RusotoError::Unknown(res)
1525    }
1526}
1527impl fmt::Display for CreateJobError {
1528    #[allow(unused_variables)]
1529    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1530        match *self {
1531            CreateJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
1532            CreateJobError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1533            CreateJobError::InternalService(ref cause) => write!(f, "{}", cause),
1534            CreateJobError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1535            CreateJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1536        }
1537    }
1538}
1539impl Error for CreateJobError {}
1540/// Errors returned by CreatePipeline
1541#[derive(Debug, PartialEq)]
1542pub enum CreatePipelineError {
1543    /// <p>General authentication failure. The request was not signed correctly.</p>
1544    AccessDenied(String),
1545
1546    IncompatibleVersion(String),
1547    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1548    InternalService(String),
1549    /// <p>Too many operations for a given AWS account. For example, the number of pipelines exceeds the maximum allowed.</p>
1550    LimitExceeded(String),
1551    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1552    ResourceNotFound(String),
1553}
1554
1555impl CreatePipelineError {
1556    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePipelineError> {
1557        if let Some(err) = proto::json::Error::parse_rest(&res) {
1558            match err.typ.as_str() {
1559                "AccessDeniedException" => {
1560                    return RusotoError::Service(CreatePipelineError::AccessDenied(err.msg))
1561                }
1562                "IncompatibleVersionException" => {
1563                    return RusotoError::Service(CreatePipelineError::IncompatibleVersion(err.msg))
1564                }
1565                "InternalServiceException" => {
1566                    return RusotoError::Service(CreatePipelineError::InternalService(err.msg))
1567                }
1568                "LimitExceededException" => {
1569                    return RusotoError::Service(CreatePipelineError::LimitExceeded(err.msg))
1570                }
1571                "ResourceNotFoundException" => {
1572                    return RusotoError::Service(CreatePipelineError::ResourceNotFound(err.msg))
1573                }
1574                "ValidationException" => return RusotoError::Validation(err.msg),
1575                _ => {}
1576            }
1577        }
1578        RusotoError::Unknown(res)
1579    }
1580}
1581impl fmt::Display for CreatePipelineError {
1582    #[allow(unused_variables)]
1583    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1584        match *self {
1585            CreatePipelineError::AccessDenied(ref cause) => write!(f, "{}", cause),
1586            CreatePipelineError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1587            CreatePipelineError::InternalService(ref cause) => write!(f, "{}", cause),
1588            CreatePipelineError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1589            CreatePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1590        }
1591    }
1592}
1593impl Error for CreatePipelineError {}
1594/// Errors returned by CreatePreset
1595#[derive(Debug, PartialEq)]
1596pub enum CreatePresetError {
1597    /// <p>General authentication failure. The request was not signed correctly.</p>
1598    AccessDenied(String),
1599
1600    IncompatibleVersion(String),
1601    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1602    InternalService(String),
1603    /// <p>Too many operations for a given AWS account. For example, the number of pipelines exceeds the maximum allowed.</p>
1604    LimitExceeded(String),
1605}
1606
1607impl CreatePresetError {
1608    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreatePresetError> {
1609        if let Some(err) = proto::json::Error::parse_rest(&res) {
1610            match err.typ.as_str() {
1611                "AccessDeniedException" => {
1612                    return RusotoError::Service(CreatePresetError::AccessDenied(err.msg))
1613                }
1614                "IncompatibleVersionException" => {
1615                    return RusotoError::Service(CreatePresetError::IncompatibleVersion(err.msg))
1616                }
1617                "InternalServiceException" => {
1618                    return RusotoError::Service(CreatePresetError::InternalService(err.msg))
1619                }
1620                "LimitExceededException" => {
1621                    return RusotoError::Service(CreatePresetError::LimitExceeded(err.msg))
1622                }
1623                "ValidationException" => return RusotoError::Validation(err.msg),
1624                _ => {}
1625            }
1626        }
1627        RusotoError::Unknown(res)
1628    }
1629}
1630impl fmt::Display for CreatePresetError {
1631    #[allow(unused_variables)]
1632    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1633        match *self {
1634            CreatePresetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1635            CreatePresetError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1636            CreatePresetError::InternalService(ref cause) => write!(f, "{}", cause),
1637            CreatePresetError::LimitExceeded(ref cause) => write!(f, "{}", cause),
1638        }
1639    }
1640}
1641impl Error for CreatePresetError {}
1642/// Errors returned by DeletePipeline
1643#[derive(Debug, PartialEq)]
1644pub enum DeletePipelineError {
1645    /// <p>General authentication failure. The request was not signed correctly.</p>
1646    AccessDenied(String),
1647
1648    IncompatibleVersion(String),
1649    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1650    InternalService(String),
1651    /// <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</p>
1652    ResourceInUse(String),
1653    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1654    ResourceNotFound(String),
1655}
1656
1657impl DeletePipelineError {
1658    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePipelineError> {
1659        if let Some(err) = proto::json::Error::parse_rest(&res) {
1660            match err.typ.as_str() {
1661                "AccessDeniedException" => {
1662                    return RusotoError::Service(DeletePipelineError::AccessDenied(err.msg))
1663                }
1664                "IncompatibleVersionException" => {
1665                    return RusotoError::Service(DeletePipelineError::IncompatibleVersion(err.msg))
1666                }
1667                "InternalServiceException" => {
1668                    return RusotoError::Service(DeletePipelineError::InternalService(err.msg))
1669                }
1670                "ResourceInUseException" => {
1671                    return RusotoError::Service(DeletePipelineError::ResourceInUse(err.msg))
1672                }
1673                "ResourceNotFoundException" => {
1674                    return RusotoError::Service(DeletePipelineError::ResourceNotFound(err.msg))
1675                }
1676                "ValidationException" => return RusotoError::Validation(err.msg),
1677                _ => {}
1678            }
1679        }
1680        RusotoError::Unknown(res)
1681    }
1682}
1683impl fmt::Display for DeletePipelineError {
1684    #[allow(unused_variables)]
1685    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1686        match *self {
1687            DeletePipelineError::AccessDenied(ref cause) => write!(f, "{}", cause),
1688            DeletePipelineError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1689            DeletePipelineError::InternalService(ref cause) => write!(f, "{}", cause),
1690            DeletePipelineError::ResourceInUse(ref cause) => write!(f, "{}", cause),
1691            DeletePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1692        }
1693    }
1694}
1695impl Error for DeletePipelineError {}
1696/// Errors returned by DeletePreset
1697#[derive(Debug, PartialEq)]
1698pub enum DeletePresetError {
1699    /// <p>General authentication failure. The request was not signed correctly.</p>
1700    AccessDenied(String),
1701
1702    IncompatibleVersion(String),
1703    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1704    InternalService(String),
1705    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1706    ResourceNotFound(String),
1707}
1708
1709impl DeletePresetError {
1710    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeletePresetError> {
1711        if let Some(err) = proto::json::Error::parse_rest(&res) {
1712            match err.typ.as_str() {
1713                "AccessDeniedException" => {
1714                    return RusotoError::Service(DeletePresetError::AccessDenied(err.msg))
1715                }
1716                "IncompatibleVersionException" => {
1717                    return RusotoError::Service(DeletePresetError::IncompatibleVersion(err.msg))
1718                }
1719                "InternalServiceException" => {
1720                    return RusotoError::Service(DeletePresetError::InternalService(err.msg))
1721                }
1722                "ResourceNotFoundException" => {
1723                    return RusotoError::Service(DeletePresetError::ResourceNotFound(err.msg))
1724                }
1725                "ValidationException" => return RusotoError::Validation(err.msg),
1726                _ => {}
1727            }
1728        }
1729        RusotoError::Unknown(res)
1730    }
1731}
1732impl fmt::Display for DeletePresetError {
1733    #[allow(unused_variables)]
1734    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1735        match *self {
1736            DeletePresetError::AccessDenied(ref cause) => write!(f, "{}", cause),
1737            DeletePresetError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1738            DeletePresetError::InternalService(ref cause) => write!(f, "{}", cause),
1739            DeletePresetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1740        }
1741    }
1742}
1743impl Error for DeletePresetError {}
1744/// Errors returned by ListJobsByPipeline
1745#[derive(Debug, PartialEq)]
1746pub enum ListJobsByPipelineError {
1747    /// <p>General authentication failure. The request was not signed correctly.</p>
1748    AccessDenied(String),
1749
1750    IncompatibleVersion(String),
1751    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1752    InternalService(String),
1753    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1754    ResourceNotFound(String),
1755}
1756
1757impl ListJobsByPipelineError {
1758    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsByPipelineError> {
1759        if let Some(err) = proto::json::Error::parse_rest(&res) {
1760            match err.typ.as_str() {
1761                "AccessDeniedException" => {
1762                    return RusotoError::Service(ListJobsByPipelineError::AccessDenied(err.msg))
1763                }
1764                "IncompatibleVersionException" => {
1765                    return RusotoError::Service(ListJobsByPipelineError::IncompatibleVersion(
1766                        err.msg,
1767                    ))
1768                }
1769                "InternalServiceException" => {
1770                    return RusotoError::Service(ListJobsByPipelineError::InternalService(err.msg))
1771                }
1772                "ResourceNotFoundException" => {
1773                    return RusotoError::Service(ListJobsByPipelineError::ResourceNotFound(err.msg))
1774                }
1775                "ValidationException" => return RusotoError::Validation(err.msg),
1776                _ => {}
1777            }
1778        }
1779        RusotoError::Unknown(res)
1780    }
1781}
1782impl fmt::Display for ListJobsByPipelineError {
1783    #[allow(unused_variables)]
1784    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1785        match *self {
1786            ListJobsByPipelineError::AccessDenied(ref cause) => write!(f, "{}", cause),
1787            ListJobsByPipelineError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1788            ListJobsByPipelineError::InternalService(ref cause) => write!(f, "{}", cause),
1789            ListJobsByPipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1790        }
1791    }
1792}
1793impl Error for ListJobsByPipelineError {}
1794/// Errors returned by ListJobsByStatus
1795#[derive(Debug, PartialEq)]
1796pub enum ListJobsByStatusError {
1797    /// <p>General authentication failure. The request was not signed correctly.</p>
1798    AccessDenied(String),
1799
1800    IncompatibleVersion(String),
1801    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1802    InternalService(String),
1803    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1804    ResourceNotFound(String),
1805}
1806
1807impl ListJobsByStatusError {
1808    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListJobsByStatusError> {
1809        if let Some(err) = proto::json::Error::parse_rest(&res) {
1810            match err.typ.as_str() {
1811                "AccessDeniedException" => {
1812                    return RusotoError::Service(ListJobsByStatusError::AccessDenied(err.msg))
1813                }
1814                "IncompatibleVersionException" => {
1815                    return RusotoError::Service(ListJobsByStatusError::IncompatibleVersion(
1816                        err.msg,
1817                    ))
1818                }
1819                "InternalServiceException" => {
1820                    return RusotoError::Service(ListJobsByStatusError::InternalService(err.msg))
1821                }
1822                "ResourceNotFoundException" => {
1823                    return RusotoError::Service(ListJobsByStatusError::ResourceNotFound(err.msg))
1824                }
1825                "ValidationException" => return RusotoError::Validation(err.msg),
1826                _ => {}
1827            }
1828        }
1829        RusotoError::Unknown(res)
1830    }
1831}
1832impl fmt::Display for ListJobsByStatusError {
1833    #[allow(unused_variables)]
1834    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1835        match *self {
1836            ListJobsByStatusError::AccessDenied(ref cause) => write!(f, "{}", cause),
1837            ListJobsByStatusError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1838            ListJobsByStatusError::InternalService(ref cause) => write!(f, "{}", cause),
1839            ListJobsByStatusError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1840        }
1841    }
1842}
1843impl Error for ListJobsByStatusError {}
1844/// Errors returned by ListPipelines
1845#[derive(Debug, PartialEq)]
1846pub enum ListPipelinesError {
1847    /// <p>General authentication failure. The request was not signed correctly.</p>
1848    AccessDenied(String),
1849
1850    IncompatibleVersion(String),
1851    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1852    InternalService(String),
1853}
1854
1855impl ListPipelinesError {
1856    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPipelinesError> {
1857        if let Some(err) = proto::json::Error::parse_rest(&res) {
1858            match err.typ.as_str() {
1859                "AccessDeniedException" => {
1860                    return RusotoError::Service(ListPipelinesError::AccessDenied(err.msg))
1861                }
1862                "IncompatibleVersionException" => {
1863                    return RusotoError::Service(ListPipelinesError::IncompatibleVersion(err.msg))
1864                }
1865                "InternalServiceException" => {
1866                    return RusotoError::Service(ListPipelinesError::InternalService(err.msg))
1867                }
1868                "ValidationException" => return RusotoError::Validation(err.msg),
1869                _ => {}
1870            }
1871        }
1872        RusotoError::Unknown(res)
1873    }
1874}
1875impl fmt::Display for ListPipelinesError {
1876    #[allow(unused_variables)]
1877    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1878        match *self {
1879            ListPipelinesError::AccessDenied(ref cause) => write!(f, "{}", cause),
1880            ListPipelinesError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1881            ListPipelinesError::InternalService(ref cause) => write!(f, "{}", cause),
1882        }
1883    }
1884}
1885impl Error for ListPipelinesError {}
1886/// Errors returned by ListPresets
1887#[derive(Debug, PartialEq)]
1888pub enum ListPresetsError {
1889    /// <p>General authentication failure. The request was not signed correctly.</p>
1890    AccessDenied(String),
1891
1892    IncompatibleVersion(String),
1893    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1894    InternalService(String),
1895}
1896
1897impl ListPresetsError {
1898    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListPresetsError> {
1899        if let Some(err) = proto::json::Error::parse_rest(&res) {
1900            match err.typ.as_str() {
1901                "AccessDeniedException" => {
1902                    return RusotoError::Service(ListPresetsError::AccessDenied(err.msg))
1903                }
1904                "IncompatibleVersionException" => {
1905                    return RusotoError::Service(ListPresetsError::IncompatibleVersion(err.msg))
1906                }
1907                "InternalServiceException" => {
1908                    return RusotoError::Service(ListPresetsError::InternalService(err.msg))
1909                }
1910                "ValidationException" => return RusotoError::Validation(err.msg),
1911                _ => {}
1912            }
1913        }
1914        RusotoError::Unknown(res)
1915    }
1916}
1917impl fmt::Display for ListPresetsError {
1918    #[allow(unused_variables)]
1919    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1920        match *self {
1921            ListPresetsError::AccessDenied(ref cause) => write!(f, "{}", cause),
1922            ListPresetsError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1923            ListPresetsError::InternalService(ref cause) => write!(f, "{}", cause),
1924        }
1925    }
1926}
1927impl Error for ListPresetsError {}
1928/// Errors returned by ReadJob
1929#[derive(Debug, PartialEq)]
1930pub enum ReadJobError {
1931    /// <p>General authentication failure. The request was not signed correctly.</p>
1932    AccessDenied(String),
1933
1934    IncompatibleVersion(String),
1935    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1936    InternalService(String),
1937    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1938    ResourceNotFound(String),
1939}
1940
1941impl ReadJobError {
1942    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReadJobError> {
1943        if let Some(err) = proto::json::Error::parse_rest(&res) {
1944            match err.typ.as_str() {
1945                "AccessDeniedException" => {
1946                    return RusotoError::Service(ReadJobError::AccessDenied(err.msg))
1947                }
1948                "IncompatibleVersionException" => {
1949                    return RusotoError::Service(ReadJobError::IncompatibleVersion(err.msg))
1950                }
1951                "InternalServiceException" => {
1952                    return RusotoError::Service(ReadJobError::InternalService(err.msg))
1953                }
1954                "ResourceNotFoundException" => {
1955                    return RusotoError::Service(ReadJobError::ResourceNotFound(err.msg))
1956                }
1957                "ValidationException" => return RusotoError::Validation(err.msg),
1958                _ => {}
1959            }
1960        }
1961        RusotoError::Unknown(res)
1962    }
1963}
1964impl fmt::Display for ReadJobError {
1965    #[allow(unused_variables)]
1966    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1967        match *self {
1968            ReadJobError::AccessDenied(ref cause) => write!(f, "{}", cause),
1969            ReadJobError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
1970            ReadJobError::InternalService(ref cause) => write!(f, "{}", cause),
1971            ReadJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
1972        }
1973    }
1974}
1975impl Error for ReadJobError {}
1976/// Errors returned by ReadPipeline
1977#[derive(Debug, PartialEq)]
1978pub enum ReadPipelineError {
1979    /// <p>General authentication failure. The request was not signed correctly.</p>
1980    AccessDenied(String),
1981
1982    IncompatibleVersion(String),
1983    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
1984    InternalService(String),
1985    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
1986    ResourceNotFound(String),
1987}
1988
1989impl ReadPipelineError {
1990    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReadPipelineError> {
1991        if let Some(err) = proto::json::Error::parse_rest(&res) {
1992            match err.typ.as_str() {
1993                "AccessDeniedException" => {
1994                    return RusotoError::Service(ReadPipelineError::AccessDenied(err.msg))
1995                }
1996                "IncompatibleVersionException" => {
1997                    return RusotoError::Service(ReadPipelineError::IncompatibleVersion(err.msg))
1998                }
1999                "InternalServiceException" => {
2000                    return RusotoError::Service(ReadPipelineError::InternalService(err.msg))
2001                }
2002                "ResourceNotFoundException" => {
2003                    return RusotoError::Service(ReadPipelineError::ResourceNotFound(err.msg))
2004                }
2005                "ValidationException" => return RusotoError::Validation(err.msg),
2006                _ => {}
2007            }
2008        }
2009        RusotoError::Unknown(res)
2010    }
2011}
2012impl fmt::Display for ReadPipelineError {
2013    #[allow(unused_variables)]
2014    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2015        match *self {
2016            ReadPipelineError::AccessDenied(ref cause) => write!(f, "{}", cause),
2017            ReadPipelineError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
2018            ReadPipelineError::InternalService(ref cause) => write!(f, "{}", cause),
2019            ReadPipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2020        }
2021    }
2022}
2023impl Error for ReadPipelineError {}
2024/// Errors returned by ReadPreset
2025#[derive(Debug, PartialEq)]
2026pub enum ReadPresetError {
2027    /// <p>General authentication failure. The request was not signed correctly.</p>
2028    AccessDenied(String),
2029
2030    IncompatibleVersion(String),
2031    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
2032    InternalService(String),
2033    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
2034    ResourceNotFound(String),
2035}
2036
2037impl ReadPresetError {
2038    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ReadPresetError> {
2039        if let Some(err) = proto::json::Error::parse_rest(&res) {
2040            match err.typ.as_str() {
2041                "AccessDeniedException" => {
2042                    return RusotoError::Service(ReadPresetError::AccessDenied(err.msg))
2043                }
2044                "IncompatibleVersionException" => {
2045                    return RusotoError::Service(ReadPresetError::IncompatibleVersion(err.msg))
2046                }
2047                "InternalServiceException" => {
2048                    return RusotoError::Service(ReadPresetError::InternalService(err.msg))
2049                }
2050                "ResourceNotFoundException" => {
2051                    return RusotoError::Service(ReadPresetError::ResourceNotFound(err.msg))
2052                }
2053                "ValidationException" => return RusotoError::Validation(err.msg),
2054                _ => {}
2055            }
2056        }
2057        RusotoError::Unknown(res)
2058    }
2059}
2060impl fmt::Display for ReadPresetError {
2061    #[allow(unused_variables)]
2062    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2063        match *self {
2064            ReadPresetError::AccessDenied(ref cause) => write!(f, "{}", cause),
2065            ReadPresetError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
2066            ReadPresetError::InternalService(ref cause) => write!(f, "{}", cause),
2067            ReadPresetError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2068        }
2069    }
2070}
2071impl Error for ReadPresetError {}
2072/// Errors returned by TestRole
2073#[derive(Debug, PartialEq)]
2074pub enum TestRoleError {
2075    /// <p>General authentication failure. The request was not signed correctly.</p>
2076    AccessDenied(String),
2077
2078    IncompatibleVersion(String),
2079    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
2080    InternalService(String),
2081    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
2082    ResourceNotFound(String),
2083}
2084
2085impl TestRoleError {
2086    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TestRoleError> {
2087        if let Some(err) = proto::json::Error::parse_rest(&res) {
2088            match err.typ.as_str() {
2089                "AccessDeniedException" => {
2090                    return RusotoError::Service(TestRoleError::AccessDenied(err.msg))
2091                }
2092                "IncompatibleVersionException" => {
2093                    return RusotoError::Service(TestRoleError::IncompatibleVersion(err.msg))
2094                }
2095                "InternalServiceException" => {
2096                    return RusotoError::Service(TestRoleError::InternalService(err.msg))
2097                }
2098                "ResourceNotFoundException" => {
2099                    return RusotoError::Service(TestRoleError::ResourceNotFound(err.msg))
2100                }
2101                "ValidationException" => return RusotoError::Validation(err.msg),
2102                _ => {}
2103            }
2104        }
2105        RusotoError::Unknown(res)
2106    }
2107}
2108impl fmt::Display for TestRoleError {
2109    #[allow(unused_variables)]
2110    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2111        match *self {
2112            TestRoleError::AccessDenied(ref cause) => write!(f, "{}", cause),
2113            TestRoleError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
2114            TestRoleError::InternalService(ref cause) => write!(f, "{}", cause),
2115            TestRoleError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2116        }
2117    }
2118}
2119impl Error for TestRoleError {}
2120/// Errors returned by UpdatePipeline
2121#[derive(Debug, PartialEq)]
2122pub enum UpdatePipelineError {
2123    /// <p>General authentication failure. The request was not signed correctly.</p>
2124    AccessDenied(String),
2125
2126    IncompatibleVersion(String),
2127    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
2128    InternalService(String),
2129    /// <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</p>
2130    ResourceInUse(String),
2131    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
2132    ResourceNotFound(String),
2133}
2134
2135impl UpdatePipelineError {
2136    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePipelineError> {
2137        if let Some(err) = proto::json::Error::parse_rest(&res) {
2138            match err.typ.as_str() {
2139                "AccessDeniedException" => {
2140                    return RusotoError::Service(UpdatePipelineError::AccessDenied(err.msg))
2141                }
2142                "IncompatibleVersionException" => {
2143                    return RusotoError::Service(UpdatePipelineError::IncompatibleVersion(err.msg))
2144                }
2145                "InternalServiceException" => {
2146                    return RusotoError::Service(UpdatePipelineError::InternalService(err.msg))
2147                }
2148                "ResourceInUseException" => {
2149                    return RusotoError::Service(UpdatePipelineError::ResourceInUse(err.msg))
2150                }
2151                "ResourceNotFoundException" => {
2152                    return RusotoError::Service(UpdatePipelineError::ResourceNotFound(err.msg))
2153                }
2154                "ValidationException" => return RusotoError::Validation(err.msg),
2155                _ => {}
2156            }
2157        }
2158        RusotoError::Unknown(res)
2159    }
2160}
2161impl fmt::Display for UpdatePipelineError {
2162    #[allow(unused_variables)]
2163    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2164        match *self {
2165            UpdatePipelineError::AccessDenied(ref cause) => write!(f, "{}", cause),
2166            UpdatePipelineError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
2167            UpdatePipelineError::InternalService(ref cause) => write!(f, "{}", cause),
2168            UpdatePipelineError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2169            UpdatePipelineError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2170        }
2171    }
2172}
2173impl Error for UpdatePipelineError {}
2174/// Errors returned by UpdatePipelineNotifications
2175#[derive(Debug, PartialEq)]
2176pub enum UpdatePipelineNotificationsError {
2177    /// <p>General authentication failure. The request was not signed correctly.</p>
2178    AccessDenied(String),
2179
2180    IncompatibleVersion(String),
2181    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
2182    InternalService(String),
2183    /// <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</p>
2184    ResourceInUse(String),
2185    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
2186    ResourceNotFound(String),
2187}
2188
2189impl UpdatePipelineNotificationsError {
2190    pub fn from_response(
2191        res: BufferedHttpResponse,
2192    ) -> RusotoError<UpdatePipelineNotificationsError> {
2193        if let Some(err) = proto::json::Error::parse_rest(&res) {
2194            match err.typ.as_str() {
2195                "AccessDeniedException" => {
2196                    return RusotoError::Service(UpdatePipelineNotificationsError::AccessDenied(
2197                        err.msg,
2198                    ))
2199                }
2200                "IncompatibleVersionException" => {
2201                    return RusotoError::Service(
2202                        UpdatePipelineNotificationsError::IncompatibleVersion(err.msg),
2203                    )
2204                }
2205                "InternalServiceException" => {
2206                    return RusotoError::Service(UpdatePipelineNotificationsError::InternalService(
2207                        err.msg,
2208                    ))
2209                }
2210                "ResourceInUseException" => {
2211                    return RusotoError::Service(UpdatePipelineNotificationsError::ResourceInUse(
2212                        err.msg,
2213                    ))
2214                }
2215                "ResourceNotFoundException" => {
2216                    return RusotoError::Service(
2217                        UpdatePipelineNotificationsError::ResourceNotFound(err.msg),
2218                    )
2219                }
2220                "ValidationException" => return RusotoError::Validation(err.msg),
2221                _ => {}
2222            }
2223        }
2224        RusotoError::Unknown(res)
2225    }
2226}
2227impl fmt::Display for UpdatePipelineNotificationsError {
2228    #[allow(unused_variables)]
2229    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2230        match *self {
2231            UpdatePipelineNotificationsError::AccessDenied(ref cause) => write!(f, "{}", cause),
2232            UpdatePipelineNotificationsError::IncompatibleVersion(ref cause) => {
2233                write!(f, "{}", cause)
2234            }
2235            UpdatePipelineNotificationsError::InternalService(ref cause) => write!(f, "{}", cause),
2236            UpdatePipelineNotificationsError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2237            UpdatePipelineNotificationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2238        }
2239    }
2240}
2241impl Error for UpdatePipelineNotificationsError {}
2242/// Errors returned by UpdatePipelineStatus
2243#[derive(Debug, PartialEq)]
2244pub enum UpdatePipelineStatusError {
2245    /// <p>General authentication failure. The request was not signed correctly.</p>
2246    AccessDenied(String),
2247
2248    IncompatibleVersion(String),
2249    /// <p>Elastic Transcoder encountered an unexpected exception while trying to fulfill the request.</p>
2250    InternalService(String),
2251    /// <p>The resource you are attempting to change is in use. For example, you are attempting to delete a pipeline that is currently in use.</p>
2252    ResourceInUse(String),
2253    /// <p>The requested resource does not exist or is not available. For example, the pipeline to which you're trying to add a job doesn't exist or is still being created.</p>
2254    ResourceNotFound(String),
2255}
2256
2257impl UpdatePipelineStatusError {
2258    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdatePipelineStatusError> {
2259        if let Some(err) = proto::json::Error::parse_rest(&res) {
2260            match err.typ.as_str() {
2261                "AccessDeniedException" => {
2262                    return RusotoError::Service(UpdatePipelineStatusError::AccessDenied(err.msg))
2263                }
2264                "IncompatibleVersionException" => {
2265                    return RusotoError::Service(UpdatePipelineStatusError::IncompatibleVersion(
2266                        err.msg,
2267                    ))
2268                }
2269                "InternalServiceException" => {
2270                    return RusotoError::Service(UpdatePipelineStatusError::InternalService(
2271                        err.msg,
2272                    ))
2273                }
2274                "ResourceInUseException" => {
2275                    return RusotoError::Service(UpdatePipelineStatusError::ResourceInUse(err.msg))
2276                }
2277                "ResourceNotFoundException" => {
2278                    return RusotoError::Service(UpdatePipelineStatusError::ResourceNotFound(
2279                        err.msg,
2280                    ))
2281                }
2282                "ValidationException" => return RusotoError::Validation(err.msg),
2283                _ => {}
2284            }
2285        }
2286        RusotoError::Unknown(res)
2287    }
2288}
2289impl fmt::Display for UpdatePipelineStatusError {
2290    #[allow(unused_variables)]
2291    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2292        match *self {
2293            UpdatePipelineStatusError::AccessDenied(ref cause) => write!(f, "{}", cause),
2294            UpdatePipelineStatusError::IncompatibleVersion(ref cause) => write!(f, "{}", cause),
2295            UpdatePipelineStatusError::InternalService(ref cause) => write!(f, "{}", cause),
2296            UpdatePipelineStatusError::ResourceInUse(ref cause) => write!(f, "{}", cause),
2297            UpdatePipelineStatusError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2298        }
2299    }
2300}
2301impl Error for UpdatePipelineStatusError {}
2302/// Trait representing the capabilities of the Amazon Elastic Transcoder API. Amazon Elastic Transcoder clients implement this trait.
2303#[async_trait]
2304pub trait Ets {
2305    /// <p><p>The CancelJob operation cancels an unfinished job.</p> <note> <p>You can only cancel a job that has a status of <code>Submitted</code>. To prevent a pipeline from starting to process a job while you&#39;re getting the job identifier, use <a>UpdatePipelineStatus</a> to temporarily pause the pipeline.</p> </note></p>
2306    async fn cancel_job(
2307        &self,
2308        input: CancelJobRequest,
2309    ) -> Result<CancelJobResponse, RusotoError<CancelJobError>>;
2310
2311    /// <p>When you create a job, Elastic Transcoder returns JSON data that includes the values that you specified plus information about the job that is created.</p> <p>If you have specified more than one output for your jobs (for example, one output for the Kindle Fire and another output for the Apple iPhone 4s), you currently must use the Elastic Transcoder API to list the jobs (as opposed to the AWS Console).</p>
2312    async fn create_job(
2313        &self,
2314        input: CreateJobRequest,
2315    ) -> Result<CreateJobResponse, RusotoError<CreateJobError>>;
2316
2317    /// <p>The CreatePipeline operation creates a pipeline with settings that you specify.</p>
2318    async fn create_pipeline(
2319        &self,
2320        input: CreatePipelineRequest,
2321    ) -> Result<CreatePipelineResponse, RusotoError<CreatePipelineError>>;
2322
2323    /// <p>The CreatePreset operation creates a preset with settings that you specify.</p> <important> <p>Elastic Transcoder checks the CreatePreset settings to ensure that they meet Elastic Transcoder requirements and to determine whether they comply with H.264 standards. If your settings are not valid for Elastic Transcoder, Elastic Transcoder returns an HTTP 400 response (<code>ValidationException</code>) and does not create the preset. If the settings are valid for Elastic Transcoder but aren't strictly compliant with the H.264 standard, Elastic Transcoder creates the preset and returns a warning message in the response. This helps you determine whether your settings comply with the H.264 standard while giving you greater flexibility with respect to the video that Elastic Transcoder produces.</p> </important> <p>Elastic Transcoder uses the H.264 video-compression format. For more information, see the International Telecommunication Union publication <i>Recommendation ITU-T H.264: Advanced video coding for generic audiovisual services</i>.</p>
2324    async fn create_preset(
2325        &self,
2326        input: CreatePresetRequest,
2327    ) -> Result<CreatePresetResponse, RusotoError<CreatePresetError>>;
2328
2329    /// <p>The DeletePipeline operation removes a pipeline.</p> <p> You can only delete a pipeline that has never been used or that is not currently in use (doesn't contain any active jobs). If the pipeline is currently in use, <code>DeletePipeline</code> returns an error. </p>
2330    async fn delete_pipeline(
2331        &self,
2332        input: DeletePipelineRequest,
2333    ) -> Result<DeletePipelineResponse, RusotoError<DeletePipelineError>>;
2334
2335    /// <p><p>The DeletePreset operation removes a preset that you&#39;ve added in an AWS region.</p> <note> <p>You can&#39;t delete the default presets that are included with Elastic Transcoder.</p> </note></p>
2336    async fn delete_preset(
2337        &self,
2338        input: DeletePresetRequest,
2339    ) -> Result<DeletePresetResponse, RusotoError<DeletePresetError>>;
2340
2341    /// <p>The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.</p> <p>Elastic Transcoder returns all of the jobs currently in the specified pipeline. The response body contains one element for each job that satisfies the search criteria.</p>
2342    async fn list_jobs_by_pipeline(
2343        &self,
2344        input: ListJobsByPipelineRequest,
2345    ) -> Result<ListJobsByPipelineResponse, RusotoError<ListJobsByPipelineError>>;
2346
2347    /// <p>The ListJobsByStatus operation gets a list of jobs that have a specified status. The response body contains one element for each job that satisfies the search criteria.</p>
2348    async fn list_jobs_by_status(
2349        &self,
2350        input: ListJobsByStatusRequest,
2351    ) -> Result<ListJobsByStatusResponse, RusotoError<ListJobsByStatusError>>;
2352
2353    /// <p>The ListPipelines operation gets a list of the pipelines associated with the current AWS account.</p>
2354    async fn list_pipelines(
2355        &self,
2356        input: ListPipelinesRequest,
2357    ) -> Result<ListPipelinesResponse, RusotoError<ListPipelinesError>>;
2358
2359    /// <p>The ListPresets operation gets a list of the default presets included with Elastic Transcoder and the presets that you've added in an AWS region.</p>
2360    async fn list_presets(
2361        &self,
2362        input: ListPresetsRequest,
2363    ) -> Result<ListPresetsResponse, RusotoError<ListPresetsError>>;
2364
2365    /// <p>The ReadJob operation returns detailed information about a job.</p>
2366    async fn read_job(
2367        &self,
2368        input: ReadJobRequest,
2369    ) -> Result<ReadJobResponse, RusotoError<ReadJobError>>;
2370
2371    /// <p>The ReadPipeline operation gets detailed information about a pipeline.</p>
2372    async fn read_pipeline(
2373        &self,
2374        input: ReadPipelineRequest,
2375    ) -> Result<ReadPipelineResponse, RusotoError<ReadPipelineError>>;
2376
2377    /// <p>The ReadPreset operation gets detailed information about a preset.</p>
2378    async fn read_preset(
2379        &self,
2380        input: ReadPresetRequest,
2381    ) -> Result<ReadPresetResponse, RusotoError<ReadPresetError>>;
2382
2383    /// <p>The TestRole operation tests the IAM role used to create the pipeline.</p> <p>The <code>TestRole</code> action lets you determine whether the IAM role you are using has sufficient permissions to let Elastic Transcoder perform tasks associated with the transcoding process. The action attempts to assume the specified IAM role, checks read access to the input and output buckets, and tries to send a test notification to Amazon SNS topics that you specify.</p>
2384    async fn test_role(
2385        &self,
2386        input: TestRoleRequest,
2387    ) -> Result<TestRoleResponse, RusotoError<TestRoleError>>;
2388
2389    /// <p><p> Use the <code>UpdatePipeline</code> operation to update settings for a pipeline.</p> <important> <p>When you change pipeline settings, your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are affected in addition to jobs that you submit after you change settings. </p> </important></p>
2390    async fn update_pipeline(
2391        &self,
2392        input: UpdatePipelineRequest,
2393    ) -> Result<UpdatePipelineResponse, RusotoError<UpdatePipelineError>>;
2394
2395    /// <p>With the UpdatePipelineNotifications operation, you can update Amazon Simple Notification Service (Amazon SNS) notifications for a pipeline.</p> <p>When you update notifications for a pipeline, Elastic Transcoder returns the values that you specified in the request.</p>
2396    async fn update_pipeline_notifications(
2397        &self,
2398        input: UpdatePipelineNotificationsRequest,
2399    ) -> Result<UpdatePipelineNotificationsResponse, RusotoError<UpdatePipelineNotificationsError>>;
2400
2401    /// <p>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.</p> <p>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for the jobs that you want to cancel, and to send a <a>CancelJob</a> request. </p>
2402    async fn update_pipeline_status(
2403        &self,
2404        input: UpdatePipelineStatusRequest,
2405    ) -> Result<UpdatePipelineStatusResponse, RusotoError<UpdatePipelineStatusError>>;
2406}
2407/// A client for the Amazon Elastic Transcoder API.
2408#[derive(Clone)]
2409pub struct EtsClient {
2410    client: Client,
2411    region: region::Region,
2412}
2413
2414impl EtsClient {
2415    /// Creates a client backed by the default tokio event loop.
2416    ///
2417    /// The client will use the default credentials provider and tls client.
2418    pub fn new(region: region::Region) -> EtsClient {
2419        EtsClient {
2420            client: Client::shared(),
2421            region,
2422        }
2423    }
2424
2425    pub fn new_with<P, D>(
2426        request_dispatcher: D,
2427        credentials_provider: P,
2428        region: region::Region,
2429    ) -> EtsClient
2430    where
2431        P: ProvideAwsCredentials + Send + Sync + 'static,
2432        D: DispatchSignedRequest + Send + Sync + 'static,
2433    {
2434        EtsClient {
2435            client: Client::new_with(credentials_provider, request_dispatcher),
2436            region,
2437        }
2438    }
2439
2440    pub fn new_with_client(client: Client, region: region::Region) -> EtsClient {
2441        EtsClient { client, region }
2442    }
2443}
2444
2445#[async_trait]
2446impl Ets for EtsClient {
2447    /// <p><p>The CancelJob operation cancels an unfinished job.</p> <note> <p>You can only cancel a job that has a status of <code>Submitted</code>. To prevent a pipeline from starting to process a job while you&#39;re getting the job identifier, use <a>UpdatePipelineStatus</a> to temporarily pause the pipeline.</p> </note></p>
2448    #[allow(unused_mut)]
2449    async fn cancel_job(
2450        &self,
2451        input: CancelJobRequest,
2452    ) -> Result<CancelJobResponse, RusotoError<CancelJobError>> {
2453        let request_uri = format!("/2012-09-25/jobs/{id}", id = input.id);
2454
2455        let mut request =
2456            SignedRequest::new("DELETE", "elastictranscoder", &self.region, &request_uri);
2457        request.set_content_type("application/x-amz-json-1.1".to_owned());
2458
2459        let mut response = self
2460            .client
2461            .sign_and_dispatch(request)
2462            .await
2463            .map_err(RusotoError::from)?;
2464        if response.status.as_u16() == 202 {
2465            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2466            let result = proto::json::ResponsePayload::new(&response)
2467                .deserialize::<CancelJobResponse, _>()?;
2468
2469            Ok(result)
2470        } else {
2471            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2472            Err(CancelJobError::from_response(response))
2473        }
2474    }
2475
2476    /// <p>When you create a job, Elastic Transcoder returns JSON data that includes the values that you specified plus information about the job that is created.</p> <p>If you have specified more than one output for your jobs (for example, one output for the Kindle Fire and another output for the Apple iPhone 4s), you currently must use the Elastic Transcoder API to list the jobs (as opposed to the AWS Console).</p>
2477    #[allow(unused_mut)]
2478    async fn create_job(
2479        &self,
2480        input: CreateJobRequest,
2481    ) -> Result<CreateJobResponse, RusotoError<CreateJobError>> {
2482        let request_uri = "/2012-09-25/jobs";
2483
2484        let mut request =
2485            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2486        request.set_content_type("application/x-amz-json-1.1".to_owned());
2487
2488        let encoded = Some(serde_json::to_vec(&input).unwrap());
2489        request.set_payload(encoded);
2490
2491        let mut response = self
2492            .client
2493            .sign_and_dispatch(request)
2494            .await
2495            .map_err(RusotoError::from)?;
2496        if response.status.as_u16() == 201 {
2497            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2498            let result = proto::json::ResponsePayload::new(&response)
2499                .deserialize::<CreateJobResponse, _>()?;
2500
2501            Ok(result)
2502        } else {
2503            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2504            Err(CreateJobError::from_response(response))
2505        }
2506    }
2507
2508    /// <p>The CreatePipeline operation creates a pipeline with settings that you specify.</p>
2509    #[allow(unused_mut)]
2510    async fn create_pipeline(
2511        &self,
2512        input: CreatePipelineRequest,
2513    ) -> Result<CreatePipelineResponse, RusotoError<CreatePipelineError>> {
2514        let request_uri = "/2012-09-25/pipelines";
2515
2516        let mut request =
2517            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2518        request.set_content_type("application/x-amz-json-1.1".to_owned());
2519
2520        let encoded = Some(serde_json::to_vec(&input).unwrap());
2521        request.set_payload(encoded);
2522
2523        let mut response = self
2524            .client
2525            .sign_and_dispatch(request)
2526            .await
2527            .map_err(RusotoError::from)?;
2528        if response.status.as_u16() == 201 {
2529            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2530            let result = proto::json::ResponsePayload::new(&response)
2531                .deserialize::<CreatePipelineResponse, _>()?;
2532
2533            Ok(result)
2534        } else {
2535            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2536            Err(CreatePipelineError::from_response(response))
2537        }
2538    }
2539
2540    /// <p>The CreatePreset operation creates a preset with settings that you specify.</p> <important> <p>Elastic Transcoder checks the CreatePreset settings to ensure that they meet Elastic Transcoder requirements and to determine whether they comply with H.264 standards. If your settings are not valid for Elastic Transcoder, Elastic Transcoder returns an HTTP 400 response (<code>ValidationException</code>) and does not create the preset. If the settings are valid for Elastic Transcoder but aren't strictly compliant with the H.264 standard, Elastic Transcoder creates the preset and returns a warning message in the response. This helps you determine whether your settings comply with the H.264 standard while giving you greater flexibility with respect to the video that Elastic Transcoder produces.</p> </important> <p>Elastic Transcoder uses the H.264 video-compression format. For more information, see the International Telecommunication Union publication <i>Recommendation ITU-T H.264: Advanced video coding for generic audiovisual services</i>.</p>
2541    #[allow(unused_mut)]
2542    async fn create_preset(
2543        &self,
2544        input: CreatePresetRequest,
2545    ) -> Result<CreatePresetResponse, RusotoError<CreatePresetError>> {
2546        let request_uri = "/2012-09-25/presets";
2547
2548        let mut request =
2549            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2550        request.set_content_type("application/x-amz-json-1.1".to_owned());
2551
2552        let encoded = Some(serde_json::to_vec(&input).unwrap());
2553        request.set_payload(encoded);
2554
2555        let mut response = self
2556            .client
2557            .sign_and_dispatch(request)
2558            .await
2559            .map_err(RusotoError::from)?;
2560        if response.status.as_u16() == 201 {
2561            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2562            let result = proto::json::ResponsePayload::new(&response)
2563                .deserialize::<CreatePresetResponse, _>()?;
2564
2565            Ok(result)
2566        } else {
2567            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2568            Err(CreatePresetError::from_response(response))
2569        }
2570    }
2571
2572    /// <p>The DeletePipeline operation removes a pipeline.</p> <p> You can only delete a pipeline that has never been used or that is not currently in use (doesn't contain any active jobs). If the pipeline is currently in use, <code>DeletePipeline</code> returns an error. </p>
2573    #[allow(unused_mut)]
2574    async fn delete_pipeline(
2575        &self,
2576        input: DeletePipelineRequest,
2577    ) -> Result<DeletePipelineResponse, RusotoError<DeletePipelineError>> {
2578        let request_uri = format!("/2012-09-25/pipelines/{id}", id = input.id);
2579
2580        let mut request =
2581            SignedRequest::new("DELETE", "elastictranscoder", &self.region, &request_uri);
2582        request.set_content_type("application/x-amz-json-1.1".to_owned());
2583
2584        let mut response = self
2585            .client
2586            .sign_and_dispatch(request)
2587            .await
2588            .map_err(RusotoError::from)?;
2589        if response.status.as_u16() == 202 {
2590            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2591            let result = proto::json::ResponsePayload::new(&response)
2592                .deserialize::<DeletePipelineResponse, _>()?;
2593
2594            Ok(result)
2595        } else {
2596            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2597            Err(DeletePipelineError::from_response(response))
2598        }
2599    }
2600
2601    /// <p><p>The DeletePreset operation removes a preset that you&#39;ve added in an AWS region.</p> <note> <p>You can&#39;t delete the default presets that are included with Elastic Transcoder.</p> </note></p>
2602    #[allow(unused_mut)]
2603    async fn delete_preset(
2604        &self,
2605        input: DeletePresetRequest,
2606    ) -> Result<DeletePresetResponse, RusotoError<DeletePresetError>> {
2607        let request_uri = format!("/2012-09-25/presets/{id}", id = input.id);
2608
2609        let mut request =
2610            SignedRequest::new("DELETE", "elastictranscoder", &self.region, &request_uri);
2611        request.set_content_type("application/x-amz-json-1.1".to_owned());
2612
2613        let mut response = self
2614            .client
2615            .sign_and_dispatch(request)
2616            .await
2617            .map_err(RusotoError::from)?;
2618        if response.status.as_u16() == 202 {
2619            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2620            let result = proto::json::ResponsePayload::new(&response)
2621                .deserialize::<DeletePresetResponse, _>()?;
2622
2623            Ok(result)
2624        } else {
2625            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2626            Err(DeletePresetError::from_response(response))
2627        }
2628    }
2629
2630    /// <p>The ListJobsByPipeline operation gets a list of the jobs currently in a pipeline.</p> <p>Elastic Transcoder returns all of the jobs currently in the specified pipeline. The response body contains one element for each job that satisfies the search criteria.</p>
2631    #[allow(unused_mut)]
2632    async fn list_jobs_by_pipeline(
2633        &self,
2634        input: ListJobsByPipelineRequest,
2635    ) -> Result<ListJobsByPipelineResponse, RusotoError<ListJobsByPipelineError>> {
2636        let request_uri = format!(
2637            "/2012-09-25/jobsByPipeline/{pipeline_id}",
2638            pipeline_id = input.pipeline_id
2639        );
2640
2641        let mut request =
2642            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2643        request.set_content_type("application/x-amz-json-1.1".to_owned());
2644
2645        let mut params = Params::new();
2646        if let Some(ref x) = input.ascending {
2647            params.put("Ascending", x);
2648        }
2649        if let Some(ref x) = input.page_token {
2650            params.put("PageToken", x);
2651        }
2652        request.set_params(params);
2653
2654        let mut response = self
2655            .client
2656            .sign_and_dispatch(request)
2657            .await
2658            .map_err(RusotoError::from)?;
2659        if response.status.is_success() {
2660            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2661            let result = proto::json::ResponsePayload::new(&response)
2662                .deserialize::<ListJobsByPipelineResponse, _>()?;
2663
2664            Ok(result)
2665        } else {
2666            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2667            Err(ListJobsByPipelineError::from_response(response))
2668        }
2669    }
2670
2671    /// <p>The ListJobsByStatus operation gets a list of jobs that have a specified status. The response body contains one element for each job that satisfies the search criteria.</p>
2672    #[allow(unused_mut)]
2673    async fn list_jobs_by_status(
2674        &self,
2675        input: ListJobsByStatusRequest,
2676    ) -> Result<ListJobsByStatusResponse, RusotoError<ListJobsByStatusError>> {
2677        let request_uri = format!("/2012-09-25/jobsByStatus/{status}", status = input.status);
2678
2679        let mut request =
2680            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2681        request.set_content_type("application/x-amz-json-1.1".to_owned());
2682
2683        let mut params = Params::new();
2684        if let Some(ref x) = input.ascending {
2685            params.put("Ascending", x);
2686        }
2687        if let Some(ref x) = input.page_token {
2688            params.put("PageToken", x);
2689        }
2690        request.set_params(params);
2691
2692        let mut response = self
2693            .client
2694            .sign_and_dispatch(request)
2695            .await
2696            .map_err(RusotoError::from)?;
2697        if response.status.is_success() {
2698            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2699            let result = proto::json::ResponsePayload::new(&response)
2700                .deserialize::<ListJobsByStatusResponse, _>()?;
2701
2702            Ok(result)
2703        } else {
2704            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2705            Err(ListJobsByStatusError::from_response(response))
2706        }
2707    }
2708
2709    /// <p>The ListPipelines operation gets a list of the pipelines associated with the current AWS account.</p>
2710    #[allow(unused_mut)]
2711    async fn list_pipelines(
2712        &self,
2713        input: ListPipelinesRequest,
2714    ) -> Result<ListPipelinesResponse, RusotoError<ListPipelinesError>> {
2715        let request_uri = "/2012-09-25/pipelines";
2716
2717        let mut request =
2718            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2719        request.set_content_type("application/x-amz-json-1.1".to_owned());
2720
2721        let mut params = Params::new();
2722        if let Some(ref x) = input.ascending {
2723            params.put("Ascending", x);
2724        }
2725        if let Some(ref x) = input.page_token {
2726            params.put("PageToken", x);
2727        }
2728        request.set_params(params);
2729
2730        let mut response = self
2731            .client
2732            .sign_and_dispatch(request)
2733            .await
2734            .map_err(RusotoError::from)?;
2735        if response.status.is_success() {
2736            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2737            let result = proto::json::ResponsePayload::new(&response)
2738                .deserialize::<ListPipelinesResponse, _>()?;
2739
2740            Ok(result)
2741        } else {
2742            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2743            Err(ListPipelinesError::from_response(response))
2744        }
2745    }
2746
2747    /// <p>The ListPresets operation gets a list of the default presets included with Elastic Transcoder and the presets that you've added in an AWS region.</p>
2748    #[allow(unused_mut)]
2749    async fn list_presets(
2750        &self,
2751        input: ListPresetsRequest,
2752    ) -> Result<ListPresetsResponse, RusotoError<ListPresetsError>> {
2753        let request_uri = "/2012-09-25/presets";
2754
2755        let mut request =
2756            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2757        request.set_content_type("application/x-amz-json-1.1".to_owned());
2758
2759        let mut params = Params::new();
2760        if let Some(ref x) = input.ascending {
2761            params.put("Ascending", x);
2762        }
2763        if let Some(ref x) = input.page_token {
2764            params.put("PageToken", x);
2765        }
2766        request.set_params(params);
2767
2768        let mut response = self
2769            .client
2770            .sign_and_dispatch(request)
2771            .await
2772            .map_err(RusotoError::from)?;
2773        if response.status.is_success() {
2774            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2775            let result = proto::json::ResponsePayload::new(&response)
2776                .deserialize::<ListPresetsResponse, _>()?;
2777
2778            Ok(result)
2779        } else {
2780            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2781            Err(ListPresetsError::from_response(response))
2782        }
2783    }
2784
2785    /// <p>The ReadJob operation returns detailed information about a job.</p>
2786    #[allow(unused_mut)]
2787    async fn read_job(
2788        &self,
2789        input: ReadJobRequest,
2790    ) -> Result<ReadJobResponse, RusotoError<ReadJobError>> {
2791        let request_uri = format!("/2012-09-25/jobs/{id}", id = input.id);
2792
2793        let mut request =
2794            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2795        request.set_content_type("application/x-amz-json-1.1".to_owned());
2796
2797        let mut response = self
2798            .client
2799            .sign_and_dispatch(request)
2800            .await
2801            .map_err(RusotoError::from)?;
2802        if response.status.is_success() {
2803            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2804            let result =
2805                proto::json::ResponsePayload::new(&response).deserialize::<ReadJobResponse, _>()?;
2806
2807            Ok(result)
2808        } else {
2809            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2810            Err(ReadJobError::from_response(response))
2811        }
2812    }
2813
2814    /// <p>The ReadPipeline operation gets detailed information about a pipeline.</p>
2815    #[allow(unused_mut)]
2816    async fn read_pipeline(
2817        &self,
2818        input: ReadPipelineRequest,
2819    ) -> Result<ReadPipelineResponse, RusotoError<ReadPipelineError>> {
2820        let request_uri = format!("/2012-09-25/pipelines/{id}", id = input.id);
2821
2822        let mut request =
2823            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2824        request.set_content_type("application/x-amz-json-1.1".to_owned());
2825
2826        let mut response = self
2827            .client
2828            .sign_and_dispatch(request)
2829            .await
2830            .map_err(RusotoError::from)?;
2831        if response.status.is_success() {
2832            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2833            let result = proto::json::ResponsePayload::new(&response)
2834                .deserialize::<ReadPipelineResponse, _>()?;
2835
2836            Ok(result)
2837        } else {
2838            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2839            Err(ReadPipelineError::from_response(response))
2840        }
2841    }
2842
2843    /// <p>The ReadPreset operation gets detailed information about a preset.</p>
2844    #[allow(unused_mut)]
2845    async fn read_preset(
2846        &self,
2847        input: ReadPresetRequest,
2848    ) -> Result<ReadPresetResponse, RusotoError<ReadPresetError>> {
2849        let request_uri = format!("/2012-09-25/presets/{id}", id = input.id);
2850
2851        let mut request =
2852            SignedRequest::new("GET", "elastictranscoder", &self.region, &request_uri);
2853        request.set_content_type("application/x-amz-json-1.1".to_owned());
2854
2855        let mut response = self
2856            .client
2857            .sign_and_dispatch(request)
2858            .await
2859            .map_err(RusotoError::from)?;
2860        if response.status.is_success() {
2861            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2862            let result = proto::json::ResponsePayload::new(&response)
2863                .deserialize::<ReadPresetResponse, _>()?;
2864
2865            Ok(result)
2866        } else {
2867            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2868            Err(ReadPresetError::from_response(response))
2869        }
2870    }
2871
2872    /// <p>The TestRole operation tests the IAM role used to create the pipeline.</p> <p>The <code>TestRole</code> action lets you determine whether the IAM role you are using has sufficient permissions to let Elastic Transcoder perform tasks associated with the transcoding process. The action attempts to assume the specified IAM role, checks read access to the input and output buckets, and tries to send a test notification to Amazon SNS topics that you specify.</p>
2873    #[allow(unused_mut)]
2874    async fn test_role(
2875        &self,
2876        input: TestRoleRequest,
2877    ) -> Result<TestRoleResponse, RusotoError<TestRoleError>> {
2878        let request_uri = "/2012-09-25/roleTests";
2879
2880        let mut request =
2881            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2882        request.set_content_type("application/x-amz-json-1.1".to_owned());
2883
2884        let encoded = Some(serde_json::to_vec(&input).unwrap());
2885        request.set_payload(encoded);
2886
2887        let mut response = self
2888            .client
2889            .sign_and_dispatch(request)
2890            .await
2891            .map_err(RusotoError::from)?;
2892        if response.status.as_u16() == 200 {
2893            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2894            let result = proto::json::ResponsePayload::new(&response)
2895                .deserialize::<TestRoleResponse, _>()?;
2896
2897            Ok(result)
2898        } else {
2899            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2900            Err(TestRoleError::from_response(response))
2901        }
2902    }
2903
2904    /// <p><p> Use the <code>UpdatePipeline</code> operation to update settings for a pipeline.</p> <important> <p>When you change pipeline settings, your changes take effect immediately. Jobs that you have already submitted and that Elastic Transcoder has not started to process are affected in addition to jobs that you submit after you change settings. </p> </important></p>
2905    #[allow(unused_mut)]
2906    async fn update_pipeline(
2907        &self,
2908        input: UpdatePipelineRequest,
2909    ) -> Result<UpdatePipelineResponse, RusotoError<UpdatePipelineError>> {
2910        let request_uri = format!("/2012-09-25/pipelines/{id}", id = input.id);
2911
2912        let mut request =
2913            SignedRequest::new("PUT", "elastictranscoder", &self.region, &request_uri);
2914        request.set_content_type("application/x-amz-json-1.1".to_owned());
2915
2916        let encoded = Some(serde_json::to_vec(&input).unwrap());
2917        request.set_payload(encoded);
2918
2919        let mut response = self
2920            .client
2921            .sign_and_dispatch(request)
2922            .await
2923            .map_err(RusotoError::from)?;
2924        if response.status.as_u16() == 200 {
2925            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2926            let result = proto::json::ResponsePayload::new(&response)
2927                .deserialize::<UpdatePipelineResponse, _>()?;
2928
2929            Ok(result)
2930        } else {
2931            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2932            Err(UpdatePipelineError::from_response(response))
2933        }
2934    }
2935
2936    /// <p>With the UpdatePipelineNotifications operation, you can update Amazon Simple Notification Service (Amazon SNS) notifications for a pipeline.</p> <p>When you update notifications for a pipeline, Elastic Transcoder returns the values that you specified in the request.</p>
2937    #[allow(unused_mut)]
2938    async fn update_pipeline_notifications(
2939        &self,
2940        input: UpdatePipelineNotificationsRequest,
2941    ) -> Result<UpdatePipelineNotificationsResponse, RusotoError<UpdatePipelineNotificationsError>>
2942    {
2943        let request_uri = format!("/2012-09-25/pipelines/{id}/notifications", id = input.id);
2944
2945        let mut request =
2946            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2947        request.set_content_type("application/x-amz-json-1.1".to_owned());
2948
2949        let encoded = Some(serde_json::to_vec(&input).unwrap());
2950        request.set_payload(encoded);
2951
2952        let mut response = self
2953            .client
2954            .sign_and_dispatch(request)
2955            .await
2956            .map_err(RusotoError::from)?;
2957        if response.status.is_success() {
2958            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2959            let result = proto::json::ResponsePayload::new(&response)
2960                .deserialize::<UpdatePipelineNotificationsResponse, _>()?;
2961
2962            Ok(result)
2963        } else {
2964            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2965            Err(UpdatePipelineNotificationsError::from_response(response))
2966        }
2967    }
2968
2969    /// <p>The UpdatePipelineStatus operation pauses or reactivates a pipeline, so that the pipeline stops or restarts the processing of jobs.</p> <p>Changing the pipeline status is useful if you want to cancel one or more jobs. You can't cancel jobs after Elastic Transcoder has started processing them; if you pause the pipeline to which you submitted the jobs, you have more time to get the job IDs for the jobs that you want to cancel, and to send a <a>CancelJob</a> request. </p>
2970    #[allow(unused_mut)]
2971    async fn update_pipeline_status(
2972        &self,
2973        input: UpdatePipelineStatusRequest,
2974    ) -> Result<UpdatePipelineStatusResponse, RusotoError<UpdatePipelineStatusError>> {
2975        let request_uri = format!("/2012-09-25/pipelines/{id}/status", id = input.id);
2976
2977        let mut request =
2978            SignedRequest::new("POST", "elastictranscoder", &self.region, &request_uri);
2979        request.set_content_type("application/x-amz-json-1.1".to_owned());
2980
2981        let encoded = Some(serde_json::to_vec(&input).unwrap());
2982        request.set_payload(encoded);
2983
2984        let mut response = self
2985            .client
2986            .sign_and_dispatch(request)
2987            .await
2988            .map_err(RusotoError::from)?;
2989        if response.status.is_success() {
2990            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2991            let result = proto::json::ResponsePayload::new(&response)
2992                .deserialize::<UpdatePipelineStatusResponse, _>()?;
2993
2994            Ok(result)
2995        } else {
2996            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2997            Err(UpdatePipelineStatusError::from_response(response))
2998        }
2999    }
3000}