aws_sdk_elasticache/operation/create_user/
_create_user_output.rs

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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
// 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 CreateUserOutput {
    /// <p>The ID of the user.</p>
    pub user_id: ::std::option::Option<::std::string::String>,
    /// <p>The username of the user.</p>
    pub user_name: ::std::option::Option<::std::string::String>,
    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The current supported value is Redis.</p>
    pub engine: ::std::option::Option<::std::string::String>,
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub minimum_engine_version: ::std::option::Option<::std::string::String>,
    /// <p>Access permissions string used for this user.</p>
    pub access_string: ::std::option::Option<::std::string::String>,
    /// <p>Returns a list of the user group IDs the user belongs to.</p>
    pub user_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>Denotes whether the user requires a password to authenticate.</p>
    pub authentication: ::std::option::Option<crate::types::Authentication>,
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateUserOutput {
    /// <p>The ID of the user.</p>
    pub fn user_id(&self) -> ::std::option::Option<&str> {
        self.user_id.as_deref()
    }
    /// <p>The username of the user.</p>
    pub fn user_name(&self) -> ::std::option::Option<&str> {
        self.user_name.as_deref()
    }
    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The current supported value is Redis.</p>
    pub fn engine(&self) -> ::std::option::Option<&str> {
        self.engine.as_deref()
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn minimum_engine_version(&self) -> ::std::option::Option<&str> {
        self.minimum_engine_version.as_deref()
    }
    /// <p>Access permissions string used for this user.</p>
    pub fn access_string(&self) -> ::std::option::Option<&str> {
        self.access_string.as_deref()
    }
    /// <p>Returns a list of the user group IDs the user belongs to.</p>
    ///
    /// 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()`.
    pub fn user_group_ids(&self) -> &[::std::string::String] {
        self.user_group_ids.as_deref().unwrap_or_default()
    }
    /// <p>Denotes whether the user requires a password to authenticate.</p>
    pub fn authentication(&self) -> ::std::option::Option<&crate::types::Authentication> {
        self.authentication.as_ref()
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
}
impl ::aws_types::request_id::RequestId for CreateUserOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl CreateUserOutput {
    /// Creates a new builder-style object to manufacture [`CreateUserOutput`](crate::operation::create_user::CreateUserOutput).
    pub fn builder() -> crate::operation::create_user::builders::CreateUserOutputBuilder {
        crate::operation::create_user::builders::CreateUserOutputBuilder::default()
    }
}

/// A builder for [`CreateUserOutput`](crate::operation::create_user::CreateUserOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateUserOutputBuilder {
    pub(crate) user_id: ::std::option::Option<::std::string::String>,
    pub(crate) user_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) engine: ::std::option::Option<::std::string::String>,
    pub(crate) minimum_engine_version: ::std::option::Option<::std::string::String>,
    pub(crate) access_string: ::std::option::Option<::std::string::String>,
    pub(crate) user_group_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) authentication: ::std::option::Option<crate::types::Authentication>,
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    _request_id: Option<String>,
}
impl CreateUserOutputBuilder {
    /// <p>The ID of the user.</p>
    pub fn user_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the user.</p>
    pub fn set_user_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_id = input;
        self
    }
    /// <p>The ID of the user.</p>
    pub fn get_user_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_id
    }
    /// <p>The username of the user.</p>
    pub fn user_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.user_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The username of the user.</p>
    pub fn set_user_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.user_name = input;
        self
    }
    /// <p>The username of the user.</p>
    pub fn get_user_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.user_name
    }
    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>Indicates the user status. Can be "active", "modifying" or "deleting".</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The current supported value is Redis.</p>
    pub fn engine(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.engine = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The current supported value is Redis.</p>
    pub fn set_engine(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.engine = input;
        self
    }
    /// <p>The current supported value is Redis.</p>
    pub fn get_engine(&self) -> &::std::option::Option<::std::string::String> {
        &self.engine
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn minimum_engine_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.minimum_engine_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn set_minimum_engine_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.minimum_engine_version = input;
        self
    }
    /// <p>The minimum engine version required, which is Redis OSS 6.0</p>
    pub fn get_minimum_engine_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.minimum_engine_version
    }
    /// <p>Access permissions string used for this user.</p>
    pub fn access_string(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.access_string = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Access permissions string used for this user.</p>
    pub fn set_access_string(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.access_string = input;
        self
    }
    /// <p>Access permissions string used for this user.</p>
    pub fn get_access_string(&self) -> &::std::option::Option<::std::string::String> {
        &self.access_string
    }
    /// Appends an item to `user_group_ids`.
    ///
    /// To override the contents of this collection use [`set_user_group_ids`](Self::set_user_group_ids).
    ///
    /// <p>Returns a list of the user group IDs the user belongs to.</p>
    pub fn user_group_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.user_group_ids.unwrap_or_default();
        v.push(input.into());
        self.user_group_ids = ::std::option::Option::Some(v);
        self
    }
    /// <p>Returns a list of the user group IDs the user belongs to.</p>
    pub fn set_user_group_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.user_group_ids = input;
        self
    }
    /// <p>Returns a list of the user group IDs the user belongs to.</p>
    pub fn get_user_group_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.user_group_ids
    }
    /// <p>Denotes whether the user requires a password to authenticate.</p>
    pub fn authentication(mut self, input: crate::types::Authentication) -> Self {
        self.authentication = ::std::option::Option::Some(input);
        self
    }
    /// <p>Denotes whether the user requires a password to authenticate.</p>
    pub fn set_authentication(mut self, input: ::std::option::Option<crate::types::Authentication>) -> Self {
        self.authentication = input;
        self
    }
    /// <p>Denotes whether the user requires a password to authenticate.</p>
    pub fn get_authentication(&self) -> &::std::option::Option<crate::types::Authentication> {
        &self.authentication
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the user.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    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 [`CreateUserOutput`](crate::operation::create_user::CreateUserOutput).
    pub fn build(self) -> crate::operation::create_user::CreateUserOutput {
        crate::operation::create_user::CreateUserOutput {
            user_id: self.user_id,
            user_name: self.user_name,
            status: self.status,
            engine: self.engine,
            minimum_engine_version: self.minimum_engine_version,
            access_string: self.access_string,
            user_group_ids: self.user_group_ids,
            authentication: self.authentication,
            arn: self.arn,
            _request_id: self._request_id,
        }
    }
}