aws-sdk-elastictranscoder 1.99.0

AWS SDK for Amazon Elastic Transcoder
Documentation
// 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,
        }
    }
}