aws_sdk_wickr/operation/get_bot/
_get_bot_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetBotOutput {
6    /// <p>The unique identifier of the bot.</p>
7    pub bot_id: ::std::option::Option<::std::string::String>,
8    /// <p>The display name of the bot that is visible to users.</p>
9    pub display_name: ::std::option::Option<::std::string::String>,
10    /// <p>The username of the bot.</p>
11    pub username: ::std::option::Option<::std::string::String>,
12    /// <p>The unique username hash identifier for the bot.</p>
13    pub uname: ::std::option::Option<::std::string::String>,
14    /// <p>The public key of the bot used for encryption.</p>
15    pub pubkey: ::std::option::Option<::std::string::String>,
16    /// <p>The current status of the bot (1 for pending, 2 for active).</p>
17    pub status: ::std::option::Option<i32>,
18    /// <p>The ID of the security group to which the bot belongs.</p>
19    pub group_id: ::std::option::Option<::std::string::String>,
20    /// <p>Indicates whether the bot has a password set.</p>
21    pub has_challenge: ::std::option::Option<bool>,
22    /// <p>Indicates whether the bot is currently suspended.</p>
23    pub suspended: ::std::option::Option<bool>,
24    /// <p>The timestamp of the bot's last login.</p>
25    pub last_login: ::std::option::Option<::std::string::String>,
26    _request_id: Option<String>,
27}
28impl GetBotOutput {
29    /// <p>The unique identifier of the bot.</p>
30    pub fn bot_id(&self) -> ::std::option::Option<&str> {
31        self.bot_id.as_deref()
32    }
33    /// <p>The display name of the bot that is visible to users.</p>
34    pub fn display_name(&self) -> ::std::option::Option<&str> {
35        self.display_name.as_deref()
36    }
37    /// <p>The username of the bot.</p>
38    pub fn username(&self) -> ::std::option::Option<&str> {
39        self.username.as_deref()
40    }
41    /// <p>The unique username hash identifier for the bot.</p>
42    pub fn uname(&self) -> ::std::option::Option<&str> {
43        self.uname.as_deref()
44    }
45    /// <p>The public key of the bot used for encryption.</p>
46    pub fn pubkey(&self) -> ::std::option::Option<&str> {
47        self.pubkey.as_deref()
48    }
49    /// <p>The current status of the bot (1 for pending, 2 for active).</p>
50    pub fn status(&self) -> ::std::option::Option<i32> {
51        self.status
52    }
53    /// <p>The ID of the security group to which the bot belongs.</p>
54    pub fn group_id(&self) -> ::std::option::Option<&str> {
55        self.group_id.as_deref()
56    }
57    /// <p>Indicates whether the bot has a password set.</p>
58    pub fn has_challenge(&self) -> ::std::option::Option<bool> {
59        self.has_challenge
60    }
61    /// <p>Indicates whether the bot is currently suspended.</p>
62    pub fn suspended(&self) -> ::std::option::Option<bool> {
63        self.suspended
64    }
65    /// <p>The timestamp of the bot's last login.</p>
66    pub fn last_login(&self) -> ::std::option::Option<&str> {
67        self.last_login.as_deref()
68    }
69}
70impl ::aws_types::request_id::RequestId for GetBotOutput {
71    fn request_id(&self) -> Option<&str> {
72        self._request_id.as_deref()
73    }
74}
75impl GetBotOutput {
76    /// Creates a new builder-style object to manufacture [`GetBotOutput`](crate::operation::get_bot::GetBotOutput).
77    pub fn builder() -> crate::operation::get_bot::builders::GetBotOutputBuilder {
78        crate::operation::get_bot::builders::GetBotOutputBuilder::default()
79    }
80}
81
82/// A builder for [`GetBotOutput`](crate::operation::get_bot::GetBotOutput).
83#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
84#[non_exhaustive]
85pub struct GetBotOutputBuilder {
86    pub(crate) bot_id: ::std::option::Option<::std::string::String>,
87    pub(crate) display_name: ::std::option::Option<::std::string::String>,
88    pub(crate) username: ::std::option::Option<::std::string::String>,
89    pub(crate) uname: ::std::option::Option<::std::string::String>,
90    pub(crate) pubkey: ::std::option::Option<::std::string::String>,
91    pub(crate) status: ::std::option::Option<i32>,
92    pub(crate) group_id: ::std::option::Option<::std::string::String>,
93    pub(crate) has_challenge: ::std::option::Option<bool>,
94    pub(crate) suspended: ::std::option::Option<bool>,
95    pub(crate) last_login: ::std::option::Option<::std::string::String>,
96    _request_id: Option<String>,
97}
98impl GetBotOutputBuilder {
99    /// <p>The unique identifier of the bot.</p>
100    pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
101        self.bot_id = ::std::option::Option::Some(input.into());
102        self
103    }
104    /// <p>The unique identifier of the bot.</p>
105    pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
106        self.bot_id = input;
107        self
108    }
109    /// <p>The unique identifier of the bot.</p>
110    pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
111        &self.bot_id
112    }
113    /// <p>The display name of the bot that is visible to users.</p>
114    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
115        self.display_name = ::std::option::Option::Some(input.into());
116        self
117    }
118    /// <p>The display name of the bot that is visible to users.</p>
119    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
120        self.display_name = input;
121        self
122    }
123    /// <p>The display name of the bot that is visible to users.</p>
124    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
125        &self.display_name
126    }
127    /// <p>The username of the bot.</p>
128    pub fn username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
129        self.username = ::std::option::Option::Some(input.into());
130        self
131    }
132    /// <p>The username of the bot.</p>
133    pub fn set_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
134        self.username = input;
135        self
136    }
137    /// <p>The username of the bot.</p>
138    pub fn get_username(&self) -> &::std::option::Option<::std::string::String> {
139        &self.username
140    }
141    /// <p>The unique username hash identifier for the bot.</p>
142    pub fn uname(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.uname = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The unique username hash identifier for the bot.</p>
147    pub fn set_uname(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.uname = input;
149        self
150    }
151    /// <p>The unique username hash identifier for the bot.</p>
152    pub fn get_uname(&self) -> &::std::option::Option<::std::string::String> {
153        &self.uname
154    }
155    /// <p>The public key of the bot used for encryption.</p>
156    pub fn pubkey(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
157        self.pubkey = ::std::option::Option::Some(input.into());
158        self
159    }
160    /// <p>The public key of the bot used for encryption.</p>
161    pub fn set_pubkey(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
162        self.pubkey = input;
163        self
164    }
165    /// <p>The public key of the bot used for encryption.</p>
166    pub fn get_pubkey(&self) -> &::std::option::Option<::std::string::String> {
167        &self.pubkey
168    }
169    /// <p>The current status of the bot (1 for pending, 2 for active).</p>
170    pub fn status(mut self, input: i32) -> Self {
171        self.status = ::std::option::Option::Some(input);
172        self
173    }
174    /// <p>The current status of the bot (1 for pending, 2 for active).</p>
175    pub fn set_status(mut self, input: ::std::option::Option<i32>) -> Self {
176        self.status = input;
177        self
178    }
179    /// <p>The current status of the bot (1 for pending, 2 for active).</p>
180    pub fn get_status(&self) -> &::std::option::Option<i32> {
181        &self.status
182    }
183    /// <p>The ID of the security group to which the bot belongs.</p>
184    pub fn group_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
185        self.group_id = ::std::option::Option::Some(input.into());
186        self
187    }
188    /// <p>The ID of the security group to which the bot belongs.</p>
189    pub fn set_group_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
190        self.group_id = input;
191        self
192    }
193    /// <p>The ID of the security group to which the bot belongs.</p>
194    pub fn get_group_id(&self) -> &::std::option::Option<::std::string::String> {
195        &self.group_id
196    }
197    /// <p>Indicates whether the bot has a password set.</p>
198    pub fn has_challenge(mut self, input: bool) -> Self {
199        self.has_challenge = ::std::option::Option::Some(input);
200        self
201    }
202    /// <p>Indicates whether the bot has a password set.</p>
203    pub fn set_has_challenge(mut self, input: ::std::option::Option<bool>) -> Self {
204        self.has_challenge = input;
205        self
206    }
207    /// <p>Indicates whether the bot has a password set.</p>
208    pub fn get_has_challenge(&self) -> &::std::option::Option<bool> {
209        &self.has_challenge
210    }
211    /// <p>Indicates whether the bot is currently suspended.</p>
212    pub fn suspended(mut self, input: bool) -> Self {
213        self.suspended = ::std::option::Option::Some(input);
214        self
215    }
216    /// <p>Indicates whether the bot is currently suspended.</p>
217    pub fn set_suspended(mut self, input: ::std::option::Option<bool>) -> Self {
218        self.suspended = input;
219        self
220    }
221    /// <p>Indicates whether the bot is currently suspended.</p>
222    pub fn get_suspended(&self) -> &::std::option::Option<bool> {
223        &self.suspended
224    }
225    /// <p>The timestamp of the bot's last login.</p>
226    pub fn last_login(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
227        self.last_login = ::std::option::Option::Some(input.into());
228        self
229    }
230    /// <p>The timestamp of the bot's last login.</p>
231    pub fn set_last_login(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
232        self.last_login = input;
233        self
234    }
235    /// <p>The timestamp of the bot's last login.</p>
236    pub fn get_last_login(&self) -> &::std::option::Option<::std::string::String> {
237        &self.last_login
238    }
239    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
240        self._request_id = Some(request_id.into());
241        self
242    }
243
244    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
245        self._request_id = request_id;
246        self
247    }
248    /// Consumes the builder and constructs a [`GetBotOutput`](crate::operation::get_bot::GetBotOutput).
249    pub fn build(self) -> crate::operation::get_bot::GetBotOutput {
250        crate::operation::get_bot::GetBotOutput {
251            bot_id: self.bot_id,
252            display_name: self.display_name,
253            username: self.username,
254            uname: self.uname,
255            pubkey: self.pubkey,
256            status: self.status,
257            group_id: self.group_id,
258            has_challenge: self.has_challenge,
259            suspended: self.suspended,
260            last_login: self.last_login,
261            _request_id: self._request_id,
262        }
263    }
264}