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)]
pub struct ListUsersInput {
    /// <p>The Amazon Chime account ID.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>Optional. The user email address used to filter results. Maximum 1.</p>
    pub user_email: ::std::option::Option<::std::string::String>,
    /// <p>The user type.</p>
    pub user_type: ::std::option::Option<crate::types::UserType>,
    /// <p>The maximum number of results to return in a single call. Defaults to 100.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The token to use to retrieve the next page of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
}
impl ListUsersInput {
    /// <p>The Amazon Chime account ID.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>Optional. The user email address used to filter results. Maximum 1.</p>
    pub fn user_email(&self) -> ::std::option::Option<&str> {
        self.user_email.as_deref()
    }
    /// <p>The user type.</p>
    pub fn user_type(&self) -> ::std::option::Option<&crate::types::UserType> {
        self.user_type.as_ref()
    }
    /// <p>The maximum number of results to return in a single call. Defaults to 100.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The token to use to retrieve the next page of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
}
impl ::std::fmt::Debug for ListUsersInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ListUsersInput");
        formatter.field("account_id", &self.account_id);
        formatter.field("user_email", &"*** Sensitive Data Redacted ***");
        formatter.field("user_type", &self.user_type);
        formatter.field("max_results", &self.max_results);
        formatter.field("next_token", &self.next_token);
        formatter.finish()
    }
}
impl ListUsersInput {
    /// Creates a new builder-style object to manufacture [`ListUsersInput`](crate::operation::list_users::ListUsersInput).
    pub fn builder() -> crate::operation::list_users::builders::ListUsersInputBuilder {
        crate::operation::list_users::builders::ListUsersInputBuilder::default()
    }
}

/// A builder for [`ListUsersInput`](crate::operation::list_users::ListUsersInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct ListUsersInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_email: ::std::option::Option<::std::string::String>,
    pub(crate) user_type: ::std::option::Option<crate::types::UserType>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
}
impl ListUsersInputBuilder {
    /// <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
    }
    /// <p>Optional. The user email address used to filter results. Maximum 1.</p>
    pub fn user_email(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_email = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Optional. The user email address used to filter results. Maximum 1.</p>
    pub fn set_user_email(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_email = input;
        self
    }
    /// <p>Optional. The user email address used to filter results. Maximum 1.</p>
    pub fn get_user_email(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_email
    }
    /// <p>The user type.</p>
    pub fn user_type(mut self, input: crate::types::UserType) -> Self {
        self.user_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The user type.</p>
    pub fn set_user_type(mut self, input: ::std::option::Option<crate::types::UserType>) -> Self {
        self.user_type = input;
        self
    }
    /// <p>The user type.</p>
    pub fn get_user_type(&self) -> &::std::option::Option<crate::types::UserType> {
        &self.user_type
    }
    /// <p>The maximum number of results to return in a single call. Defaults to 100.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of results to return in a single call. Defaults to 100.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of results to return in a single call. Defaults to 100.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The token to use to retrieve the next page of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The token to use to retrieve the next page of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token to use to retrieve the next page of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// Consumes the builder and constructs a [`ListUsersInput`](crate::operation::list_users::ListUsersInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::list_users::ListUsersInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::list_users::ListUsersInput {
            account_id: self.account_id,
            user_email: self.user_email,
            user_type: self.user_type,
            max_results: self.max_results,
            next_token: self.next_token,
        })
    }
}
impl ::std::fmt::Debug for ListUsersInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("ListUsersInputBuilder");
        formatter.field("account_id", &self.account_id);
        formatter.field("user_email", &"*** Sensitive Data Redacted ***");
        formatter.field("user_type", &self.user_type);
        formatter.field("max_results", &self.max_results);
        formatter.field("next_token", &self.next_token);
        formatter.finish()
    }
}