cfn 0.0.8

Type-safe representations for AWS CloudFormation templates, resources and properties
Documentation
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
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
//! Types for the `ApplicationInsights` service.

/// The [`AWS::ApplicationInsights::Application`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html) resource type.
#[derive(Debug, Default)]
pub struct Application {
    properties: ApplicationProperties
}

/// Properties for the `Application` resource.
#[derive(Debug, Default)]
pub struct ApplicationProperties {
    /// Property [`AutoConfigurationEnabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-autoconfigurationenabled).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub auto_configuration_enabled: Option<::Value<bool>>,
    /// Property [`CWEMonitorEnabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-cwemonitorenabled).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub cwe_monitor_enabled: Option<::Value<bool>>,
    /// Property [`ComponentMonitoringSettings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-componentmonitoringsettings).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub component_monitoring_settings: Option<::ValueList<self::application::ComponentMonitoringSetting>>,
    /// Property [`CustomComponents`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-customcomponents).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub custom_components: Option<::ValueList<self::application::CustomComponent>>,
    /// Property [`LogPatternSets`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-logpatternsets).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub log_pattern_sets: Option<::ValueList<self::application::LogPatternSet>>,
    /// Property [`OpsCenterEnabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-opscenterenabled).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub ops_center_enabled: Option<::Value<bool>>,
    /// Property [`OpsItemSNSTopicArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-opsitemsnstopicarn).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub ops_item_sns_topic_arn: Option<::Value<String>>,
    /// Property [`ResourceGroupName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-resourcegroupname).
    ///
    /// Update type: _Immutable_.
    /// AWS CloudFormation replaces the resource when you change this property.
    pub resource_group_name: ::Value<String>,
    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationinsights-application.html#cfn-applicationinsights-application-tags).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub tags: Option<::ValueList<::Tag>>,
}

impl ::serde::Serialize for ApplicationProperties {
    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 auto_configuration_enabled) = self.auto_configuration_enabled {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoConfigurationEnabled", auto_configuration_enabled)?;
        }
        if let Some(ref cwe_monitor_enabled) = self.cwe_monitor_enabled {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CWEMonitorEnabled", cwe_monitor_enabled)?;
        }
        if let Some(ref component_monitoring_settings) = self.component_monitoring_settings {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentMonitoringSettings", component_monitoring_settings)?;
        }
        if let Some(ref custom_components) = self.custom_components {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CustomComponents", custom_components)?;
        }
        if let Some(ref log_pattern_sets) = self.log_pattern_sets {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogPatternSets", log_pattern_sets)?;
        }
        if let Some(ref ops_center_enabled) = self.ops_center_enabled {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "OpsCenterEnabled", ops_center_enabled)?;
        }
        if let Some(ref ops_item_sns_topic_arn) = self.ops_item_sns_topic_arn {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "OpsItemSNSTopicArn", ops_item_sns_topic_arn)?;
        }
        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ResourceGroupName", &self.resource_group_name)?;
        if let Some(ref tags) = self.tags {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
        }
        ::serde::ser::SerializeMap::end(map)
    }
}

impl<'de> ::serde::Deserialize<'de> for ApplicationProperties {
    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ApplicationProperties, D::Error> {
        struct Visitor;

        impl<'de> ::serde::de::Visitor<'de> for Visitor {
            type Value = ApplicationProperties;

            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                write!(f, "a struct of type ApplicationProperties")
            }

            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                let mut auto_configuration_enabled: Option<::Value<bool>> = None;
                let mut cwe_monitor_enabled: Option<::Value<bool>> = None;
                let mut component_monitoring_settings: Option<::ValueList<self::application::ComponentMonitoringSetting>> = None;
                let mut custom_components: Option<::ValueList<self::application::CustomComponent>> = None;
                let mut log_pattern_sets: Option<::ValueList<self::application::LogPatternSet>> = None;
                let mut ops_center_enabled: Option<::Value<bool>> = None;
                let mut ops_item_sns_topic_arn: Option<::Value<String>> = None;
                let mut resource_group_name: Option<::Value<String>> = None;
                let mut tags: Option<::ValueList<::Tag>> = None;

                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                    match __cfn_key.as_ref() {
                        "AutoConfigurationEnabled" => {
                            auto_configuration_enabled = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "CWEMonitorEnabled" => {
                            cwe_monitor_enabled = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "ComponentMonitoringSettings" => {
                            component_monitoring_settings = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "CustomComponents" => {
                            custom_components = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "LogPatternSets" => {
                            log_pattern_sets = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "OpsCenterEnabled" => {
                            ops_center_enabled = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "OpsItemSNSTopicArn" => {
                            ops_item_sns_topic_arn = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "ResourceGroupName" => {
                            resource_group_name = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "Tags" => {
                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        _ => {}
                    }
                }

                Ok(ApplicationProperties {
                    auto_configuration_enabled: auto_configuration_enabled,
                    cwe_monitor_enabled: cwe_monitor_enabled,
                    component_monitoring_settings: component_monitoring_settings,
                    custom_components: custom_components,
                    log_pattern_sets: log_pattern_sets,
                    ops_center_enabled: ops_center_enabled,
                    ops_item_sns_topic_arn: ops_item_sns_topic_arn,
                    resource_group_name: resource_group_name.ok_or(::serde::de::Error::missing_field("ResourceGroupName"))?,
                    tags: tags,
                })
            }
        }

        d.deserialize_map(Visitor)
    }
}

impl ::Resource for Application {
    type Properties = ApplicationProperties;
    const TYPE: &'static str = "AWS::ApplicationInsights::Application";
    fn properties(&self) -> &ApplicationProperties {
        &self.properties
    }
    fn properties_mut(&mut self) -> &mut ApplicationProperties {
        &mut self.properties
    }
}

impl ::private::Sealed for Application {}

impl From<ApplicationProperties> for Application {
    fn from(properties: ApplicationProperties) -> Application {
        Application { properties }
    }
}

pub mod application {
    //! Property types for the `Application` resource.

    /// The [`AWS::ApplicationInsights::Application.Alarm`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html) property type.
    #[derive(Debug, Default)]
    pub struct Alarm {
        /// Property [`AlarmName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html#cfn-applicationinsights-application-alarm-alarmname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub alarm_name: ::Value<String>,
        /// Property [`Severity`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html#cfn-applicationinsights-application-alarm-severity).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub severity: Option<::Value<String>>,
    }

    impl ::codec::SerializeValue for Alarm {
        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, "AlarmName", &self.alarm_name)?;
            if let Some(ref severity) = self.severity {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Severity", severity)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for Alarm {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Alarm, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = Alarm;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type Alarm")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut alarm_name: Option<::Value<String>> = None;
                    let mut severity: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "AlarmName" => {
                                alarm_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Severity" => {
                                severity = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(Alarm {
                        alarm_name: alarm_name.ok_or(::serde::de::Error::missing_field("AlarmName"))?,
                        severity: severity,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.AlarmMetric`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarmmetric.html) property type.
    #[derive(Debug, Default)]
    pub struct AlarmMetric {
        /// Property [`AlarmMetricName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarmmetric.html#cfn-applicationinsights-application-alarmmetric-alarmmetricname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub alarm_metric_name: ::Value<String>,
    }

    impl ::codec::SerializeValue for AlarmMetric {
        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, "AlarmMetricName", &self.alarm_metric_name)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for AlarmMetric {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AlarmMetric, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = AlarmMetric;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type AlarmMetric")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut alarm_metric_name: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "AlarmMetricName" => {
                                alarm_metric_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(AlarmMetric {
                        alarm_metric_name: alarm_metric_name.ok_or(::serde::de::Error::missing_field("AlarmMetricName"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.ComponentConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html) property type.
    #[derive(Debug, Default)]
    pub struct ComponentConfiguration {
        /// Property [`ConfigurationDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html#cfn-applicationinsights-application-componentconfiguration-configurationdetails).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub configuration_details: Option<::Value<ConfigurationDetails>>,
        /// Property [`SubComponentTypeConfigurations`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentconfiguration.html#cfn-applicationinsights-application-componentconfiguration-subcomponenttypeconfigurations).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub sub_component_type_configurations: Option<::ValueList<SubComponentTypeConfiguration>>,
    }

    impl ::codec::SerializeValue for ComponentConfiguration {
        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 configuration_details) = self.configuration_details {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ConfigurationDetails", configuration_details)?;
            }
            if let Some(ref sub_component_type_configurations) = self.sub_component_type_configurations {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubComponentTypeConfigurations", sub_component_type_configurations)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for ComponentConfiguration {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ComponentConfiguration, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = ComponentConfiguration;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type ComponentConfiguration")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut configuration_details: Option<::Value<ConfigurationDetails>> = None;
                    let mut sub_component_type_configurations: Option<::ValueList<SubComponentTypeConfiguration>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "ConfigurationDetails" => {
                                configuration_details = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "SubComponentTypeConfigurations" => {
                                sub_component_type_configurations = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(ComponentConfiguration {
                        configuration_details: configuration_details,
                        sub_component_type_configurations: sub_component_type_configurations,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.ComponentMonitoringSetting`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html) property type.
    #[derive(Debug, Default)]
    pub struct ComponentMonitoringSetting {
        /// Property [`ComponentARN`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-componentarn).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub component_arn: Option<::Value<String>>,
        /// Property [`ComponentConfigurationMode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-componentconfigurationmode).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub component_configuration_mode: ::Value<String>,
        /// Property [`ComponentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-componentname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub component_name: Option<::Value<String>>,
        /// Property [`CustomComponentConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-customcomponentconfiguration).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub custom_component_configuration: Option<::Value<ComponentConfiguration>>,
        /// Property [`DefaultOverwriteComponentConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-defaultoverwritecomponentconfiguration).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub default_overwrite_component_configuration: Option<::Value<ComponentConfiguration>>,
        /// Property [`Tier`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-componentmonitoringsetting.html#cfn-applicationinsights-application-componentmonitoringsetting-tier).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub tier: ::Value<String>,
    }

    impl ::codec::SerializeValue for ComponentMonitoringSetting {
        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 component_arn) = self.component_arn {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentARN", component_arn)?;
            }
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentConfigurationMode", &self.component_configuration_mode)?;
            if let Some(ref component_name) = self.component_name {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentName", component_name)?;
            }
            if let Some(ref custom_component_configuration) = self.custom_component_configuration {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CustomComponentConfiguration", custom_component_configuration)?;
            }
            if let Some(ref default_overwrite_component_configuration) = self.default_overwrite_component_configuration {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultOverwriteComponentConfiguration", default_overwrite_component_configuration)?;
            }
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tier", &self.tier)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for ComponentMonitoringSetting {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ComponentMonitoringSetting, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = ComponentMonitoringSetting;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type ComponentMonitoringSetting")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut component_arn: Option<::Value<String>> = None;
                    let mut component_configuration_mode: Option<::Value<String>> = None;
                    let mut component_name: Option<::Value<String>> = None;
                    let mut custom_component_configuration: Option<::Value<ComponentConfiguration>> = None;
                    let mut default_overwrite_component_configuration: Option<::Value<ComponentConfiguration>> = None;
                    let mut tier: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "ComponentARN" => {
                                component_arn = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "ComponentConfigurationMode" => {
                                component_configuration_mode = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "ComponentName" => {
                                component_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "CustomComponentConfiguration" => {
                                custom_component_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "DefaultOverwriteComponentConfiguration" => {
                                default_overwrite_component_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Tier" => {
                                tier = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(ComponentMonitoringSetting {
                        component_arn: component_arn,
                        component_configuration_mode: component_configuration_mode.ok_or(::serde::de::Error::missing_field("ComponentConfigurationMode"))?,
                        component_name: component_name,
                        custom_component_configuration: custom_component_configuration,
                        default_overwrite_component_configuration: default_overwrite_component_configuration,
                        tier: tier.ok_or(::serde::de::Error::missing_field("Tier"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.ConfigurationDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html) property type.
    #[derive(Debug, Default)]
    pub struct ConfigurationDetails {
        /// Property [`AlarmMetrics`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html#cfn-applicationinsights-application-configurationdetails-alarmmetrics).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub alarm_metrics: Option<::ValueList<AlarmMetric>>,
        /// Property [`Alarms`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html#cfn-applicationinsights-application-configurationdetails-alarms).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub alarms: Option<::ValueList<Alarm>>,
        /// Property [`JMXPrometheusExporter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html#cfn-applicationinsights-application-configurationdetails-jmxprometheusexporter).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub jmx_prometheus_exporter: Option<::Value<JMXPrometheusExporter>>,
        /// Property [`Logs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html#cfn-applicationinsights-application-configurationdetails-logs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub logs: Option<::ValueList<Log>>,
        /// Property [`WindowsEvents`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-configurationdetails.html#cfn-applicationinsights-application-configurationdetails-windowsevents).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub windows_events: Option<::ValueList<WindowsEvent>>,
    }

    impl ::codec::SerializeValue for ConfigurationDetails {
        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 alarm_metrics) = self.alarm_metrics {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AlarmMetrics", alarm_metrics)?;
            }
            if let Some(ref alarms) = self.alarms {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Alarms", alarms)?;
            }
            if let Some(ref jmx_prometheus_exporter) = self.jmx_prometheus_exporter {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "JMXPrometheusExporter", jmx_prometheus_exporter)?;
            }
            if let Some(ref logs) = self.logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Logs", logs)?;
            }
            if let Some(ref windows_events) = self.windows_events {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WindowsEvents", windows_events)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for ConfigurationDetails {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ConfigurationDetails, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = ConfigurationDetails;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type ConfigurationDetails")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut alarm_metrics: Option<::ValueList<AlarmMetric>> = None;
                    let mut alarms: Option<::ValueList<Alarm>> = None;
                    let mut jmx_prometheus_exporter: Option<::Value<JMXPrometheusExporter>> = None;
                    let mut logs: Option<::ValueList<Log>> = None;
                    let mut windows_events: Option<::ValueList<WindowsEvent>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "AlarmMetrics" => {
                                alarm_metrics = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Alarms" => {
                                alarms = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "JMXPrometheusExporter" => {
                                jmx_prometheus_exporter = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Logs" => {
                                logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "WindowsEvents" => {
                                windows_events = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(ConfigurationDetails {
                        alarm_metrics: alarm_metrics,
                        alarms: alarms,
                        jmx_prometheus_exporter: jmx_prometheus_exporter,
                        logs: logs,
                        windows_events: windows_events,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.CustomComponent`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-customcomponent.html) property type.
    #[derive(Debug, Default)]
    pub struct CustomComponent {
        /// Property [`ComponentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-customcomponent.html#cfn-applicationinsights-application-customcomponent-componentname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub component_name: ::Value<String>,
        /// Property [`ResourceList`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-customcomponent.html#cfn-applicationinsights-application-customcomponent-resourcelist).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub resource_list: ::ValueList<String>,
    }

    impl ::codec::SerializeValue for CustomComponent {
        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, "ComponentName", &self.component_name)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ResourceList", &self.resource_list)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for CustomComponent {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CustomComponent, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = CustomComponent;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type CustomComponent")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut component_name: Option<::Value<String>> = None;
                    let mut resource_list: Option<::ValueList<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "ComponentName" => {
                                component_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "ResourceList" => {
                                resource_list = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(CustomComponent {
                        component_name: component_name.ok_or(::serde::de::Error::missing_field("ComponentName"))?,
                        resource_list: resource_list.ok_or(::serde::de::Error::missing_field("ResourceList"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.JMXPrometheusExporter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-jmxprometheusexporter.html) property type.
    #[derive(Debug, Default)]
    pub struct JMXPrometheusExporter {
        /// Property [`HostPort`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-jmxprometheusexporter.html#cfn-applicationinsights-application-jmxprometheusexporter-hostport).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub host_port: Option<::Value<String>>,
        /// Property [`JMXURL`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-jmxprometheusexporter.html#cfn-applicationinsights-application-jmxprometheusexporter-jmxurl).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub jmxurl: Option<::Value<String>>,
        /// Property [`PrometheusPort`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-jmxprometheusexporter.html#cfn-applicationinsights-application-jmxprometheusexporter-prometheusport).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub prometheus_port: Option<::Value<String>>,
    }

    impl ::codec::SerializeValue for JMXPrometheusExporter {
        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 host_port) = self.host_port {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HostPort", host_port)?;
            }
            if let Some(ref jmxurl) = self.jmxurl {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "JMXURL", jmxurl)?;
            }
            if let Some(ref prometheus_port) = self.prometheus_port {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrometheusPort", prometheus_port)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for JMXPrometheusExporter {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<JMXPrometheusExporter, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = JMXPrometheusExporter;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type JMXPrometheusExporter")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut host_port: Option<::Value<String>> = None;
                    let mut jmxurl: Option<::Value<String>> = None;
                    let mut prometheus_port: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "HostPort" => {
                                host_port = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "JMXURL" => {
                                jmxurl = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "PrometheusPort" => {
                                prometheus_port = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(JMXPrometheusExporter {
                        host_port: host_port,
                        jmxurl: jmxurl,
                        prometheus_port: prometheus_port,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.Log`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html) property type.
    #[derive(Debug, Default)]
    pub struct Log {
        /// Property [`Encoding`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html#cfn-applicationinsights-application-log-encoding).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub encoding: Option<::Value<String>>,
        /// Property [`LogGroupName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html#cfn-applicationinsights-application-log-loggroupname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_group_name: Option<::Value<String>>,
        /// Property [`LogPath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html#cfn-applicationinsights-application-log-logpath).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_path: Option<::Value<String>>,
        /// Property [`LogType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html#cfn-applicationinsights-application-log-logtype).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_type: ::Value<String>,
        /// Property [`PatternSet`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-log.html#cfn-applicationinsights-application-log-patternset).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub pattern_set: Option<::Value<String>>,
    }

    impl ::codec::SerializeValue for Log {
        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 encoding) = self.encoding {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Encoding", encoding)?;
            }
            if let Some(ref log_group_name) = self.log_group_name {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogGroupName", log_group_name)?;
            }
            if let Some(ref log_path) = self.log_path {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogPath", log_path)?;
            }
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogType", &self.log_type)?;
            if let Some(ref pattern_set) = self.pattern_set {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PatternSet", pattern_set)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for Log {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Log, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = Log;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type Log")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut encoding: Option<::Value<String>> = None;
                    let mut log_group_name: Option<::Value<String>> = None;
                    let mut log_path: Option<::Value<String>> = None;
                    let mut log_type: Option<::Value<String>> = None;
                    let mut pattern_set: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "Encoding" => {
                                encoding = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "LogGroupName" => {
                                log_group_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "LogPath" => {
                                log_path = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "LogType" => {
                                log_type = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "PatternSet" => {
                                pattern_set = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(Log {
                        encoding: encoding,
                        log_group_name: log_group_name,
                        log_path: log_path,
                        log_type: log_type.ok_or(::serde::de::Error::missing_field("LogType"))?,
                        pattern_set: pattern_set,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.LogPattern`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpattern.html) property type.
    #[derive(Debug, Default)]
    pub struct LogPattern {
        /// Property [`Pattern`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpattern.html#cfn-applicationinsights-application-logpattern-pattern).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub pattern: ::Value<String>,
        /// Property [`PatternName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpattern.html#cfn-applicationinsights-application-logpattern-patternname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub pattern_name: ::Value<String>,
        /// Property [`Rank`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpattern.html#cfn-applicationinsights-application-logpattern-rank).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub rank: ::Value<u32>,
    }

    impl ::codec::SerializeValue for LogPattern {
        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, "Pattern", &self.pattern)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PatternName", &self.pattern_name)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Rank", &self.rank)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for LogPattern {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LogPattern, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = LogPattern;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type LogPattern")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut pattern: Option<::Value<String>> = None;
                    let mut pattern_name: Option<::Value<String>> = None;
                    let mut rank: Option<::Value<u32>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "Pattern" => {
                                pattern = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "PatternName" => {
                                pattern_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Rank" => {
                                rank = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(LogPattern {
                        pattern: pattern.ok_or(::serde::de::Error::missing_field("Pattern"))?,
                        pattern_name: pattern_name.ok_or(::serde::de::Error::missing_field("PatternName"))?,
                        rank: rank.ok_or(::serde::de::Error::missing_field("Rank"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.LogPatternSet`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpatternset.html) property type.
    #[derive(Debug, Default)]
    pub struct LogPatternSet {
        /// Property [`LogPatterns`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpatternset.html#cfn-applicationinsights-application-logpatternset-logpatterns).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_patterns: ::ValueList<LogPattern>,
        /// Property [`PatternSetName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-logpatternset.html#cfn-applicationinsights-application-logpatternset-patternsetname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub pattern_set_name: ::Value<String>,
    }

    impl ::codec::SerializeValue for LogPatternSet {
        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, "LogPatterns", &self.log_patterns)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PatternSetName", &self.pattern_set_name)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for LogPatternSet {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LogPatternSet, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = LogPatternSet;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type LogPatternSet")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut log_patterns: Option<::ValueList<LogPattern>> = None;
                    let mut pattern_set_name: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "LogPatterns" => {
                                log_patterns = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "PatternSetName" => {
                                pattern_set_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(LogPatternSet {
                        log_patterns: log_patterns.ok_or(::serde::de::Error::missing_field("LogPatterns"))?,
                        pattern_set_name: pattern_set_name.ok_or(::serde::de::Error::missing_field("PatternSetName"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.SubComponentConfigurationDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponentconfigurationdetails.html) property type.
    #[derive(Debug, Default)]
    pub struct SubComponentConfigurationDetails {
        /// Property [`AlarmMetrics`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponentconfigurationdetails.html#cfn-applicationinsights-application-subcomponentconfigurationdetails-alarmmetrics).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub alarm_metrics: Option<::ValueList<AlarmMetric>>,
        /// Property [`Logs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponentconfigurationdetails.html#cfn-applicationinsights-application-subcomponentconfigurationdetails-logs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub logs: Option<::ValueList<Log>>,
        /// Property [`WindowsEvents`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponentconfigurationdetails.html#cfn-applicationinsights-application-subcomponentconfigurationdetails-windowsevents).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub windows_events: Option<::ValueList<WindowsEvent>>,
    }

    impl ::codec::SerializeValue for SubComponentConfigurationDetails {
        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 alarm_metrics) = self.alarm_metrics {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AlarmMetrics", alarm_metrics)?;
            }
            if let Some(ref logs) = self.logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Logs", logs)?;
            }
            if let Some(ref windows_events) = self.windows_events {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WindowsEvents", windows_events)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for SubComponentConfigurationDetails {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SubComponentConfigurationDetails, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = SubComponentConfigurationDetails;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type SubComponentConfigurationDetails")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut alarm_metrics: Option<::ValueList<AlarmMetric>> = None;
                    let mut logs: Option<::ValueList<Log>> = None;
                    let mut windows_events: Option<::ValueList<WindowsEvent>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "AlarmMetrics" => {
                                alarm_metrics = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Logs" => {
                                logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "WindowsEvents" => {
                                windows_events = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(SubComponentConfigurationDetails {
                        alarm_metrics: alarm_metrics,
                        logs: logs,
                        windows_events: windows_events,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.SubComponentTypeConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponenttypeconfiguration.html) property type.
    #[derive(Debug, Default)]
    pub struct SubComponentTypeConfiguration {
        /// Property [`SubComponentConfigurationDetails`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponenttypeconfiguration.html#cfn-applicationinsights-application-subcomponenttypeconfiguration-subcomponentconfigurationdetails).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub sub_component_configuration_details: ::Value<SubComponentConfigurationDetails>,
        /// Property [`SubComponentType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-subcomponenttypeconfiguration.html#cfn-applicationinsights-application-subcomponenttypeconfiguration-subcomponenttype).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub sub_component_type: ::Value<String>,
    }

    impl ::codec::SerializeValue for SubComponentTypeConfiguration {
        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, "SubComponentConfigurationDetails", &self.sub_component_configuration_details)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubComponentType", &self.sub_component_type)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for SubComponentTypeConfiguration {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SubComponentTypeConfiguration, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = SubComponentTypeConfiguration;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type SubComponentTypeConfiguration")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut sub_component_configuration_details: Option<::Value<SubComponentConfigurationDetails>> = None;
                    let mut sub_component_type: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "SubComponentConfigurationDetails" => {
                                sub_component_configuration_details = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "SubComponentType" => {
                                sub_component_type = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(SubComponentTypeConfiguration {
                        sub_component_configuration_details: sub_component_configuration_details.ok_or(::serde::de::Error::missing_field("SubComponentConfigurationDetails"))?,
                        sub_component_type: sub_component_type.ok_or(::serde::de::Error::missing_field("SubComponentType"))?,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::ApplicationInsights::Application.WindowsEvent`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-windowsevent.html) property type.
    #[derive(Debug, Default)]
    pub struct WindowsEvent {
        /// Property [`EventLevels`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-windowsevent.html#cfn-applicationinsights-application-windowsevent-eventlevels).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub event_levels: ::ValueList<String>,
        /// Property [`EventName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-windowsevent.html#cfn-applicationinsights-application-windowsevent-eventname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub event_name: ::Value<String>,
        /// Property [`LogGroupName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-windowsevent.html#cfn-applicationinsights-application-windowsevent-loggroupname).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_group_name: ::Value<String>,
        /// Property [`PatternSet`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-windowsevent.html#cfn-applicationinsights-application-windowsevent-patternset).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub pattern_set: Option<::Value<String>>,
    }

    impl ::codec::SerializeValue for WindowsEvent {
        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, "EventLevels", &self.event_levels)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EventName", &self.event_name)?;
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogGroupName", &self.log_group_name)?;
            if let Some(ref pattern_set) = self.pattern_set {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PatternSet", pattern_set)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

    impl ::codec::DeserializeValue for WindowsEvent {
        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<WindowsEvent, D::Error> {
            struct Visitor;

            impl<'de> ::serde::de::Visitor<'de> for Visitor {
                type Value = WindowsEvent;

                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
                    write!(f, "a struct of type WindowsEvent")
                }

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut event_levels: Option<::ValueList<String>> = None;
                    let mut event_name: Option<::Value<String>> = None;
                    let mut log_group_name: Option<::Value<String>> = None;
                    let mut pattern_set: Option<::Value<String>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "EventLevels" => {
                                event_levels = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "EventName" => {
                                event_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "LogGroupName" => {
                                log_group_name = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "PatternSet" => {
                                pattern_set = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(WindowsEvent {
                        event_levels: event_levels.ok_or(::serde::de::Error::missing_field("EventLevels"))?,
                        event_name: event_name.ok_or(::serde::de::Error::missing_field("EventName"))?,
                        log_group_name: log_group_name.ok_or(::serde::de::Error::missing_field("LogGroupName"))?,
                        pattern_set: pattern_set,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }
}