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
//! Types for the `MWAA` service.

/// The [`AWS::MWAA::Environment`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html) resource type.
#[derive(Debug, Default)]
pub struct Environment {
    properties: EnvironmentProperties
}

/// Properties for the `Environment` resource.
#[derive(Debug, Default)]
pub struct EnvironmentProperties {
    /// Property [`AirflowConfigurationOptions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-airflowconfigurationoptions).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub airflow_configuration_options: Option<::Value<::json::Value>>,
    /// Property [`AirflowVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-airflowversion).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub airflow_version: Option<::Value<String>>,
    /// Property [`DagS3Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-dags3path).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub dag_s3_path: Option<::Value<String>>,
    /// Property [`EnvironmentClass`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-environmentclass).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub environment_class: Option<::Value<String>>,
    /// Property [`ExecutionRoleArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-executionrolearn).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub execution_role_arn: Option<::Value<String>>,
    /// Property [`KmsKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-kmskey).
    ///
    /// Update type: _Immutable_.
    /// AWS CloudFormation replaces the resource when you change this property.
    pub kms_key: Option<::Value<String>>,
    /// Property [`LoggingConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-loggingconfiguration).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub logging_configuration: Option<::Value<self::environment::LoggingConfiguration>>,
    /// Property [`MaxWorkers`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-maxworkers).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub max_workers: Option<::Value<u32>>,
    /// Property [`MinWorkers`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-minworkers).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub min_workers: Option<::Value<u32>>,
    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-name).
    ///
    /// Update type: _Immutable_.
    /// AWS CloudFormation replaces the resource when you change this property.
    pub name: ::Value<String>,
    /// Property [`NetworkConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-networkconfiguration).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub network_configuration: Option<::Value<self::environment::NetworkConfiguration>>,
    /// Property [`PluginsS3ObjectVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-pluginss3objectversion).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub plugins_s3_object_version: Option<::Value<String>>,
    /// Property [`PluginsS3Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-pluginss3path).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub plugins_s3_path: Option<::Value<String>>,
    /// Property [`RequirementsS3ObjectVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-requirementss3objectversion).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub requirements_s3_object_version: Option<::Value<String>>,
    /// Property [`RequirementsS3Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-requirementss3path).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub requirements_s3_path: Option<::Value<String>>,
    /// Property [`Schedulers`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-schedulers).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub schedulers: Option<::Value<u32>>,
    /// Property [`SourceBucketArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-sourcebucketarn).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub source_bucket_arn: Option<::Value<String>>,
    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-tags).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub tags: Option<::Value<self::environment::TagMap>>,
    /// Property [`WebserverAccessMode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-webserveraccessmode).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub webserver_access_mode: Option<::Value<String>>,
    /// Property [`WeeklyMaintenanceWindowStart`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-mwaa-environment.html#cfn-mwaa-environment-weeklymaintenancewindowstart).
    ///
    /// Update type: _Mutable_.
    /// AWS CloudFormation doesn't replace the resource when you change this property.
    pub weekly_maintenance_window_start: Option<::Value<String>>,
}

impl ::serde::Serialize for EnvironmentProperties {
    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 airflow_configuration_options) = self.airflow_configuration_options {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AirflowConfigurationOptions", airflow_configuration_options)?;
        }
        if let Some(ref airflow_version) = self.airflow_version {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AirflowVersion", airflow_version)?;
        }
        if let Some(ref dag_s3_path) = self.dag_s3_path {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DagS3Path", dag_s3_path)?;
        }
        if let Some(ref environment_class) = self.environment_class {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnvironmentClass", environment_class)?;
        }
        if let Some(ref execution_role_arn) = self.execution_role_arn {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ExecutionRoleArn", execution_role_arn)?;
        }
        if let Some(ref kms_key) = self.kms_key {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "KmsKey", kms_key)?;
        }
        if let Some(ref logging_configuration) = self.logging_configuration {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LoggingConfiguration", logging_configuration)?;
        }
        if let Some(ref max_workers) = self.max_workers {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaxWorkers", max_workers)?;
        }
        if let Some(ref min_workers) = self.min_workers {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "MinWorkers", min_workers)?;
        }
        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
        if let Some(ref network_configuration) = self.network_configuration {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "NetworkConfiguration", network_configuration)?;
        }
        if let Some(ref plugins_s3_object_version) = self.plugins_s3_object_version {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PluginsS3ObjectVersion", plugins_s3_object_version)?;
        }
        if let Some(ref plugins_s3_path) = self.plugins_s3_path {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PluginsS3Path", plugins_s3_path)?;
        }
        if let Some(ref requirements_s3_object_version) = self.requirements_s3_object_version {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "RequirementsS3ObjectVersion", requirements_s3_object_version)?;
        }
        if let Some(ref requirements_s3_path) = self.requirements_s3_path {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "RequirementsS3Path", requirements_s3_path)?;
        }
        if let Some(ref schedulers) = self.schedulers {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Schedulers", schedulers)?;
        }
        if let Some(ref source_bucket_arn) = self.source_bucket_arn {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SourceBucketArn", source_bucket_arn)?;
        }
        if let Some(ref tags) = self.tags {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
        }
        if let Some(ref webserver_access_mode) = self.webserver_access_mode {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "WebserverAccessMode", webserver_access_mode)?;
        }
        if let Some(ref weekly_maintenance_window_start) = self.weekly_maintenance_window_start {
            ::serde::ser::SerializeMap::serialize_entry(&mut map, "WeeklyMaintenanceWindowStart", weekly_maintenance_window_start)?;
        }
        ::serde::ser::SerializeMap::end(map)
    }
}

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

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

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

            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                let mut airflow_configuration_options: Option<::Value<::json::Value>> = None;
                let mut airflow_version: Option<::Value<String>> = None;
                let mut dag_s3_path: Option<::Value<String>> = None;
                let mut environment_class: Option<::Value<String>> = None;
                let mut execution_role_arn: Option<::Value<String>> = None;
                let mut kms_key: Option<::Value<String>> = None;
                let mut logging_configuration: Option<::Value<self::environment::LoggingConfiguration>> = None;
                let mut max_workers: Option<::Value<u32>> = None;
                let mut min_workers: Option<::Value<u32>> = None;
                let mut name: Option<::Value<String>> = None;
                let mut network_configuration: Option<::Value<self::environment::NetworkConfiguration>> = None;
                let mut plugins_s3_object_version: Option<::Value<String>> = None;
                let mut plugins_s3_path: Option<::Value<String>> = None;
                let mut requirements_s3_object_version: Option<::Value<String>> = None;
                let mut requirements_s3_path: Option<::Value<String>> = None;
                let mut schedulers: Option<::Value<u32>> = None;
                let mut source_bucket_arn: Option<::Value<String>> = None;
                let mut tags: Option<::Value<self::environment::TagMap>> = None;
                let mut webserver_access_mode: Option<::Value<String>> = None;
                let mut weekly_maintenance_window_start: Option<::Value<String>> = None;

                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                    match __cfn_key.as_ref() {
                        "AirflowConfigurationOptions" => {
                            airflow_configuration_options = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "AirflowVersion" => {
                            airflow_version = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "DagS3Path" => {
                            dag_s3_path = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "EnvironmentClass" => {
                            environment_class = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "ExecutionRoleArn" => {
                            execution_role_arn = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "KmsKey" => {
                            kms_key = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "LoggingConfiguration" => {
                            logging_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "MaxWorkers" => {
                            max_workers = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "MinWorkers" => {
                            min_workers = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "Name" => {
                            name = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "NetworkConfiguration" => {
                            network_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "PluginsS3ObjectVersion" => {
                            plugins_s3_object_version = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "PluginsS3Path" => {
                            plugins_s3_path = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "RequirementsS3ObjectVersion" => {
                            requirements_s3_object_version = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "RequirementsS3Path" => {
                            requirements_s3_path = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "Schedulers" => {
                            schedulers = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "SourceBucketArn" => {
                            source_bucket_arn = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "Tags" => {
                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "WebserverAccessMode" => {
                            webserver_access_mode = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        "WeeklyMaintenanceWindowStart" => {
                            weekly_maintenance_window_start = ::serde::de::MapAccess::next_value(&mut map)?;
                        }
                        _ => {}
                    }
                }

                Ok(EnvironmentProperties {
                    airflow_configuration_options: airflow_configuration_options,
                    airflow_version: airflow_version,
                    dag_s3_path: dag_s3_path,
                    environment_class: environment_class,
                    execution_role_arn: execution_role_arn,
                    kms_key: kms_key,
                    logging_configuration: logging_configuration,
                    max_workers: max_workers,
                    min_workers: min_workers,
                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
                    network_configuration: network_configuration,
                    plugins_s3_object_version: plugins_s3_object_version,
                    plugins_s3_path: plugins_s3_path,
                    requirements_s3_object_version: requirements_s3_object_version,
                    requirements_s3_path: requirements_s3_path,
                    schedulers: schedulers,
                    source_bucket_arn: source_bucket_arn,
                    tags: tags,
                    webserver_access_mode: webserver_access_mode,
                    weekly_maintenance_window_start: weekly_maintenance_window_start,
                })
            }
        }

        d.deserialize_map(Visitor)
    }
}

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

impl ::private::Sealed for Environment {}

impl From<EnvironmentProperties> for Environment {
    fn from(properties: EnvironmentProperties) -> Environment {
        Environment { properties }
    }
}

pub mod environment {
    //! Property types for the `Environment` resource.

    /// The [`AWS::MWAA::Environment.LoggingConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html) property type.
    #[derive(Debug, Default)]
    pub struct LoggingConfiguration {
        /// Property [`DagProcessingLogs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-dagprocessinglogs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub dag_processing_logs: Option<::Value<ModuleLoggingConfiguration>>,
        /// Property [`SchedulerLogs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-schedulerlogs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub scheduler_logs: Option<::Value<ModuleLoggingConfiguration>>,
        /// Property [`TaskLogs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-tasklogs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub task_logs: Option<::Value<ModuleLoggingConfiguration>>,
        /// Property [`WebserverLogs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-webserverlogs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub webserver_logs: Option<::Value<ModuleLoggingConfiguration>>,
        /// Property [`WorkerLogs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-loggingconfiguration.html#cfn-mwaa-environment-loggingconfiguration-workerlogs).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub worker_logs: Option<::Value<ModuleLoggingConfiguration>>,
    }

    impl ::codec::SerializeValue for LoggingConfiguration {
        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 dag_processing_logs) = self.dag_processing_logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DagProcessingLogs", dag_processing_logs)?;
            }
            if let Some(ref scheduler_logs) = self.scheduler_logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SchedulerLogs", scheduler_logs)?;
            }
            if let Some(ref task_logs) = self.task_logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TaskLogs", task_logs)?;
            }
            if let Some(ref webserver_logs) = self.webserver_logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WebserverLogs", webserver_logs)?;
            }
            if let Some(ref worker_logs) = self.worker_logs {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WorkerLogs", worker_logs)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

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

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

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

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
                    let mut dag_processing_logs: Option<::Value<ModuleLoggingConfiguration>> = None;
                    let mut scheduler_logs: Option<::Value<ModuleLoggingConfiguration>> = None;
                    let mut task_logs: Option<::Value<ModuleLoggingConfiguration>> = None;
                    let mut webserver_logs: Option<::Value<ModuleLoggingConfiguration>> = None;
                    let mut worker_logs: Option<::Value<ModuleLoggingConfiguration>> = None;

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "DagProcessingLogs" => {
                                dag_processing_logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "SchedulerLogs" => {
                                scheduler_logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "TaskLogs" => {
                                task_logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "WebserverLogs" => {
                                webserver_logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "WorkerLogs" => {
                                worker_logs = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(LoggingConfiguration {
                        dag_processing_logs: dag_processing_logs,
                        scheduler_logs: scheduler_logs,
                        task_logs: task_logs,
                        webserver_logs: webserver_logs,
                        worker_logs: worker_logs,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::MWAA::Environment.ModuleLoggingConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html) property type.
    #[derive(Debug, Default)]
    pub struct ModuleLoggingConfiguration {
        /// Property [`CloudWatchLogGroupArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-cloudwatchloggrouparn).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub cloud_watch_log_group_arn: Option<::Value<String>>,
        /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-enabled).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub enabled: Option<::Value<bool>>,
        /// Property [`LogLevel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-moduleloggingconfiguration.html#cfn-mwaa-environment-moduleloggingconfiguration-loglevel).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub log_level: Option<::Value<String>>,
    }

    impl ::codec::SerializeValue for ModuleLoggingConfiguration {
        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 cloud_watch_log_group_arn) = self.cloud_watch_log_group_arn {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CloudWatchLogGroupArn", cloud_watch_log_group_arn)?;
            }
            if let Some(ref enabled) = self.enabled {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
            }
            if let Some(ref log_level) = self.log_level {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LogLevel", log_level)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

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

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

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

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

                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
                        match __cfn_key.as_ref() {
                            "CloudWatchLogGroupArn" => {
                                cloud_watch_log_group_arn = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "Enabled" => {
                                enabled = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            "LogLevel" => {
                                log_level = ::serde::de::MapAccess::next_value(&mut map)?;
                            }
                            _ => {}
                        }
                    }

                    Ok(ModuleLoggingConfiguration {
                        cloud_watch_log_group_arn: cloud_watch_log_group_arn,
                        enabled: enabled,
                        log_level: log_level,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::MWAA::Environment.NetworkConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html) property type.
    #[derive(Debug, Default)]
    pub struct NetworkConfiguration {
        /// Property [`SecurityGroupIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-securitygroupids).
        ///
        /// Update type: _Mutable_.
        /// AWS CloudFormation doesn't replace the resource when you change this property.
        pub security_group_ids: Option<::ValueList<String>>,
        /// Property [`SubnetIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-networkconfiguration.html#cfn-mwaa-environment-networkconfiguration-subnetids).
        ///
        /// Update type: _Immutable_.
        /// AWS CloudFormation replaces the resource when you change this property.
        pub subnet_ids: Option<::ValueList<String>>,
    }

    impl ::codec::SerializeValue for NetworkConfiguration {
        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 security_group_ids) = self.security_group_ids {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityGroupIds", security_group_ids)?;
            }
            if let Some(ref subnet_ids) = self.subnet_ids {
                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetIds", subnet_ids)?;
            }
            ::serde::ser::SerializeMap::end(map)
        }
    }

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

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

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

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

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

                    Ok(NetworkConfiguration {
                        security_group_ids: security_group_ids,
                        subnet_ids: subnet_ids,
                    })
                }
            }

            d.deserialize_map(Visitor)
        }
    }

    /// The [`AWS::MWAA::Environment.TagMap`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-mwaa-environment-tagmap.html) property type.
    #[derive(Debug, Default)]
    pub struct TagMap {
    }

    impl ::codec::SerializeValue for TagMap {
        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
            let map = ::serde::Serializer::serialize_map(s, None)?;
            ::serde::ser::SerializeMap::end(map)
        }
    }

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

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

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

                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, _map: A) -> Result<Self::Value, A::Error> {
                    Ok(TagMap {})
                }
            }

            d.deserialize_map(Visitor)
        }
    }
}