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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// Required when you set Codec, under AudioDescriptions>CodecSettings, to the value Vorbis.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct VorbisSettings {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
#[doc(hidden)]
pub channels: i32,
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
#[doc(hidden)]
pub sample_rate: i32,
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
#[doc(hidden)]
pub vbr_quality: i32,
}
impl VorbisSettings {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn channels(&self) -> i32 {
self.channels
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn sample_rate(&self) -> i32 {
self.sample_rate
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn vbr_quality(&self) -> i32 {
self.vbr_quality
}
}
impl VorbisSettings {
/// Creates a new builder-style object to manufacture [`VorbisSettings`](crate::types::VorbisSettings).
pub fn builder() -> crate::types::builders::VorbisSettingsBuilder {
crate::types::builders::VorbisSettingsBuilder::default()
}
}
/// A builder for [`VorbisSettings`](crate::types::VorbisSettings).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct VorbisSettingsBuilder {
pub(crate) channels: std::option::Option<i32>,
pub(crate) sample_rate: std::option::Option<i32>,
pub(crate) vbr_quality: std::option::Option<i32>,
}
impl VorbisSettingsBuilder {
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn channels(mut self, input: i32) -> Self {
self.channels = Some(input);
self
}
/// Optional. Specify the number of channels in this output audio track. Choosing Mono on the console gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2. The default value is 2.
pub fn set_channels(mut self, input: std::option::Option<i32>) -> Self {
self.channels = input;
self
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn sample_rate(mut self, input: i32) -> Self {
self.sample_rate = Some(input);
self
}
/// Optional. Specify the audio sample rate in Hz. Valid values are 22050, 32000, 44100, and 48000. The default value is 48000.
pub fn set_sample_rate(mut self, input: std::option::Option<i32>) -> Self {
self.sample_rate = input;
self
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn vbr_quality(mut self, input: i32) -> Self {
self.vbr_quality = Some(input);
self
}
/// Optional. Specify the variable audio quality of this Vorbis output from -1 (lowest quality, ~45 kbit/s) to 10 (highest quality, ~500 kbit/s). The default value is 4 (~128 kbit/s). Values 5 and 6 are approximately 160 and 192 kbit/s, respectively.
pub fn set_vbr_quality(mut self, input: std::option::Option<i32>) -> Self {
self.vbr_quality = input;
self
}
/// Consumes the builder and constructs a [`VorbisSettings`](crate::types::VorbisSettings).
pub fn build(self) -> crate::types::VorbisSettings {
crate::types::VorbisSettings {
channels: self.channels.unwrap_or_default(),
sample_rate: self.sample_rate.unwrap_or_default(),
vbr_quality: self.vbr_quality.unwrap_or_default(),
}
}
}