cfn/aws/
fsx.rs

1//! Types for the `FSx` service.
2
3/// The [`AWS::FSx::FileSystem`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html) resource type.
4#[derive(Debug, Default)]
5pub struct FileSystem {
6    properties: FileSystemProperties
7}
8
9/// Properties for the `FileSystem` resource.
10#[derive(Debug, Default)]
11pub struct FileSystemProperties {
12    /// Property [`BackupId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-backupid).
13    ///
14    /// Update type: _Immutable_.
15    /// AWS CloudFormation replaces the resource when you change this property.
16    pub backup_id: Option<::Value<String>>,
17    /// Property [`FileSystemType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-filesystemtype).
18    ///
19    /// Update type: _Immutable_.
20    /// AWS CloudFormation replaces the resource when you change this property.
21    pub file_system_type: ::Value<String>,
22    /// Property [`KmsKeyId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-kmskeyid).
23    ///
24    /// Update type: _Immutable_.
25    /// AWS CloudFormation replaces the resource when you change this property.
26    pub kms_key_id: Option<::Value<String>>,
27    /// Property [`LustreConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-lustreconfiguration).
28    ///
29    /// Update type: _Mutable_.
30    /// AWS CloudFormation doesn't replace the resource when you change this property.
31    pub lustre_configuration: Option<::Value<self::file_system::LustreConfiguration>>,
32    /// Property [`SecurityGroupIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-securitygroupids).
33    ///
34    /// Update type: _Immutable_.
35    /// AWS CloudFormation replaces the resource when you change this property.
36    pub security_group_ids: Option<::ValueList<String>>,
37    /// Property [`StorageCapacity`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-storagecapacity).
38    ///
39    /// Update type: _Mutable_.
40    /// AWS CloudFormation doesn't replace the resource when you change this property.
41    pub storage_capacity: Option<::Value<u32>>,
42    /// Property [`StorageType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-storagetype).
43    ///
44    /// Update type: _Immutable_.
45    /// AWS CloudFormation replaces the resource when you change this property.
46    pub storage_type: Option<::Value<String>>,
47    /// Property [`SubnetIds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-subnetids).
48    ///
49    /// Update type: _Immutable_.
50    /// AWS CloudFormation replaces the resource when you change this property.
51    pub subnet_ids: ::ValueList<String>,
52    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-tags).
53    ///
54    /// Update type: _Mutable_.
55    /// AWS CloudFormation doesn't replace the resource when you change this property.
56    pub tags: Option<::ValueList<::Tag>>,
57    /// Property [`WindowsConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-windowsconfiguration).
58    ///
59    /// Update type: _Mutable_.
60    /// AWS CloudFormation doesn't replace the resource when you change this property.
61    pub windows_configuration: Option<::Value<self::file_system::WindowsConfiguration>>,
62}
63
64impl ::serde::Serialize for FileSystemProperties {
65    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
66        let mut map = ::serde::Serializer::serialize_map(s, None)?;
67        if let Some(ref backup_id) = self.backup_id {
68            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BackupId", backup_id)?;
69        }
70        ::serde::ser::SerializeMap::serialize_entry(&mut map, "FileSystemType", &self.file_system_type)?;
71        if let Some(ref kms_key_id) = self.kms_key_id {
72            ::serde::ser::SerializeMap::serialize_entry(&mut map, "KmsKeyId", kms_key_id)?;
73        }
74        if let Some(ref lustre_configuration) = self.lustre_configuration {
75            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LustreConfiguration", lustre_configuration)?;
76        }
77        if let Some(ref security_group_ids) = self.security_group_ids {
78            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityGroupIds", security_group_ids)?;
79        }
80        if let Some(ref storage_capacity) = self.storage_capacity {
81            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StorageCapacity", storage_capacity)?;
82        }
83        if let Some(ref storage_type) = self.storage_type {
84            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StorageType", storage_type)?;
85        }
86        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetIds", &self.subnet_ids)?;
87        if let Some(ref tags) = self.tags {
88            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
89        }
90        if let Some(ref windows_configuration) = self.windows_configuration {
91            ::serde::ser::SerializeMap::serialize_entry(&mut map, "WindowsConfiguration", windows_configuration)?;
92        }
93        ::serde::ser::SerializeMap::end(map)
94    }
95}
96
97impl<'de> ::serde::Deserialize<'de> for FileSystemProperties {
98    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<FileSystemProperties, D::Error> {
99        struct Visitor;
100
101        impl<'de> ::serde::de::Visitor<'de> for Visitor {
102            type Value = FileSystemProperties;
103
104            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
105                write!(f, "a struct of type FileSystemProperties")
106            }
107
108            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
109                let mut backup_id: Option<::Value<String>> = None;
110                let mut file_system_type: Option<::Value<String>> = None;
111                let mut kms_key_id: Option<::Value<String>> = None;
112                let mut lustre_configuration: Option<::Value<self::file_system::LustreConfiguration>> = None;
113                let mut security_group_ids: Option<::ValueList<String>> = None;
114                let mut storage_capacity: Option<::Value<u32>> = None;
115                let mut storage_type: Option<::Value<String>> = None;
116                let mut subnet_ids: Option<::ValueList<String>> = None;
117                let mut tags: Option<::ValueList<::Tag>> = None;
118                let mut windows_configuration: Option<::Value<self::file_system::WindowsConfiguration>> = None;
119
120                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
121                    match __cfn_key.as_ref() {
122                        "BackupId" => {
123                            backup_id = ::serde::de::MapAccess::next_value(&mut map)?;
124                        }
125                        "FileSystemType" => {
126                            file_system_type = ::serde::de::MapAccess::next_value(&mut map)?;
127                        }
128                        "KmsKeyId" => {
129                            kms_key_id = ::serde::de::MapAccess::next_value(&mut map)?;
130                        }
131                        "LustreConfiguration" => {
132                            lustre_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
133                        }
134                        "SecurityGroupIds" => {
135                            security_group_ids = ::serde::de::MapAccess::next_value(&mut map)?;
136                        }
137                        "StorageCapacity" => {
138                            storage_capacity = ::serde::de::MapAccess::next_value(&mut map)?;
139                        }
140                        "StorageType" => {
141                            storage_type = ::serde::de::MapAccess::next_value(&mut map)?;
142                        }
143                        "SubnetIds" => {
144                            subnet_ids = ::serde::de::MapAccess::next_value(&mut map)?;
145                        }
146                        "Tags" => {
147                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
148                        }
149                        "WindowsConfiguration" => {
150                            windows_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
151                        }
152                        _ => {}
153                    }
154                }
155
156                Ok(FileSystemProperties {
157                    backup_id: backup_id,
158                    file_system_type: file_system_type.ok_or(::serde::de::Error::missing_field("FileSystemType"))?,
159                    kms_key_id: kms_key_id,
160                    lustre_configuration: lustre_configuration,
161                    security_group_ids: security_group_ids,
162                    storage_capacity: storage_capacity,
163                    storage_type: storage_type,
164                    subnet_ids: subnet_ids.ok_or(::serde::de::Error::missing_field("SubnetIds"))?,
165                    tags: tags,
166                    windows_configuration: windows_configuration,
167                })
168            }
169        }
170
171        d.deserialize_map(Visitor)
172    }
173}
174
175impl ::Resource for FileSystem {
176    type Properties = FileSystemProperties;
177    const TYPE: &'static str = "AWS::FSx::FileSystem";
178    fn properties(&self) -> &FileSystemProperties {
179        &self.properties
180    }
181    fn properties_mut(&mut self) -> &mut FileSystemProperties {
182        &mut self.properties
183    }
184}
185
186impl ::private::Sealed for FileSystem {}
187
188impl From<FileSystemProperties> for FileSystem {
189    fn from(properties: FileSystemProperties) -> FileSystem {
190        FileSystem { properties }
191    }
192}
193
194pub mod file_system {
195    //! Property types for the `FileSystem` resource.
196
197    /// The [`AWS::FSx::FileSystem.LustreConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html) property type.
198    #[derive(Debug, Default)]
199    pub struct LustreConfiguration {
200        /// Property [`AutoImportPolicy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-autoimportpolicy).
201        ///
202        /// Update type: _Mutable_.
203        /// AWS CloudFormation doesn't replace the resource when you change this property.
204        pub auto_import_policy: Option<::Value<String>>,
205        /// Property [`AutomaticBackupRetentionDays`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-automaticbackupretentiondays).
206        ///
207        /// Update type: _Mutable_.
208        /// AWS CloudFormation doesn't replace the resource when you change this property.
209        pub automatic_backup_retention_days: Option<::Value<u32>>,
210        /// Property [`CopyTagsToBackups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-copytagstobackups).
211        ///
212        /// Update type: _Immutable_.
213        /// AWS CloudFormation replaces the resource when you change this property.
214        pub copy_tags_to_backups: Option<::Value<bool>>,
215        /// Property [`DailyAutomaticBackupStartTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-dailyautomaticbackupstarttime).
216        ///
217        /// Update type: _Mutable_.
218        /// AWS CloudFormation doesn't replace the resource when you change this property.
219        pub daily_automatic_backup_start_time: Option<::Value<String>>,
220        /// Property [`DataCompressionType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-datacompressiontype).
221        ///
222        /// Update type: _Mutable_.
223        /// AWS CloudFormation doesn't replace the resource when you change this property.
224        pub data_compression_type: Option<::Value<String>>,
225        /// Property [`DeploymentType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-deploymenttype).
226        ///
227        /// Update type: _Immutable_.
228        /// AWS CloudFormation replaces the resource when you change this property.
229        pub deployment_type: Option<::Value<String>>,
230        /// Property [`DriveCacheType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-drivecachetype).
231        ///
232        /// Update type: _Immutable_.
233        /// AWS CloudFormation replaces the resource when you change this property.
234        pub drive_cache_type: Option<::Value<String>>,
235        /// Property [`ExportPath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-exportpath).
236        ///
237        /// Update type: _Immutable_.
238        /// AWS CloudFormation replaces the resource when you change this property.
239        pub export_path: Option<::Value<String>>,
240        /// Property [`ImportPath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-importpath).
241        ///
242        /// Update type: _Immutable_.
243        /// AWS CloudFormation replaces the resource when you change this property.
244        pub import_path: Option<::Value<String>>,
245        /// Property [`ImportedFileChunkSize`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-importedfilechunksize).
246        ///
247        /// Update type: _Immutable_.
248        /// AWS CloudFormation replaces the resource when you change this property.
249        pub imported_file_chunk_size: Option<::Value<u32>>,
250        /// Property [`PerUnitStorageThroughput`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-perunitstoragethroughput).
251        ///
252        /// Update type: _Immutable_.
253        /// AWS CloudFormation replaces the resource when you change this property.
254        pub per_unit_storage_throughput: Option<::Value<u32>>,
255        /// Property [`WeeklyMaintenanceStartTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-lustreconfiguration.html#cfn-fsx-filesystem-lustreconfiguration-weeklymaintenancestarttime).
256        ///
257        /// Update type: _Mutable_.
258        /// AWS CloudFormation doesn't replace the resource when you change this property.
259        pub weekly_maintenance_start_time: Option<::Value<String>>,
260    }
261
262    impl ::codec::SerializeValue for LustreConfiguration {
263        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
264            let mut map = ::serde::Serializer::serialize_map(s, None)?;
265            if let Some(ref auto_import_policy) = self.auto_import_policy {
266                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoImportPolicy", auto_import_policy)?;
267            }
268            if let Some(ref automatic_backup_retention_days) = self.automatic_backup_retention_days {
269                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutomaticBackupRetentionDays", automatic_backup_retention_days)?;
270            }
271            if let Some(ref copy_tags_to_backups) = self.copy_tags_to_backups {
272                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CopyTagsToBackups", copy_tags_to_backups)?;
273            }
274            if let Some(ref daily_automatic_backup_start_time) = self.daily_automatic_backup_start_time {
275                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DailyAutomaticBackupStartTime", daily_automatic_backup_start_time)?;
276            }
277            if let Some(ref data_compression_type) = self.data_compression_type {
278                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DataCompressionType", data_compression_type)?;
279            }
280            if let Some(ref deployment_type) = self.deployment_type {
281                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DeploymentType", deployment_type)?;
282            }
283            if let Some(ref drive_cache_type) = self.drive_cache_type {
284                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DriveCacheType", drive_cache_type)?;
285            }
286            if let Some(ref export_path) = self.export_path {
287                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ExportPath", export_path)?;
288            }
289            if let Some(ref import_path) = self.import_path {
290                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImportPath", import_path)?;
291            }
292            if let Some(ref imported_file_chunk_size) = self.imported_file_chunk_size {
293                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImportedFileChunkSize", imported_file_chunk_size)?;
294            }
295            if let Some(ref per_unit_storage_throughput) = self.per_unit_storage_throughput {
296                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PerUnitStorageThroughput", per_unit_storage_throughput)?;
297            }
298            if let Some(ref weekly_maintenance_start_time) = self.weekly_maintenance_start_time {
299                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WeeklyMaintenanceStartTime", weekly_maintenance_start_time)?;
300            }
301            ::serde::ser::SerializeMap::end(map)
302        }
303    }
304
305    impl ::codec::DeserializeValue for LustreConfiguration {
306        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LustreConfiguration, D::Error> {
307            struct Visitor;
308
309            impl<'de> ::serde::de::Visitor<'de> for Visitor {
310                type Value = LustreConfiguration;
311
312                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
313                    write!(f, "a struct of type LustreConfiguration")
314                }
315
316                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
317                    let mut auto_import_policy: Option<::Value<String>> = None;
318                    let mut automatic_backup_retention_days: Option<::Value<u32>> = None;
319                    let mut copy_tags_to_backups: Option<::Value<bool>> = None;
320                    let mut daily_automatic_backup_start_time: Option<::Value<String>> = None;
321                    let mut data_compression_type: Option<::Value<String>> = None;
322                    let mut deployment_type: Option<::Value<String>> = None;
323                    let mut drive_cache_type: Option<::Value<String>> = None;
324                    let mut export_path: Option<::Value<String>> = None;
325                    let mut import_path: Option<::Value<String>> = None;
326                    let mut imported_file_chunk_size: Option<::Value<u32>> = None;
327                    let mut per_unit_storage_throughput: Option<::Value<u32>> = None;
328                    let mut weekly_maintenance_start_time: Option<::Value<String>> = None;
329
330                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
331                        match __cfn_key.as_ref() {
332                            "AutoImportPolicy" => {
333                                auto_import_policy = ::serde::de::MapAccess::next_value(&mut map)?;
334                            }
335                            "AutomaticBackupRetentionDays" => {
336                                automatic_backup_retention_days = ::serde::de::MapAccess::next_value(&mut map)?;
337                            }
338                            "CopyTagsToBackups" => {
339                                copy_tags_to_backups = ::serde::de::MapAccess::next_value(&mut map)?;
340                            }
341                            "DailyAutomaticBackupStartTime" => {
342                                daily_automatic_backup_start_time = ::serde::de::MapAccess::next_value(&mut map)?;
343                            }
344                            "DataCompressionType" => {
345                                data_compression_type = ::serde::de::MapAccess::next_value(&mut map)?;
346                            }
347                            "DeploymentType" => {
348                                deployment_type = ::serde::de::MapAccess::next_value(&mut map)?;
349                            }
350                            "DriveCacheType" => {
351                                drive_cache_type = ::serde::de::MapAccess::next_value(&mut map)?;
352                            }
353                            "ExportPath" => {
354                                export_path = ::serde::de::MapAccess::next_value(&mut map)?;
355                            }
356                            "ImportPath" => {
357                                import_path = ::serde::de::MapAccess::next_value(&mut map)?;
358                            }
359                            "ImportedFileChunkSize" => {
360                                imported_file_chunk_size = ::serde::de::MapAccess::next_value(&mut map)?;
361                            }
362                            "PerUnitStorageThroughput" => {
363                                per_unit_storage_throughput = ::serde::de::MapAccess::next_value(&mut map)?;
364                            }
365                            "WeeklyMaintenanceStartTime" => {
366                                weekly_maintenance_start_time = ::serde::de::MapAccess::next_value(&mut map)?;
367                            }
368                            _ => {}
369                        }
370                    }
371
372                    Ok(LustreConfiguration {
373                        auto_import_policy: auto_import_policy,
374                        automatic_backup_retention_days: automatic_backup_retention_days,
375                        copy_tags_to_backups: copy_tags_to_backups,
376                        daily_automatic_backup_start_time: daily_automatic_backup_start_time,
377                        data_compression_type: data_compression_type,
378                        deployment_type: deployment_type,
379                        drive_cache_type: drive_cache_type,
380                        export_path: export_path,
381                        import_path: import_path,
382                        imported_file_chunk_size: imported_file_chunk_size,
383                        per_unit_storage_throughput: per_unit_storage_throughput,
384                        weekly_maintenance_start_time: weekly_maintenance_start_time,
385                    })
386                }
387            }
388
389            d.deserialize_map(Visitor)
390        }
391    }
392
393    /// The [`AWS::FSx::FileSystem.SelfManagedActiveDirectoryConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html) property type.
394    #[derive(Debug, Default)]
395    pub struct SelfManagedActiveDirectoryConfiguration {
396        /// Property [`DnsIps`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-dnsips).
397        ///
398        /// Update type: _Mutable_.
399        /// AWS CloudFormation doesn't replace the resource when you change this property.
400        pub dns_ips: Option<::ValueList<String>>,
401        /// Property [`DomainName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-domainname).
402        ///
403        /// Update type: _Immutable_.
404        /// AWS CloudFormation replaces the resource when you change this property.
405        pub domain_name: Option<::Value<String>>,
406        /// Property [`FileSystemAdministratorsGroup`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-filesystemadministratorsgroup).
407        ///
408        /// Update type: _Immutable_.
409        /// AWS CloudFormation replaces the resource when you change this property.
410        pub file_system_administrators_group: Option<::Value<String>>,
411        /// Property [`OrganizationalUnitDistinguishedName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-organizationalunitdistinguishedname).
412        ///
413        /// Update type: _Immutable_.
414        /// AWS CloudFormation replaces the resource when you change this property.
415        pub organizational_unit_distinguished_name: Option<::Value<String>>,
416        /// Property [`Password`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-password).
417        ///
418        /// Update type: _Mutable_.
419        /// AWS CloudFormation doesn't replace the resource when you change this property.
420        pub password: Option<::Value<String>>,
421        /// Property [`UserName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration-username).
422        ///
423        /// Update type: _Mutable_.
424        /// AWS CloudFormation doesn't replace the resource when you change this property.
425        pub user_name: Option<::Value<String>>,
426    }
427
428    impl ::codec::SerializeValue for SelfManagedActiveDirectoryConfiguration {
429        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
430            let mut map = ::serde::Serializer::serialize_map(s, None)?;
431            if let Some(ref dns_ips) = self.dns_ips {
432                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DnsIps", dns_ips)?;
433            }
434            if let Some(ref domain_name) = self.domain_name {
435                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DomainName", domain_name)?;
436            }
437            if let Some(ref file_system_administrators_group) = self.file_system_administrators_group {
438                ::serde::ser::SerializeMap::serialize_entry(&mut map, "FileSystemAdministratorsGroup", file_system_administrators_group)?;
439            }
440            if let Some(ref organizational_unit_distinguished_name) = self.organizational_unit_distinguished_name {
441                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OrganizationalUnitDistinguishedName", organizational_unit_distinguished_name)?;
442            }
443            if let Some(ref password) = self.password {
444                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Password", password)?;
445            }
446            if let Some(ref user_name) = self.user_name {
447                ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserName", user_name)?;
448            }
449            ::serde::ser::SerializeMap::end(map)
450        }
451    }
452
453    impl ::codec::DeserializeValue for SelfManagedActiveDirectoryConfiguration {
454        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SelfManagedActiveDirectoryConfiguration, D::Error> {
455            struct Visitor;
456
457            impl<'de> ::serde::de::Visitor<'de> for Visitor {
458                type Value = SelfManagedActiveDirectoryConfiguration;
459
460                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
461                    write!(f, "a struct of type SelfManagedActiveDirectoryConfiguration")
462                }
463
464                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
465                    let mut dns_ips: Option<::ValueList<String>> = None;
466                    let mut domain_name: Option<::Value<String>> = None;
467                    let mut file_system_administrators_group: Option<::Value<String>> = None;
468                    let mut organizational_unit_distinguished_name: Option<::Value<String>> = None;
469                    let mut password: Option<::Value<String>> = None;
470                    let mut user_name: Option<::Value<String>> = None;
471
472                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
473                        match __cfn_key.as_ref() {
474                            "DnsIps" => {
475                                dns_ips = ::serde::de::MapAccess::next_value(&mut map)?;
476                            }
477                            "DomainName" => {
478                                domain_name = ::serde::de::MapAccess::next_value(&mut map)?;
479                            }
480                            "FileSystemAdministratorsGroup" => {
481                                file_system_administrators_group = ::serde::de::MapAccess::next_value(&mut map)?;
482                            }
483                            "OrganizationalUnitDistinguishedName" => {
484                                organizational_unit_distinguished_name = ::serde::de::MapAccess::next_value(&mut map)?;
485                            }
486                            "Password" => {
487                                password = ::serde::de::MapAccess::next_value(&mut map)?;
488                            }
489                            "UserName" => {
490                                user_name = ::serde::de::MapAccess::next_value(&mut map)?;
491                            }
492                            _ => {}
493                        }
494                    }
495
496                    Ok(SelfManagedActiveDirectoryConfiguration {
497                        dns_ips: dns_ips,
498                        domain_name: domain_name,
499                        file_system_administrators_group: file_system_administrators_group,
500                        organizational_unit_distinguished_name: organizational_unit_distinguished_name,
501                        password: password,
502                        user_name: user_name,
503                    })
504                }
505            }
506
507            d.deserialize_map(Visitor)
508        }
509    }
510
511    /// The [`AWS::FSx::FileSystem.WindowsConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html) property type.
512    #[derive(Debug, Default)]
513    pub struct WindowsConfiguration {
514        /// Property [`ActiveDirectoryId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-activedirectoryid).
515        ///
516        /// Update type: _Immutable_.
517        /// AWS CloudFormation replaces the resource when you change this property.
518        pub active_directory_id: Option<::Value<String>>,
519        /// Property [`Aliases`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-aliases).
520        ///
521        /// Update type: _Mutable_.
522        /// AWS CloudFormation doesn't replace the resource when you change this property.
523        pub aliases: Option<::ValueList<String>>,
524        /// Property [`AutomaticBackupRetentionDays`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-automaticbackupretentiondays).
525        ///
526        /// Update type: _Mutable_.
527        /// AWS CloudFormation doesn't replace the resource when you change this property.
528        pub automatic_backup_retention_days: Option<::Value<u32>>,
529        /// Property [`CopyTagsToBackups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-copytagstobackups).
530        ///
531        /// Update type: _Immutable_.
532        /// AWS CloudFormation replaces the resource when you change this property.
533        pub copy_tags_to_backups: Option<::Value<bool>>,
534        /// Property [`DailyAutomaticBackupStartTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-dailyautomaticbackupstarttime).
535        ///
536        /// Update type: _Mutable_.
537        /// AWS CloudFormation doesn't replace the resource when you change this property.
538        pub daily_automatic_backup_start_time: Option<::Value<String>>,
539        /// Property [`DeploymentType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-deploymenttype).
540        ///
541        /// Update type: _Immutable_.
542        /// AWS CloudFormation replaces the resource when you change this property.
543        pub deployment_type: Option<::Value<String>>,
544        /// Property [`PreferredSubnetId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-preferredsubnetid).
545        ///
546        /// Update type: _Immutable_.
547        /// AWS CloudFormation replaces the resource when you change this property.
548        pub preferred_subnet_id: Option<::Value<String>>,
549        /// Property [`SelfManagedActiveDirectoryConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-selfmanagedactivedirectoryconfiguration).
550        ///
551        /// Update type: _Mutable_.
552        /// AWS CloudFormation doesn't replace the resource when you change this property.
553        pub self_managed_active_directory_configuration: Option<::Value<SelfManagedActiveDirectoryConfiguration>>,
554        /// Property [`ThroughputCapacity`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-throughputcapacity).
555        ///
556        /// Update type: _Mutable_.
557        /// AWS CloudFormation doesn't replace the resource when you change this property.
558        pub throughput_capacity: ::Value<u32>,
559        /// Property [`WeeklyMaintenanceStartTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-fsx-filesystem-windowsconfiguration.html#cfn-fsx-filesystem-windowsconfiguration-weeklymaintenancestarttime).
560        ///
561        /// Update type: _Mutable_.
562        /// AWS CloudFormation doesn't replace the resource when you change this property.
563        pub weekly_maintenance_start_time: Option<::Value<String>>,
564    }
565
566    impl ::codec::SerializeValue for WindowsConfiguration {
567        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
568            let mut map = ::serde::Serializer::serialize_map(s, None)?;
569            if let Some(ref active_directory_id) = self.active_directory_id {
570                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ActiveDirectoryId", active_directory_id)?;
571            }
572            if let Some(ref aliases) = self.aliases {
573                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Aliases", aliases)?;
574            }
575            if let Some(ref automatic_backup_retention_days) = self.automatic_backup_retention_days {
576                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutomaticBackupRetentionDays", automatic_backup_retention_days)?;
577            }
578            if let Some(ref copy_tags_to_backups) = self.copy_tags_to_backups {
579                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CopyTagsToBackups", copy_tags_to_backups)?;
580            }
581            if let Some(ref daily_automatic_backup_start_time) = self.daily_automatic_backup_start_time {
582                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DailyAutomaticBackupStartTime", daily_automatic_backup_start_time)?;
583            }
584            if let Some(ref deployment_type) = self.deployment_type {
585                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DeploymentType", deployment_type)?;
586            }
587            if let Some(ref preferred_subnet_id) = self.preferred_subnet_id {
588                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PreferredSubnetId", preferred_subnet_id)?;
589            }
590            if let Some(ref self_managed_active_directory_configuration) = self.self_managed_active_directory_configuration {
591                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SelfManagedActiveDirectoryConfiguration", self_managed_active_directory_configuration)?;
592            }
593            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ThroughputCapacity", &self.throughput_capacity)?;
594            if let Some(ref weekly_maintenance_start_time) = self.weekly_maintenance_start_time {
595                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WeeklyMaintenanceStartTime", weekly_maintenance_start_time)?;
596            }
597            ::serde::ser::SerializeMap::end(map)
598        }
599    }
600
601    impl ::codec::DeserializeValue for WindowsConfiguration {
602        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<WindowsConfiguration, D::Error> {
603            struct Visitor;
604
605            impl<'de> ::serde::de::Visitor<'de> for Visitor {
606                type Value = WindowsConfiguration;
607
608                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
609                    write!(f, "a struct of type WindowsConfiguration")
610                }
611
612                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
613                    let mut active_directory_id: Option<::Value<String>> = None;
614                    let mut aliases: Option<::ValueList<String>> = None;
615                    let mut automatic_backup_retention_days: Option<::Value<u32>> = None;
616                    let mut copy_tags_to_backups: Option<::Value<bool>> = None;
617                    let mut daily_automatic_backup_start_time: Option<::Value<String>> = None;
618                    let mut deployment_type: Option<::Value<String>> = None;
619                    let mut preferred_subnet_id: Option<::Value<String>> = None;
620                    let mut self_managed_active_directory_configuration: Option<::Value<SelfManagedActiveDirectoryConfiguration>> = None;
621                    let mut throughput_capacity: Option<::Value<u32>> = None;
622                    let mut weekly_maintenance_start_time: Option<::Value<String>> = None;
623
624                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
625                        match __cfn_key.as_ref() {
626                            "ActiveDirectoryId" => {
627                                active_directory_id = ::serde::de::MapAccess::next_value(&mut map)?;
628                            }
629                            "Aliases" => {
630                                aliases = ::serde::de::MapAccess::next_value(&mut map)?;
631                            }
632                            "AutomaticBackupRetentionDays" => {
633                                automatic_backup_retention_days = ::serde::de::MapAccess::next_value(&mut map)?;
634                            }
635                            "CopyTagsToBackups" => {
636                                copy_tags_to_backups = ::serde::de::MapAccess::next_value(&mut map)?;
637                            }
638                            "DailyAutomaticBackupStartTime" => {
639                                daily_automatic_backup_start_time = ::serde::de::MapAccess::next_value(&mut map)?;
640                            }
641                            "DeploymentType" => {
642                                deployment_type = ::serde::de::MapAccess::next_value(&mut map)?;
643                            }
644                            "PreferredSubnetId" => {
645                                preferred_subnet_id = ::serde::de::MapAccess::next_value(&mut map)?;
646                            }
647                            "SelfManagedActiveDirectoryConfiguration" => {
648                                self_managed_active_directory_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
649                            }
650                            "ThroughputCapacity" => {
651                                throughput_capacity = ::serde::de::MapAccess::next_value(&mut map)?;
652                            }
653                            "WeeklyMaintenanceStartTime" => {
654                                weekly_maintenance_start_time = ::serde::de::MapAccess::next_value(&mut map)?;
655                            }
656                            _ => {}
657                        }
658                    }
659
660                    Ok(WindowsConfiguration {
661                        active_directory_id: active_directory_id,
662                        aliases: aliases,
663                        automatic_backup_retention_days: automatic_backup_retention_days,
664                        copy_tags_to_backups: copy_tags_to_backups,
665                        daily_automatic_backup_start_time: daily_automatic_backup_start_time,
666                        deployment_type: deployment_type,
667                        preferred_subnet_id: preferred_subnet_id,
668                        self_managed_active_directory_configuration: self_managed_active_directory_configuration,
669                        throughput_capacity: throughput_capacity.ok_or(::serde::de::Error::missing_field("ThroughputCapacity"))?,
670                        weekly_maintenance_start_time: weekly_maintenance_start_time,
671                    })
672                }
673            }
674
675            d.deserialize_map(Visitor)
676        }
677    }
678}