aws-sdk-wickr 1.1.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, ::std::fmt::Debug)]
pub struct GetUsersCountOutput {
    /// <p>The number of users with pending status (invited but not yet accepted).</p>
    pub pending: i32,
    /// <p>The number of users with active status in the network.</p>
    pub active: i32,
    /// <p>The number of users who have rejected network invitations.</p>
    pub rejected: i32,
    /// <p>The number of additional users that can be added to the network while maintaining premium free trial eligibility.</p>
    pub remaining: i32,
    /// <p>The total number of users in the network (active and pending combined).</p>
    pub total: i32,
    _request_id: Option<String>,
}
impl GetUsersCountOutput {
    /// <p>The number of users with pending status (invited but not yet accepted).</p>
    pub fn pending(&self) -> i32 {
        self.pending
    }
    /// <p>The number of users with active status in the network.</p>
    pub fn active(&self) -> i32 {
        self.active
    }
    /// <p>The number of users who have rejected network invitations.</p>
    pub fn rejected(&self) -> i32 {
        self.rejected
    }
    /// <p>The number of additional users that can be added to the network while maintaining premium free trial eligibility.</p>
    pub fn remaining(&self) -> i32 {
        self.remaining
    }
    /// <p>The total number of users in the network (active and pending combined).</p>
    pub fn total(&self) -> i32 {
        self.total
    }
}
impl ::aws_types::request_id::RequestId for GetUsersCountOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetUsersCountOutput {
    /// Creates a new builder-style object to manufacture [`GetUsersCountOutput`](crate::operation::get_users_count::GetUsersCountOutput).
    pub fn builder() -> crate::operation::get_users_count::builders::GetUsersCountOutputBuilder {
        crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::default()
    }
}

/// A builder for [`GetUsersCountOutput`](crate::operation::get_users_count::GetUsersCountOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetUsersCountOutputBuilder {
    pub(crate) pending: ::std::option::Option<i32>,
    pub(crate) active: ::std::option::Option<i32>,
    pub(crate) rejected: ::std::option::Option<i32>,
    pub(crate) remaining: ::std::option::Option<i32>,
    pub(crate) total: ::std::option::Option<i32>,
    _request_id: Option<String>,
}
impl GetUsersCountOutputBuilder {
    /// <p>The number of users with pending status (invited but not yet accepted).</p>
    /// This field is required.
    pub fn pending(mut self, input: i32) -> Self {
        self.pending = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of users with pending status (invited but not yet accepted).</p>
    pub fn set_pending(mut self, input: ::std::option::Option<i32>) -> Self {
        self.pending = input;
        self
    }
    /// <p>The number of users with pending status (invited but not yet accepted).</p>
    pub fn get_pending(&self) -> &::std::option::Option<i32> {
        &self.pending
    }
    /// <p>The number of users with active status in the network.</p>
    /// This field is required.
    pub fn active(mut self, input: i32) -> Self {
        self.active = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of users with active status in the network.</p>
    pub fn set_active(mut self, input: ::std::option::Option<i32>) -> Self {
        self.active = input;
        self
    }
    /// <p>The number of users with active status in the network.</p>
    pub fn get_active(&self) -> &::std::option::Option<i32> {
        &self.active
    }
    /// <p>The number of users who have rejected network invitations.</p>
    /// This field is required.
    pub fn rejected(mut self, input: i32) -> Self {
        self.rejected = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of users who have rejected network invitations.</p>
    pub fn set_rejected(mut self, input: ::std::option::Option<i32>) -> Self {
        self.rejected = input;
        self
    }
    /// <p>The number of users who have rejected network invitations.</p>
    pub fn get_rejected(&self) -> &::std::option::Option<i32> {
        &self.rejected
    }
    /// <p>The number of additional users that can be added to the network while maintaining premium free trial eligibility.</p>
    /// This field is required.
    pub fn remaining(mut self, input: i32) -> Self {
        self.remaining = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of additional users that can be added to the network while maintaining premium free trial eligibility.</p>
    pub fn set_remaining(mut self, input: ::std::option::Option<i32>) -> Self {
        self.remaining = input;
        self
    }
    /// <p>The number of additional users that can be added to the network while maintaining premium free trial eligibility.</p>
    pub fn get_remaining(&self) -> &::std::option::Option<i32> {
        &self.remaining
    }
    /// <p>The total number of users in the network (active and pending combined).</p>
    /// This field is required.
    pub fn total(mut self, input: i32) -> Self {
        self.total = ::std::option::Option::Some(input);
        self
    }
    /// <p>The total number of users in the network (active and pending combined).</p>
    pub fn set_total(mut self, input: ::std::option::Option<i32>) -> Self {
        self.total = input;
        self
    }
    /// <p>The total number of users in the network (active and pending combined).</p>
    pub fn get_total(&self) -> &::std::option::Option<i32> {
        &self.total
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetUsersCountOutput`](crate::operation::get_users_count::GetUsersCountOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`pending`](crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::pending)
    /// - [`active`](crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::active)
    /// - [`rejected`](crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::rejected)
    /// - [`remaining`](crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::remaining)
    /// - [`total`](crate::operation::get_users_count::builders::GetUsersCountOutputBuilder::total)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_users_count::GetUsersCountOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_users_count::GetUsersCountOutput {
            pending: self.pending.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "pending",
                    "pending was not specified but it is required when building GetUsersCountOutput",
                )
            })?,
            active: self.active.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "active",
                    "active was not specified but it is required when building GetUsersCountOutput",
                )
            })?,
            rejected: self.rejected.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "rejected",
                    "rejected was not specified but it is required when building GetUsersCountOutput",
                )
            })?,
            remaining: self.remaining.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "remaining",
                    "remaining was not specified but it is required when building GetUsersCountOutput",
                )
            })?,
            total: self.total.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "total",
                    "total was not specified but it is required when building GetUsersCountOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}