aws-sdk-medialive 1.149.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
    pub channel_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// List of multiplex IDs
    pub multiplex_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchStopInput {
    /// List of channel IDs
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.channel_ids.is_none()`.
    pub fn channel_ids(&self) -> &[::std::string::String] {
        self.channel_ids.as_deref().unwrap_or_default()
    }
    /// List of multiplex IDs
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.multiplex_ids.is_none()`.
    pub fn multiplex_ids(&self) -> &[::std::string::String] {
        self.multiplex_ids.as_deref().unwrap_or_default()
    }
}
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).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.channel_ids.unwrap_or_default();
        v.push(input.into());
        self.channel_ids = ::std::option::Option::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
    }
    /// List of channel IDs
    pub fn get_channel_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.channel_ids
    }
    /// 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 ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.multiplex_ids.unwrap_or_default();
        v.push(input.into());
        self.multiplex_ids = ::std::option::Option::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
    }
    /// List of multiplex IDs
    pub fn get_multiplex_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.multiplex_ids
    }
    /// Consumes the builder and constructs a [`BatchStopInput`](crate::operation::batch_stop::BatchStopInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::batch_stop::BatchStopInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::batch_stop::BatchStopInput {
            channel_ids: self.channel_ids,
            multiplex_ids: self.multiplex_ids,
        })
    }
}