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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
// 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 ListBotsInput {
/// <p>The ID of the Wickr network from which to list bots.</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 bots 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 bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', '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 bots with display names matching this value.</p>
pub display_name: ::std::option::Option<::std::string::String>,
/// <p>Filter results to only include bots with usernames matching this value.</p>
pub username: ::std::option::Option<::std::string::String>,
/// <p>Filter results to only include bots with this status (1 for pending, 2 for active).</p>
pub status: ::std::option::Option<i32>,
/// <p>Filter results to only include bots belonging to this security group.</p>
pub group_id: ::std::option::Option<::std::string::String>,
}
impl ListBotsInput {
/// <p>The ID of the Wickr network from which to list bots.</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 bots 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 bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', '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 bots with display names matching this value.</p>
pub fn display_name(&self) -> ::std::option::Option<&str> {
self.display_name.as_deref()
}
/// <p>Filter results to only include bots with usernames matching this value.</p>
pub fn username(&self) -> ::std::option::Option<&str> {
self.username.as_deref()
}
/// <p>Filter results to only include bots 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 bots belonging to this security group.</p>
pub fn group_id(&self) -> ::std::option::Option<&str> {
self.group_id.as_deref()
}
}
impl ListBotsInput {
/// Creates a new builder-style object to manufacture [`ListBotsInput`](crate::operation::list_bots::ListBotsInput).
pub fn builder() -> crate::operation::list_bots::builders::ListBotsInputBuilder {
crate::operation::list_bots::builders::ListBotsInputBuilder::default()
}
}
/// A builder for [`ListBotsInput`](crate::operation::list_bots::ListBotsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ListBotsInputBuilder {
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) display_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 ListBotsInputBuilder {
/// <p>The ID of the Wickr network from which to list bots.</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 bots.</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 bots.</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 bots 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 bots 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 bots 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 bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', '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 bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', '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 bots by. Multiple fields can be specified by separating them with '+'. Accepted values include 'username', 'firstName', 'displayName', '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 bots with display names matching this value.</p>
pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.display_name = ::std::option::Option::Some(input.into());
self
}
/// <p>Filter results to only include bots with display names matching this value.</p>
pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.display_name = input;
self
}
/// <p>Filter results to only include bots with display names matching this value.</p>
pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
&self.display_name
}
/// <p>Filter results to only include bots 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 bots 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 bots 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 bots 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 bots 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 bots 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 bots 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 bots 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 bots 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 [`ListBotsInput`](crate::operation::list_bots::ListBotsInput).
pub fn build(self) -> ::std::result::Result<crate::operation::list_bots::ListBotsInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::list_bots::ListBotsInput {
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,
display_name: self.display_name,
username: self.username,
status: self.status,
group_id: self.group_id,
})
}
}