aws_sdk_elasticache/operation/delete_user/
_delete_user_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 DeleteUserOutput {
6    /// <p>The ID of the user.</p>
7    pub user_id: ::std::option::Option<::std::string::String>,
8    /// <p>The username of the user.</p>
9    pub user_name: ::std::option::Option<::std::string::String>,
10    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
11    pub status: ::std::option::Option<::std::string::String>,
12    /// <p>The options are valkey or redis.</p>
13    pub engine: ::std::option::Option<::std::string::String>,
14    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
15    pub minimum_engine_version: ::std::option::Option<::std::string::String>,
16    /// <p>Access permissions string used for this user.</p>
17    pub access_string: ::std::option::Option<::std::string::String>,
18    /// <p>Returns a list of the user group IDs the user belongs to.</p>
19    pub user_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
20    /// <p>Denotes whether the user requires a password to authenticate.</p>
21    pub authentication: ::std::option::Option<crate::types::Authentication>,
22    /// <p>The Amazon Resource Name (ARN) of the user.</p>
23    pub arn: ::std::option::Option<::std::string::String>,
24    _request_id: Option<String>,
25}
26impl DeleteUserOutput {
27    /// <p>The ID of the user.</p>
28    pub fn user_id(&self) -> ::std::option::Option<&str> {
29        self.user_id.as_deref()
30    }
31    /// <p>The username of the user.</p>
32    pub fn user_name(&self) -> ::std::option::Option<&str> {
33        self.user_name.as_deref()
34    }
35    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
36    pub fn status(&self) -> ::std::option::Option<&str> {
37        self.status.as_deref()
38    }
39    /// <p>The options are valkey or redis.</p>
40    pub fn engine(&self) -> ::std::option::Option<&str> {
41        self.engine.as_deref()
42    }
43    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
44    pub fn minimum_engine_version(&self) -> ::std::option::Option<&str> {
45        self.minimum_engine_version.as_deref()
46    }
47    /// <p>Access permissions string used for this user.</p>
48    pub fn access_string(&self) -> ::std::option::Option<&str> {
49        self.access_string.as_deref()
50    }
51    /// <p>Returns a list of the user group IDs the user belongs to.</p>
52    ///
53    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.user_group_ids.is_none()`.
54    pub fn user_group_ids(&self) -> &[::std::string::String] {
55        self.user_group_ids.as_deref().unwrap_or_default()
56    }
57    /// <p>Denotes whether the user requires a password to authenticate.</p>
58    pub fn authentication(&self) -> ::std::option::Option<&crate::types::Authentication> {
59        self.authentication.as_ref()
60    }
61    /// <p>The Amazon Resource Name (ARN) of the user.</p>
62    pub fn arn(&self) -> ::std::option::Option<&str> {
63        self.arn.as_deref()
64    }
65}
66impl ::aws_types::request_id::RequestId for DeleteUserOutput {
67    fn request_id(&self) -> Option<&str> {
68        self._request_id.as_deref()
69    }
70}
71impl DeleteUserOutput {
72    /// Creates a new builder-style object to manufacture [`DeleteUserOutput`](crate::operation::delete_user::DeleteUserOutput).
73    pub fn builder() -> crate::operation::delete_user::builders::DeleteUserOutputBuilder {
74        crate::operation::delete_user::builders::DeleteUserOutputBuilder::default()
75    }
76}
77
78/// A builder for [`DeleteUserOutput`](crate::operation::delete_user::DeleteUserOutput).
79#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
80#[non_exhaustive]
81pub struct DeleteUserOutputBuilder {
82    pub(crate) user_id: ::std::option::Option<::std::string::String>,
83    pub(crate) user_name: ::std::option::Option<::std::string::String>,
84    pub(crate) status: ::std::option::Option<::std::string::String>,
85    pub(crate) engine: ::std::option::Option<::std::string::String>,
86    pub(crate) minimum_engine_version: ::std::option::Option<::std::string::String>,
87    pub(crate) access_string: ::std::option::Option<::std::string::String>,
88    pub(crate) user_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
89    pub(crate) authentication: ::std::option::Option<crate::types::Authentication>,
90    pub(crate) arn: ::std::option::Option<::std::string::String>,
91    _request_id: Option<String>,
92}
93impl DeleteUserOutputBuilder {
94    /// <p>The ID of the user.</p>
95    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96        self.user_id = ::std::option::Option::Some(input.into());
97        self
98    }
99    /// <p>The ID of the user.</p>
100    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101        self.user_id = input;
102        self
103    }
104    /// <p>The ID of the user.</p>
105    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
106        &self.user_id
107    }
108    /// <p>The username of the user.</p>
109    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
110        self.user_name = ::std::option::Option::Some(input.into());
111        self
112    }
113    /// <p>The username of the user.</p>
114    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
115        self.user_name = input;
116        self
117    }
118    /// <p>The username of the user.</p>
119    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
120        &self.user_name
121    }
122    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
123    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
124        self.status = ::std::option::Option::Some(input.into());
125        self
126    }
127    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
128    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
129        self.status = input;
130        self
131    }
132    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
133    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
134        &self.status
135    }
136    /// <p>The options are valkey or redis.</p>
137    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
138        self.engine = ::std::option::Option::Some(input.into());
139        self
140    }
141    /// <p>The options are valkey or redis.</p>
142    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
143        self.engine = input;
144        self
145    }
146    /// <p>The options are valkey or redis.</p>
147    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
148        &self.engine
149    }
150    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
151    pub fn minimum_engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
152        self.minimum_engine_version = ::std::option::Option::Some(input.into());
153        self
154    }
155    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
156    pub fn set_minimum_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
157        self.minimum_engine_version = input;
158        self
159    }
160    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
161    pub fn get_minimum_engine_version(&self) -> &::std::option::Option<::std::string::String> {
162        &self.minimum_engine_version
163    }
164    /// <p>Access permissions string used for this user.</p>
165    pub fn access_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
166        self.access_string = ::std::option::Option::Some(input.into());
167        self
168    }
169    /// <p>Access permissions string used for this user.</p>
170    pub fn set_access_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
171        self.access_string = input;
172        self
173    }
174    /// <p>Access permissions string used for this user.</p>
175    pub fn get_access_string(&self) -> &::std::option::Option<::std::string::String> {
176        &self.access_string
177    }
178    /// Appends an item to `user_group_ids`.
179    ///
180    /// To override the contents of this collection use [`set_user_group_ids`](Self::set_user_group_ids).
181    ///
182    /// <p>Returns a list of the user group IDs the user belongs to.</p>
183    pub fn user_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
184        let mut v = self.user_group_ids.unwrap_or_default();
185        v.push(input.into());
186        self.user_group_ids = ::std::option::Option::Some(v);
187        self
188    }
189    /// <p>Returns a list of the user group IDs the user belongs to.</p>
190    pub fn set_user_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
191        self.user_group_ids = input;
192        self
193    }
194    /// <p>Returns a list of the user group IDs the user belongs to.</p>
195    pub fn get_user_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
196        &self.user_group_ids
197    }
198    /// <p>Denotes whether the user requires a password to authenticate.</p>
199    pub fn authentication(mut self, input: crate::types::Authentication) -> Self {
200        self.authentication = ::std::option::Option::Some(input);
201        self
202    }
203    /// <p>Denotes whether the user requires a password to authenticate.</p>
204    pub fn set_authentication(mut self, input: ::std::option::Option<crate::types::Authentication>) -> Self {
205        self.authentication = input;
206        self
207    }
208    /// <p>Denotes whether the user requires a password to authenticate.</p>
209    pub fn get_authentication(&self) -> &::std::option::Option<crate::types::Authentication> {
210        &self.authentication
211    }
212    /// <p>The Amazon Resource Name (ARN) of the user.</p>
213    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
214        self.arn = ::std::option::Option::Some(input.into());
215        self
216    }
217    /// <p>The Amazon Resource Name (ARN) of the user.</p>
218    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
219        self.arn = input;
220        self
221    }
222    /// <p>The Amazon Resource Name (ARN) of the user.</p>
223    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
224        &self.arn
225    }
226    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
227        self._request_id = Some(request_id.into());
228        self
229    }
230
231    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
232        self._request_id = request_id;
233        self
234    }
235    /// Consumes the builder and constructs a [`DeleteUserOutput`](crate::operation::delete_user::DeleteUserOutput).
236    pub fn build(self) -> crate::operation::delete_user::DeleteUserOutput {
237        crate::operation::delete_user::DeleteUserOutput {
238            user_id: self.user_id,
239            user_name: self.user_name,
240            status: self.status,
241            engine: self.engine,
242            minimum_engine_version: self.minimum_engine_version,
243            access_string: self.access_string,
244            user_group_ids: self.user_group_ids,
245            authentication: self.authentication,
246            arn: self.arn,
247            _request_id: self._request_id,
248        }
249    }
250}