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.

/// A request to start resources
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchStartInput {
    /// List of channel IDs
    #[doc(hidden)]
    pub channel_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    /// List of multiplex IDs
    #[doc(hidden)]
    pub multiplex_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchStartInput {
    /// List of channel IDs
    pub fn channel_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.channel_ids.as_deref()
    }
    /// List of multiplex IDs
    pub fn multiplex_ids(&self) -> std::option::Option<&[std::string::String]> {
        self.multiplex_ids.as_deref()
    }
}
impl BatchStartInput {
    /// Creates a new builder-style object to manufacture [`BatchStartInput`](crate::operation::batch_start::BatchStartInput).
    pub fn builder() -> crate::operation::batch_start::builders::BatchStartInputBuilder {
        crate::operation::batch_start::builders::BatchStartInputBuilder::default()
    }
}

/// A builder for [`BatchStartInput`](crate::operation::batch_start::BatchStartInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BatchStartInputBuilder {
    pub(crate) channel_ids: std::option::Option<std::vec::Vec<std::string::String>>,
    pub(crate) multiplex_ids: std::option::Option<std::vec::Vec<std::string::String>>,
}
impl BatchStartInputBuilder {
    /// Appends an item to `channel_ids`.
    ///
    /// To override the contents of this collection use [`set_channel_ids`](Self::set_channel_ids).
    ///
    /// List of channel IDs
    pub fn channel_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.channel_ids.unwrap_or_default();
        v.push(input.into());
        self.channel_ids = Some(v);
        self
    }
    /// List of channel IDs
    pub fn set_channel_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.channel_ids = input;
        self
    }
    /// Appends an item to `multiplex_ids`.
    ///
    /// To override the contents of this collection use [`set_multiplex_ids`](Self::set_multiplex_ids).
    ///
    /// List of multiplex IDs
    pub fn multiplex_ids(mut self, input: impl Into<std::string::String>) -> Self {
        let mut v = self.multiplex_ids.unwrap_or_default();
        v.push(input.into());
        self.multiplex_ids = Some(v);
        self
    }
    /// List of multiplex IDs
    pub fn set_multiplex_ids(
        mut self,
        input: std::option::Option<std::vec::Vec<std::string::String>>,
    ) -> Self {
        self.multiplex_ids = input;
        self
    }
    /// Consumes the builder and constructs a [`BatchStartInput`](crate::operation::batch_start::BatchStartInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::batch_start::BatchStartInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::batch_start::BatchStartInput {
            channel_ids: self.channel_ids,
            multiplex_ids: self.multiplex_ids,
        })
    }
}