1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
// 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,
})
}
}