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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A tenant database in the DB instance. This data type is an element in the response to the <code>DescribeTenantDatabases</code> action.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TenantDatabase {
    /// <p>The creation time of the tenant database.</p>
    pub tenant_database_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The ID of the DB instance that contains the tenant database.</p>
    pub db_instance_identifier: ::std::option::Option<::std::string::String>,
    /// <p>The database name of the tenant database.</p>
    pub tenant_db_name: ::std::option::Option<::std::string::String>,
    /// <p>The status of the tenant database.</p>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The master username of the tenant database.</p>
    pub master_username: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the DB instance.</p>
    pub dbi_resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the tenant database.</p>
    pub tenant_database_resource_id: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) for the tenant database.</p>
    pub tenant_database_arn: ::std::option::Option<::std::string::String>,
    /// <p>The character set of the tenant database.</p>
    pub character_set_name: ::std::option::Option<::std::string::String>,
    /// <p>The <code>NCHAR</code> character set name of the tenant database.</p>
    pub nchar_character_set_name: ::std::option::Option<::std::string::String>,
    /// <p>Specifies whether deletion protection is enabled for the DB instance.</p>
    pub deletion_protection: ::std::option::Option<bool>,
    /// <p>Information about pending changes for a tenant database.</p>
    pub pending_modified_values: ::std::option::Option<crate::types::TenantDatabasePendingModifiedValues>,
    /// <p>A list of tags. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i></p>
    pub tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl TenantDatabase {
    /// <p>The creation time of the tenant database.</p>
    pub fn tenant_database_create_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.tenant_database_create_time.as_ref()
    }
    /// <p>The ID of the DB instance that contains the tenant database.</p>
    pub fn db_instance_identifier(&self) -> ::std::option::Option<&str> {
        self.db_instance_identifier.as_deref()
    }
    /// <p>The database name of the tenant database.</p>
    pub fn tenant_db_name(&self) -> ::std::option::Option<&str> {
        self.tenant_db_name.as_deref()
    }
    /// <p>The status of the tenant database.</p>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The master username of the tenant database.</p>
    pub fn master_username(&self) -> ::std::option::Option<&str> {
        self.master_username.as_deref()
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the DB instance.</p>
    pub fn dbi_resource_id(&self) -> ::std::option::Option<&str> {
        self.dbi_resource_id.as_deref()
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the tenant database.</p>
    pub fn tenant_database_resource_id(&self) -> ::std::option::Option<&str> {
        self.tenant_database_resource_id.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) for the tenant database.</p>
    pub fn tenant_database_arn(&self) -> ::std::option::Option<&str> {
        self.tenant_database_arn.as_deref()
    }
    /// <p>The character set of the tenant database.</p>
    pub fn character_set_name(&self) -> ::std::option::Option<&str> {
        self.character_set_name.as_deref()
    }
    /// <p>The <code>NCHAR</code> character set name of the tenant database.</p>
    pub fn nchar_character_set_name(&self) -> ::std::option::Option<&str> {
        self.nchar_character_set_name.as_deref()
    }
    /// <p>Specifies whether deletion protection is enabled for the DB instance.</p>
    pub fn deletion_protection(&self) -> ::std::option::Option<bool> {
        self.deletion_protection
    }
    /// <p>Information about pending changes for a tenant database.</p>
    pub fn pending_modified_values(&self) -> ::std::option::Option<&crate::types::TenantDatabasePendingModifiedValues> {
        self.pending_modified_values.as_ref()
    }
    /// <p>A list of tags. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i></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 `.tag_list.is_none()`.
    pub fn tag_list(&self) -> &[crate::types::Tag] {
        self.tag_list.as_deref().unwrap_or_default()
    }
}
impl TenantDatabase {
    /// Creates a new builder-style object to manufacture [`TenantDatabase`](crate::types::TenantDatabase).
    pub fn builder() -> crate::types::builders::TenantDatabaseBuilder {
        crate::types::builders::TenantDatabaseBuilder::default()
    }
}

/// A builder for [`TenantDatabase`](crate::types::TenantDatabase).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct TenantDatabaseBuilder {
    pub(crate) tenant_database_create_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) db_instance_identifier: ::std::option::Option<::std::string::String>,
    pub(crate) tenant_db_name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) master_username: ::std::option::Option<::std::string::String>,
    pub(crate) dbi_resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) tenant_database_resource_id: ::std::option::Option<::std::string::String>,
    pub(crate) tenant_database_arn: ::std::option::Option<::std::string::String>,
    pub(crate) character_set_name: ::std::option::Option<::std::string::String>,
    pub(crate) nchar_character_set_name: ::std::option::Option<::std::string::String>,
    pub(crate) deletion_protection: ::std::option::Option<bool>,
    pub(crate) pending_modified_values: ::std::option::Option<crate::types::TenantDatabasePendingModifiedValues>,
    pub(crate) tag_list: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
}
impl TenantDatabaseBuilder {
    /// <p>The creation time of the tenant database.</p>
    pub fn tenant_database_create_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.tenant_database_create_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The creation time of the tenant database.</p>
    pub fn set_tenant_database_create_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.tenant_database_create_time = input;
        self
    }
    /// <p>The creation time of the tenant database.</p>
    pub fn get_tenant_database_create_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.tenant_database_create_time
    }
    /// <p>The ID of the DB instance that contains the tenant database.</p>
    pub fn db_instance_identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.db_instance_identifier = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the DB instance that contains the tenant database.</p>
    pub fn set_db_instance_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.db_instance_identifier = input;
        self
    }
    /// <p>The ID of the DB instance that contains the tenant database.</p>
    pub fn get_db_instance_identifier(&self) -> &::std::option::Option<::std::string::String> {
        &self.db_instance_identifier
    }
    /// <p>The database name of the tenant database.</p>
    pub fn tenant_db_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tenant_db_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The database name of the tenant database.</p>
    pub fn set_tenant_db_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tenant_db_name = input;
        self
    }
    /// <p>The database name of the tenant database.</p>
    pub fn get_tenant_db_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.tenant_db_name
    }
    /// <p>The status of the tenant database.</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>The status of the tenant database.</p>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the tenant database.</p>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The master username of the tenant database.</p>
    pub fn master_username(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.master_username = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The master username of the tenant database.</p>
    pub fn set_master_username(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.master_username = input;
        self
    }
    /// <p>The master username of the tenant database.</p>
    pub fn get_master_username(&self) -> &::std::option::Option<::std::string::String> {
        &self.master_username
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the DB instance.</p>
    pub fn dbi_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.dbi_resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the DB instance.</p>
    pub fn set_dbi_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.dbi_resource_id = input;
        self
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the DB instance.</p>
    pub fn get_dbi_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.dbi_resource_id
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the tenant database.</p>
    pub fn tenant_database_resource_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tenant_database_resource_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the tenant database.</p>
    pub fn set_tenant_database_resource_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tenant_database_resource_id = input;
        self
    }
    /// <p>The Amazon Web Services Region-unique, immutable identifier for the tenant database.</p>
    pub fn get_tenant_database_resource_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.tenant_database_resource_id
    }
    /// <p>The Amazon Resource Name (ARN) for the tenant database.</p>
    pub fn tenant_database_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tenant_database_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the tenant database.</p>
    pub fn set_tenant_database_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tenant_database_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) for the tenant database.</p>
    pub fn get_tenant_database_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.tenant_database_arn
    }
    /// <p>The character set of the tenant database.</p>
    pub fn character_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.character_set_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The character set of the tenant database.</p>
    pub fn set_character_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.character_set_name = input;
        self
    }
    /// <p>The character set of the tenant database.</p>
    pub fn get_character_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.character_set_name
    }
    /// <p>The <code>NCHAR</code> character set name of the tenant database.</p>
    pub fn nchar_character_set_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.nchar_character_set_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>NCHAR</code> character set name of the tenant database.</p>
    pub fn set_nchar_character_set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.nchar_character_set_name = input;
        self
    }
    /// <p>The <code>NCHAR</code> character set name of the tenant database.</p>
    pub fn get_nchar_character_set_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.nchar_character_set_name
    }
    /// <p>Specifies whether deletion protection is enabled for the DB instance.</p>
    pub fn deletion_protection(mut self, input: bool) -> Self {
        self.deletion_protection = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether deletion protection is enabled for the DB instance.</p>
    pub fn set_deletion_protection(mut self, input: ::std::option::Option<bool>) -> Self {
        self.deletion_protection = input;
        self
    }
    /// <p>Specifies whether deletion protection is enabled for the DB instance.</p>
    pub fn get_deletion_protection(&self) -> &::std::option::Option<bool> {
        &self.deletion_protection
    }
    /// <p>Information about pending changes for a tenant database.</p>
    pub fn pending_modified_values(mut self, input: crate::types::TenantDatabasePendingModifiedValues) -> Self {
        self.pending_modified_values = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about pending changes for a tenant database.</p>
    pub fn set_pending_modified_values(mut self, input: ::std::option::Option<crate::types::TenantDatabasePendingModifiedValues>) -> Self {
        self.pending_modified_values = input;
        self
    }
    /// <p>Information about pending changes for a tenant database.</p>
    pub fn get_pending_modified_values(&self) -> &::std::option::Option<crate::types::TenantDatabasePendingModifiedValues> {
        &self.pending_modified_values
    }
    /// Appends an item to `tag_list`.
    ///
    /// To override the contents of this collection use [`set_tag_list`](Self::set_tag_list).
    ///
    /// <p>A list of tags. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i></p>
    pub fn tag_list(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tag_list.unwrap_or_default();
        v.push(input);
        self.tag_list = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of tags. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i></p>
    pub fn set_tag_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tag_list = input;
        self
    }
    /// <p>A list of tags. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Tagging.html">Tagging Amazon RDS Resources</a> in the <i>Amazon RDS User Guide.</i></p>
    pub fn get_tag_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tag_list
    }
    /// Consumes the builder and constructs a [`TenantDatabase`](crate::types::TenantDatabase).
    pub fn build(self) -> crate::types::TenantDatabase {
        crate::types::TenantDatabase {
            tenant_database_create_time: self.tenant_database_create_time,
            db_instance_identifier: self.db_instance_identifier,
            tenant_db_name: self.tenant_db_name,
            status: self.status,
            master_username: self.master_username,
            dbi_resource_id: self.dbi_resource_id,
            tenant_database_resource_id: self.tenant_database_resource_id,
            tenant_database_arn: self.tenant_database_arn,
            character_set_name: self.character_set_name,
            nchar_character_set_name: self.nchar_character_set_name,
            deletion_protection: self.deletion_protection,
            pending_modified_values: self.pending_modified_values,
            tag_list: self.tag_list,
        }
    }
}