aws_sdk_elastictranscoder/types/_create_job_playlist.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the master playlist.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateJobPlaylist {
7 /// <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>
8 /// <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>
9 /// </note>
10 pub name: ::std::option::Option<::std::string::String>,
11 /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
12 pub format: ::std::option::Option<::std::string::String>,
13 /// <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>
14 /// <ul>
15 /// <li>
16 /// <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>
17 /// <p>OutputKeyPrefix<code>Outputs:Key</code></p></li>
18 /// <li>
19 /// <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>
20 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p>
21 /// <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p></li>
22 /// <li>
23 /// <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>
24 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p>
25 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p>
26 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p></li>
27 /// </ul>
28 /// <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>
29 /// <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>
30 pub output_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
31 /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
32 pub hls_content_protection: ::std::option::Option<crate::types::HlsContentProtection>,
33 /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
34 pub play_ready_drm: ::std::option::Option<crate::types::PlayReadyDrm>,
35}
36impl CreateJobPlaylist {
37 /// <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>
38 /// <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>
39 /// </note>
40 pub fn name(&self) -> ::std::option::Option<&str> {
41 self.name.as_deref()
42 }
43 /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
44 pub fn format(&self) -> ::std::option::Option<&str> {
45 self.format.as_deref()
46 }
47 /// <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>
48 /// <ul>
49 /// <li>
50 /// <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>
51 /// <p>OutputKeyPrefix<code>Outputs:Key</code></p></li>
52 /// <li>
53 /// <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>
54 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p>
55 /// <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p></li>
56 /// <li>
57 /// <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>
58 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p>
59 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p>
60 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p></li>
61 /// </ul>
62 /// <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>
63 /// <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>
64 ///
65 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.output_keys.is_none()`.
66 pub fn output_keys(&self) -> &[::std::string::String] {
67 self.output_keys.as_deref().unwrap_or_default()
68 }
69 /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
70 pub fn hls_content_protection(&self) -> ::std::option::Option<&crate::types::HlsContentProtection> {
71 self.hls_content_protection.as_ref()
72 }
73 /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
74 pub fn play_ready_drm(&self) -> ::std::option::Option<&crate::types::PlayReadyDrm> {
75 self.play_ready_drm.as_ref()
76 }
77}
78impl CreateJobPlaylist {
79 /// Creates a new builder-style object to manufacture [`CreateJobPlaylist`](crate::types::CreateJobPlaylist).
80 pub fn builder() -> crate::types::builders::CreateJobPlaylistBuilder {
81 crate::types::builders::CreateJobPlaylistBuilder::default()
82 }
83}
84
85/// A builder for [`CreateJobPlaylist`](crate::types::CreateJobPlaylist).
86#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
87#[non_exhaustive]
88pub struct CreateJobPlaylistBuilder {
89 pub(crate) name: ::std::option::Option<::std::string::String>,
90 pub(crate) format: ::std::option::Option<::std::string::String>,
91 pub(crate) output_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
92 pub(crate) hls_content_protection: ::std::option::Option<crate::types::HlsContentProtection>,
93 pub(crate) play_ready_drm: ::std::option::Option<crate::types::PlayReadyDrm>,
94}
95impl CreateJobPlaylistBuilder {
96 /// <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>
97 /// <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>
98 /// </note>
99 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
100 self.name = ::std::option::Option::Some(input.into());
101 self
102 }
103 /// <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>
104 /// <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>
105 /// </note>
106 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.name = input;
108 self
109 }
110 /// <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>
111 /// <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>
112 /// </note>
113 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
114 &self.name
115 }
116 /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
117 pub fn format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
118 self.format = ::std::option::Option::Some(input.into());
119 self
120 }
121 /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
122 pub fn set_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
123 self.format = input;
124 self
125 }
126 /// <p>The format of the output playlist. Valid formats include <code>HLSv3</code>, <code>HLSv4</code>, and <code>Smooth</code>.</p>
127 pub fn get_format(&self) -> &::std::option::Option<::std::string::String> {
128 &self.format
129 }
130 /// Appends an item to `output_keys`.
131 ///
132 /// To override the contents of this collection use [`set_output_keys`](Self::set_output_keys).
133 ///
134 /// <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>
135 /// <ul>
136 /// <li>
137 /// <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>
138 /// <p>OutputKeyPrefix<code>Outputs:Key</code></p></li>
139 /// <li>
140 /// <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>
141 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p>
142 /// <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p></li>
143 /// <li>
144 /// <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>
145 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p>
146 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p>
147 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p></li>
148 /// </ul>
149 /// <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>
150 /// <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>
151 pub fn output_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152 let mut v = self.output_keys.unwrap_or_default();
153 v.push(input.into());
154 self.output_keys = ::std::option::Option::Some(v);
155 self
156 }
157 /// <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>
158 /// <ul>
159 /// <li>
160 /// <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>
161 /// <p>OutputKeyPrefix<code>Outputs:Key</code></p></li>
162 /// <li>
163 /// <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>
164 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p>
165 /// <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p></li>
166 /// <li>
167 /// <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>
168 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p>
169 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p>
170 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p></li>
171 /// </ul>
172 /// <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>
173 /// <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>
174 pub fn set_output_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
175 self.output_keys = input;
176 self
177 }
178 /// <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>
179 /// <ul>
180 /// <li>
181 /// <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>
182 /// <p>OutputKeyPrefix<code>Outputs:Key</code></p></li>
183 /// <li>
184 /// <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>
185 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.m3u8</p>
186 /// <p>OutputKeyPrefix<code>Outputs:Key</code>00000.ts</p></li>
187 /// <li>
188 /// <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>
189 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_v4.m3u8</p>
190 /// <p>OutputKeyPrefix<code>Outputs:Key</code>_iframe.m3u8</p>
191 /// <p>OutputKeyPrefix<code>Outputs:Key</code>.ts</p></li>
192 /// </ul>
193 /// <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>
194 /// <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>
195 pub fn get_output_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
196 &self.output_keys
197 }
198 /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
199 pub fn hls_content_protection(mut self, input: crate::types::HlsContentProtection) -> Self {
200 self.hls_content_protection = ::std::option::Option::Some(input);
201 self
202 }
203 /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
204 pub fn set_hls_content_protection(mut self, input: ::std::option::Option<crate::types::HlsContentProtection>) -> Self {
205 self.hls_content_protection = input;
206 self
207 }
208 /// <p>The HLS content protection settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
209 pub fn get_hls_content_protection(&self) -> &::std::option::Option<crate::types::HlsContentProtection> {
210 &self.hls_content_protection
211 }
212 /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
213 pub fn play_ready_drm(mut self, input: crate::types::PlayReadyDrm) -> Self {
214 self.play_ready_drm = ::std::option::Option::Some(input);
215 self
216 }
217 /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
218 pub fn set_play_ready_drm(mut self, input: ::std::option::Option<crate::types::PlayReadyDrm>) -> Self {
219 self.play_ready_drm = input;
220 self
221 }
222 /// <p>The DRM settings, if any, that you want Elastic Transcoder to apply to the output files associated with this playlist.</p>
223 pub fn get_play_ready_drm(&self) -> &::std::option::Option<crate::types::PlayReadyDrm> {
224 &self.play_ready_drm
225 }
226 /// Consumes the builder and constructs a [`CreateJobPlaylist`](crate::types::CreateJobPlaylist).
227 pub fn build(self) -> crate::types::CreateJobPlaylist {
228 crate::types::CreateJobPlaylist {
229 name: self.name,
230 format: self.format,
231 output_keys: self.output_keys,
232 hls_content_protection: self.hls_content_protection,
233 play_ready_drm: self.play_ready_drm,
234 }
235 }
236}