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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Generate subtitles for your media file with your transcription request.</p>
/// <p>You can choose a start index of 0 or 1, and you can specify either WebVTT or SubRip (or both) as your output format.</p>
/// <p>Note that your subtitle files are placed in the same location as your transcription output.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Subtitles {
/// <p>Specify the output format for your subtitle file; if you select both WebVTT (<code>vtt</code>) and SubRip (<code>srt</code>) formats, two output files are generated.</p>
pub formats: ::std::option::Option<::std::vec::Vec<crate::types::SubtitleFormat>>,
/// <p>Specify the starting value that is assigned to the first subtitle segment.</p>
/// <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from the more widely used standard of <code>1</code>. If you're uncertain which value to use, we recommend choosing <code>1</code>, as this may improve compatibility with other services.</p>
pub output_start_index: ::std::option::Option<i32>,
}
impl Subtitles {
/// <p>Specify the output format for your subtitle file; if you select both WebVTT (<code>vtt</code>) and SubRip (<code>srt</code>) formats, two output files are generated.</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 `.formats.is_none()`.
pub fn formats(&self) -> &[crate::types::SubtitleFormat] {
self.formats.as_deref().unwrap_or_default()
}
/// <p>Specify the starting value that is assigned to the first subtitle segment.</p>
/// <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from the more widely used standard of <code>1</code>. If you're uncertain which value to use, we recommend choosing <code>1</code>, as this may improve compatibility with other services.</p>
pub fn output_start_index(&self) -> ::std::option::Option<i32> {
self.output_start_index
}
}
impl Subtitles {
/// Creates a new builder-style object to manufacture [`Subtitles`](crate::types::Subtitles).
pub fn builder() -> crate::types::builders::SubtitlesBuilder {
crate::types::builders::SubtitlesBuilder::default()
}
}
/// A builder for [`Subtitles`](crate::types::Subtitles).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SubtitlesBuilder {
pub(crate) formats: ::std::option::Option<::std::vec::Vec<crate::types::SubtitleFormat>>,
pub(crate) output_start_index: ::std::option::Option<i32>,
}
impl SubtitlesBuilder {
/// Appends an item to `formats`.
///
/// To override the contents of this collection use [`set_formats`](Self::set_formats).
///
/// <p>Specify the output format for your subtitle file; if you select both WebVTT (<code>vtt</code>) and SubRip (<code>srt</code>) formats, two output files are generated.</p>
pub fn formats(mut self, input: crate::types::SubtitleFormat) -> Self {
let mut v = self.formats.unwrap_or_default();
v.push(input);
self.formats = ::std::option::Option::Some(v);
self
}
/// <p>Specify the output format for your subtitle file; if you select both WebVTT (<code>vtt</code>) and SubRip (<code>srt</code>) formats, two output files are generated.</p>
pub fn set_formats(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SubtitleFormat>>) -> Self {
self.formats = input;
self
}
/// <p>Specify the output format for your subtitle file; if you select both WebVTT (<code>vtt</code>) and SubRip (<code>srt</code>) formats, two output files are generated.</p>
pub fn get_formats(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SubtitleFormat>> {
&self.formats
}
/// <p>Specify the starting value that is assigned to the first subtitle segment.</p>
/// <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from the more widely used standard of <code>1</code>. If you're uncertain which value to use, we recommend choosing <code>1</code>, as this may improve compatibility with other services.</p>
pub fn output_start_index(mut self, input: i32) -> Self {
self.output_start_index = ::std::option::Option::Some(input);
self
}
/// <p>Specify the starting value that is assigned to the first subtitle segment.</p>
/// <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from the more widely used standard of <code>1</code>. If you're uncertain which value to use, we recommend choosing <code>1</code>, as this may improve compatibility with other services.</p>
pub fn set_output_start_index(mut self, input: ::std::option::Option<i32>) -> Self {
self.output_start_index = input;
self
}
/// <p>Specify the starting value that is assigned to the first subtitle segment.</p>
/// <p>The default start index for Amazon Transcribe is <code>0</code>, which differs from the more widely used standard of <code>1</code>. If you're uncertain which value to use, we recommend choosing <code>1</code>, as this may improve compatibility with other services.</p>
pub fn get_output_start_index(&self) -> &::std::option::Option<i32> {
&self.output_start_index
}
/// Consumes the builder and constructs a [`Subtitles`](crate::types::Subtitles).
pub fn build(self) -> crate::types::Subtitles {
crate::types::Subtitles {
formats: self.formats,
output_start_index: self.output_start_index,
}
}
}