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 stop resources
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct BatchStopInput {
    /// 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 BatchStopInput {
    /// 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 BatchStopInput {
    /// Creates a new builder-style object to manufacture [`BatchStopInput`](crate::operation::batch_stop::BatchStopInput).
    pub fn builder() -> crate::operation::batch_stop::builders::BatchStopInputBuilder {
        crate::operation::batch_stop::builders::BatchStopInputBuilder::default()
    }
}

/// A builder for [`BatchStopInput`](crate::operation::batch_stop::BatchStopInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct BatchStopInputBuilder {
    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 BatchStopInputBuilder {
    /// 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 [`BatchStopInput`](crate::operation::batch_stop::BatchStopInput).
    pub fn build(
        self,
    ) -> Result<
        crate::operation::batch_stop::BatchStopInput,
        aws_smithy_http::operation::error::BuildError,
    > {
        Ok(crate::operation::batch_stop::BatchStopInput {
            channel_ids: self.channel_ids,
            multiplex_ids: self.multiplex_ids,
        })
    }
}