aws-sdk-medialive 0.26.0

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

/// Output settings. There can be multiple outputs within a group.
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct Output {
    /// The names of the AudioDescriptions used as audio sources for this output.
    #[doc(hidden)]
    pub audio_description_names: std::option::Option<std::vec::Vec<std::string::String>>,
    /// The names of the CaptionDescriptions used as caption sources for this output.
    #[doc(hidden)]
    pub caption_description_names: std::option::Option<std::vec::Vec<std::string::String>>,
    /// The name used to identify an output.
    #[doc(hidden)]
    pub output_name: std::option::Option<std::string::String>,
    /// Output type-specific settings.
    #[doc(hidden)]
    pub output_settings: std::option::Option<crate::types::OutputSettings>,
    /// The name of the VideoDescription used as the source for this output.
    #[doc(hidden)]
    pub video_description_name: std::option::Option<std::string::String>,
}
impl Output {
    /// The names of the AudioDescriptions used as audio sources for this output.
    pub fn audio_description_names(&self) -> std::option::Option<&[std::string::String]> {
        self.audio_description_names.as_deref()
    }
    /// The names of the CaptionDescriptions used as caption sources for this output.
    pub fn caption_description_names(&self) -> std::option::Option<&[std::string::String]> {
        self.caption_description_names.as_deref()
    }
    /// The name used to identify an output.
    pub fn output_name(&self) -> std::option::Option<&str> {
        self.output_name.as_deref()
    }
    /// Output type-specific settings.
    pub fn output_settings(&self) -> std::option::Option<&crate::types::OutputSettings> {
        self.output_settings.as_ref()
    }
    /// The name of the VideoDescription used as the source for this output.
    pub fn video_description_name(&self) -> std::option::Option<&str> {
        self.video_description_name.as_deref()
    }
}
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).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct OutputBuilder {
    pub(crate) audio_description_names: std::option::Option<std::vec::Vec<std::string::String>>,
    pub(crate) caption_description_names: std::option::Option<std::vec::Vec<std::string::String>>,
    pub(crate) output_name: std::option::Option<std::string::String>,
    pub(crate) output_settings: std::option::Option<crate::types::OutputSettings>,
    pub(crate) video_description_name: std::option::Option<std::string::String>,
}
impl OutputBuilder {
    /// Appends an item to `audio_description_names`.
    ///
    /// To override the contents of this collection use [`set_audio_description_names`](Self::set_audio_description_names).
    ///
    /// The names of the AudioDescriptions used as audio sources for this output.
    pub fn audio_description_names(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.audio_description_names.unwrap_or_default();
        v.push(input.into());
        self.audio_description_names = Some(v);
        self
    }
    /// The names of the AudioDescriptions used as audio sources for this output.
    pub fn set_audio_description_names(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.audio_description_names = input;
        self
    }
    /// Appends an item to `caption_description_names`.
    ///
    /// To override the contents of this collection use [`set_caption_description_names`](Self::set_caption_description_names).
    ///
    /// The names of the CaptionDescriptions used as caption sources for this output.
    pub fn caption_description_names(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.caption_description_names.unwrap_or_default();
        v.push(input.into());
        self.caption_description_names = Some(v);
        self
    }
    /// The names of the CaptionDescriptions used as caption sources for this output.
    pub fn set_caption_description_names(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.caption_description_names = input;
        self
    }
    /// The name used to identify an output.
    pub fn output_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.output_name = Some(input.into());
        self
    }
    /// The name used to identify an output.
    pub fn set_output_name(mut self, input: std::option::Option<std::string::String>) -> Self {
        self.output_name = input;
        self
    }
    /// Output type-specific settings.
    pub fn output_settings(mut self, input: crate::types::OutputSettings) -> Self {
        self.output_settings = Some(input);
        self
    }
    /// Output type-specific settings.
    pub fn set_output_settings(
        mut self,
        input: std::option::Option<crate::types::OutputSettings>,
    ) -> Self {
        self.output_settings = input;
        self
    }
    /// The name of the VideoDescription used as the source for this output.
    pub fn video_description_name(mut self, input: impl Into<std::string::String>) -> Self {
        self.video_description_name = Some(input.into());
        self
    }
    /// The name of the VideoDescription used as the source for this output.
    pub fn set_video_description_name(
        mut self,
        input: std::option::Option<std::string::String>,
    ) -> Self {
        self.video_description_name = input;
        self
    }
    /// Consumes the builder and constructs a [`Output`](crate::types::Output).
    pub fn build(self) -> crate::types::Output {
        crate::types::Output {
            audio_description_names: self.audio_description_names,
            caption_description_names: self.caption_description_names,
            output_name: self.output_name,
            output_settings: self.output_settings,
            video_description_name: self.video_description_name,
        }
    }
}