cfn/aws/
greengrassv2.rs

1//! Types for the `GreengrassV2` service.
2
3/// The [`AWS::GreengrassV2::ComponentVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-componentversion.html) resource type.
4#[derive(Debug, Default)]
5pub struct ComponentVersion {
6    properties: ComponentVersionProperties
7}
8
9/// Properties for the `ComponentVersion` resource.
10#[derive(Debug, Default)]
11pub struct ComponentVersionProperties {
12    /// Property [`InlineRecipe`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-componentversion.html#cfn-greengrassv2-componentversion-inlinerecipe).
13    ///
14    /// Update type: _Immutable_.
15    /// AWS CloudFormation replaces the resource when you change this property.
16    pub inline_recipe: Option<::Value<String>>,
17    /// Property [`LambdaFunction`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-componentversion.html#cfn-greengrassv2-componentversion-lambdafunction).
18    ///
19    /// Update type: _Immutable_.
20    /// AWS CloudFormation replaces the resource when you change this property.
21    pub lambda_function: Option<::Value<self::component_version::LambdaFunctionRecipeSource>>,
22    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrassv2-componentversion.html#cfn-greengrassv2-componentversion-tags).
23    ///
24    /// Update type: _Mutable_.
25    /// AWS CloudFormation doesn't replace the resource when you change this property.
26    pub tags: Option<::ValueMap<String>>,
27}
28
29impl ::serde::Serialize for ComponentVersionProperties {
30    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
31        let mut map = ::serde::Serializer::serialize_map(s, None)?;
32        if let Some(ref inline_recipe) = self.inline_recipe {
33            ::serde::ser::SerializeMap::serialize_entry(&mut map, "InlineRecipe", inline_recipe)?;
34        }
35        if let Some(ref lambda_function) = self.lambda_function {
36            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LambdaFunction", lambda_function)?;
37        }
38        if let Some(ref tags) = self.tags {
39            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
40        }
41        ::serde::ser::SerializeMap::end(map)
42    }
43}
44
45impl<'de> ::serde::Deserialize<'de> for ComponentVersionProperties {
46    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ComponentVersionProperties, D::Error> {
47        struct Visitor;
48
49        impl<'de> ::serde::de::Visitor<'de> for Visitor {
50            type Value = ComponentVersionProperties;
51
52            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
53                write!(f, "a struct of type ComponentVersionProperties")
54            }
55
56            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
57                let mut inline_recipe: Option<::Value<String>> = None;
58                let mut lambda_function: Option<::Value<self::component_version::LambdaFunctionRecipeSource>> = None;
59                let mut tags: Option<::ValueMap<String>> = None;
60
61                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
62                    match __cfn_key.as_ref() {
63                        "InlineRecipe" => {
64                            inline_recipe = ::serde::de::MapAccess::next_value(&mut map)?;
65                        }
66                        "LambdaFunction" => {
67                            lambda_function = ::serde::de::MapAccess::next_value(&mut map)?;
68                        }
69                        "Tags" => {
70                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
71                        }
72                        _ => {}
73                    }
74                }
75
76                Ok(ComponentVersionProperties {
77                    inline_recipe: inline_recipe,
78                    lambda_function: lambda_function,
79                    tags: tags,
80                })
81            }
82        }
83
84        d.deserialize_map(Visitor)
85    }
86}
87
88impl ::Resource for ComponentVersion {
89    type Properties = ComponentVersionProperties;
90    const TYPE: &'static str = "AWS::GreengrassV2::ComponentVersion";
91    fn properties(&self) -> &ComponentVersionProperties {
92        &self.properties
93    }
94    fn properties_mut(&mut self) -> &mut ComponentVersionProperties {
95        &mut self.properties
96    }
97}
98
99impl ::private::Sealed for ComponentVersion {}
100
101impl From<ComponentVersionProperties> for ComponentVersion {
102    fn from(properties: ComponentVersionProperties) -> ComponentVersion {
103        ComponentVersion { properties }
104    }
105}
106
107pub mod component_version {
108    //! Property types for the `ComponentVersion` resource.
109
110    /// The [`AWS::GreengrassV2::ComponentVersion.ComponentDependencyRequirement`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html) property type.
111    #[derive(Debug, Default)]
112    pub struct ComponentDependencyRequirement {
113        /// Property [`DependencyType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html#cfn-greengrassv2-componentversion-componentdependencyrequirement-dependencytype).
114        ///
115        /// Update type: _Mutable_.
116        /// AWS CloudFormation doesn't replace the resource when you change this property.
117        pub dependency_type: Option<::Value<String>>,
118        /// Property [`VersionRequirement`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentdependencyrequirement.html#cfn-greengrassv2-componentversion-componentdependencyrequirement-versionrequirement).
119        ///
120        /// Update type: _Mutable_.
121        /// AWS CloudFormation doesn't replace the resource when you change this property.
122        pub version_requirement: Option<::Value<String>>,
123    }
124
125    impl ::codec::SerializeValue for ComponentDependencyRequirement {
126        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
127            let mut map = ::serde::Serializer::serialize_map(s, None)?;
128            if let Some(ref dependency_type) = self.dependency_type {
129                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DependencyType", dependency_type)?;
130            }
131            if let Some(ref version_requirement) = self.version_requirement {
132                ::serde::ser::SerializeMap::serialize_entry(&mut map, "VersionRequirement", version_requirement)?;
133            }
134            ::serde::ser::SerializeMap::end(map)
135        }
136    }
137
138    impl ::codec::DeserializeValue for ComponentDependencyRequirement {
139        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ComponentDependencyRequirement, D::Error> {
140            struct Visitor;
141
142            impl<'de> ::serde::de::Visitor<'de> for Visitor {
143                type Value = ComponentDependencyRequirement;
144
145                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
146                    write!(f, "a struct of type ComponentDependencyRequirement")
147                }
148
149                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
150                    let mut dependency_type: Option<::Value<String>> = None;
151                    let mut version_requirement: Option<::Value<String>> = None;
152
153                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
154                        match __cfn_key.as_ref() {
155                            "DependencyType" => {
156                                dependency_type = ::serde::de::MapAccess::next_value(&mut map)?;
157                            }
158                            "VersionRequirement" => {
159                                version_requirement = ::serde::de::MapAccess::next_value(&mut map)?;
160                            }
161                            _ => {}
162                        }
163                    }
164
165                    Ok(ComponentDependencyRequirement {
166                        dependency_type: dependency_type,
167                        version_requirement: version_requirement,
168                    })
169                }
170            }
171
172            d.deserialize_map(Visitor)
173        }
174    }
175
176    /// The [`AWS::GreengrassV2::ComponentVersion.ComponentPlatform`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html) property type.
177    #[derive(Debug, Default)]
178    pub struct ComponentPlatform {
179        /// Property [`Attributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html#cfn-greengrassv2-componentversion-componentplatform-attributes).
180        ///
181        /// Update type: _Immutable_.
182        /// AWS CloudFormation replaces the resource when you change this property.
183        pub attributes: Option<::ValueMap<String>>,
184        /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-componentplatform.html#cfn-greengrassv2-componentversion-componentplatform-name).
185        ///
186        /// Update type: _Immutable_.
187        /// AWS CloudFormation replaces the resource when you change this property.
188        pub name: Option<::Value<String>>,
189    }
190
191    impl ::codec::SerializeValue for ComponentPlatform {
192        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
193            let mut map = ::serde::Serializer::serialize_map(s, None)?;
194            if let Some(ref attributes) = self.attributes {
195                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Attributes", attributes)?;
196            }
197            if let Some(ref name) = self.name {
198                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", name)?;
199            }
200            ::serde::ser::SerializeMap::end(map)
201        }
202    }
203
204    impl ::codec::DeserializeValue for ComponentPlatform {
205        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ComponentPlatform, D::Error> {
206            struct Visitor;
207
208            impl<'de> ::serde::de::Visitor<'de> for Visitor {
209                type Value = ComponentPlatform;
210
211                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
212                    write!(f, "a struct of type ComponentPlatform")
213                }
214
215                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
216                    let mut attributes: Option<::ValueMap<String>> = None;
217                    let mut name: Option<::Value<String>> = None;
218
219                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
220                        match __cfn_key.as_ref() {
221                            "Attributes" => {
222                                attributes = ::serde::de::MapAccess::next_value(&mut map)?;
223                            }
224                            "Name" => {
225                                name = ::serde::de::MapAccess::next_value(&mut map)?;
226                            }
227                            _ => {}
228                        }
229                    }
230
231                    Ok(ComponentPlatform {
232                        attributes: attributes,
233                        name: name,
234                    })
235                }
236            }
237
238            d.deserialize_map(Visitor)
239        }
240    }
241
242    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaContainerParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdacontainerparams.html) property type.
243    #[derive(Debug, Default)]
244    pub struct LambdaContainerParams {
245        /// Property [`Devices`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdacontainerparams.html#cfn-greengrassv2-componentversion-lambdacontainerparams-devices).
246        ///
247        /// Update type: _Immutable_.
248        /// AWS CloudFormation replaces the resource when you change this property.
249        pub devices: Option<::ValueList<LambdaDeviceMount>>,
250        /// Property [`MemorySizeInKB`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdacontainerparams.html#cfn-greengrassv2-componentversion-lambdacontainerparams-memorysizeinkb).
251        ///
252        /// Update type: _Immutable_.
253        /// AWS CloudFormation replaces the resource when you change this property.
254        pub memory_size_in_kb: Option<::Value<u32>>,
255        /// Property [`MountROSysfs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdacontainerparams.html#cfn-greengrassv2-componentversion-lambdacontainerparams-mountrosysfs).
256        ///
257        /// Update type: _Immutable_.
258        /// AWS CloudFormation replaces the resource when you change this property.
259        pub mount_ro_sysfs: Option<::Value<bool>>,
260        /// Property [`Volumes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdacontainerparams.html#cfn-greengrassv2-componentversion-lambdacontainerparams-volumes).
261        ///
262        /// Update type: _Immutable_.
263        /// AWS CloudFormation replaces the resource when you change this property.
264        pub volumes: Option<::ValueList<LambdaVolumeMount>>,
265    }
266
267    impl ::codec::SerializeValue for LambdaContainerParams {
268        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
269            let mut map = ::serde::Serializer::serialize_map(s, None)?;
270            if let Some(ref devices) = self.devices {
271                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Devices", devices)?;
272            }
273            if let Some(ref memory_size_in_kb) = self.memory_size_in_kb {
274                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MemorySizeInKB", memory_size_in_kb)?;
275            }
276            if let Some(ref mount_ro_sysfs) = self.mount_ro_sysfs {
277                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MountROSysfs", mount_ro_sysfs)?;
278            }
279            if let Some(ref volumes) = self.volumes {
280                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Volumes", volumes)?;
281            }
282            ::serde::ser::SerializeMap::end(map)
283        }
284    }
285
286    impl ::codec::DeserializeValue for LambdaContainerParams {
287        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaContainerParams, D::Error> {
288            struct Visitor;
289
290            impl<'de> ::serde::de::Visitor<'de> for Visitor {
291                type Value = LambdaContainerParams;
292
293                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
294                    write!(f, "a struct of type LambdaContainerParams")
295                }
296
297                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
298                    let mut devices: Option<::ValueList<LambdaDeviceMount>> = None;
299                    let mut memory_size_in_kb: Option<::Value<u32>> = None;
300                    let mut mount_ro_sysfs: Option<::Value<bool>> = None;
301                    let mut volumes: Option<::ValueList<LambdaVolumeMount>> = None;
302
303                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
304                        match __cfn_key.as_ref() {
305                            "Devices" => {
306                                devices = ::serde::de::MapAccess::next_value(&mut map)?;
307                            }
308                            "MemorySizeInKB" => {
309                                memory_size_in_kb = ::serde::de::MapAccess::next_value(&mut map)?;
310                            }
311                            "MountROSysfs" => {
312                                mount_ro_sysfs = ::serde::de::MapAccess::next_value(&mut map)?;
313                            }
314                            "Volumes" => {
315                                volumes = ::serde::de::MapAccess::next_value(&mut map)?;
316                            }
317                            _ => {}
318                        }
319                    }
320
321                    Ok(LambdaContainerParams {
322                        devices: devices,
323                        memory_size_in_kb: memory_size_in_kb,
324                        mount_ro_sysfs: mount_ro_sysfs,
325                        volumes: volumes,
326                    })
327                }
328            }
329
330            d.deserialize_map(Visitor)
331        }
332    }
333
334    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaDeviceMount`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdadevicemount.html) property type.
335    #[derive(Debug, Default)]
336    pub struct LambdaDeviceMount {
337        /// Property [`AddGroupOwner`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdadevicemount.html#cfn-greengrassv2-componentversion-lambdadevicemount-addgroupowner).
338        ///
339        /// Update type: _Immutable_.
340        /// AWS CloudFormation replaces the resource when you change this property.
341        pub add_group_owner: Option<::Value<bool>>,
342        /// Property [`Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdadevicemount.html#cfn-greengrassv2-componentversion-lambdadevicemount-path).
343        ///
344        /// Update type: _Immutable_.
345        /// AWS CloudFormation replaces the resource when you change this property.
346        pub path: Option<::Value<String>>,
347        /// Property [`Permission`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdadevicemount.html#cfn-greengrassv2-componentversion-lambdadevicemount-permission).
348        ///
349        /// Update type: _Immutable_.
350        /// AWS CloudFormation replaces the resource when you change this property.
351        pub permission: Option<::Value<String>>,
352    }
353
354    impl ::codec::SerializeValue for LambdaDeviceMount {
355        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
356            let mut map = ::serde::Serializer::serialize_map(s, None)?;
357            if let Some(ref add_group_owner) = self.add_group_owner {
358                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AddGroupOwner", add_group_owner)?;
359            }
360            if let Some(ref path) = self.path {
361                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Path", path)?;
362            }
363            if let Some(ref permission) = self.permission {
364                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Permission", permission)?;
365            }
366            ::serde::ser::SerializeMap::end(map)
367        }
368    }
369
370    impl ::codec::DeserializeValue for LambdaDeviceMount {
371        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaDeviceMount, D::Error> {
372            struct Visitor;
373
374            impl<'de> ::serde::de::Visitor<'de> for Visitor {
375                type Value = LambdaDeviceMount;
376
377                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
378                    write!(f, "a struct of type LambdaDeviceMount")
379                }
380
381                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
382                    let mut add_group_owner: Option<::Value<bool>> = None;
383                    let mut path: Option<::Value<String>> = None;
384                    let mut permission: Option<::Value<String>> = None;
385
386                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
387                        match __cfn_key.as_ref() {
388                            "AddGroupOwner" => {
389                                add_group_owner = ::serde::de::MapAccess::next_value(&mut map)?;
390                            }
391                            "Path" => {
392                                path = ::serde::de::MapAccess::next_value(&mut map)?;
393                            }
394                            "Permission" => {
395                                permission = ::serde::de::MapAccess::next_value(&mut map)?;
396                            }
397                            _ => {}
398                        }
399                    }
400
401                    Ok(LambdaDeviceMount {
402                        add_group_owner: add_group_owner,
403                        path: path,
404                        permission: permission,
405                    })
406                }
407            }
408
409            d.deserialize_map(Visitor)
410        }
411    }
412
413    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaEventSource`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaeventsource.html) property type.
414    #[derive(Debug, Default)]
415    pub struct LambdaEventSource {
416        /// Property [`Topic`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaeventsource.html#cfn-greengrassv2-componentversion-lambdaeventsource-topic).
417        ///
418        /// Update type: _Immutable_.
419        /// AWS CloudFormation replaces the resource when you change this property.
420        pub topic: Option<::Value<String>>,
421        /// Property [`Type`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaeventsource.html#cfn-greengrassv2-componentversion-lambdaeventsource-type).
422        ///
423        /// Update type: _Immutable_.
424        /// AWS CloudFormation replaces the resource when you change this property.
425        pub r#type: Option<::Value<String>>,
426    }
427
428    impl ::codec::SerializeValue for LambdaEventSource {
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 topic) = self.topic {
432                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Topic", topic)?;
433            }
434            if let Some(ref r#type) = self.r#type {
435                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Type", r#type)?;
436            }
437            ::serde::ser::SerializeMap::end(map)
438        }
439    }
440
441    impl ::codec::DeserializeValue for LambdaEventSource {
442        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaEventSource, D::Error> {
443            struct Visitor;
444
445            impl<'de> ::serde::de::Visitor<'de> for Visitor {
446                type Value = LambdaEventSource;
447
448                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
449                    write!(f, "a struct of type LambdaEventSource")
450                }
451
452                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
453                    let mut topic: Option<::Value<String>> = None;
454                    let mut r#type: Option<::Value<String>> = None;
455
456                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
457                        match __cfn_key.as_ref() {
458                            "Topic" => {
459                                topic = ::serde::de::MapAccess::next_value(&mut map)?;
460                            }
461                            "Type" => {
462                                r#type = ::serde::de::MapAccess::next_value(&mut map)?;
463                            }
464                            _ => {}
465                        }
466                    }
467
468                    Ok(LambdaEventSource {
469                        topic: topic,
470                        r#type: r#type,
471                    })
472                }
473            }
474
475            d.deserialize_map(Visitor)
476        }
477    }
478
479    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaExecutionParameters`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html) property type.
480    #[derive(Debug, Default)]
481    pub struct LambdaExecutionParameters {
482        /// Property [`EnvironmentVariables`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-environmentvariables).
483        ///
484        /// Update type: _Immutable_.
485        /// AWS CloudFormation replaces the resource when you change this property.
486        pub environment_variables: Option<::ValueMap<String>>,
487        /// Property [`EventSources`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-eventsources).
488        ///
489        /// Update type: _Immutable_.
490        /// AWS CloudFormation replaces the resource when you change this property.
491        pub event_sources: Option<::ValueList<LambdaEventSource>>,
492        /// Property [`ExecArgs`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-execargs).
493        ///
494        /// Update type: _Immutable_.
495        /// AWS CloudFormation replaces the resource when you change this property.
496        pub exec_args: Option<::ValueList<String>>,
497        /// Property [`InputPayloadEncodingType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-inputpayloadencodingtype).
498        ///
499        /// Update type: _Immutable_.
500        /// AWS CloudFormation replaces the resource when you change this property.
501        pub input_payload_encoding_type: Option<::Value<String>>,
502        /// Property [`LinuxProcessParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-linuxprocessparams).
503        ///
504        /// Update type: _Immutable_.
505        /// AWS CloudFormation replaces the resource when you change this property.
506        pub linux_process_params: Option<::Value<LambdaLinuxProcessParams>>,
507        /// Property [`MaxIdleTimeInSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-maxidletimeinseconds).
508        ///
509        /// Update type: _Immutable_.
510        /// AWS CloudFormation replaces the resource when you change this property.
511        pub max_idle_time_in_seconds: Option<::Value<u32>>,
512        /// Property [`MaxInstancesCount`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-maxinstancescount).
513        ///
514        /// Update type: _Immutable_.
515        /// AWS CloudFormation replaces the resource when you change this property.
516        pub max_instances_count: Option<::Value<u32>>,
517        /// Property [`MaxQueueSize`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-maxqueuesize).
518        ///
519        /// Update type: _Immutable_.
520        /// AWS CloudFormation replaces the resource when you change this property.
521        pub max_queue_size: Option<::Value<u32>>,
522        /// Property [`Pinned`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-pinned).
523        ///
524        /// Update type: _Immutable_.
525        /// AWS CloudFormation replaces the resource when you change this property.
526        pub pinned: Option<::Value<bool>>,
527        /// Property [`StatusTimeoutInSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-statustimeoutinseconds).
528        ///
529        /// Update type: _Immutable_.
530        /// AWS CloudFormation replaces the resource when you change this property.
531        pub status_timeout_in_seconds: Option<::Value<u32>>,
532        /// Property [`TimeoutInSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdaexecutionparameters.html#cfn-greengrassv2-componentversion-lambdaexecutionparameters-timeoutinseconds).
533        ///
534        /// Update type: _Immutable_.
535        /// AWS CloudFormation replaces the resource when you change this property.
536        pub timeout_in_seconds: Option<::Value<u32>>,
537    }
538
539    impl ::codec::SerializeValue for LambdaExecutionParameters {
540        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
541            let mut map = ::serde::Serializer::serialize_map(s, None)?;
542            if let Some(ref environment_variables) = self.environment_variables {
543                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnvironmentVariables", environment_variables)?;
544            }
545            if let Some(ref event_sources) = self.event_sources {
546                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EventSources", event_sources)?;
547            }
548            if let Some(ref exec_args) = self.exec_args {
549                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ExecArgs", exec_args)?;
550            }
551            if let Some(ref input_payload_encoding_type) = self.input_payload_encoding_type {
552                ::serde::ser::SerializeMap::serialize_entry(&mut map, "InputPayloadEncodingType", input_payload_encoding_type)?;
553            }
554            if let Some(ref linux_process_params) = self.linux_process_params {
555                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LinuxProcessParams", linux_process_params)?;
556            }
557            if let Some(ref max_idle_time_in_seconds) = self.max_idle_time_in_seconds {
558                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaxIdleTimeInSeconds", max_idle_time_in_seconds)?;
559            }
560            if let Some(ref max_instances_count) = self.max_instances_count {
561                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaxInstancesCount", max_instances_count)?;
562            }
563            if let Some(ref max_queue_size) = self.max_queue_size {
564                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaxQueueSize", max_queue_size)?;
565            }
566            if let Some(ref pinned) = self.pinned {
567                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Pinned", pinned)?;
568            }
569            if let Some(ref status_timeout_in_seconds) = self.status_timeout_in_seconds {
570                ::serde::ser::SerializeMap::serialize_entry(&mut map, "StatusTimeoutInSeconds", status_timeout_in_seconds)?;
571            }
572            if let Some(ref timeout_in_seconds) = self.timeout_in_seconds {
573                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TimeoutInSeconds", timeout_in_seconds)?;
574            }
575            ::serde::ser::SerializeMap::end(map)
576        }
577    }
578
579    impl ::codec::DeserializeValue for LambdaExecutionParameters {
580        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaExecutionParameters, D::Error> {
581            struct Visitor;
582
583            impl<'de> ::serde::de::Visitor<'de> for Visitor {
584                type Value = LambdaExecutionParameters;
585
586                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
587                    write!(f, "a struct of type LambdaExecutionParameters")
588                }
589
590                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
591                    let mut environment_variables: Option<::ValueMap<String>> = None;
592                    let mut event_sources: Option<::ValueList<LambdaEventSource>> = None;
593                    let mut exec_args: Option<::ValueList<String>> = None;
594                    let mut input_payload_encoding_type: Option<::Value<String>> = None;
595                    let mut linux_process_params: Option<::Value<LambdaLinuxProcessParams>> = None;
596                    let mut max_idle_time_in_seconds: Option<::Value<u32>> = None;
597                    let mut max_instances_count: Option<::Value<u32>> = None;
598                    let mut max_queue_size: Option<::Value<u32>> = None;
599                    let mut pinned: Option<::Value<bool>> = None;
600                    let mut status_timeout_in_seconds: Option<::Value<u32>> = None;
601                    let mut timeout_in_seconds: Option<::Value<u32>> = None;
602
603                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
604                        match __cfn_key.as_ref() {
605                            "EnvironmentVariables" => {
606                                environment_variables = ::serde::de::MapAccess::next_value(&mut map)?;
607                            }
608                            "EventSources" => {
609                                event_sources = ::serde::de::MapAccess::next_value(&mut map)?;
610                            }
611                            "ExecArgs" => {
612                                exec_args = ::serde::de::MapAccess::next_value(&mut map)?;
613                            }
614                            "InputPayloadEncodingType" => {
615                                input_payload_encoding_type = ::serde::de::MapAccess::next_value(&mut map)?;
616                            }
617                            "LinuxProcessParams" => {
618                                linux_process_params = ::serde::de::MapAccess::next_value(&mut map)?;
619                            }
620                            "MaxIdleTimeInSeconds" => {
621                                max_idle_time_in_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
622                            }
623                            "MaxInstancesCount" => {
624                                max_instances_count = ::serde::de::MapAccess::next_value(&mut map)?;
625                            }
626                            "MaxQueueSize" => {
627                                max_queue_size = ::serde::de::MapAccess::next_value(&mut map)?;
628                            }
629                            "Pinned" => {
630                                pinned = ::serde::de::MapAccess::next_value(&mut map)?;
631                            }
632                            "StatusTimeoutInSeconds" => {
633                                status_timeout_in_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
634                            }
635                            "TimeoutInSeconds" => {
636                                timeout_in_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
637                            }
638                            _ => {}
639                        }
640                    }
641
642                    Ok(LambdaExecutionParameters {
643                        environment_variables: environment_variables,
644                        event_sources: event_sources,
645                        exec_args: exec_args,
646                        input_payload_encoding_type: input_payload_encoding_type,
647                        linux_process_params: linux_process_params,
648                        max_idle_time_in_seconds: max_idle_time_in_seconds,
649                        max_instances_count: max_instances_count,
650                        max_queue_size: max_queue_size,
651                        pinned: pinned,
652                        status_timeout_in_seconds: status_timeout_in_seconds,
653                        timeout_in_seconds: timeout_in_seconds,
654                    })
655                }
656            }
657
658            d.deserialize_map(Visitor)
659        }
660    }
661
662    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaFunctionRecipeSource`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html) property type.
663    #[derive(Debug, Default)]
664    pub struct LambdaFunctionRecipeSource {
665        /// Property [`ComponentDependencies`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-componentdependencies).
666        ///
667        /// Update type: _Immutable_.
668        /// AWS CloudFormation replaces the resource when you change this property.
669        pub component_dependencies: Option<::ValueMap<ComponentDependencyRequirement>>,
670        /// Property [`ComponentLambdaParameters`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-componentlambdaparameters).
671        ///
672        /// Update type: _Immutable_.
673        /// AWS CloudFormation replaces the resource when you change this property.
674        pub component_lambda_parameters: Option<::Value<LambdaExecutionParameters>>,
675        /// Property [`ComponentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-componentname).
676        ///
677        /// Update type: _Immutable_.
678        /// AWS CloudFormation replaces the resource when you change this property.
679        pub component_name: Option<::Value<String>>,
680        /// Property [`ComponentPlatforms`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-componentplatforms).
681        ///
682        /// Update type: _Immutable_.
683        /// AWS CloudFormation replaces the resource when you change this property.
684        pub component_platforms: Option<::ValueList<ComponentPlatform>>,
685        /// Property [`ComponentVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-componentversion).
686        ///
687        /// Update type: _Immutable_.
688        /// AWS CloudFormation replaces the resource when you change this property.
689        pub component_version: Option<::Value<String>>,
690        /// Property [`LambdaArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdafunctionrecipesource.html#cfn-greengrassv2-componentversion-lambdafunctionrecipesource-lambdaarn).
691        ///
692        /// Update type: _Immutable_.
693        /// AWS CloudFormation replaces the resource when you change this property.
694        pub lambda_arn: Option<::Value<String>>,
695    }
696
697    impl ::codec::SerializeValue for LambdaFunctionRecipeSource {
698        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
699            let mut map = ::serde::Serializer::serialize_map(s, None)?;
700            if let Some(ref component_dependencies) = self.component_dependencies {
701                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentDependencies", component_dependencies)?;
702            }
703            if let Some(ref component_lambda_parameters) = self.component_lambda_parameters {
704                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentLambdaParameters", component_lambda_parameters)?;
705            }
706            if let Some(ref component_name) = self.component_name {
707                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentName", component_name)?;
708            }
709            if let Some(ref component_platforms) = self.component_platforms {
710                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentPlatforms", component_platforms)?;
711            }
712            if let Some(ref component_version) = self.component_version {
713                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComponentVersion", component_version)?;
714            }
715            if let Some(ref lambda_arn) = self.lambda_arn {
716                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LambdaArn", lambda_arn)?;
717            }
718            ::serde::ser::SerializeMap::end(map)
719        }
720    }
721
722    impl ::codec::DeserializeValue for LambdaFunctionRecipeSource {
723        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaFunctionRecipeSource, D::Error> {
724            struct Visitor;
725
726            impl<'de> ::serde::de::Visitor<'de> for Visitor {
727                type Value = LambdaFunctionRecipeSource;
728
729                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
730                    write!(f, "a struct of type LambdaFunctionRecipeSource")
731                }
732
733                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
734                    let mut component_dependencies: Option<::ValueMap<ComponentDependencyRequirement>> = None;
735                    let mut component_lambda_parameters: Option<::Value<LambdaExecutionParameters>> = None;
736                    let mut component_name: Option<::Value<String>> = None;
737                    let mut component_platforms: Option<::ValueList<ComponentPlatform>> = None;
738                    let mut component_version: Option<::Value<String>> = None;
739                    let mut lambda_arn: Option<::Value<String>> = None;
740
741                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
742                        match __cfn_key.as_ref() {
743                            "ComponentDependencies" => {
744                                component_dependencies = ::serde::de::MapAccess::next_value(&mut map)?;
745                            }
746                            "ComponentLambdaParameters" => {
747                                component_lambda_parameters = ::serde::de::MapAccess::next_value(&mut map)?;
748                            }
749                            "ComponentName" => {
750                                component_name = ::serde::de::MapAccess::next_value(&mut map)?;
751                            }
752                            "ComponentPlatforms" => {
753                                component_platforms = ::serde::de::MapAccess::next_value(&mut map)?;
754                            }
755                            "ComponentVersion" => {
756                                component_version = ::serde::de::MapAccess::next_value(&mut map)?;
757                            }
758                            "LambdaArn" => {
759                                lambda_arn = ::serde::de::MapAccess::next_value(&mut map)?;
760                            }
761                            _ => {}
762                        }
763                    }
764
765                    Ok(LambdaFunctionRecipeSource {
766                        component_dependencies: component_dependencies,
767                        component_lambda_parameters: component_lambda_parameters,
768                        component_name: component_name,
769                        component_platforms: component_platforms,
770                        component_version: component_version,
771                        lambda_arn: lambda_arn,
772                    })
773                }
774            }
775
776            d.deserialize_map(Visitor)
777        }
778    }
779
780    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaLinuxProcessParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdalinuxprocessparams.html) property type.
781    #[derive(Debug, Default)]
782    pub struct LambdaLinuxProcessParams {
783        /// Property [`ContainerParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdalinuxprocessparams.html#cfn-greengrassv2-componentversion-lambdalinuxprocessparams-containerparams).
784        ///
785        /// Update type: _Immutable_.
786        /// AWS CloudFormation replaces the resource when you change this property.
787        pub container_params: Option<::Value<LambdaContainerParams>>,
788        /// Property [`IsolationMode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdalinuxprocessparams.html#cfn-greengrassv2-componentversion-lambdalinuxprocessparams-isolationmode).
789        ///
790        /// Update type: _Immutable_.
791        /// AWS CloudFormation replaces the resource when you change this property.
792        pub isolation_mode: Option<::Value<String>>,
793    }
794
795    impl ::codec::SerializeValue for LambdaLinuxProcessParams {
796        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
797            let mut map = ::serde::Serializer::serialize_map(s, None)?;
798            if let Some(ref container_params) = self.container_params {
799                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ContainerParams", container_params)?;
800            }
801            if let Some(ref isolation_mode) = self.isolation_mode {
802                ::serde::ser::SerializeMap::serialize_entry(&mut map, "IsolationMode", isolation_mode)?;
803            }
804            ::serde::ser::SerializeMap::end(map)
805        }
806    }
807
808    impl ::codec::DeserializeValue for LambdaLinuxProcessParams {
809        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaLinuxProcessParams, D::Error> {
810            struct Visitor;
811
812            impl<'de> ::serde::de::Visitor<'de> for Visitor {
813                type Value = LambdaLinuxProcessParams;
814
815                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
816                    write!(f, "a struct of type LambdaLinuxProcessParams")
817                }
818
819                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
820                    let mut container_params: Option<::Value<LambdaContainerParams>> = None;
821                    let mut isolation_mode: Option<::Value<String>> = None;
822
823                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
824                        match __cfn_key.as_ref() {
825                            "ContainerParams" => {
826                                container_params = ::serde::de::MapAccess::next_value(&mut map)?;
827                            }
828                            "IsolationMode" => {
829                                isolation_mode = ::serde::de::MapAccess::next_value(&mut map)?;
830                            }
831                            _ => {}
832                        }
833                    }
834
835                    Ok(LambdaLinuxProcessParams {
836                        container_params: container_params,
837                        isolation_mode: isolation_mode,
838                    })
839                }
840            }
841
842            d.deserialize_map(Visitor)
843        }
844    }
845
846    /// The [`AWS::GreengrassV2::ComponentVersion.LambdaVolumeMount`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdavolumemount.html) property type.
847    #[derive(Debug, Default)]
848    pub struct LambdaVolumeMount {
849        /// Property [`AddGroupOwner`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdavolumemount.html#cfn-greengrassv2-componentversion-lambdavolumemount-addgroupowner).
850        ///
851        /// Update type: _Immutable_.
852        /// AWS CloudFormation replaces the resource when you change this property.
853        pub add_group_owner: Option<::Value<bool>>,
854        /// Property [`DestinationPath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdavolumemount.html#cfn-greengrassv2-componentversion-lambdavolumemount-destinationpath).
855        ///
856        /// Update type: _Immutable_.
857        /// AWS CloudFormation replaces the resource when you change this property.
858        pub destination_path: Option<::Value<String>>,
859        /// Property [`Permission`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdavolumemount.html#cfn-greengrassv2-componentversion-lambdavolumemount-permission).
860        ///
861        /// Update type: _Immutable_.
862        /// AWS CloudFormation replaces the resource when you change this property.
863        pub permission: Option<::Value<String>>,
864        /// Property [`SourcePath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrassv2-componentversion-lambdavolumemount.html#cfn-greengrassv2-componentversion-lambdavolumemount-sourcepath).
865        ///
866        /// Update type: _Immutable_.
867        /// AWS CloudFormation replaces the resource when you change this property.
868        pub source_path: Option<::Value<String>>,
869    }
870
871    impl ::codec::SerializeValue for LambdaVolumeMount {
872        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
873            let mut map = ::serde::Serializer::serialize_map(s, None)?;
874            if let Some(ref add_group_owner) = self.add_group_owner {
875                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AddGroupOwner", add_group_owner)?;
876            }
877            if let Some(ref destination_path) = self.destination_path {
878                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DestinationPath", destination_path)?;
879            }
880            if let Some(ref permission) = self.permission {
881                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Permission", permission)?;
882            }
883            if let Some(ref source_path) = self.source_path {
884                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SourcePath", source_path)?;
885            }
886            ::serde::ser::SerializeMap::end(map)
887        }
888    }
889
890    impl ::codec::DeserializeValue for LambdaVolumeMount {
891        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LambdaVolumeMount, D::Error> {
892            struct Visitor;
893
894            impl<'de> ::serde::de::Visitor<'de> for Visitor {
895                type Value = LambdaVolumeMount;
896
897                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
898                    write!(f, "a struct of type LambdaVolumeMount")
899                }
900
901                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
902                    let mut add_group_owner: Option<::Value<bool>> = None;
903                    let mut destination_path: Option<::Value<String>> = None;
904                    let mut permission: Option<::Value<String>> = None;
905                    let mut source_path: Option<::Value<String>> = None;
906
907                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
908                        match __cfn_key.as_ref() {
909                            "AddGroupOwner" => {
910                                add_group_owner = ::serde::de::MapAccess::next_value(&mut map)?;
911                            }
912                            "DestinationPath" => {
913                                destination_path = ::serde::de::MapAccess::next_value(&mut map)?;
914                            }
915                            "Permission" => {
916                                permission = ::serde::de::MapAccess::next_value(&mut map)?;
917                            }
918                            "SourcePath" => {
919                                source_path = ::serde::de::MapAccess::next_value(&mut map)?;
920                            }
921                            _ => {}
922                        }
923                    }
924
925                    Ok(LambdaVolumeMount {
926                        add_group_owner: add_group_owner,
927                        destination_path: destination_path,
928                        permission: permission,
929                        source_path: source_path,
930                    })
931                }
932            }
933
934            d.deserialize_map(Visitor)
935        }
936    }
937}