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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>The captions to be created, if any.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Captions {
/// <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>
#[deprecated]
pub merge_policy: ::std::option::Option<::std::string::String>,
/// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
#[deprecated]
pub caption_sources: ::std::option::Option<::std::vec::Vec<crate::types::CaptionSource>>,
/// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
pub caption_formats: ::std::option::Option<::std::vec::Vec<crate::types::CaptionFormat>>,
}
impl Captions {
/// <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>
#[deprecated]
pub fn merge_policy(&self) -> ::std::option::Option<&str> {
self.merge_policy.as_deref()
}
/// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.caption_sources.is_none()`.
#[deprecated]
pub fn caption_sources(&self) -> &[crate::types::CaptionSource] {
self.caption_sources.as_deref().unwrap_or_default()
}
/// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.caption_formats.is_none()`.
pub fn caption_formats(&self) -> &[crate::types::CaptionFormat] {
self.caption_formats.as_deref().unwrap_or_default()
}
}
impl Captions {
/// Creates a new builder-style object to manufacture [`Captions`](crate::types::Captions).
pub fn builder() -> crate::types::builders::CaptionsBuilder {
crate::types::builders::CaptionsBuilder::default()
}
}
/// A builder for [`Captions`](crate::types::Captions).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CaptionsBuilder {
pub(crate) merge_policy: ::std::option::Option<::std::string::String>,
pub(crate) caption_sources: ::std::option::Option<::std::vec::Vec<crate::types::CaptionSource>>,
pub(crate) caption_formats: ::std::option::Option<::std::vec::Vec<crate::types::CaptionFormat>>,
}
impl CaptionsBuilder {
/// <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>
#[deprecated]
pub fn merge_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.merge_policy = ::std::option::Option::Some(input.into());
self
}
/// <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>
#[deprecated]
pub fn set_merge_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.merge_policy = input;
self
}
/// <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>
#[deprecated]
pub fn get_merge_policy(&self) -> &::std::option::Option<::std::string::String> {
&self.merge_policy
}
/// Appends an item to `caption_sources`.
///
/// To override the contents of this collection use [`set_caption_sources`](Self::set_caption_sources).
///
/// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
#[deprecated]
pub fn caption_sources(mut self, input: crate::types::CaptionSource) -> Self {
let mut v = self.caption_sources.unwrap_or_default();
v.push(input);
self.caption_sources = ::std::option::Option::Some(v);
self
}
/// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
#[deprecated]
pub fn set_caption_sources(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaptionSource>>) -> Self {
self.caption_sources = input;
self
}
/// <p>Source files for the input sidecar captions used during the transcoding process. To omit all sidecar captions, leave <code>CaptionSources</code> blank.</p>
#[deprecated]
pub fn get_caption_sources(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaptionSource>> {
&self.caption_sources
}
/// Appends an item to `caption_formats`.
///
/// To override the contents of this collection use [`set_caption_formats`](Self::set_caption_formats).
///
/// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
pub fn caption_formats(mut self, input: crate::types::CaptionFormat) -> Self {
let mut v = self.caption_formats.unwrap_or_default();
v.push(input);
self.caption_formats = ::std::option::Option::Some(v);
self
}
/// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
pub fn set_caption_formats(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaptionFormat>>) -> Self {
self.caption_formats = input;
self
}
/// <p>The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an error.</p>
pub fn get_caption_formats(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaptionFormat>> {
&self.caption_formats
}
/// Consumes the builder and constructs a [`Captions`](crate::types::Captions).
pub fn build(self) -> crate::types::Captions {
crate::types::Captions {
merge_policy: self.merge_policy,
caption_sources: self.caption_sources,
caption_formats: self.caption_formats,
}
}
}