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
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DbInstanceAutomatedBackup {
#[doc(hidden)]
pub db_instance_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub dbi_resource_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub region: std::option::Option<std::string::String>,
#[doc(hidden)]
pub db_instance_identifier: std::option::Option<std::string::String>,
#[doc(hidden)]
pub restore_window: std::option::Option<crate::types::RestoreWindow>,
#[doc(hidden)]
pub allocated_storage: i32,
#[doc(hidden)]
pub status: std::option::Option<std::string::String>,
#[doc(hidden)]
pub port: i32,
#[doc(hidden)]
pub availability_zone: std::option::Option<std::string::String>,
#[doc(hidden)]
pub vpc_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub instance_create_time: std::option::Option<aws_smithy_types::DateTime>,
#[doc(hidden)]
pub master_username: std::option::Option<std::string::String>,
#[doc(hidden)]
pub engine: std::option::Option<std::string::String>,
#[doc(hidden)]
pub engine_version: std::option::Option<std::string::String>,
#[doc(hidden)]
pub license_model: std::option::Option<std::string::String>,
#[doc(hidden)]
pub iops: std::option::Option<i32>,
#[doc(hidden)]
pub option_group_name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub tde_credential_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub encrypted: bool,
#[doc(hidden)]
pub storage_type: std::option::Option<std::string::String>,
#[doc(hidden)]
pub kms_key_id: std::option::Option<std::string::String>,
#[doc(hidden)]
pub timezone: std::option::Option<std::string::String>,
#[doc(hidden)]
pub iam_database_authentication_enabled: bool,
#[doc(hidden)]
pub backup_retention_period: std::option::Option<i32>,
#[doc(hidden)]
pub db_instance_automated_backups_arn: std::option::Option<std::string::String>,
#[doc(hidden)]
pub db_instance_automated_backups_replications:
std::option::Option<std::vec::Vec<crate::types::DbInstanceAutomatedBackupsReplication>>,
#[doc(hidden)]
pub backup_target: std::option::Option<std::string::String>,
#[doc(hidden)]
pub storage_throughput: std::option::Option<i32>,
}
impl DbInstanceAutomatedBackup {
pub fn db_instance_arn(&self) -> std::option::Option<&str> {
self.db_instance_arn.as_deref()
}
pub fn dbi_resource_id(&self) -> std::option::Option<&str> {
self.dbi_resource_id.as_deref()
}
pub fn region(&self) -> std::option::Option<&str> {
self.region.as_deref()
}
pub fn db_instance_identifier(&self) -> std::option::Option<&str> {
self.db_instance_identifier.as_deref()
}
pub fn restore_window(&self) -> std::option::Option<&crate::types::RestoreWindow> {
self.restore_window.as_ref()
}
pub fn allocated_storage(&self) -> i32 {
self.allocated_storage
}
pub fn status(&self) -> std::option::Option<&str> {
self.status.as_deref()
}
pub fn port(&self) -> i32 {
self.port
}
pub fn availability_zone(&self) -> std::option::Option<&str> {
self.availability_zone.as_deref()
}
pub fn vpc_id(&self) -> std::option::Option<&str> {
self.vpc_id.as_deref()
}
pub fn instance_create_time(&self) -> std::option::Option<&aws_smithy_types::DateTime> {
self.instance_create_time.as_ref()
}
pub fn master_username(&self) -> std::option::Option<&str> {
self.master_username.as_deref()
}
pub fn engine(&self) -> std::option::Option<&str> {
self.engine.as_deref()
}
pub fn engine_version(&self) -> std::option::Option<&str> {
self.engine_version.as_deref()
}
pub fn license_model(&self) -> std::option::Option<&str> {
self.license_model.as_deref()
}
pub fn iops(&self) -> std::option::Option<i32> {
self.iops
}
pub fn option_group_name(&self) -> std::option::Option<&str> {
self.option_group_name.as_deref()
}
pub fn tde_credential_arn(&self) -> std::option::Option<&str> {
self.tde_credential_arn.as_deref()
}
pub fn encrypted(&self) -> bool {
self.encrypted
}
pub fn storage_type(&self) -> std::option::Option<&str> {
self.storage_type.as_deref()
}
pub fn kms_key_id(&self) -> std::option::Option<&str> {
self.kms_key_id.as_deref()
}
pub fn timezone(&self) -> std::option::Option<&str> {
self.timezone.as_deref()
}
pub fn iam_database_authentication_enabled(&self) -> bool {
self.iam_database_authentication_enabled
}
pub fn backup_retention_period(&self) -> std::option::Option<i32> {
self.backup_retention_period
}
pub fn db_instance_automated_backups_arn(&self) -> std::option::Option<&str> {
self.db_instance_automated_backups_arn.as_deref()
}
pub fn db_instance_automated_backups_replications(
&self,
) -> std::option::Option<&[crate::types::DbInstanceAutomatedBackupsReplication]> {
self.db_instance_automated_backups_replications.as_deref()
}
pub fn backup_target(&self) -> std::option::Option<&str> {
self.backup_target.as_deref()
}
pub fn storage_throughput(&self) -> std::option::Option<i32> {
self.storage_throughput
}
}
impl DbInstanceAutomatedBackup {
pub fn builder() -> crate::types::builders::DbInstanceAutomatedBackupBuilder {
crate::types::builders::DbInstanceAutomatedBackupBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DbInstanceAutomatedBackupBuilder {
pub(crate) db_instance_arn: std::option::Option<std::string::String>,
pub(crate) dbi_resource_id: std::option::Option<std::string::String>,
pub(crate) region: std::option::Option<std::string::String>,
pub(crate) db_instance_identifier: std::option::Option<std::string::String>,
pub(crate) restore_window: std::option::Option<crate::types::RestoreWindow>,
pub(crate) allocated_storage: std::option::Option<i32>,
pub(crate) status: std::option::Option<std::string::String>,
pub(crate) port: std::option::Option<i32>,
pub(crate) availability_zone: std::option::Option<std::string::String>,
pub(crate) vpc_id: std::option::Option<std::string::String>,
pub(crate) instance_create_time: std::option::Option<aws_smithy_types::DateTime>,
pub(crate) master_username: std::option::Option<std::string::String>,
pub(crate) engine: std::option::Option<std::string::String>,
pub(crate) engine_version: std::option::Option<std::string::String>,
pub(crate) license_model: std::option::Option<std::string::String>,
pub(crate) iops: std::option::Option<i32>,
pub(crate) option_group_name: std::option::Option<std::string::String>,
pub(crate) tde_credential_arn: std::option::Option<std::string::String>,
pub(crate) encrypted: std::option::Option<bool>,
pub(crate) storage_type: std::option::Option<std::string::String>,
pub(crate) kms_key_id: std::option::Option<std::string::String>,
pub(crate) timezone: std::option::Option<std::string::String>,
pub(crate) iam_database_authentication_enabled: std::option::Option<bool>,
pub(crate) backup_retention_period: std::option::Option<i32>,
pub(crate) db_instance_automated_backups_arn: std::option::Option<std::string::String>,
pub(crate) db_instance_automated_backups_replications:
std::option::Option<std::vec::Vec<crate::types::DbInstanceAutomatedBackupsReplication>>,
pub(crate) backup_target: std::option::Option<std::string::String>,
pub(crate) storage_throughput: std::option::Option<i32>,
}
impl DbInstanceAutomatedBackupBuilder {
pub fn db_instance_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.db_instance_arn = Some(input.into());
self
}
pub fn set_db_instance_arn(mut self, input: std::option::Option<std::string::String>) -> Self {
self.db_instance_arn = input;
self
}
pub fn dbi_resource_id(mut self, input: impl Into<std::string::String>) -> Self {
self.dbi_resource_id = Some(input.into());
self
}
pub fn set_dbi_resource_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.dbi_resource_id = input;
self
}
pub fn region(mut self, input: impl Into<std::string::String>) -> Self {
self.region = Some(input.into());
self
}
pub fn set_region(mut self, input: std::option::Option<std::string::String>) -> Self {
self.region = input;
self
}
pub fn db_instance_identifier(mut self, input: impl Into<std::string::String>) -> Self {
self.db_instance_identifier = Some(input.into());
self
}
pub fn set_db_instance_identifier(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.db_instance_identifier = input;
self
}
pub fn restore_window(mut self, input: crate::types::RestoreWindow) -> Self {
self.restore_window = Some(input);
self
}
pub fn set_restore_window(
mut self,
input: std::option::Option<crate::types::RestoreWindow>,
) -> Self {
self.restore_window = input;
self
}
pub fn allocated_storage(mut self, input: i32) -> Self {
self.allocated_storage = Some(input);
self
}
pub fn set_allocated_storage(mut self, input: std::option::Option<i32>) -> Self {
self.allocated_storage = input;
self
}
pub fn status(mut self, input: impl Into<std::string::String>) -> Self {
self.status = Some(input.into());
self
}
pub fn set_status(mut self, input: std::option::Option<std::string::String>) -> Self {
self.status = input;
self
}
pub fn port(mut self, input: i32) -> Self {
self.port = Some(input);
self
}
pub fn set_port(mut self, input: std::option::Option<i32>) -> Self {
self.port = input;
self
}
pub fn availability_zone(mut self, input: impl Into<std::string::String>) -> Self {
self.availability_zone = Some(input.into());
self
}
pub fn set_availability_zone(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.availability_zone = input;
self
}
pub fn vpc_id(mut self, input: impl Into<std::string::String>) -> Self {
self.vpc_id = Some(input.into());
self
}
pub fn set_vpc_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.vpc_id = input;
self
}
pub fn instance_create_time(mut self, input: aws_smithy_types::DateTime) -> Self {
self.instance_create_time = Some(input);
self
}
pub fn set_instance_create_time(
mut self,
input: std::option::Option<aws_smithy_types::DateTime>,
) -> Self {
self.instance_create_time = input;
self
}
pub fn master_username(mut self, input: impl Into<std::string::String>) -> Self {
self.master_username = Some(input.into());
self
}
pub fn set_master_username(mut self, input: std::option::Option<std::string::String>) -> Self {
self.master_username = input;
self
}
pub fn engine(mut self, input: impl Into<std::string::String>) -> Self {
self.engine = Some(input.into());
self
}
pub fn set_engine(mut self, input: std::option::Option<std::string::String>) -> Self {
self.engine = input;
self
}
pub fn engine_version(mut self, input: impl Into<std::string::String>) -> Self {
self.engine_version = Some(input.into());
self
}
pub fn set_engine_version(mut self, input: std::option::Option<std::string::String>) -> Self {
self.engine_version = input;
self
}
pub fn license_model(mut self, input: impl Into<std::string::String>) -> Self {
self.license_model = Some(input.into());
self
}
pub fn set_license_model(mut self, input: std::option::Option<std::string::String>) -> Self {
self.license_model = input;
self
}
pub fn iops(mut self, input: i32) -> Self {
self.iops = Some(input);
self
}
pub fn set_iops(mut self, input: std::option::Option<i32>) -> Self {
self.iops = input;
self
}
pub fn option_group_name(mut self, input: impl Into<std::string::String>) -> Self {
self.option_group_name = Some(input.into());
self
}
pub fn set_option_group_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.option_group_name = input;
self
}
pub fn tde_credential_arn(mut self, input: impl Into<std::string::String>) -> Self {
self.tde_credential_arn = Some(input.into());
self
}
pub fn set_tde_credential_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.tde_credential_arn = input;
self
}
pub fn encrypted(mut self, input: bool) -> Self {
self.encrypted = Some(input);
self
}
pub fn set_encrypted(mut self, input: std::option::Option<bool>) -> Self {
self.encrypted = input;
self
}
pub fn storage_type(mut self, input: impl Into<std::string::String>) -> Self {
self.storage_type = Some(input.into());
self
}
pub fn set_storage_type(mut self, input: std::option::Option<std::string::String>) -> Self {
self.storage_type = input;
self
}
pub fn kms_key_id(mut self, input: impl Into<std::string::String>) -> Self {
self.kms_key_id = Some(input.into());
self
}
pub fn set_kms_key_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.kms_key_id = input;
self
}
pub fn timezone(mut self, input: impl Into<std::string::String>) -> Self {
self.timezone = Some(input.into());
self
}
pub fn set_timezone(mut self, input: std::option::Option<std::string::String>) -> Self {
self.timezone = input;
self
}
pub fn iam_database_authentication_enabled(mut self, input: bool) -> Self {
self.iam_database_authentication_enabled = Some(input);
self
}
pub fn set_iam_database_authentication_enabled(
mut self,
input: std::option::Option<bool>,
) -> Self {
self.iam_database_authentication_enabled = input;
self
}
pub fn backup_retention_period(mut self, input: i32) -> Self {
self.backup_retention_period = Some(input);
self
}
pub fn set_backup_retention_period(mut self, input: std::option::Option<i32>) -> Self {
self.backup_retention_period = input;
self
}
pub fn db_instance_automated_backups_arn(
mut self,
input: impl Into<std::string::String>,
) -> Self {
self.db_instance_automated_backups_arn = Some(input.into());
self
}
pub fn set_db_instance_automated_backups_arn(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.db_instance_automated_backups_arn = input;
self
}
pub fn db_instance_automated_backups_replications(
mut self,
input: crate::types::DbInstanceAutomatedBackupsReplication,
) -> Self {
let mut v = self
.db_instance_automated_backups_replications
.unwrap_or_default();
v.push(input);
self.db_instance_automated_backups_replications = Some(v);
self
}
pub fn set_db_instance_automated_backups_replications(
mut self,
input: std::option::Option<
std::vec::Vec<crate::types::DbInstanceAutomatedBackupsReplication>,
>,
) -> Self {
self.db_instance_automated_backups_replications = input;
self
}
pub fn backup_target(mut self, input: impl Into<std::string::String>) -> Self {
self.backup_target = Some(input.into());
self
}
pub fn set_backup_target(mut self, input: std::option::Option<std::string::String>) -> Self {
self.backup_target = input;
self
}
pub fn storage_throughput(mut self, input: i32) -> Self {
self.storage_throughput = Some(input);
self
}
pub fn set_storage_throughput(mut self, input: std::option::Option<i32>) -> Self {
self.storage_throughput = input;
self
}
pub fn build(self) -> crate::types::DbInstanceAutomatedBackup {
crate::types::DbInstanceAutomatedBackup {
db_instance_arn: self.db_instance_arn,
dbi_resource_id: self.dbi_resource_id,
region: self.region,
db_instance_identifier: self.db_instance_identifier,
restore_window: self.restore_window,
allocated_storage: self.allocated_storage.unwrap_or_default(),
status: self.status,
port: self.port.unwrap_or_default(),
availability_zone: self.availability_zone,
vpc_id: self.vpc_id,
instance_create_time: self.instance_create_time,
master_username: self.master_username,
engine: self.engine,
engine_version: self.engine_version,
license_model: self.license_model,
iops: self.iops,
option_group_name: self.option_group_name,
tde_credential_arn: self.tde_credential_arn,
encrypted: self.encrypted.unwrap_or_default(),
storage_type: self.storage_type,
kms_key_id: self.kms_key_id,
timezone: self.timezone,
iam_database_authentication_enabled: self
.iam_database_authentication_enabled
.unwrap_or_default(),
backup_retention_period: self.backup_retention_period,
db_instance_automated_backups_arn: self.db_instance_automated_backups_arn,
db_instance_automated_backups_replications: self
.db_instance_automated_backups_replications,
backup_target: self.backup_target,
storage_throughput: self.storage_throughput,
}
}
}