aws-sdk-wickr 1.6.0

AWS SDK for AWS Wickr Admin API
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 ID of the Wickr network from which to list users.</p>
    pub network_id: ::std::option::Option<::std::string::String>,
    /// <p>The token for retrieving the next page of results. This is returned from a previous request when there are more results available.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.</p>
    pub sort_fields: ::std::option::Option<::std::string::String>,
    /// <p>The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.</p>
    pub sort_direction: ::std::option::Option<crate::types::SortDirection>,
    /// <p>Filter results to only include users with first names matching this value.</p>
    pub first_name: ::std::option::Option<::std::string::String>,
    /// <p>Filter results to only include users with last names matching this value.</p>
    pub last_name: ::std::option::Option<::std::string::String>,
    /// <p>Filter results to only include users with usernames matching this value.</p>
    pub username: ::std::option::Option<::std::string::String>,
    /// <p>Filter results to only include users with this status (1 for pending, 2 for active).</p>
    pub status: ::std::option::Option<i32>,
    /// <p>Filter results to only include users belonging to this security group.</p>
    pub group_id: ::std::option::Option<::std::string::String>,
}
impl ListUsersInput {
    /// <p>The ID of the Wickr network from which to list users.</p>
    pub fn network_id(&self) -> ::std::option::Option<&str> {
        self.network_id.as_deref()
    }
    /// <p>The token for retrieving the next page of results. This is returned from a previous request when there are more results available.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.</p>
    pub fn sort_fields(&self) -> ::std::option::Option<&str> {
        self.sort_fields.as_deref()
    }
    /// <p>The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.</p>
    pub fn sort_direction(&self) -> ::std::option::Option<&crate::types::SortDirection> {
        self.sort_direction.as_ref()
    }
    /// <p>Filter results to only include users with first names matching this value.</p>
    pub fn first_name(&self) -> ::std::option::Option<&str> {
        self.first_name.as_deref()
    }
    /// <p>Filter results to only include users with last names matching this value.</p>
    pub fn last_name(&self) -> ::std::option::Option<&str> {
        self.last_name.as_deref()
    }
    /// <p>Filter results to only include users with usernames matching this value.</p>
    pub fn username(&self) -> ::std::option::Option<&str> {
        self.username.as_deref()
    }
    /// <p>Filter results to only include users with this status (1 for pending, 2 for active).</p>
    pub fn status(&self) -> ::std::option::Option<i32> {
        self.status
    }
    /// <p>Filter results to only include users belonging to this security group.</p>
    pub fn group_id(&self) -> ::std::option::Option<&str> {
        self.group_id.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("network_id", &self.network_id);
        formatter.field("next_token", &self.next_token);
        formatter.field("max_results", &self.max_results);
        formatter.field("sort_fields", &self.sort_fields);
        formatter.field("sort_direction", &self.sort_direction);
        formatter.field("first_name", &"*** Sensitive Data Redacted ***");
        formatter.field("last_name", &"*** Sensitive Data Redacted ***");
        formatter.field("username", &self.username);
        formatter.field("status", &self.status);
        formatter.field("group_id", &self.group_id);
        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) network_id: ::std::option::Option<::std::string::String>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) sort_fields: ::std::option::Option<::std::string::String>,
    pub(crate) sort_direction: ::std::option::Option<crate::types::SortDirection>,
    pub(crate) first_name: ::std::option::Option<::std::string::String>,
    pub(crate) last_name: ::std::option::Option<::std::string::String>,
    pub(crate) username: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<i32>,
    pub(crate) group_id: ::std::option::Option<::std::string::String>,
}
impl ListUsersInputBuilder {
    /// <p>The ID of the Wickr network from which to list users.</p>
    /// This field is required.
    pub fn network_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.network_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the Wickr network from which to list users.</p>
    pub fn set_network_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.network_id = input;
        self
    }
    /// <p>The ID of the Wickr network from which to list users.</p>
    pub fn get_network_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.network_id
    }
    /// <p>The token for retrieving the next page of results. This is returned from a previous request when there are more results available.</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 for retrieving the next page of results. This is returned from a previous request when there are more results available.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>The token for retrieving the next page of results. This is returned from a previous request when there are more results available.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>The maximum number of users to return in a single page. Valid range is 1-100. Default is 10.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.</p>
    pub fn sort_fields(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.sort_fields = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.</p>
    pub fn set_sort_fields(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.sort_fields = input;
        self
    }
    /// <p>The fields to sort users by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'lastName', 'status', and 'groupId'.</p>
    pub fn get_sort_fields(&self) -> &::std::option::Option<::std::string::String> {
        &self.sort_fields
    }
    /// <p>The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.</p>
    pub fn sort_direction(mut self, input: crate::types::SortDirection) -> Self {
        self.sort_direction = ::std::option::Option::Some(input);
        self
    }
    /// <p>The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.</p>
    pub fn set_sort_direction(mut self, input: ::std::option::Option<crate::types::SortDirection>) -> Self {
        self.sort_direction = input;
        self
    }
    /// <p>The direction to sort results. Valid values are 'ASC' (ascending) or 'DESC' (descending). Default is 'DESC'.</p>
    pub fn get_sort_direction(&self) -> &::std::option::Option<crate::types::SortDirection> {
        &self.sort_direction
    }
    /// <p>Filter results to only include users with first names matching this value.</p>
    pub fn first_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.first_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filter results to only include users with first names matching this value.</p>
    pub fn set_first_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.first_name = input;
        self
    }
    /// <p>Filter results to only include users with first names matching this value.</p>
    pub fn get_first_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.first_name
    }
    /// <p>Filter results to only include users with last names matching this value.</p>
    pub fn last_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.last_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filter results to only include users with last names matching this value.</p>
    pub fn set_last_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.last_name = input;
        self
    }
    /// <p>Filter results to only include users with last names matching this value.</p>
    pub fn get_last_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.last_name
    }
    /// <p>Filter results to only include users with usernames matching this value.</p>
    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filter results to only include users with usernames matching this value.</p>
    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.username = input;
        self
    }
    /// <p>Filter results to only include users with usernames matching this value.</p>
    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.username
    }
    /// <p>Filter results to only include users with this status (1 for pending, 2 for active).</p>
    pub fn status(mut self, input: i32) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter results to only include users with this status (1 for pending, 2 for active).</p>
    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
        self.status = input;
        self
    }
    /// <p>Filter results to only include users with this status (1 for pending, 2 for active).</p>
    pub fn get_status(&self) -> &::std::option::Option<i32> {
        &self.status
    }
    /// <p>Filter results to only include users belonging to this security group.</p>
    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.group_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Filter results to only include users belonging to this security group.</p>
    pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.group_id = input;
        self
    }
    /// <p>Filter results to only include users belonging to this security group.</p>
    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.group_id
    }
    /// 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 {
            network_id: self.network_id,
            next_token: self.next_token,
            max_results: self.max_results,
            sort_fields: self.sort_fields,
            sort_direction: self.sort_direction,
            first_name: self.first_name,
            last_name: self.last_name,
            username: self.username,
            status: self.status,
            group_id: self.group_id,
        })
    }
}
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("network_id", &self.network_id);
        formatter.field("next_token", &self.next_token);
        formatter.field("max_results", &self.max_results);
        formatter.field("sort_fields", &self.sort_fields);
        formatter.field("sort_direction", &self.sort_direction);
        formatter.field("first_name", &"*** Sensitive Data Redacted ***");
        formatter.field("last_name", &"*** Sensitive Data Redacted ***");
        formatter.field("username", &self.username);
        formatter.field("status", &self.status);
        formatter.field("group_id", &self.group_id);
        formatter.finish()
    }
}