aws_sdk_elastictranscoder/types/_preset.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <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>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Preset {
7 /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
8 pub id: ::std::option::Option<::std::string::String>,
9 /// <p>The Amazon Resource Name (ARN) for the preset.</p>
10 pub arn: ::std::option::Option<::std::string::String>,
11 /// <p>The name of the preset.</p>
12 pub name: ::std::option::Option<::std::string::String>,
13 /// <p>A description of the preset.</p>
14 pub description: ::std::option::Option<::std::string::String>,
15 /// <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>
16 pub container: ::std::option::Option<::std::string::String>,
17 /// <p>A section of the response body that provides information about the audio preset values.</p>
18 pub audio: ::std::option::Option<crate::types::AudioParameters>,
19 /// <p>A section of the response body that provides information about the video preset values.</p>
20 pub video: ::std::option::Option<crate::types::VideoParameters>,
21 /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
22 pub thumbnails: ::std::option::Option<crate::types::Thumbnails>,
23 /// <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>
24 pub r#type: ::std::option::Option<::std::string::String>,
25}
26impl Preset {
27 /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
28 pub fn id(&self) -> ::std::option::Option<&str> {
29 self.id.as_deref()
30 }
31 /// <p>The Amazon Resource Name (ARN) for the preset.</p>
32 pub fn arn(&self) -> ::std::option::Option<&str> {
33 self.arn.as_deref()
34 }
35 /// <p>The name of the preset.</p>
36 pub fn name(&self) -> ::std::option::Option<&str> {
37 self.name.as_deref()
38 }
39 /// <p>A description of the preset.</p>
40 pub fn description(&self) -> ::std::option::Option<&str> {
41 self.description.as_deref()
42 }
43 /// <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>
44 pub fn container(&self) -> ::std::option::Option<&str> {
45 self.container.as_deref()
46 }
47 /// <p>A section of the response body that provides information about the audio preset values.</p>
48 pub fn audio(&self) -> ::std::option::Option<&crate::types::AudioParameters> {
49 self.audio.as_ref()
50 }
51 /// <p>A section of the response body that provides information about the video preset values.</p>
52 pub fn video(&self) -> ::std::option::Option<&crate::types::VideoParameters> {
53 self.video.as_ref()
54 }
55 /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
56 pub fn thumbnails(&self) -> ::std::option::Option<&crate::types::Thumbnails> {
57 self.thumbnails.as_ref()
58 }
59 /// <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>
60 pub fn r#type(&self) -> ::std::option::Option<&str> {
61 self.r#type.as_deref()
62 }
63}
64impl Preset {
65 /// Creates a new builder-style object to manufacture [`Preset`](crate::types::Preset).
66 pub fn builder() -> crate::types::builders::PresetBuilder {
67 crate::types::builders::PresetBuilder::default()
68 }
69}
70
71/// A builder for [`Preset`](crate::types::Preset).
72#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
73#[non_exhaustive]
74pub struct PresetBuilder {
75 pub(crate) id: ::std::option::Option<::std::string::String>,
76 pub(crate) arn: ::std::option::Option<::std::string::String>,
77 pub(crate) name: ::std::option::Option<::std::string::String>,
78 pub(crate) description: ::std::option::Option<::std::string::String>,
79 pub(crate) container: ::std::option::Option<::std::string::String>,
80 pub(crate) audio: ::std::option::Option<crate::types::AudioParameters>,
81 pub(crate) video: ::std::option::Option<crate::types::VideoParameters>,
82 pub(crate) thumbnails: ::std::option::Option<crate::types::Thumbnails>,
83 pub(crate) r#type: ::std::option::Option<::std::string::String>,
84}
85impl PresetBuilder {
86 /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
87 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.id = ::std::option::Option::Some(input.into());
89 self
90 }
91 /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
92 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.id = input;
94 self
95 }
96 /// <p>Identifier for the new preset. You use this value to get settings for the preset or to delete it.</p>
97 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
98 &self.id
99 }
100 /// <p>The Amazon Resource Name (ARN) for the preset.</p>
101 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102 self.arn = ::std::option::Option::Some(input.into());
103 self
104 }
105 /// <p>The Amazon Resource Name (ARN) for the preset.</p>
106 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107 self.arn = input;
108 self
109 }
110 /// <p>The Amazon Resource Name (ARN) for the preset.</p>
111 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.arn
113 }
114 /// <p>The name of the preset.</p>
115 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116 self.name = ::std::option::Option::Some(input.into());
117 self
118 }
119 /// <p>The name of the preset.</p>
120 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121 self.name = input;
122 self
123 }
124 /// <p>The name of the preset.</p>
125 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
126 &self.name
127 }
128 /// <p>A description of the preset.</p>
129 pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
130 self.description = ::std::option::Option::Some(input.into());
131 self
132 }
133 /// <p>A description of the preset.</p>
134 pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
135 self.description = input;
136 self
137 }
138 /// <p>A description of the preset.</p>
139 pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
140 &self.description
141 }
142 /// <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>
143 pub fn container(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
144 self.container = ::std::option::Option::Some(input.into());
145 self
146 }
147 /// <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>
148 pub fn set_container(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
149 self.container = input;
150 self
151 }
152 /// <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>
153 pub fn get_container(&self) -> &::std::option::Option<::std::string::String> {
154 &self.container
155 }
156 /// <p>A section of the response body that provides information about the audio preset values.</p>
157 pub fn audio(mut self, input: crate::types::AudioParameters) -> Self {
158 self.audio = ::std::option::Option::Some(input);
159 self
160 }
161 /// <p>A section of the response body that provides information about the audio preset values.</p>
162 pub fn set_audio(mut self, input: ::std::option::Option<crate::types::AudioParameters>) -> Self {
163 self.audio = input;
164 self
165 }
166 /// <p>A section of the response body that provides information about the audio preset values.</p>
167 pub fn get_audio(&self) -> &::std::option::Option<crate::types::AudioParameters> {
168 &self.audio
169 }
170 /// <p>A section of the response body that provides information about the video preset values.</p>
171 pub fn video(mut self, input: crate::types::VideoParameters) -> Self {
172 self.video = ::std::option::Option::Some(input);
173 self
174 }
175 /// <p>A section of the response body that provides information about the video preset values.</p>
176 pub fn set_video(mut self, input: ::std::option::Option<crate::types::VideoParameters>) -> Self {
177 self.video = input;
178 self
179 }
180 /// <p>A section of the response body that provides information about the video preset values.</p>
181 pub fn get_video(&self) -> &::std::option::Option<crate::types::VideoParameters> {
182 &self.video
183 }
184 /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
185 pub fn thumbnails(mut self, input: crate::types::Thumbnails) -> Self {
186 self.thumbnails = ::std::option::Option::Some(input);
187 self
188 }
189 /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
190 pub fn set_thumbnails(mut self, input: ::std::option::Option<crate::types::Thumbnails>) -> Self {
191 self.thumbnails = input;
192 self
193 }
194 /// <p>A section of the response body that provides information about the thumbnail preset values, if any.</p>
195 pub fn get_thumbnails(&self) -> &::std::option::Option<crate::types::Thumbnails> {
196 &self.thumbnails
197 }
198 /// <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>
199 pub fn r#type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200 self.r#type = ::std::option::Option::Some(input.into());
201 self
202 }
203 /// <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>
204 pub fn set_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205 self.r#type = input;
206 self
207 }
208 /// <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>
209 pub fn get_type(&self) -> &::std::option::Option<::std::string::String> {
210 &self.r#type
211 }
212 /// Consumes the builder and constructs a [`Preset`](crate::types::Preset).
213 pub fn build(self) -> crate::types::Preset {
214 crate::types::Preset {
215 id: self.id,
216 arn: self.arn,
217 name: self.name,
218 description: self.description,
219 container: self.container,
220 audio: self.audio,
221 video: self.video,
222 thumbnails: self.thumbnails,
223 r#type: self.r#type,
224 }
225 }
226}