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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// The container of your media file. This information helps you understand the overall structure and details of your media, including format, duration, and track layout.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Container {
/// The total duration of your media file, in seconds.
pub duration: ::std::option::Option<f64>,
/// The format of your media file. For example: MP4, QuickTime (MOV), Matroska (MKV), WebM, MXF, Wave, AVI, or MPEG-TS. Note that this will be blank if your media file has a format that the MediaConvert Probe operation does not recognize.
pub format: ::std::option::Option<crate::types::Format>,
/// The start timecode of the media file, in HH:MM:SS:FF format (or HH:MM:SS;FF for drop frame timecode). Note that this field is null when the container does not include an embedded start timecode.
pub start_timecode: ::std::option::Option<::std::string::String>,
/// Details about each track (video, audio, or data) in the media file.
pub tracks: ::std::option::Option<::std::vec::Vec<crate::types::Track>>,
}
impl Container {
/// The total duration of your media file, in seconds.
pub fn duration(&self) -> ::std::option::Option<f64> {
self.duration
}
/// The format of your media file. For example: MP4, QuickTime (MOV), Matroska (MKV), WebM, MXF, Wave, AVI, or MPEG-TS. Note that this will be blank if your media file has a format that the MediaConvert Probe operation does not recognize.
pub fn format(&self) -> ::std::option::Option<&crate::types::Format> {
self.format.as_ref()
}
/// The start timecode of the media file, in HH:MM:SS:FF format (or HH:MM:SS;FF for drop frame timecode). Note that this field is null when the container does not include an embedded start timecode.
pub fn start_timecode(&self) -> ::std::option::Option<&str> {
self.start_timecode.as_deref()
}
/// Details about each track (video, audio, or data) in the media file.
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tracks.is_none()`.
pub fn tracks(&self) -> &[crate::types::Track] {
self.tracks.as_deref().unwrap_or_default()
}
}
impl Container {
/// Creates a new builder-style object to manufacture [`Container`](crate::types::Container).
pub fn builder() -> crate::types::builders::ContainerBuilder {
crate::types::builders::ContainerBuilder::default()
}
}
/// A builder for [`Container`](crate::types::Container).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ContainerBuilder {
pub(crate) duration: ::std::option::Option<f64>,
pub(crate) format: ::std::option::Option<crate::types::Format>,
pub(crate) start_timecode: ::std::option::Option<::std::string::String>,
pub(crate) tracks: ::std::option::Option<::std::vec::Vec<crate::types::Track>>,
}
impl ContainerBuilder {
/// The total duration of your media file, in seconds.
pub fn duration(mut self, input: f64) -> Self {
self.duration = ::std::option::Option::Some(input);
self
}
/// The total duration of your media file, in seconds.
pub fn set_duration(mut self, input: ::std::option::Option<f64>) -> Self {
self.duration = input;
self
}
/// The total duration of your media file, in seconds.
pub fn get_duration(&self) -> &::std::option::Option<f64> {
&self.duration
}
/// The format of your media file. For example: MP4, QuickTime (MOV), Matroska (MKV), WebM, MXF, Wave, AVI, or MPEG-TS. Note that this will be blank if your media file has a format that the MediaConvert Probe operation does not recognize.
pub fn format(mut self, input: crate::types::Format) -> Self {
self.format = ::std::option::Option::Some(input);
self
}
/// The format of your media file. For example: MP4, QuickTime (MOV), Matroska (MKV), WebM, MXF, Wave, AVI, or MPEG-TS. Note that this will be blank if your media file has a format that the MediaConvert Probe operation does not recognize.
pub fn set_format(mut self, input: ::std::option::Option<crate::types::Format>) -> Self {
self.format = input;
self
}
/// The format of your media file. For example: MP4, QuickTime (MOV), Matroska (MKV), WebM, MXF, Wave, AVI, or MPEG-TS. Note that this will be blank if your media file has a format that the MediaConvert Probe operation does not recognize.
pub fn get_format(&self) -> &::std::option::Option<crate::types::Format> {
&self.format
}
/// The start timecode of the media file, in HH:MM:SS:FF format (or HH:MM:SS;FF for drop frame timecode). Note that this field is null when the container does not include an embedded start timecode.
pub fn start_timecode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.start_timecode = ::std::option::Option::Some(input.into());
self
}
/// The start timecode of the media file, in HH:MM:SS:FF format (or HH:MM:SS;FF for drop frame timecode). Note that this field is null when the container does not include an embedded start timecode.
pub fn set_start_timecode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.start_timecode = input;
self
}
/// The start timecode of the media file, in HH:MM:SS:FF format (or HH:MM:SS;FF for drop frame timecode). Note that this field is null when the container does not include an embedded start timecode.
pub fn get_start_timecode(&self) -> &::std::option::Option<::std::string::String> {
&self.start_timecode
}
/// Appends an item to `tracks`.
///
/// To override the contents of this collection use [`set_tracks`](Self::set_tracks).
///
/// Details about each track (video, audio, or data) in the media file.
pub fn tracks(mut self, input: crate::types::Track) -> Self {
let mut v = self.tracks.unwrap_or_default();
v.push(input);
self.tracks = ::std::option::Option::Some(v);
self
}
/// Details about each track (video, audio, or data) in the media file.
pub fn set_tracks(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Track>>) -> Self {
self.tracks = input;
self
}
/// Details about each track (video, audio, or data) in the media file.
pub fn get_tracks(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Track>> {
&self.tracks
}
/// Consumes the builder and constructs a [`Container`](crate::types::Container).
pub fn build(self) -> crate::types::Container {
crate::types::Container {
duration: self.duration,
format: self.format,
start_timecode: self.start_timecode,
tracks: self.tracks,
}
}
}