aws-sdk-chime 1.99.0

AWS SDK for Amazon Chime
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct BatchUnsuspendUserInput {
    /// <p>The Amazon Chime account ID.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The request containing the user IDs to unsuspend.</p>
    pub user_id_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchUnsuspendUserInput {
    /// <p>The Amazon Chime account ID.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The request containing the user IDs to unsuspend.</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 `.user_id_list.is_none()`.
    pub fn user_id_list(&self) -> &[::std::string::String] {
        self.user_id_list.as_deref().unwrap_or_default()
    }
}
impl BatchUnsuspendUserInput {
    /// Creates a new builder-style object to manufacture [`BatchUnsuspendUserInput`](crate::operation::batch_unsuspend_user::BatchUnsuspendUserInput).
    pub fn builder() -> crate::operation::batch_unsuspend_user::builders::BatchUnsuspendUserInputBuilder {
        crate::operation::batch_unsuspend_user::builders::BatchUnsuspendUserInputBuilder::default()
    }
}

/// A builder for [`BatchUnsuspendUserInput`](crate::operation::batch_unsuspend_user::BatchUnsuspendUserInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct BatchUnsuspendUserInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_id_list: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl BatchUnsuspendUserInputBuilder {
    /// <p>The Amazon Chime account ID.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Chime account ID.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The Amazon Chime account ID.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// Appends an item to `user_id_list`.
    ///
    /// To override the contents of this collection use [`set_user_id_list`](Self::set_user_id_list).
    ///
    /// <p>The request containing the user IDs to unsuspend.</p>
    pub fn user_id_list(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.user_id_list.unwrap_or_default();
        v.push(input.into());
        self.user_id_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>The request containing the user IDs to unsuspend.</p>
    pub fn set_user_id_list(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.user_id_list = input;
        self
    }
    /// <p>The request containing the user IDs to unsuspend.</p>
    pub fn get_user_id_list(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.user_id_list
    }
    /// Consumes the builder and constructs a [`BatchUnsuspendUserInput`](crate::operation::batch_unsuspend_user::BatchUnsuspendUserInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::batch_unsuspend_user::BatchUnsuspendUserInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::batch_unsuspend_user::BatchUnsuspendUserInput {
            account_id: self.account_id,
            user_id_list: self.user_id_list,
        })
    }
}