aws-sdk-mediaconvert 1.66.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Each output in your job is a collection of settings that describes how you want MediaConvert to encode a single output file or stream. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/create-outputs.html.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Output {
    /// Contains groups of audio encoding settings organized by audio codec. Include one instance of per output. Can contain multiple groups of encoding settings.
    pub audio_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::AudioDescription>>,
    /// Contains groups of captions settings. For each output that has captions, include one instance of CaptionDescriptions. Can contain multiple groups of captions settings.
    pub caption_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::CaptionDescription>>,
    /// Container specific settings.
    pub container_settings: ::std::option::Option<crate::types::ContainerSettings>,
    /// Use Extension to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
    pub extension: ::std::option::Option<::std::string::String>,
    /// Use Name modifier to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
    pub name_modifier: ::std::option::Option<::std::string::String>,
    /// Specific settings for this type of output.
    pub output_settings: ::std::option::Option<crate::types::OutputSettings>,
    /// Use Preset to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset or Container settings, but not both.
    pub preset: ::std::option::Option<::std::string::String>,
    /// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
    pub video_description: ::std::option::Option<crate::types::VideoDescription>,
}
impl Output {
    /// Contains groups of audio encoding settings organized by audio codec. Include one instance of per output. Can contain multiple groups of encoding settings.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.audio_descriptions.is_none()`.
    pub fn audio_descriptions(&self) -> &[crate::types::AudioDescription] {
        self.audio_descriptions.as_deref().unwrap_or_default()
    }
    /// Contains groups of captions settings. For each output that has captions, include one instance of CaptionDescriptions. Can contain multiple groups of captions settings.
    ///
    /// 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_descriptions.is_none()`.
    pub fn caption_descriptions(&self) -> &[crate::types::CaptionDescription] {
        self.caption_descriptions.as_deref().unwrap_or_default()
    }
    /// Container specific settings.
    pub fn container_settings(&self) -> ::std::option::Option<&crate::types::ContainerSettings> {
        self.container_settings.as_ref()
    }
    /// Use Extension to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
    pub fn extension(&self) -> ::std::option::Option<&str> {
        self.extension.as_deref()
    }
    /// Use Name modifier to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
    pub fn name_modifier(&self) -> ::std::option::Option<&str> {
        self.name_modifier.as_deref()
    }
    /// Specific settings for this type of output.
    pub fn output_settings(&self) -> ::std::option::Option<&crate::types::OutputSettings> {
        self.output_settings.as_ref()
    }
    /// Use Preset to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset or Container settings, but not both.
    pub fn preset(&self) -> ::std::option::Option<&str> {
        self.preset.as_deref()
    }
    /// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
    pub fn video_description(&self) -> ::std::option::Option<&crate::types::VideoDescription> {
        self.video_description.as_ref()
    }
}
impl Output {
    /// Creates a new builder-style object to manufacture [`Output`](crate::types::Output).
    pub fn builder() -> crate::types::builders::OutputBuilder {
        crate::types::builders::OutputBuilder::default()
    }
}

/// A builder for [`Output`](crate::types::Output).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct OutputBuilder {
    pub(crate) audio_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::AudioDescription>>,
    pub(crate) caption_descriptions: ::std::option::Option<::std::vec::Vec<crate::types::CaptionDescription>>,
    pub(crate) container_settings: ::std::option::Option<crate::types::ContainerSettings>,
    pub(crate) extension: ::std::option::Option<::std::string::String>,
    pub(crate) name_modifier: ::std::option::Option<::std::string::String>,
    pub(crate) output_settings: ::std::option::Option<crate::types::OutputSettings>,
    pub(crate) preset: ::std::option::Option<::std::string::String>,
    pub(crate) video_description: ::std::option::Option<crate::types::VideoDescription>,
}
impl OutputBuilder {
    /// Appends an item to `audio_descriptions`.
    ///
    /// To override the contents of this collection use [`set_audio_descriptions`](Self::set_audio_descriptions).
    ///
    /// Contains groups of audio encoding settings organized by audio codec. Include one instance of per output. Can contain multiple groups of encoding settings.
    pub fn audio_descriptions(mut self, input: crate::types::AudioDescription) -> Self {
        let mut v = self.audio_descriptions.unwrap_or_default();
        v.push(input);
        self.audio_descriptions = ::std::option::Option::Some(v);
        self
    }
    /// Contains groups of audio encoding settings organized by audio codec. Include one instance of per output. Can contain multiple groups of encoding settings.
    pub fn set_audio_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AudioDescription>>) -> Self {
        self.audio_descriptions = input;
        self
    }
    /// Contains groups of audio encoding settings organized by audio codec. Include one instance of per output. Can contain multiple groups of encoding settings.
    pub fn get_audio_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AudioDescription>> {
        &self.audio_descriptions
    }
    /// Appends an item to `caption_descriptions`.
    ///
    /// To override the contents of this collection use [`set_caption_descriptions`](Self::set_caption_descriptions).
    ///
    /// Contains groups of captions settings. For each output that has captions, include one instance of CaptionDescriptions. Can contain multiple groups of captions settings.
    pub fn caption_descriptions(mut self, input: crate::types::CaptionDescription) -> Self {
        let mut v = self.caption_descriptions.unwrap_or_default();
        v.push(input);
        self.caption_descriptions = ::std::option::Option::Some(v);
        self
    }
    /// Contains groups of captions settings. For each output that has captions, include one instance of CaptionDescriptions. Can contain multiple groups of captions settings.
    pub fn set_caption_descriptions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CaptionDescription>>) -> Self {
        self.caption_descriptions = input;
        self
    }
    /// Contains groups of captions settings. For each output that has captions, include one instance of CaptionDescriptions. Can contain multiple groups of captions settings.
    pub fn get_caption_descriptions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CaptionDescription>> {
        &self.caption_descriptions
    }
    /// Container specific settings.
    pub fn container_settings(mut self, input: crate::types::ContainerSettings) -> Self {
        self.container_settings = ::std::option::Option::Some(input);
        self
    }
    /// Container specific settings.
    pub fn set_container_settings(mut self, input: ::std::option::Option<crate::types::ContainerSettings>) -> Self {
        self.container_settings = input;
        self
    }
    /// Container specific settings.
    pub fn get_container_settings(&self) -> &::std::option::Option<crate::types::ContainerSettings> {
        &self.container_settings
    }
    /// Use Extension to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
    pub fn extension(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.extension = ::std::option::Option::Some(input.into());
        self
    }
    /// Use Extension to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
    pub fn set_extension(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.extension = input;
        self
    }
    /// Use Extension to specify the file extension for outputs in File output groups. If you do not specify a value, the service will use default extensions by container type as follows * MPEG-2 transport stream, m2ts * Quicktime, mov * MXF container, mxf * MPEG-4 container, mp4 * WebM container, webm * No Container, the service will use codec extensions (e.g. AAC, H265, H265, AC3)
    pub fn get_extension(&self) -> &::std::option::Option<::std::string::String> {
        &self.extension
    }
    /// Use Name modifier to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
    pub fn name_modifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name_modifier = ::std::option::Option::Some(input.into());
        self
    }
    /// Use Name modifier to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
    pub fn set_name_modifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name_modifier = input;
        self
    }
    /// Use Name modifier to have the service add a string to the end of each output filename. You specify the base filename as part of your destination URI. When you create multiple outputs in the same output group, Name modifier is required. Name modifier also accepts format identifiers. For DASH ISO outputs, if you use the format identifiers $Number$ or $Time$ in one output, you must use them in the same way in all outputs of the output group.
    pub fn get_name_modifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.name_modifier
    }
    /// Specific settings for this type of output.
    pub fn output_settings(mut self, input: crate::types::OutputSettings) -> Self {
        self.output_settings = ::std::option::Option::Some(input);
        self
    }
    /// Specific settings for this type of output.
    pub fn set_output_settings(mut self, input: ::std::option::Option<crate::types::OutputSettings>) -> Self {
        self.output_settings = input;
        self
    }
    /// Specific settings for this type of output.
    pub fn get_output_settings(&self) -> &::std::option::Option<crate::types::OutputSettings> {
        &self.output_settings
    }
    /// Use Preset to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset or Container settings, but not both.
    pub fn preset(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.preset = ::std::option::Option::Some(input.into());
        self
    }
    /// Use Preset to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset or Container settings, but not both.
    pub fn set_preset(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.preset = input;
        self
    }
    /// Use Preset to specify a preset for your transcoding settings. Provide the system or custom preset name. You can specify either Preset or Container settings, but not both.
    pub fn get_preset(&self) -> &::std::option::Option<::std::string::String> {
        &self.preset
    }
    /// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
    pub fn video_description(mut self, input: crate::types::VideoDescription) -> Self {
        self.video_description = ::std::option::Option::Some(input);
        self
    }
    /// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
    pub fn set_video_description(mut self, input: ::std::option::Option<crate::types::VideoDescription>) -> Self {
        self.video_description = input;
        self
    }
    /// VideoDescription contains a group of video encoding settings. The specific video settings depend on the video codec that you choose for the property codec. Include one instance of VideoDescription per output.
    pub fn get_video_description(&self) -> &::std::option::Option<crate::types::VideoDescription> {
        &self.video_description
    }
    /// Consumes the builder and constructs a [`Output`](crate::types::Output).
    pub fn build(self) -> crate::types::Output {
        crate::types::Output {
            audio_descriptions: self.audio_descriptions,
            caption_descriptions: self.caption_descriptions,
            container_settings: self.container_settings,
            extension: self.extension,
            name_modifier: self.name_modifier,
            output_settings: self.output_settings,
            preset: self.preset,
            video_description: self.video_description,
        }
    }
}