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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>A structure that contains the details about a secret. It does not include the encrypted <code>SecretString</code> and <code>SecretBinary</code> values. To get those values, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html">GetSecretValue</a> .</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SecretListEntry {
    /// <p>The Amazon Resource Name (ARN) of the secret.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The friendly name of the secret.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The user-provided description of the secret.</p>
    pub description: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted.</p>
    pub kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>Indicates whether automatic, scheduled rotation is enabled for this secret.</p>
    pub rotation_enabled: ::std::option::Option<bool>,
    /// <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html"> <code>RotateSecret</code> </a>.</p>
    pub rotation_lambda_arn: ::std::option::Option<::std::string::String>,
    /// <p>A structure that defines the rotation configuration for the secret.</p>
    pub rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
    /// <p>The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.</p>
    pub last_rotated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The last date and time that this secret was modified in any way.</p>
    pub last_changed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the <code>RecoveryWindowInDays</code> parameter of the <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html"> <code>DeleteSecret</code> </a> operation.</p>
    pub deleted_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
    pub next_rotation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The list of user-defined tags associated with the secret. To add tags to a secret, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html"> <code>TagResource</code> </a>. To remove tags, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html"> <code>UntagResource</code> </a>.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p><note>
    /// <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p>
    /// </note>
    pub secret_versions_to_stages: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    /// <p>Returns the name of the service that created the secret.</p>
    pub owning_service: ::std::option::Option<::std::string::String>,
    /// <p>The date and time when a secret was created.</p>
    pub created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The Region where Secrets Manager originated the secret.</p>
    pub primary_region: ::std::option::Option<::std::string::String>,
}
impl SecretListEntry {
    /// <p>The Amazon Resource Name (ARN) of the secret.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The friendly name of the secret.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The user-provided description of the secret.</p>
    pub fn description(&self) -> ::std::option::Option<&str> {
        self.description.as_deref()
    }
    /// <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted.</p>
    pub fn kms_key_id(&self) -> ::std::option::Option<&str> {
        self.kms_key_id.as_deref()
    }
    /// <p>Indicates whether automatic, scheduled rotation is enabled for this secret.</p>
    pub fn rotation_enabled(&self) -> ::std::option::Option<bool> {
        self.rotation_enabled
    }
    /// <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html"> <code>RotateSecret</code> </a>.</p>
    pub fn rotation_lambda_arn(&self) -> ::std::option::Option<&str> {
        self.rotation_lambda_arn.as_deref()
    }
    /// <p>A structure that defines the rotation configuration for the secret.</p>
    pub fn rotation_rules(&self) -> ::std::option::Option<&crate::types::RotationRulesType> {
        self.rotation_rules.as_ref()
    }
    /// <p>The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.</p>
    pub fn last_rotated_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_rotated_date.as_ref()
    }
    /// <p>The last date and time that this secret was modified in any way.</p>
    pub fn last_changed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_changed_date.as_ref()
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn last_accessed_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_accessed_date.as_ref()
    }
    /// <p>The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the <code>RecoveryWindowInDays</code> parameter of the <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html"> <code>DeleteSecret</code> </a> operation.</p>
    pub fn deleted_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.deleted_date.as_ref()
    }
    /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
    pub fn next_rotation_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.next_rotation_date.as_ref()
    }
    /// <p>The list of user-defined tags associated with the secret. To add tags to a secret, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html"> <code>TagResource</code> </a>. To remove tags, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html"> <code>UntagResource</code> </a>.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p><note>
    /// <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p>
    /// </note>
    pub fn secret_versions_to_stages(
        &self,
    ) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        self.secret_versions_to_stages.as_ref()
    }
    /// <p>Returns the name of the service that created the secret.</p>
    pub fn owning_service(&self) -> ::std::option::Option<&str> {
        self.owning_service.as_deref()
    }
    /// <p>The date and time when a secret was created.</p>
    pub fn created_date(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_date.as_ref()
    }
    /// <p>The Region where Secrets Manager originated the secret.</p>
    pub fn primary_region(&self) -> ::std::option::Option<&str> {
        self.primary_region.as_deref()
    }
}
impl SecretListEntry {
    /// Creates a new builder-style object to manufacture [`SecretListEntry`](crate::types::SecretListEntry).
    pub fn builder() -> crate::types::builders::SecretListEntryBuilder {
        crate::types::builders::SecretListEntryBuilder::default()
    }
}

/// A builder for [`SecretListEntry`](crate::types::SecretListEntry).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SecretListEntryBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) description: ::std::option::Option<::std::string::String>,
    pub(crate) kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) rotation_enabled: ::std::option::Option<bool>,
    pub(crate) rotation_lambda_arn: ::std::option::Option<::std::string::String>,
    pub(crate) rotation_rules: ::std::option::Option<crate::types::RotationRulesType>,
    pub(crate) last_rotated_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_changed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_accessed_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) deleted_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) next_rotation_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) secret_versions_to_stages:
        ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    pub(crate) owning_service: ::std::option::Option<::std::string::String>,
    pub(crate) created_date: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) primary_region: ::std::option::Option<::std::string::String>,
}
impl SecretListEntryBuilder {
    /// <p>The Amazon Resource Name (ARN) of the secret.</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 secret.</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 secret.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The friendly name of the secret.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The friendly name of the secret.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The friendly name of the secret.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The user-provided description of the secret.</p>
    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.description = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The user-provided description of the secret.</p>
    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.description = input;
        self
    }
    /// <p>The user-provided description of the secret.</p>
    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
        &self.description
    }
    /// <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted.</p>
    pub fn kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted.</p>
    pub fn set_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.kms_key_id = input;
        self
    }
    /// <p>The ARN of the KMS key that Secrets Manager uses to encrypt the secret value. If the secret is encrypted with the Amazon Web Services managed key <code>aws/secretsmanager</code>, this field is omitted.</p>
    pub fn get_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.kms_key_id
    }
    /// <p>Indicates whether automatic, scheduled rotation is enabled for this secret.</p>
    pub fn rotation_enabled(mut self, input: bool) -> Self {
        self.rotation_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether automatic, scheduled rotation is enabled for this secret.</p>
    pub fn set_rotation_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.rotation_enabled = input;
        self
    }
    /// <p>Indicates whether automatic, scheduled rotation is enabled for this secret.</p>
    pub fn get_rotation_enabled(&self) -> &::std::option::Option<bool> {
        &self.rotation_enabled
    }
    /// <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html"> <code>RotateSecret</code> </a>.</p>
    pub fn rotation_lambda_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.rotation_lambda_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html"> <code>RotateSecret</code> </a>.</p>
    pub fn set_rotation_lambda_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.rotation_lambda_arn = input;
        self
    }
    /// <p>The ARN of an Amazon Web Services Lambda function invoked by Secrets Manager to rotate and expire the secret either automatically per the schedule or manually by a call to <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_RotateSecret.html"> <code>RotateSecret</code> </a>.</p>
    pub fn get_rotation_lambda_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.rotation_lambda_arn
    }
    /// <p>A structure that defines the rotation configuration for the secret.</p>
    pub fn rotation_rules(mut self, input: crate::types::RotationRulesType) -> Self {
        self.rotation_rules = ::std::option::Option::Some(input);
        self
    }
    /// <p>A structure that defines the rotation configuration for the secret.</p>
    pub fn set_rotation_rules(mut self, input: ::std::option::Option<crate::types::RotationRulesType>) -> Self {
        self.rotation_rules = input;
        self
    }
    /// <p>A structure that defines the rotation configuration for the secret.</p>
    pub fn get_rotation_rules(&self) -> &::std::option::Option<crate::types::RotationRulesType> {
        &self.rotation_rules
    }
    /// <p>The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.</p>
    pub fn last_rotated_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_rotated_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.</p>
    pub fn set_last_rotated_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_rotated_date = input;
        self
    }
    /// <p>The most recent date and time that the Secrets Manager rotation process was successfully completed. This value is null if the secret hasn't ever rotated.</p>
    pub fn get_last_rotated_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_rotated_date
    }
    /// <p>The last date and time that this secret was modified in any way.</p>
    pub fn last_changed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_changed_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The last date and time that this secret was modified in any way.</p>
    pub fn set_last_changed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_changed_date = input;
        self
    }
    /// <p>The last date and time that this secret was modified in any way.</p>
    pub fn get_last_changed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_changed_date
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn last_accessed_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_accessed_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn set_last_accessed_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_accessed_date = input;
        self
    }
    /// <p>The date that the secret was last accessed in the Region. This field is omitted if the secret has never been retrieved in the Region.</p>
    pub fn get_last_accessed_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_accessed_date
    }
    /// <p>The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the <code>RecoveryWindowInDays</code> parameter of the <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html"> <code>DeleteSecret</code> </a> operation.</p>
    pub fn deleted_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.deleted_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the <code>RecoveryWindowInDays</code> parameter of the <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html"> <code>DeleteSecret</code> </a> operation.</p>
    pub fn set_deleted_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.deleted_date = input;
        self
    }
    /// <p>The date and time the deletion of the secret occurred. Not present on active secrets. The secret can be recovered until the number of days in the recovery window has passed, as specified in the <code>RecoveryWindowInDays</code> parameter of the <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_DeleteSecret.html"> <code>DeleteSecret</code> </a> operation.</p>
    pub fn get_deleted_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.deleted_date
    }
    /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
    pub fn next_rotation_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.next_rotation_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
    pub fn set_next_rotation_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.next_rotation_date = input;
        self
    }
    /// <p>The next rotation is scheduled to occur on or before this date. If the secret isn't configured for rotation or rotation has been disabled, Secrets Manager returns null.</p>
    pub fn get_next_rotation_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.next_rotation_date
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The list of user-defined tags associated with the secret. To add tags to a secret, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html"> <code>TagResource</code> </a>. To remove tags, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html"> <code>UntagResource</code> </a>.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of user-defined tags associated with the secret. To add tags to a secret, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html"> <code>TagResource</code> </a>. To remove tags, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html"> <code>UntagResource</code> </a>.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The list of user-defined tags associated with the secret. To add tags to a secret, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_TagResource.html"> <code>TagResource</code> </a>. To remove tags, use <a href="https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_UntagResource.html"> <code>UntagResource</code> </a>.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Adds a key-value pair to `secret_versions_to_stages`.
    ///
    /// To override the contents of this collection use [`set_secret_versions_to_stages`](Self::set_secret_versions_to_stages).
    ///
    /// <p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p><note>
    /// <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p>
    /// </note>
    pub fn secret_versions_to_stages(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: ::std::vec::Vec<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.secret_versions_to_stages.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.secret_versions_to_stages = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p><note>
    /// <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p>
    /// </note>
    pub fn set_secret_versions_to_stages(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    ) -> Self {
        self.secret_versions_to_stages = input;
        self
    }
    /// <p>A list of all of the currently assigned <code>SecretVersionStage</code> staging labels and the <code>SecretVersionId</code> attached to each one. Staging labels are used to keep track of the different versions during the rotation process.</p><note>
    /// <p>A version that does not have any <code>SecretVersionStage</code> is considered deprecated and subject to deletion. Such versions are not included in this list.</p>
    /// </note>
    pub fn get_secret_versions_to_stages(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        &self.secret_versions_to_stages
    }
    /// <p>Returns the name of the service that created the secret.</p>
    pub fn owning_service(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owning_service = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Returns the name of the service that created the secret.</p>
    pub fn set_owning_service(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owning_service = input;
        self
    }
    /// <p>Returns the name of the service that created the secret.</p>
    pub fn get_owning_service(&self) -> &::std::option::Option<::std::string::String> {
        &self.owning_service
    }
    /// <p>The date and time when a secret was created.</p>
    pub fn created_date(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_date = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time when a secret was created.</p>
    pub fn set_created_date(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_date = input;
        self
    }
    /// <p>The date and time when a secret was created.</p>
    pub fn get_created_date(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_date
    }
    /// <p>The Region where Secrets Manager originated the secret.</p>
    pub fn primary_region(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.primary_region = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Region where Secrets Manager originated the secret.</p>
    pub fn set_primary_region(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.primary_region = input;
        self
    }
    /// <p>The Region where Secrets Manager originated the secret.</p>
    pub fn get_primary_region(&self) -> &::std::option::Option<::std::string::String> {
        &self.primary_region
    }
    /// Consumes the builder and constructs a [`SecretListEntry`](crate::types::SecretListEntry).
    pub fn build(self) -> crate::types::SecretListEntry {
        crate::types::SecretListEntry {
            arn: self.arn,
            name: self.name,
            description: self.description,
            kms_key_id: self.kms_key_id,
            rotation_enabled: self.rotation_enabled,
            rotation_lambda_arn: self.rotation_lambda_arn,
            rotation_rules: self.rotation_rules,
            last_rotated_date: self.last_rotated_date,
            last_changed_date: self.last_changed_date,
            last_accessed_date: self.last_accessed_date,
            deleted_date: self.deleted_date,
            next_rotation_date: self.next_rotation_date,
            tags: self.tags,
            secret_versions_to_stages: self.secret_versions_to_stages,
            owning_service: self.owning_service,
            created_date: self.created_date,
            primary_region: self.primary_region,
        }
    }
}