1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Thumbnails for videos.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Thumbnails {
/// <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>
pub format: ::std::option::Option<::std::string::String>,
/// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
pub interval: ::std::option::Option<::std::string::String>,
/// <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>
pub resolution: ::std::option::Option<::std::string::String>,
/// <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>
pub aspect_ratio: ::std::option::Option<::std::string::String>,
/// <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>
pub max_width: ::std::option::Option<::std::string::String>,
/// <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>
pub max_height: ::std::option::Option<::std::string::String>,
/// <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>
pub sizing_policy: ::std::option::Option<::std::string::String>,
/// <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>
pub padding_policy: ::std::option::Option<::std::string::String>,
}
impl Thumbnails {
/// <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>
pub fn format(&self) -> ::std::option::Option<&str> {
self.format.as_deref()
}
/// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
pub fn interval(&self) -> ::std::option::Option<&str> {
self.interval.as_deref()
}
/// <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>
pub fn resolution(&self) -> ::std::option::Option<&str> {
self.resolution.as_deref()
}
/// <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>
pub fn aspect_ratio(&self) -> ::std::option::Option<&str> {
self.aspect_ratio.as_deref()
}
/// <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>
pub fn max_width(&self) -> ::std::option::Option<&str> {
self.max_width.as_deref()
}
/// <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>
pub fn max_height(&self) -> ::std::option::Option<&str> {
self.max_height.as_deref()
}
/// <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>
pub fn sizing_policy(&self) -> ::std::option::Option<&str> {
self.sizing_policy.as_deref()
}
/// <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>
pub fn padding_policy(&self) -> ::std::option::Option<&str> {
self.padding_policy.as_deref()
}
}
impl Thumbnails {
/// Creates a new builder-style object to manufacture [`Thumbnails`](crate::types::Thumbnails).
pub fn builder() -> crate::types::builders::ThumbnailsBuilder {
crate::types::builders::ThumbnailsBuilder::default()
}
}
/// A builder for [`Thumbnails`](crate::types::Thumbnails).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ThumbnailsBuilder {
pub(crate) format: ::std::option::Option<::std::string::String>,
pub(crate) interval: ::std::option::Option<::std::string::String>,
pub(crate) resolution: ::std::option::Option<::std::string::String>,
pub(crate) aspect_ratio: ::std::option::Option<::std::string::String>,
pub(crate) max_width: ::std::option::Option<::std::string::String>,
pub(crate) max_height: ::std::option::Option<::std::string::String>,
pub(crate) sizing_policy: ::std::option::Option<::std::string::String>,
pub(crate) padding_policy: ::std::option::Option<::std::string::String>,
}
impl ThumbnailsBuilder {
/// <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>
pub fn format(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.format = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_format(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.format = input;
self
}
/// <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>
pub fn get_format(&self) -> &::std::option::Option<::std::string::String> {
&self.format
}
/// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
pub fn interval(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.interval = ::std::option::Option::Some(input.into());
self
}
/// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
pub fn set_interval(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.interval = input;
self
}
/// <p>The approximate number of seconds between thumbnails. Specify an integer value.</p>
pub fn get_interval(&self) -> &::std::option::Option<::std::string::String> {
&self.interval
}
/// <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>
pub fn resolution(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.resolution = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_resolution(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.resolution = input;
self
}
/// <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>
pub fn get_resolution(&self) -> &::std::option::Option<::std::string::String> {
&self.resolution
}
/// <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>
pub fn aspect_ratio(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.aspect_ratio = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_aspect_ratio(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.aspect_ratio = input;
self
}
/// <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>
pub fn get_aspect_ratio(&self) -> &::std::option::Option<::std::string::String> {
&self.aspect_ratio
}
/// <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>
pub fn max_width(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.max_width = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_max_width(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.max_width = input;
self
}
/// <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>
pub fn get_max_width(&self) -> &::std::option::Option<::std::string::String> {
&self.max_width
}
/// <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>
pub fn max_height(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.max_height = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_max_height(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.max_height = input;
self
}
/// <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>
pub fn get_max_height(&self) -> &::std::option::Option<::std::string::String> {
&self.max_height
}
/// <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>
pub fn sizing_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.sizing_policy = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_sizing_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.sizing_policy = input;
self
}
/// <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>
pub fn get_sizing_policy(&self) -> &::std::option::Option<::std::string::String> {
&self.sizing_policy
}
/// <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>
pub fn padding_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.padding_policy = ::std::option::Option::Some(input.into());
self
}
/// <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>
pub fn set_padding_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.padding_policy = input;
self
}
/// <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>
pub fn get_padding_policy(&self) -> &::std::option::Option<::std::string::String> {
&self.padding_policy
}
/// Consumes the builder and constructs a [`Thumbnails`](crate::types::Thumbnails).
pub fn build(self) -> crate::types::Thumbnails {
crate::types::Thumbnails {
format: self.format,
interval: self.interval,
resolution: self.resolution,
aspect_ratio: self.aspect_ratio,
max_width: self.max_width,
max_height: self.max_height,
sizing_policy: self.sizing_policy,
padding_policy: self.padding_policy,
}
}
}