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
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
//! Types for the `Backup` service.
/// The [`AWS::Backup::BackupPlan`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupplan.html) resource type.
#[derive(Debug, Default)]
pub struct BackupPlan {
properties: BackupPlanProperties
}
/// Properties for the `BackupPlan` resource.
#[derive(Debug, Default)]
pub struct BackupPlanProperties {
/// Property [`BackupPlan`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupplan.html#cfn-backup-backupplan-backupplan).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_plan: ::Value<self::backup_plan::BackupPlanResourceType>,
/// Property [`BackupPlanTags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupplan.html#cfn-backup-backupplan-backupplantags).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_plan_tags: Option<::ValueMap<String>>,
}
impl ::serde::Serialize for BackupPlanProperties {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupPlan", &self.backup_plan)?;
if let Some(ref backup_plan_tags) = self.backup_plan_tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupPlanTags", backup_plan_tags)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl<'de> ::serde::Deserialize<'de> for BackupPlanProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupPlanProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupPlanProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupPlanProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut backup_plan: Option<::Value<self::backup_plan::BackupPlanResourceType>> = None;
let mut backup_plan_tags: Option<::ValueMap<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"BackupPlan" => {
backup_plan = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupPlanTags" => {
backup_plan_tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupPlanProperties {
backup_plan: backup_plan.ok_or(::serde::de::Error::missing_field("BackupPlan"))?,
backup_plan_tags: backup_plan_tags,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for BackupPlan {
type Properties = BackupPlanProperties;
const TYPE: &'static str = "AWS::Backup::BackupPlan";
fn properties(&self) -> &BackupPlanProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut BackupPlanProperties {
&mut self.properties
}
}
impl ::private::Sealed for BackupPlan {}
impl From<BackupPlanProperties> for BackupPlan {
fn from(properties: BackupPlanProperties) -> BackupPlan {
BackupPlan { properties }
}
}
/// The [`AWS::Backup::BackupSelection`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupselection.html) resource type.
#[derive(Debug, Default)]
pub struct BackupSelection {
properties: BackupSelectionProperties
}
/// Properties for the `BackupSelection` resource.
#[derive(Debug, Default)]
pub struct BackupSelectionProperties {
/// Property [`BackupPlanId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupselection.html#cfn-backup-backupselection-backupplanid).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub backup_plan_id: ::Value<String>,
/// Property [`BackupSelection`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupselection.html#cfn-backup-backupselection-backupselection).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub backup_selection: ::Value<self::backup_selection::BackupSelectionResourceType>,
}
impl ::serde::Serialize for BackupSelectionProperties {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupPlanId", &self.backup_plan_id)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupSelection", &self.backup_selection)?;
::serde::ser::SerializeMap::end(map)
}
}
impl<'de> ::serde::Deserialize<'de> for BackupSelectionProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupSelectionProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupSelectionProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupSelectionProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut backup_plan_id: Option<::Value<String>> = None;
let mut backup_selection: Option<::Value<self::backup_selection::BackupSelectionResourceType>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"BackupPlanId" => {
backup_plan_id = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupSelection" => {
backup_selection = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupSelectionProperties {
backup_plan_id: backup_plan_id.ok_or(::serde::de::Error::missing_field("BackupPlanId"))?,
backup_selection: backup_selection.ok_or(::serde::de::Error::missing_field("BackupSelection"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for BackupSelection {
type Properties = BackupSelectionProperties;
const TYPE: &'static str = "AWS::Backup::BackupSelection";
fn properties(&self) -> &BackupSelectionProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut BackupSelectionProperties {
&mut self.properties
}
}
impl ::private::Sealed for BackupSelection {}
impl From<BackupSelectionProperties> for BackupSelection {
fn from(properties: BackupSelectionProperties) -> BackupSelection {
BackupSelection { properties }
}
}
/// The [`AWS::Backup::BackupVault`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html) resource type.
#[derive(Debug, Default)]
pub struct BackupVault {
properties: BackupVaultProperties
}
/// Properties for the `BackupVault` resource.
#[derive(Debug, Default)]
pub struct BackupVaultProperties {
/// Property [`AccessPolicy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-accesspolicy).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub access_policy: Option<::Value<::json::Value>>,
/// Property [`BackupVaultName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-backupvaultname).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub backup_vault_name: ::Value<String>,
/// Property [`BackupVaultTags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-backupvaulttags).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_vault_tags: Option<::ValueMap<String>>,
/// Property [`EncryptionKeyArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-encryptionkeyarn).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub encryption_key_arn: Option<::Value<String>>,
/// Property [`Notifications`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-notifications).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub notifications: Option<::Value<self::backup_vault::NotificationObjectType>>,
}
impl ::serde::Serialize for BackupVaultProperties {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref access_policy) = self.access_policy {
::serde::ser::SerializeMap::serialize_entry(&mut map, "AccessPolicy", access_policy)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupVaultName", &self.backup_vault_name)?;
if let Some(ref backup_vault_tags) = self.backup_vault_tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupVaultTags", backup_vault_tags)?;
}
if let Some(ref encryption_key_arn) = self.encryption_key_arn {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EncryptionKeyArn", encryption_key_arn)?;
}
if let Some(ref notifications) = self.notifications {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Notifications", notifications)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl<'de> ::serde::Deserialize<'de> for BackupVaultProperties {
fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupVaultProperties, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupVaultProperties;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupVaultProperties")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut access_policy: Option<::Value<::json::Value>> = None;
let mut backup_vault_name: Option<::Value<String>> = None;
let mut backup_vault_tags: Option<::ValueMap<String>> = None;
let mut encryption_key_arn: Option<::Value<String>> = None;
let mut notifications: Option<::Value<self::backup_vault::NotificationObjectType>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"AccessPolicy" => {
access_policy = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupVaultName" => {
backup_vault_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupVaultTags" => {
backup_vault_tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EncryptionKeyArn" => {
encryption_key_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Notifications" => {
notifications = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupVaultProperties {
access_policy: access_policy,
backup_vault_name: backup_vault_name.ok_or(::serde::de::Error::missing_field("BackupVaultName"))?,
backup_vault_tags: backup_vault_tags,
encryption_key_arn: encryption_key_arn,
notifications: notifications,
})
}
}
d.deserialize_map(Visitor)
}
}
impl ::Resource for BackupVault {
type Properties = BackupVaultProperties;
const TYPE: &'static str = "AWS::Backup::BackupVault";
fn properties(&self) -> &BackupVaultProperties {
&self.properties
}
fn properties_mut(&mut self) -> &mut BackupVaultProperties {
&mut self.properties
}
}
impl ::private::Sealed for BackupVault {}
impl From<BackupVaultProperties> for BackupVault {
fn from(properties: BackupVaultProperties) -> BackupVault {
BackupVault { properties }
}
}
pub mod backup_plan {
//! Property types for the `BackupPlan` resource.
/// The [`AWS::Backup::BackupPlan.AdvancedBackupSettingResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct AdvancedBackupSettingResourceType {
/// Property [`BackupOptions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html#cfn-backup-backupplan-advancedbackupsettingresourcetype-backupoptions).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_options: ::Value<::json::Value>,
/// Property [`ResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html#cfn-backup-backupplan-advancedbackupsettingresourcetype-resourcetype).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub resource_type: ::Value<String>,
}
impl ::codec::SerializeValue for AdvancedBackupSettingResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupOptions", &self.backup_options)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "ResourceType", &self.resource_type)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for AdvancedBackupSettingResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AdvancedBackupSettingResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = AdvancedBackupSettingResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type AdvancedBackupSettingResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut backup_options: Option<::Value<::json::Value>> = None;
let mut resource_type: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"BackupOptions" => {
backup_options = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ResourceType" => {
resource_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(AdvancedBackupSettingResourceType {
backup_options: backup_options.ok_or(::serde::de::Error::missing_field("BackupOptions"))?,
resource_type: resource_type.ok_or(::serde::de::Error::missing_field("ResourceType"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Backup::BackupPlan.BackupPlanResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct BackupPlanResourceType {
/// Property [`AdvancedBackupSettings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-advancedbackupsettings).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub advanced_backup_settings: Option<::ValueList<AdvancedBackupSettingResourceType>>,
/// Property [`BackupPlanName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-backupplanname).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_plan_name: ::Value<String>,
/// Property [`BackupPlanRule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupplanresourcetype.html#cfn-backup-backupplan-backupplanresourcetype-backupplanrule).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_plan_rule: ::ValueList<BackupRuleResourceType>,
}
impl ::codec::SerializeValue for BackupPlanResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref advanced_backup_settings) = self.advanced_backup_settings {
::serde::ser::SerializeMap::serialize_entry(&mut map, "AdvancedBackupSettings", advanced_backup_settings)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupPlanName", &self.backup_plan_name)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupPlanRule", &self.backup_plan_rule)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for BackupPlanResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupPlanResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupPlanResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupPlanResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut advanced_backup_settings: Option<::ValueList<AdvancedBackupSettingResourceType>> = None;
let mut backup_plan_name: Option<::Value<String>> = None;
let mut backup_plan_rule: Option<::ValueList<BackupRuleResourceType>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"AdvancedBackupSettings" => {
advanced_backup_settings = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupPlanName" => {
backup_plan_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"BackupPlanRule" => {
backup_plan_rule = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupPlanResourceType {
advanced_backup_settings: advanced_backup_settings,
backup_plan_name: backup_plan_name.ok_or(::serde::de::Error::missing_field("BackupPlanName"))?,
backup_plan_rule: backup_plan_rule.ok_or(::serde::de::Error::missing_field("BackupPlanRule"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Backup::BackupPlan.BackupRuleResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct BackupRuleResourceType {
/// Property [`CompletionWindowMinutes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-completionwindowminutes).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub completion_window_minutes: Option<::Value<f64>>,
/// Property [`CopyActions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-copyactions).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub copy_actions: Option<::ValueList<CopyActionResourceType>>,
/// Property [`EnableContinuousBackup`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-enablecontinuousbackup).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub enable_continuous_backup: Option<::Value<bool>>,
/// Property [`Lifecycle`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-lifecycle).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub lifecycle: Option<::Value<LifecycleResourceType>>,
/// Property [`RecoveryPointTags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-recoverypointtags).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub recovery_point_tags: Option<::ValueMap<String>>,
/// Property [`RuleName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-rulename).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub rule_name: ::Value<String>,
/// Property [`ScheduleExpression`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-scheduleexpression).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub schedule_expression: Option<::Value<String>>,
/// Property [`StartWindowMinutes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-startwindowminutes).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub start_window_minutes: Option<::Value<f64>>,
/// Property [`TargetBackupVault`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-backupruleresourcetype.html#cfn-backup-backupplan-backupruleresourcetype-targetbackupvault).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub target_backup_vault: ::Value<String>,
}
impl ::codec::SerializeValue for BackupRuleResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref completion_window_minutes) = self.completion_window_minutes {
::serde::ser::SerializeMap::serialize_entry(&mut map, "CompletionWindowMinutes", completion_window_minutes)?;
}
if let Some(ref copy_actions) = self.copy_actions {
::serde::ser::SerializeMap::serialize_entry(&mut map, "CopyActions", copy_actions)?;
}
if let Some(ref enable_continuous_backup) = self.enable_continuous_backup {
::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableContinuousBackup", enable_continuous_backup)?;
}
if let Some(ref lifecycle) = self.lifecycle {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Lifecycle", lifecycle)?;
}
if let Some(ref recovery_point_tags) = self.recovery_point_tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "RecoveryPointTags", recovery_point_tags)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "RuleName", &self.rule_name)?;
if let Some(ref schedule_expression) = self.schedule_expression {
::serde::ser::SerializeMap::serialize_entry(&mut map, "ScheduleExpression", schedule_expression)?;
}
if let Some(ref start_window_minutes) = self.start_window_minutes {
::serde::ser::SerializeMap::serialize_entry(&mut map, "StartWindowMinutes", start_window_minutes)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetBackupVault", &self.target_backup_vault)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for BackupRuleResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupRuleResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupRuleResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupRuleResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut completion_window_minutes: Option<::Value<f64>> = None;
let mut copy_actions: Option<::ValueList<CopyActionResourceType>> = None;
let mut enable_continuous_backup: Option<::Value<bool>> = None;
let mut lifecycle: Option<::Value<LifecycleResourceType>> = None;
let mut recovery_point_tags: Option<::ValueMap<String>> = None;
let mut rule_name: Option<::Value<String>> = None;
let mut schedule_expression: Option<::Value<String>> = None;
let mut start_window_minutes: Option<::Value<f64>> = None;
let mut target_backup_vault: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"CompletionWindowMinutes" => {
completion_window_minutes = ::serde::de::MapAccess::next_value(&mut map)?;
}
"CopyActions" => {
copy_actions = ::serde::de::MapAccess::next_value(&mut map)?;
}
"EnableContinuousBackup" => {
enable_continuous_backup = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Lifecycle" => {
lifecycle = ::serde::de::MapAccess::next_value(&mut map)?;
}
"RecoveryPointTags" => {
recovery_point_tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
"RuleName" => {
rule_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ScheduleExpression" => {
schedule_expression = ::serde::de::MapAccess::next_value(&mut map)?;
}
"StartWindowMinutes" => {
start_window_minutes = ::serde::de::MapAccess::next_value(&mut map)?;
}
"TargetBackupVault" => {
target_backup_vault = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupRuleResourceType {
completion_window_minutes: completion_window_minutes,
copy_actions: copy_actions,
enable_continuous_backup: enable_continuous_backup,
lifecycle: lifecycle,
recovery_point_tags: recovery_point_tags,
rule_name: rule_name.ok_or(::serde::de::Error::missing_field("RuleName"))?,
schedule_expression: schedule_expression,
start_window_minutes: start_window_minutes,
target_backup_vault: target_backup_vault.ok_or(::serde::de::Error::missing_field("TargetBackupVault"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Backup::BackupPlan.CopyActionResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-copyactionresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct CopyActionResourceType {
/// Property [`DestinationBackupVaultArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-copyactionresourcetype.html#cfn-backup-backupplan-copyactionresourcetype-destinationbackupvaultarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub destination_backup_vault_arn: ::Value<String>,
/// Property [`Lifecycle`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-copyactionresourcetype.html#cfn-backup-backupplan-copyactionresourcetype-lifecycle).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub lifecycle: Option<::Value<LifecycleResourceType>>,
}
impl ::codec::SerializeValue for CopyActionResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "DestinationBackupVaultArn", &self.destination_backup_vault_arn)?;
if let Some(ref lifecycle) = self.lifecycle {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Lifecycle", lifecycle)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for CopyActionResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CopyActionResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = CopyActionResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type CopyActionResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut destination_backup_vault_arn: Option<::Value<String>> = None;
let mut lifecycle: Option<::Value<LifecycleResourceType>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"DestinationBackupVaultArn" => {
destination_backup_vault_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Lifecycle" => {
lifecycle = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(CopyActionResourceType {
destination_backup_vault_arn: destination_backup_vault_arn.ok_or(::serde::de::Error::missing_field("DestinationBackupVaultArn"))?,
lifecycle: lifecycle,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Backup::BackupPlan.LifecycleResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-lifecycleresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct LifecycleResourceType {
/// Property [`DeleteAfterDays`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-lifecycleresourcetype.html#cfn-backup-backupplan-lifecycleresourcetype-deleteafterdays).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub delete_after_days: Option<::Value<f64>>,
/// Property [`MoveToColdStorageAfterDays`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-lifecycleresourcetype.html#cfn-backup-backupplan-lifecycleresourcetype-movetocoldstorageafterdays).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub move_to_cold_storage_after_days: Option<::Value<f64>>,
}
impl ::codec::SerializeValue for LifecycleResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
if let Some(ref delete_after_days) = self.delete_after_days {
::serde::ser::SerializeMap::serialize_entry(&mut map, "DeleteAfterDays", delete_after_days)?;
}
if let Some(ref move_to_cold_storage_after_days) = self.move_to_cold_storage_after_days {
::serde::ser::SerializeMap::serialize_entry(&mut map, "MoveToColdStorageAfterDays", move_to_cold_storage_after_days)?;
}
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for LifecycleResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LifecycleResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = LifecycleResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type LifecycleResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut delete_after_days: Option<::Value<f64>> = None;
let mut move_to_cold_storage_after_days: Option<::Value<f64>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"DeleteAfterDays" => {
delete_after_days = ::serde::de::MapAccess::next_value(&mut map)?;
}
"MoveToColdStorageAfterDays" => {
move_to_cold_storage_after_days = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(LifecycleResourceType {
delete_after_days: delete_after_days,
move_to_cold_storage_after_days: move_to_cold_storage_after_days,
})
}
}
d.deserialize_map(Visitor)
}
}
}
pub mod backup_selection {
//! Property types for the `BackupSelection` resource.
/// The [`AWS::Backup::BackupSelection.BackupSelectionResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct BackupSelectionResourceType {
/// Property [`IamRoleArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-iamrolearn).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub iam_role_arn: ::Value<String>,
/// Property [`ListOfTags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-listoftags).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub list_of_tags: Option<::ValueList<ConditionResourceType>>,
/// Property [`Resources`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-resources).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub resources: Option<::ValueList<String>>,
/// Property [`SelectionName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-backupselectionresourcetype.html#cfn-backup-backupselection-backupselectionresourcetype-selectionname).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub selection_name: ::Value<String>,
}
impl ::codec::SerializeValue for BackupSelectionResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "IamRoleArn", &self.iam_role_arn)?;
if let Some(ref list_of_tags) = self.list_of_tags {
::serde::ser::SerializeMap::serialize_entry(&mut map, "ListOfTags", list_of_tags)?;
}
if let Some(ref resources) = self.resources {
::serde::ser::SerializeMap::serialize_entry(&mut map, "Resources", resources)?;
}
::serde::ser::SerializeMap::serialize_entry(&mut map, "SelectionName", &self.selection_name)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for BackupSelectionResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<BackupSelectionResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = BackupSelectionResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type BackupSelectionResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut iam_role_arn: Option<::Value<String>> = None;
let mut list_of_tags: Option<::ValueList<ConditionResourceType>> = None;
let mut resources: Option<::ValueList<String>> = None;
let mut selection_name: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"IamRoleArn" => {
iam_role_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ListOfTags" => {
list_of_tags = ::serde::de::MapAccess::next_value(&mut map)?;
}
"Resources" => {
resources = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SelectionName" => {
selection_name = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(BackupSelectionResourceType {
iam_role_arn: iam_role_arn.ok_or(::serde::de::Error::missing_field("IamRoleArn"))?,
list_of_tags: list_of_tags,
resources: resources,
selection_name: selection_name.ok_or(::serde::de::Error::missing_field("SelectionName"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
/// The [`AWS::Backup::BackupSelection.ConditionResourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html) property type.
#[derive(Debug, Default)]
pub struct ConditionResourceType {
/// Property [`ConditionKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditionkey).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub condition_key: ::Value<String>,
/// Property [`ConditionType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditiontype).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub condition_type: ::Value<String>,
/// Property [`ConditionValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupselection-conditionresourcetype.html#cfn-backup-backupselection-conditionresourcetype-conditionvalue).
///
/// Update type: _Immutable_.
/// AWS CloudFormation replaces the resource when you change this property.
pub condition_value: ::Value<String>,
}
impl ::codec::SerializeValue for ConditionResourceType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "ConditionKey", &self.condition_key)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "ConditionType", &self.condition_type)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "ConditionValue", &self.condition_value)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for ConditionResourceType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ConditionResourceType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = ConditionResourceType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type ConditionResourceType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut condition_key: Option<::Value<String>> = None;
let mut condition_type: Option<::Value<String>> = None;
let mut condition_value: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"ConditionKey" => {
condition_key = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ConditionType" => {
condition_type = ::serde::de::MapAccess::next_value(&mut map)?;
}
"ConditionValue" => {
condition_value = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(ConditionResourceType {
condition_key: condition_key.ok_or(::serde::de::Error::missing_field("ConditionKey"))?,
condition_type: condition_type.ok_or(::serde::de::Error::missing_field("ConditionType"))?,
condition_value: condition_value.ok_or(::serde::de::Error::missing_field("ConditionValue"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
}
pub mod backup_vault {
//! Property types for the `BackupVault` resource.
/// The [`AWS::Backup::BackupVault.NotificationObjectType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupvault-notificationobjecttype.html) property type.
#[derive(Debug, Default)]
pub struct NotificationObjectType {
/// Property [`BackupVaultEvents`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupvault-notificationobjecttype.html#cfn-backup-backupvault-notificationobjecttype-backupvaultevents).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub backup_vault_events: ::ValueList<String>,
/// Property [`SNSTopicArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupvault-notificationobjecttype.html#cfn-backup-backupvault-notificationobjecttype-snstopicarn).
///
/// Update type: _Mutable_.
/// AWS CloudFormation doesn't replace the resource when you change this property.
pub sns_topic_arn: ::Value<String>,
}
impl ::codec::SerializeValue for NotificationObjectType {
fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
let mut map = ::serde::Serializer::serialize_map(s, None)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupVaultEvents", &self.backup_vault_events)?;
::serde::ser::SerializeMap::serialize_entry(&mut map, "SNSTopicArn", &self.sns_topic_arn)?;
::serde::ser::SerializeMap::end(map)
}
}
impl ::codec::DeserializeValue for NotificationObjectType {
fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<NotificationObjectType, D::Error> {
struct Visitor;
impl<'de> ::serde::de::Visitor<'de> for Visitor {
type Value = NotificationObjectType;
fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "a struct of type NotificationObjectType")
}
fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
let mut backup_vault_events: Option<::ValueList<String>> = None;
let mut sns_topic_arn: Option<::Value<String>> = None;
while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
match __cfn_key.as_ref() {
"BackupVaultEvents" => {
backup_vault_events = ::serde::de::MapAccess::next_value(&mut map)?;
}
"SNSTopicArn" => {
sns_topic_arn = ::serde::de::MapAccess::next_value(&mut map)?;
}
_ => {}
}
}
Ok(NotificationObjectType {
backup_vault_events: backup_vault_events.ok_or(::serde::de::Error::missing_field("BackupVaultEvents"))?,
sns_topic_arn: sns_topic_arn.ok_or(::serde::de::Error::missing_field("SNSTopicArn"))?,
})
}
}
d.deserialize_map(Visitor)
}
}
}