cfn/aws/
elasticloadbalancingv2.rs

1//! Types for the `ElasticLoadBalancingV2` service.
2
3/// The [`AWS::ElasticLoadBalancingV2::Listener`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html) resource type.
4#[derive(Debug, Default)]
5pub struct Listener {
6    properties: ListenerProperties
7}
8
9/// Properties for the `Listener` resource.
10#[derive(Debug, Default)]
11pub struct ListenerProperties {
12    /// Property [`AlpnPolicy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-alpnpolicy).
13    ///
14    /// Update type: _Mutable_.
15    /// AWS CloudFormation doesn't replace the resource when you change this property.
16    pub alpn_policy: Option<::ValueList<String>>,
17    /// Property [`Certificates`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-certificates).
18    ///
19    /// Update type: _Mutable_.
20    /// AWS CloudFormation doesn't replace the resource when you change this property.
21    pub certificates: Option<::ValueList<self::listener::Certificate>>,
22    /// Property [`DefaultActions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-defaultactions).
23    ///
24    /// Update type: _Mutable_.
25    /// AWS CloudFormation doesn't replace the resource when you change this property.
26    pub default_actions: ::ValueList<self::listener::Action>,
27    /// Property [`LoadBalancerArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-loadbalancerarn).
28    ///
29    /// Update type: _Immutable_.
30    /// AWS CloudFormation replaces the resource when you change this property.
31    pub load_balancer_arn: ::Value<String>,
32    /// Property [`Port`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-port).
33    ///
34    /// Update type: _Mutable_.
35    /// AWS CloudFormation doesn't replace the resource when you change this property.
36    pub port: Option<::Value<u32>>,
37    /// Property [`Protocol`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-protocol).
38    ///
39    /// Update type: _Mutable_.
40    /// AWS CloudFormation doesn't replace the resource when you change this property.
41    pub protocol: Option<::Value<String>>,
42    /// Property [`SslPolicy`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listener.html#cfn-elasticloadbalancingv2-listener-sslpolicy).
43    ///
44    /// Update type: _Mutable_.
45    /// AWS CloudFormation doesn't replace the resource when you change this property.
46    pub ssl_policy: Option<::Value<String>>,
47}
48
49impl ::serde::Serialize for ListenerProperties {
50    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
51        let mut map = ::serde::Serializer::serialize_map(s, None)?;
52        if let Some(ref alpn_policy) = self.alpn_policy {
53            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AlpnPolicy", alpn_policy)?;
54        }
55        if let Some(ref certificates) = self.certificates {
56            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificates", certificates)?;
57        }
58        ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultActions", &self.default_actions)?;
59        ::serde::ser::SerializeMap::serialize_entry(&mut map, "LoadBalancerArn", &self.load_balancer_arn)?;
60        if let Some(ref port) = self.port {
61            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Port", port)?;
62        }
63        if let Some(ref protocol) = self.protocol {
64            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Protocol", protocol)?;
65        }
66        if let Some(ref ssl_policy) = self.ssl_policy {
67            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SslPolicy", ssl_policy)?;
68        }
69        ::serde::ser::SerializeMap::end(map)
70    }
71}
72
73impl<'de> ::serde::Deserialize<'de> for ListenerProperties {
74    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ListenerProperties, D::Error> {
75        struct Visitor;
76
77        impl<'de> ::serde::de::Visitor<'de> for Visitor {
78            type Value = ListenerProperties;
79
80            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
81                write!(f, "a struct of type ListenerProperties")
82            }
83
84            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
85                let mut alpn_policy: Option<::ValueList<String>> = None;
86                let mut certificates: Option<::ValueList<self::listener::Certificate>> = None;
87                let mut default_actions: Option<::ValueList<self::listener::Action>> = None;
88                let mut load_balancer_arn: Option<::Value<String>> = None;
89                let mut port: Option<::Value<u32>> = None;
90                let mut protocol: Option<::Value<String>> = None;
91                let mut ssl_policy: Option<::Value<String>> = None;
92
93                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
94                    match __cfn_key.as_ref() {
95                        "AlpnPolicy" => {
96                            alpn_policy = ::serde::de::MapAccess::next_value(&mut map)?;
97                        }
98                        "Certificates" => {
99                            certificates = ::serde::de::MapAccess::next_value(&mut map)?;
100                        }
101                        "DefaultActions" => {
102                            default_actions = ::serde::de::MapAccess::next_value(&mut map)?;
103                        }
104                        "LoadBalancerArn" => {
105                            load_balancer_arn = ::serde::de::MapAccess::next_value(&mut map)?;
106                        }
107                        "Port" => {
108                            port = ::serde::de::MapAccess::next_value(&mut map)?;
109                        }
110                        "Protocol" => {
111                            protocol = ::serde::de::MapAccess::next_value(&mut map)?;
112                        }
113                        "SslPolicy" => {
114                            ssl_policy = ::serde::de::MapAccess::next_value(&mut map)?;
115                        }
116                        _ => {}
117                    }
118                }
119
120                Ok(ListenerProperties {
121                    alpn_policy: alpn_policy,
122                    certificates: certificates,
123                    default_actions: default_actions.ok_or(::serde::de::Error::missing_field("DefaultActions"))?,
124                    load_balancer_arn: load_balancer_arn.ok_or(::serde::de::Error::missing_field("LoadBalancerArn"))?,
125                    port: port,
126                    protocol: protocol,
127                    ssl_policy: ssl_policy,
128                })
129            }
130        }
131
132        d.deserialize_map(Visitor)
133    }
134}
135
136impl ::Resource for Listener {
137    type Properties = ListenerProperties;
138    const TYPE: &'static str = "AWS::ElasticLoadBalancingV2::Listener";
139    fn properties(&self) -> &ListenerProperties {
140        &self.properties
141    }
142    fn properties_mut(&mut self) -> &mut ListenerProperties {
143        &mut self.properties
144    }
145}
146
147impl ::private::Sealed for Listener {}
148
149impl From<ListenerProperties> for Listener {
150    fn from(properties: ListenerProperties) -> Listener {
151        Listener { properties }
152    }
153}
154
155/// The [`AWS::ElasticLoadBalancingV2::ListenerCertificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenercertificate.html) resource type.
156#[derive(Debug, Default)]
157pub struct ListenerCertificate {
158    properties: ListenerCertificateProperties
159}
160
161/// Properties for the `ListenerCertificate` resource.
162#[derive(Debug, Default)]
163pub struct ListenerCertificateProperties {
164    /// Property [`Certificates`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenercertificate.html#cfn-elasticloadbalancingv2-listenercertificate-certificates).
165    ///
166    /// Update type: _Immutable_.
167    /// AWS CloudFormation replaces the resource when you change this property.
168    pub certificates: ::ValueList<self::listener_certificate::Certificate>,
169    /// Property [`ListenerArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenercertificate.html#cfn-elasticloadbalancingv2-listenercertificate-listenerarn).
170    ///
171    /// Update type: _Immutable_.
172    /// AWS CloudFormation replaces the resource when you change this property.
173    pub listener_arn: ::Value<String>,
174}
175
176impl ::serde::Serialize for ListenerCertificateProperties {
177    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
178        let mut map = ::serde::Serializer::serialize_map(s, None)?;
179        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificates", &self.certificates)?;
180        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ListenerArn", &self.listener_arn)?;
181        ::serde::ser::SerializeMap::end(map)
182    }
183}
184
185impl<'de> ::serde::Deserialize<'de> for ListenerCertificateProperties {
186    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ListenerCertificateProperties, D::Error> {
187        struct Visitor;
188
189        impl<'de> ::serde::de::Visitor<'de> for Visitor {
190            type Value = ListenerCertificateProperties;
191
192            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
193                write!(f, "a struct of type ListenerCertificateProperties")
194            }
195
196            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
197                let mut certificates: Option<::ValueList<self::listener_certificate::Certificate>> = None;
198                let mut listener_arn: Option<::Value<String>> = None;
199
200                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
201                    match __cfn_key.as_ref() {
202                        "Certificates" => {
203                            certificates = ::serde::de::MapAccess::next_value(&mut map)?;
204                        }
205                        "ListenerArn" => {
206                            listener_arn = ::serde::de::MapAccess::next_value(&mut map)?;
207                        }
208                        _ => {}
209                    }
210                }
211
212                Ok(ListenerCertificateProperties {
213                    certificates: certificates.ok_or(::serde::de::Error::missing_field("Certificates"))?,
214                    listener_arn: listener_arn.ok_or(::serde::de::Error::missing_field("ListenerArn"))?,
215                })
216            }
217        }
218
219        d.deserialize_map(Visitor)
220    }
221}
222
223impl ::Resource for ListenerCertificate {
224    type Properties = ListenerCertificateProperties;
225    const TYPE: &'static str = "AWS::ElasticLoadBalancingV2::ListenerCertificate";
226    fn properties(&self) -> &ListenerCertificateProperties {
227        &self.properties
228    }
229    fn properties_mut(&mut self) -> &mut ListenerCertificateProperties {
230        &mut self.properties
231    }
232}
233
234impl ::private::Sealed for ListenerCertificate {}
235
236impl From<ListenerCertificateProperties> for ListenerCertificate {
237    fn from(properties: ListenerCertificateProperties) -> ListenerCertificate {
238        ListenerCertificate { properties }
239    }
240}
241
242/// The [`AWS::ElasticLoadBalancingV2::ListenerRule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html) resource type.
243#[derive(Debug, Default)]
244pub struct ListenerRule {
245    properties: ListenerRuleProperties
246}
247
248/// Properties for the `ListenerRule` resource.
249#[derive(Debug, Default)]
250pub struct ListenerRuleProperties {
251    /// Property [`Actions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html#cfn-elasticloadbalancingv2-listenerrule-actions).
252    ///
253    /// Update type: _Mutable_.
254    /// AWS CloudFormation doesn't replace the resource when you change this property.
255    pub actions: ::ValueList<self::listener_rule::Action>,
256    /// Property [`Conditions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html#cfn-elasticloadbalancingv2-listenerrule-conditions).
257    ///
258    /// Update type: _Mutable_.
259    /// AWS CloudFormation doesn't replace the resource when you change this property.
260    pub conditions: ::ValueList<self::listener_rule::RuleCondition>,
261    /// Property [`ListenerArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html#cfn-elasticloadbalancingv2-listenerrule-listenerarn).
262    ///
263    /// Update type: _Immutable_.
264    /// AWS CloudFormation replaces the resource when you change this property.
265    pub listener_arn: ::Value<String>,
266    /// Property [`Priority`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-listenerrule.html#cfn-elasticloadbalancingv2-listenerrule-priority).
267    ///
268    /// Update type: _Mutable_.
269    /// AWS CloudFormation doesn't replace the resource when you change this property.
270    pub priority: ::Value<u32>,
271}
272
273impl ::serde::Serialize for ListenerRuleProperties {
274    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
275        let mut map = ::serde::Serializer::serialize_map(s, None)?;
276        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Actions", &self.actions)?;
277        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Conditions", &self.conditions)?;
278        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ListenerArn", &self.listener_arn)?;
279        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Priority", &self.priority)?;
280        ::serde::ser::SerializeMap::end(map)
281    }
282}
283
284impl<'de> ::serde::Deserialize<'de> for ListenerRuleProperties {
285    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ListenerRuleProperties, D::Error> {
286        struct Visitor;
287
288        impl<'de> ::serde::de::Visitor<'de> for Visitor {
289            type Value = ListenerRuleProperties;
290
291            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
292                write!(f, "a struct of type ListenerRuleProperties")
293            }
294
295            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
296                let mut actions: Option<::ValueList<self::listener_rule::Action>> = None;
297                let mut conditions: Option<::ValueList<self::listener_rule::RuleCondition>> = None;
298                let mut listener_arn: Option<::Value<String>> = None;
299                let mut priority: Option<::Value<u32>> = None;
300
301                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
302                    match __cfn_key.as_ref() {
303                        "Actions" => {
304                            actions = ::serde::de::MapAccess::next_value(&mut map)?;
305                        }
306                        "Conditions" => {
307                            conditions = ::serde::de::MapAccess::next_value(&mut map)?;
308                        }
309                        "ListenerArn" => {
310                            listener_arn = ::serde::de::MapAccess::next_value(&mut map)?;
311                        }
312                        "Priority" => {
313                            priority = ::serde::de::MapAccess::next_value(&mut map)?;
314                        }
315                        _ => {}
316                    }
317                }
318
319                Ok(ListenerRuleProperties {
320                    actions: actions.ok_or(::serde::de::Error::missing_field("Actions"))?,
321                    conditions: conditions.ok_or(::serde::de::Error::missing_field("Conditions"))?,
322                    listener_arn: listener_arn.ok_or(::serde::de::Error::missing_field("ListenerArn"))?,
323                    priority: priority.ok_or(::serde::de::Error::missing_field("Priority"))?,
324                })
325            }
326        }
327
328        d.deserialize_map(Visitor)
329    }
330}
331
332impl ::Resource for ListenerRule {
333    type Properties = ListenerRuleProperties;
334    const TYPE: &'static str = "AWS::ElasticLoadBalancingV2::ListenerRule";
335    fn properties(&self) -> &ListenerRuleProperties {
336        &self.properties
337    }
338    fn properties_mut(&mut self) -> &mut ListenerRuleProperties {
339        &mut self.properties
340    }
341}
342
343impl ::private::Sealed for ListenerRule {}
344
345impl From<ListenerRuleProperties> for ListenerRule {
346    fn from(properties: ListenerRuleProperties) -> ListenerRule {
347        ListenerRule { properties }
348    }
349}
350
351/// The [`AWS::ElasticLoadBalancingV2::LoadBalancer`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html) resource type.
352#[derive(Debug, Default)]
353pub struct LoadBalancer {
354    properties: LoadBalancerProperties
355}
356
357/// Properties for the `LoadBalancer` resource.
358#[derive(Debug, Default)]
359pub struct LoadBalancerProperties {
360    /// Property [`IpAddressType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-ipaddresstype).
361    ///
362    /// Update type: _Mutable_.
363    /// AWS CloudFormation doesn't replace the resource when you change this property.
364    pub ip_address_type: Option<::Value<String>>,
365    /// Property [`LoadBalancerAttributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-loadbalancerattributes).
366    ///
367    /// Update type: _Mutable_.
368    /// AWS CloudFormation doesn't replace the resource when you change this property.
369    pub load_balancer_attributes: Option<::ValueList<self::load_balancer::LoadBalancerAttribute>>,
370    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-name).
371    ///
372    /// Update type: _Immutable_.
373    /// AWS CloudFormation replaces the resource when you change this property.
374    pub name: Option<::Value<String>>,
375    /// Property [`Scheme`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-scheme).
376    ///
377    /// Update type: _Immutable_.
378    /// AWS CloudFormation replaces the resource when you change this property.
379    pub scheme: Option<::Value<String>>,
380    /// Property [`SecurityGroups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-securitygroups).
381    ///
382    /// Update type: _Mutable_.
383    /// AWS CloudFormation doesn't replace the resource when you change this property.
384    pub security_groups: Option<::ValueList<String>>,
385    /// Property [`SubnetMappings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmappings).
386    ///
387    /// Update type: _Mutable_.
388    /// AWS CloudFormation doesn't replace the resource when you change this property.
389    pub subnet_mappings: Option<::ValueList<self::load_balancer::SubnetMapping>>,
390    /// Property [`Subnets`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-subnets).
391    ///
392    /// Update type: _Mutable_.
393    /// AWS CloudFormation doesn't replace the resource when you change this property.
394    pub subnets: Option<::ValueList<String>>,
395    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-tags).
396    ///
397    /// Update type: _Mutable_.
398    /// AWS CloudFormation doesn't replace the resource when you change this property.
399    pub tags: Option<::ValueList<::Tag>>,
400    /// Property [`Type`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-type).
401    ///
402    /// Update type: _Immutable_.
403    /// AWS CloudFormation replaces the resource when you change this property.
404    pub r#type: Option<::Value<String>>,
405}
406
407impl ::serde::Serialize for LoadBalancerProperties {
408    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
409        let mut map = ::serde::Serializer::serialize_map(s, None)?;
410        if let Some(ref ip_address_type) = self.ip_address_type {
411            ::serde::ser::SerializeMap::serialize_entry(&mut map, "IpAddressType", ip_address_type)?;
412        }
413        if let Some(ref load_balancer_attributes) = self.load_balancer_attributes {
414            ::serde::ser::SerializeMap::serialize_entry(&mut map, "LoadBalancerAttributes", load_balancer_attributes)?;
415        }
416        if let Some(ref name) = self.name {
417            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", name)?;
418        }
419        if let Some(ref scheme) = self.scheme {
420            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Scheme", scheme)?;
421        }
422        if let Some(ref security_groups) = self.security_groups {
423            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SecurityGroups", security_groups)?;
424        }
425        if let Some(ref subnet_mappings) = self.subnet_mappings {
426            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetMappings", subnet_mappings)?;
427        }
428        if let Some(ref subnets) = self.subnets {
429            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Subnets", subnets)?;
430        }
431        if let Some(ref tags) = self.tags {
432            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
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
441impl<'de> ::serde::Deserialize<'de> for LoadBalancerProperties {
442    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<LoadBalancerProperties, D::Error> {
443        struct Visitor;
444
445        impl<'de> ::serde::de::Visitor<'de> for Visitor {
446            type Value = LoadBalancerProperties;
447
448            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
449                write!(f, "a struct of type LoadBalancerProperties")
450            }
451
452            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
453                let mut ip_address_type: Option<::Value<String>> = None;
454                let mut load_balancer_attributes: Option<::ValueList<self::load_balancer::LoadBalancerAttribute>> = None;
455                let mut name: Option<::Value<String>> = None;
456                let mut scheme: Option<::Value<String>> = None;
457                let mut security_groups: Option<::ValueList<String>> = None;
458                let mut subnet_mappings: Option<::ValueList<self::load_balancer::SubnetMapping>> = None;
459                let mut subnets: Option<::ValueList<String>> = None;
460                let mut tags: Option<::ValueList<::Tag>> = None;
461                let mut r#type: Option<::Value<String>> = None;
462
463                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
464                    match __cfn_key.as_ref() {
465                        "IpAddressType" => {
466                            ip_address_type = ::serde::de::MapAccess::next_value(&mut map)?;
467                        }
468                        "LoadBalancerAttributes" => {
469                            load_balancer_attributes = ::serde::de::MapAccess::next_value(&mut map)?;
470                        }
471                        "Name" => {
472                            name = ::serde::de::MapAccess::next_value(&mut map)?;
473                        }
474                        "Scheme" => {
475                            scheme = ::serde::de::MapAccess::next_value(&mut map)?;
476                        }
477                        "SecurityGroups" => {
478                            security_groups = ::serde::de::MapAccess::next_value(&mut map)?;
479                        }
480                        "SubnetMappings" => {
481                            subnet_mappings = ::serde::de::MapAccess::next_value(&mut map)?;
482                        }
483                        "Subnets" => {
484                            subnets = ::serde::de::MapAccess::next_value(&mut map)?;
485                        }
486                        "Tags" => {
487                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
488                        }
489                        "Type" => {
490                            r#type = ::serde::de::MapAccess::next_value(&mut map)?;
491                        }
492                        _ => {}
493                    }
494                }
495
496                Ok(LoadBalancerProperties {
497                    ip_address_type: ip_address_type,
498                    load_balancer_attributes: load_balancer_attributes,
499                    name: name,
500                    scheme: scheme,
501                    security_groups: security_groups,
502                    subnet_mappings: subnet_mappings,
503                    subnets: subnets,
504                    tags: tags,
505                    r#type: r#type,
506                })
507            }
508        }
509
510        d.deserialize_map(Visitor)
511    }
512}
513
514impl ::Resource for LoadBalancer {
515    type Properties = LoadBalancerProperties;
516    const TYPE: &'static str = "AWS::ElasticLoadBalancingV2::LoadBalancer";
517    fn properties(&self) -> &LoadBalancerProperties {
518        &self.properties
519    }
520    fn properties_mut(&mut self) -> &mut LoadBalancerProperties {
521        &mut self.properties
522    }
523}
524
525impl ::private::Sealed for LoadBalancer {}
526
527impl From<LoadBalancerProperties> for LoadBalancer {
528    fn from(properties: LoadBalancerProperties) -> LoadBalancer {
529        LoadBalancer { properties }
530    }
531}
532
533/// The [`AWS::ElasticLoadBalancingV2::TargetGroup`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html) resource type.
534#[derive(Debug, Default)]
535pub struct TargetGroup {
536    properties: TargetGroupProperties
537}
538
539/// Properties for the `TargetGroup` resource.
540#[derive(Debug, Default)]
541pub struct TargetGroupProperties {
542    /// Property [`HealthCheckEnabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthcheckenabled).
543    ///
544    /// Update type: _Mutable_.
545    /// AWS CloudFormation doesn't replace the resource when you change this property.
546    pub health_check_enabled: Option<::Value<bool>>,
547    /// Property [`HealthCheckIntervalSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthcheckintervalseconds).
548    ///
549    /// Update type: _Mutable_.
550    /// AWS CloudFormation doesn't replace the resource when you change this property.
551    pub health_check_interval_seconds: Option<::Value<u32>>,
552    /// Property [`HealthCheckPath`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthcheckpath).
553    ///
554    /// Update type: _Mutable_.
555    /// AWS CloudFormation doesn't replace the resource when you change this property.
556    pub health_check_path: Option<::Value<String>>,
557    /// Property [`HealthCheckPort`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthcheckport).
558    ///
559    /// Update type: _Mutable_.
560    /// AWS CloudFormation doesn't replace the resource when you change this property.
561    pub health_check_port: Option<::Value<String>>,
562    /// Property [`HealthCheckProtocol`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthcheckprotocol).
563    ///
564    /// Update type: _Mutable_.
565    /// AWS CloudFormation doesn't replace the resource when you change this property.
566    pub health_check_protocol: Option<::Value<String>>,
567    /// Property [`HealthCheckTimeoutSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthchecktimeoutseconds).
568    ///
569    /// Update type: _Mutable_.
570    /// AWS CloudFormation doesn't replace the resource when you change this property.
571    pub health_check_timeout_seconds: Option<::Value<u32>>,
572    /// Property [`HealthyThresholdCount`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-healthythresholdcount).
573    ///
574    /// Update type: _Mutable_.
575    /// AWS CloudFormation doesn't replace the resource when you change this property.
576    pub healthy_threshold_count: Option<::Value<u32>>,
577    /// Property [`Matcher`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-matcher).
578    ///
579    /// Update type: _Mutable_.
580    /// AWS CloudFormation doesn't replace the resource when you change this property.
581    pub matcher: Option<::Value<self::target_group::Matcher>>,
582    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-name).
583    ///
584    /// Update type: _Immutable_.
585    /// AWS CloudFormation replaces the resource when you change this property.
586    pub name: Option<::Value<String>>,
587    /// Property [`Port`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-port).
588    ///
589    /// Update type: _Immutable_.
590    /// AWS CloudFormation replaces the resource when you change this property.
591    pub port: Option<::Value<u32>>,
592    /// Property [`Protocol`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-protocol).
593    ///
594    /// Update type: _Immutable_.
595    /// AWS CloudFormation replaces the resource when you change this property.
596    pub protocol: Option<::Value<String>>,
597    /// Property [`ProtocolVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-protocolversion).
598    ///
599    /// Update type: _Immutable_.
600    /// AWS CloudFormation replaces the resource when you change this property.
601    pub protocol_version: Option<::Value<String>>,
602    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-tags).
603    ///
604    /// Update type: _Mutable_.
605    /// AWS CloudFormation doesn't replace the resource when you change this property.
606    pub tags: Option<::ValueList<::Tag>>,
607    /// Property [`TargetGroupAttributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-targetgroupattributes).
608    ///
609    /// Update type: _Mutable_.
610    /// AWS CloudFormation doesn't replace the resource when you change this property.
611    pub target_group_attributes: Option<::ValueList<self::target_group::TargetGroupAttribute>>,
612    /// Property [`TargetType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-targettype).
613    ///
614    /// Update type: _Immutable_.
615    /// AWS CloudFormation replaces the resource when you change this property.
616    pub target_type: Option<::Value<String>>,
617    /// Property [`Targets`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-targets).
618    ///
619    /// Update type: _Mutable_.
620    /// AWS CloudFormation doesn't replace the resource when you change this property.
621    pub targets: Option<::ValueList<self::target_group::TargetDescription>>,
622    /// Property [`UnhealthyThresholdCount`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-unhealthythresholdcount).
623    ///
624    /// Update type: _Mutable_.
625    /// AWS CloudFormation doesn't replace the resource when you change this property.
626    pub unhealthy_threshold_count: Option<::Value<u32>>,
627    /// Property [`VpcId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-targetgroup.html#cfn-elasticloadbalancingv2-targetgroup-vpcid).
628    ///
629    /// Update type: _Immutable_.
630    /// AWS CloudFormation replaces the resource when you change this property.
631    pub vpc_id: Option<::Value<String>>,
632}
633
634impl ::serde::Serialize for TargetGroupProperties {
635    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
636        let mut map = ::serde::Serializer::serialize_map(s, None)?;
637        if let Some(ref health_check_enabled) = self.health_check_enabled {
638            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckEnabled", health_check_enabled)?;
639        }
640        if let Some(ref health_check_interval_seconds) = self.health_check_interval_seconds {
641            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckIntervalSeconds", health_check_interval_seconds)?;
642        }
643        if let Some(ref health_check_path) = self.health_check_path {
644            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckPath", health_check_path)?;
645        }
646        if let Some(ref health_check_port) = self.health_check_port {
647            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckPort", health_check_port)?;
648        }
649        if let Some(ref health_check_protocol) = self.health_check_protocol {
650            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckProtocol", health_check_protocol)?;
651        }
652        if let Some(ref health_check_timeout_seconds) = self.health_check_timeout_seconds {
653            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthCheckTimeoutSeconds", health_check_timeout_seconds)?;
654        }
655        if let Some(ref healthy_threshold_count) = self.healthy_threshold_count {
656            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HealthyThresholdCount", healthy_threshold_count)?;
657        }
658        if let Some(ref matcher) = self.matcher {
659            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Matcher", matcher)?;
660        }
661        if let Some(ref name) = self.name {
662            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", name)?;
663        }
664        if let Some(ref port) = self.port {
665            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Port", port)?;
666        }
667        if let Some(ref protocol) = self.protocol {
668            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Protocol", protocol)?;
669        }
670        if let Some(ref protocol_version) = self.protocol_version {
671            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ProtocolVersion", protocol_version)?;
672        }
673        if let Some(ref tags) = self.tags {
674            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
675        }
676        if let Some(ref target_group_attributes) = self.target_group_attributes {
677            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupAttributes", target_group_attributes)?;
678        }
679        if let Some(ref target_type) = self.target_type {
680            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetType", target_type)?;
681        }
682        if let Some(ref targets) = self.targets {
683            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Targets", targets)?;
684        }
685        if let Some(ref unhealthy_threshold_count) = self.unhealthy_threshold_count {
686            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UnhealthyThresholdCount", unhealthy_threshold_count)?;
687        }
688        if let Some(ref vpc_id) = self.vpc_id {
689            ::serde::ser::SerializeMap::serialize_entry(&mut map, "VpcId", vpc_id)?;
690        }
691        ::serde::ser::SerializeMap::end(map)
692    }
693}
694
695impl<'de> ::serde::Deserialize<'de> for TargetGroupProperties {
696    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupProperties, D::Error> {
697        struct Visitor;
698
699        impl<'de> ::serde::de::Visitor<'de> for Visitor {
700            type Value = TargetGroupProperties;
701
702            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
703                write!(f, "a struct of type TargetGroupProperties")
704            }
705
706            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
707                let mut health_check_enabled: Option<::Value<bool>> = None;
708                let mut health_check_interval_seconds: Option<::Value<u32>> = None;
709                let mut health_check_path: Option<::Value<String>> = None;
710                let mut health_check_port: Option<::Value<String>> = None;
711                let mut health_check_protocol: Option<::Value<String>> = None;
712                let mut health_check_timeout_seconds: Option<::Value<u32>> = None;
713                let mut healthy_threshold_count: Option<::Value<u32>> = None;
714                let mut matcher: Option<::Value<self::target_group::Matcher>> = None;
715                let mut name: Option<::Value<String>> = None;
716                let mut port: Option<::Value<u32>> = None;
717                let mut protocol: Option<::Value<String>> = None;
718                let mut protocol_version: Option<::Value<String>> = None;
719                let mut tags: Option<::ValueList<::Tag>> = None;
720                let mut target_group_attributes: Option<::ValueList<self::target_group::TargetGroupAttribute>> = None;
721                let mut target_type: Option<::Value<String>> = None;
722                let mut targets: Option<::ValueList<self::target_group::TargetDescription>> = None;
723                let mut unhealthy_threshold_count: Option<::Value<u32>> = None;
724                let mut vpc_id: Option<::Value<String>> = None;
725
726                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
727                    match __cfn_key.as_ref() {
728                        "HealthCheckEnabled" => {
729                            health_check_enabled = ::serde::de::MapAccess::next_value(&mut map)?;
730                        }
731                        "HealthCheckIntervalSeconds" => {
732                            health_check_interval_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
733                        }
734                        "HealthCheckPath" => {
735                            health_check_path = ::serde::de::MapAccess::next_value(&mut map)?;
736                        }
737                        "HealthCheckPort" => {
738                            health_check_port = ::serde::de::MapAccess::next_value(&mut map)?;
739                        }
740                        "HealthCheckProtocol" => {
741                            health_check_protocol = ::serde::de::MapAccess::next_value(&mut map)?;
742                        }
743                        "HealthCheckTimeoutSeconds" => {
744                            health_check_timeout_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
745                        }
746                        "HealthyThresholdCount" => {
747                            healthy_threshold_count = ::serde::de::MapAccess::next_value(&mut map)?;
748                        }
749                        "Matcher" => {
750                            matcher = ::serde::de::MapAccess::next_value(&mut map)?;
751                        }
752                        "Name" => {
753                            name = ::serde::de::MapAccess::next_value(&mut map)?;
754                        }
755                        "Port" => {
756                            port = ::serde::de::MapAccess::next_value(&mut map)?;
757                        }
758                        "Protocol" => {
759                            protocol = ::serde::de::MapAccess::next_value(&mut map)?;
760                        }
761                        "ProtocolVersion" => {
762                            protocol_version = ::serde::de::MapAccess::next_value(&mut map)?;
763                        }
764                        "Tags" => {
765                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
766                        }
767                        "TargetGroupAttributes" => {
768                            target_group_attributes = ::serde::de::MapAccess::next_value(&mut map)?;
769                        }
770                        "TargetType" => {
771                            target_type = ::serde::de::MapAccess::next_value(&mut map)?;
772                        }
773                        "Targets" => {
774                            targets = ::serde::de::MapAccess::next_value(&mut map)?;
775                        }
776                        "UnhealthyThresholdCount" => {
777                            unhealthy_threshold_count = ::serde::de::MapAccess::next_value(&mut map)?;
778                        }
779                        "VpcId" => {
780                            vpc_id = ::serde::de::MapAccess::next_value(&mut map)?;
781                        }
782                        _ => {}
783                    }
784                }
785
786                Ok(TargetGroupProperties {
787                    health_check_enabled: health_check_enabled,
788                    health_check_interval_seconds: health_check_interval_seconds,
789                    health_check_path: health_check_path,
790                    health_check_port: health_check_port,
791                    health_check_protocol: health_check_protocol,
792                    health_check_timeout_seconds: health_check_timeout_seconds,
793                    healthy_threshold_count: healthy_threshold_count,
794                    matcher: matcher,
795                    name: name,
796                    port: port,
797                    protocol: protocol,
798                    protocol_version: protocol_version,
799                    tags: tags,
800                    target_group_attributes: target_group_attributes,
801                    target_type: target_type,
802                    targets: targets,
803                    unhealthy_threshold_count: unhealthy_threshold_count,
804                    vpc_id: vpc_id,
805                })
806            }
807        }
808
809        d.deserialize_map(Visitor)
810    }
811}
812
813impl ::Resource for TargetGroup {
814    type Properties = TargetGroupProperties;
815    const TYPE: &'static str = "AWS::ElasticLoadBalancingV2::TargetGroup";
816    fn properties(&self) -> &TargetGroupProperties {
817        &self.properties
818    }
819    fn properties_mut(&mut self) -> &mut TargetGroupProperties {
820        &mut self.properties
821    }
822}
823
824impl ::private::Sealed for TargetGroup {}
825
826impl From<TargetGroupProperties> for TargetGroup {
827    fn from(properties: TargetGroupProperties) -> TargetGroup {
828        TargetGroup { properties }
829    }
830}
831
832pub mod listener {
833    //! Property types for the `Listener` resource.
834
835    /// The [`AWS::ElasticLoadBalancingV2::Listener.Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html) property type.
836    #[derive(Debug, Default)]
837    pub struct Action {
838        /// Property [`AuthenticateCognitoConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticatecognitoconfig).
839        ///
840        /// Update type: _Mutable_.
841        /// AWS CloudFormation doesn't replace the resource when you change this property.
842        pub authenticate_cognito_config: Option<::Value<AuthenticateCognitoConfig>>,
843        /// Property [`AuthenticateOidcConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-authenticateoidcconfig).
844        ///
845        /// Update type: _Mutable_.
846        /// AWS CloudFormation doesn't replace the resource when you change this property.
847        pub authenticate_oidc_config: Option<::Value<AuthenticateOidcConfig>>,
848        /// Property [`FixedResponseConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-fixedresponseconfig).
849        ///
850        /// Update type: _Mutable_.
851        /// AWS CloudFormation doesn't replace the resource when you change this property.
852        pub fixed_response_config: Option<::Value<FixedResponseConfig>>,
853        /// Property [`ForwardConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-forwardconfig).
854        ///
855        /// Update type: _Mutable_.
856        /// AWS CloudFormation doesn't replace the resource when you change this property.
857        pub forward_config: Option<::Value<ForwardConfig>>,
858        /// Property [`Order`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-order).
859        ///
860        /// Update type: _Mutable_.
861        /// AWS CloudFormation doesn't replace the resource when you change this property.
862        pub order: Option<::Value<u32>>,
863        /// Property [`RedirectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-redirectconfig).
864        ///
865        /// Update type: _Mutable_.
866        /// AWS CloudFormation doesn't replace the resource when you change this property.
867        pub redirect_config: Option<::Value<RedirectConfig>>,
868        /// Property [`TargetGroupArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-targetgrouparn).
869        ///
870        /// Update type: _Mutable_.
871        /// AWS CloudFormation doesn't replace the resource when you change this property.
872        pub target_group_arn: Option<::Value<String>>,
873        /// Property [`Type`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-action.html#cfn-elasticloadbalancingv2-listener-action-type).
874        ///
875        /// Update type: _Mutable_.
876        /// AWS CloudFormation doesn't replace the resource when you change this property.
877        pub r#type: ::Value<String>,
878    }
879
880    impl ::codec::SerializeValue for Action {
881        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
882            let mut map = ::serde::Serializer::serialize_map(s, None)?;
883            if let Some(ref authenticate_cognito_config) = self.authenticate_cognito_config {
884                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticateCognitoConfig", authenticate_cognito_config)?;
885            }
886            if let Some(ref authenticate_oidc_config) = self.authenticate_oidc_config {
887                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticateOidcConfig", authenticate_oidc_config)?;
888            }
889            if let Some(ref fixed_response_config) = self.fixed_response_config {
890                ::serde::ser::SerializeMap::serialize_entry(&mut map, "FixedResponseConfig", fixed_response_config)?;
891            }
892            if let Some(ref forward_config) = self.forward_config {
893                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ForwardConfig", forward_config)?;
894            }
895            if let Some(ref order) = self.order {
896                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Order", order)?;
897            }
898            if let Some(ref redirect_config) = self.redirect_config {
899                ::serde::ser::SerializeMap::serialize_entry(&mut map, "RedirectConfig", redirect_config)?;
900            }
901            if let Some(ref target_group_arn) = self.target_group_arn {
902                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupArn", target_group_arn)?;
903            }
904            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Type", &self.r#type)?;
905            ::serde::ser::SerializeMap::end(map)
906        }
907    }
908
909    impl ::codec::DeserializeValue for Action {
910        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Action, D::Error> {
911            struct Visitor;
912
913            impl<'de> ::serde::de::Visitor<'de> for Visitor {
914                type Value = Action;
915
916                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
917                    write!(f, "a struct of type Action")
918                }
919
920                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
921                    let mut authenticate_cognito_config: Option<::Value<AuthenticateCognitoConfig>> = None;
922                    let mut authenticate_oidc_config: Option<::Value<AuthenticateOidcConfig>> = None;
923                    let mut fixed_response_config: Option<::Value<FixedResponseConfig>> = None;
924                    let mut forward_config: Option<::Value<ForwardConfig>> = None;
925                    let mut order: Option<::Value<u32>> = None;
926                    let mut redirect_config: Option<::Value<RedirectConfig>> = None;
927                    let mut target_group_arn: Option<::Value<String>> = None;
928                    let mut r#type: Option<::Value<String>> = None;
929
930                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
931                        match __cfn_key.as_ref() {
932                            "AuthenticateCognitoConfig" => {
933                                authenticate_cognito_config = ::serde::de::MapAccess::next_value(&mut map)?;
934                            }
935                            "AuthenticateOidcConfig" => {
936                                authenticate_oidc_config = ::serde::de::MapAccess::next_value(&mut map)?;
937                            }
938                            "FixedResponseConfig" => {
939                                fixed_response_config = ::serde::de::MapAccess::next_value(&mut map)?;
940                            }
941                            "ForwardConfig" => {
942                                forward_config = ::serde::de::MapAccess::next_value(&mut map)?;
943                            }
944                            "Order" => {
945                                order = ::serde::de::MapAccess::next_value(&mut map)?;
946                            }
947                            "RedirectConfig" => {
948                                redirect_config = ::serde::de::MapAccess::next_value(&mut map)?;
949                            }
950                            "TargetGroupArn" => {
951                                target_group_arn = ::serde::de::MapAccess::next_value(&mut map)?;
952                            }
953                            "Type" => {
954                                r#type = ::serde::de::MapAccess::next_value(&mut map)?;
955                            }
956                            _ => {}
957                        }
958                    }
959
960                    Ok(Action {
961                        authenticate_cognito_config: authenticate_cognito_config,
962                        authenticate_oidc_config: authenticate_oidc_config,
963                        fixed_response_config: fixed_response_config,
964                        forward_config: forward_config,
965                        order: order,
966                        redirect_config: redirect_config,
967                        target_group_arn: target_group_arn,
968                        r#type: r#type.ok_or(::serde::de::Error::missing_field("Type"))?,
969                    })
970                }
971            }
972
973            d.deserialize_map(Visitor)
974        }
975    }
976
977    /// The [`AWS::ElasticLoadBalancingV2::Listener.AuthenticateCognitoConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html) property type.
978    #[derive(Debug, Default)]
979    pub struct AuthenticateCognitoConfig {
980        /// Property [`AuthenticationRequestExtraParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-authenticationrequestextraparams).
981        ///
982        /// Update type: _Mutable_.
983        /// AWS CloudFormation doesn't replace the resource when you change this property.
984        pub authentication_request_extra_params: Option<::ValueMap<String>>,
985        /// Property [`OnUnauthenticatedRequest`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-onunauthenticatedrequest).
986        ///
987        /// Update type: _Mutable_.
988        /// AWS CloudFormation doesn't replace the resource when you change this property.
989        pub on_unauthenticated_request: Option<::Value<String>>,
990        /// Property [`Scope`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-scope).
991        ///
992        /// Update type: _Mutable_.
993        /// AWS CloudFormation doesn't replace the resource when you change this property.
994        pub scope: Option<::Value<String>>,
995        /// Property [`SessionCookieName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-sessioncookiename).
996        ///
997        /// Update type: _Mutable_.
998        /// AWS CloudFormation doesn't replace the resource when you change this property.
999        pub session_cookie_name: Option<::Value<String>>,
1000        /// Property [`SessionTimeout`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-sessiontimeout).
1001        ///
1002        /// Update type: _Mutable_.
1003        /// AWS CloudFormation doesn't replace the resource when you change this property.
1004        pub session_timeout: Option<::Value<String>>,
1005        /// Property [`UserPoolArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-userpoolarn).
1006        ///
1007        /// Update type: _Mutable_.
1008        /// AWS CloudFormation doesn't replace the resource when you change this property.
1009        pub user_pool_arn: ::Value<String>,
1010        /// Property [`UserPoolClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-userpoolclientid).
1011        ///
1012        /// Update type: _Mutable_.
1013        /// AWS CloudFormation doesn't replace the resource when you change this property.
1014        pub user_pool_client_id: ::Value<String>,
1015        /// Property [`UserPoolDomain`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listener-authenticatecognitoconfig-userpooldomain).
1016        ///
1017        /// Update type: _Mutable_.
1018        /// AWS CloudFormation doesn't replace the resource when you change this property.
1019        pub user_pool_domain: ::Value<String>,
1020    }
1021
1022    impl ::codec::SerializeValue for AuthenticateCognitoConfig {
1023        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1024            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1025            if let Some(ref authentication_request_extra_params) = self.authentication_request_extra_params {
1026                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticationRequestExtraParams", authentication_request_extra_params)?;
1027            }
1028            if let Some(ref on_unauthenticated_request) = self.on_unauthenticated_request {
1029                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OnUnauthenticatedRequest", on_unauthenticated_request)?;
1030            }
1031            if let Some(ref scope) = self.scope {
1032                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Scope", scope)?;
1033            }
1034            if let Some(ref session_cookie_name) = self.session_cookie_name {
1035                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionCookieName", session_cookie_name)?;
1036            }
1037            if let Some(ref session_timeout) = self.session_timeout {
1038                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionTimeout", session_timeout)?;
1039            }
1040            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolArn", &self.user_pool_arn)?;
1041            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolClientId", &self.user_pool_client_id)?;
1042            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolDomain", &self.user_pool_domain)?;
1043            ::serde::ser::SerializeMap::end(map)
1044        }
1045    }
1046
1047    impl ::codec::DeserializeValue for AuthenticateCognitoConfig {
1048        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AuthenticateCognitoConfig, D::Error> {
1049            struct Visitor;
1050
1051            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1052                type Value = AuthenticateCognitoConfig;
1053
1054                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1055                    write!(f, "a struct of type AuthenticateCognitoConfig")
1056                }
1057
1058                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1059                    let mut authentication_request_extra_params: Option<::ValueMap<String>> = None;
1060                    let mut on_unauthenticated_request: Option<::Value<String>> = None;
1061                    let mut scope: Option<::Value<String>> = None;
1062                    let mut session_cookie_name: Option<::Value<String>> = None;
1063                    let mut session_timeout: Option<::Value<String>> = None;
1064                    let mut user_pool_arn: Option<::Value<String>> = None;
1065                    let mut user_pool_client_id: Option<::Value<String>> = None;
1066                    let mut user_pool_domain: Option<::Value<String>> = None;
1067
1068                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1069                        match __cfn_key.as_ref() {
1070                            "AuthenticationRequestExtraParams" => {
1071                                authentication_request_extra_params = ::serde::de::MapAccess::next_value(&mut map)?;
1072                            }
1073                            "OnUnauthenticatedRequest" => {
1074                                on_unauthenticated_request = ::serde::de::MapAccess::next_value(&mut map)?;
1075                            }
1076                            "Scope" => {
1077                                scope = ::serde::de::MapAccess::next_value(&mut map)?;
1078                            }
1079                            "SessionCookieName" => {
1080                                session_cookie_name = ::serde::de::MapAccess::next_value(&mut map)?;
1081                            }
1082                            "SessionTimeout" => {
1083                                session_timeout = ::serde::de::MapAccess::next_value(&mut map)?;
1084                            }
1085                            "UserPoolArn" => {
1086                                user_pool_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1087                            }
1088                            "UserPoolClientId" => {
1089                                user_pool_client_id = ::serde::de::MapAccess::next_value(&mut map)?;
1090                            }
1091                            "UserPoolDomain" => {
1092                                user_pool_domain = ::serde::de::MapAccess::next_value(&mut map)?;
1093                            }
1094                            _ => {}
1095                        }
1096                    }
1097
1098                    Ok(AuthenticateCognitoConfig {
1099                        authentication_request_extra_params: authentication_request_extra_params,
1100                        on_unauthenticated_request: on_unauthenticated_request,
1101                        scope: scope,
1102                        session_cookie_name: session_cookie_name,
1103                        session_timeout: session_timeout,
1104                        user_pool_arn: user_pool_arn.ok_or(::serde::de::Error::missing_field("UserPoolArn"))?,
1105                        user_pool_client_id: user_pool_client_id.ok_or(::serde::de::Error::missing_field("UserPoolClientId"))?,
1106                        user_pool_domain: user_pool_domain.ok_or(::serde::de::Error::missing_field("UserPoolDomain"))?,
1107                    })
1108                }
1109            }
1110
1111            d.deserialize_map(Visitor)
1112        }
1113    }
1114
1115    /// The [`AWS::ElasticLoadBalancingV2::Listener.AuthenticateOidcConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html) property type.
1116    #[derive(Debug, Default)]
1117    pub struct AuthenticateOidcConfig {
1118        /// Property [`AuthenticationRequestExtraParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-authenticationrequestextraparams).
1119        ///
1120        /// Update type: _Mutable_.
1121        /// AWS CloudFormation doesn't replace the resource when you change this property.
1122        pub authentication_request_extra_params: Option<::ValueMap<String>>,
1123        /// Property [`AuthorizationEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-authorizationendpoint).
1124        ///
1125        /// Update type: _Mutable_.
1126        /// AWS CloudFormation doesn't replace the resource when you change this property.
1127        pub authorization_endpoint: ::Value<String>,
1128        /// Property [`ClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-clientid).
1129        ///
1130        /// Update type: _Mutable_.
1131        /// AWS CloudFormation doesn't replace the resource when you change this property.
1132        pub client_id: ::Value<String>,
1133        /// Property [`ClientSecret`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-clientsecret).
1134        ///
1135        /// Update type: _Mutable_.
1136        /// AWS CloudFormation doesn't replace the resource when you change this property.
1137        pub client_secret: ::Value<String>,
1138        /// Property [`Issuer`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-issuer).
1139        ///
1140        /// Update type: _Mutable_.
1141        /// AWS CloudFormation doesn't replace the resource when you change this property.
1142        pub issuer: ::Value<String>,
1143        /// Property [`OnUnauthenticatedRequest`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-onunauthenticatedrequest).
1144        ///
1145        /// Update type: _Mutable_.
1146        /// AWS CloudFormation doesn't replace the resource when you change this property.
1147        pub on_unauthenticated_request: Option<::Value<String>>,
1148        /// Property [`Scope`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-scope).
1149        ///
1150        /// Update type: _Mutable_.
1151        /// AWS CloudFormation doesn't replace the resource when you change this property.
1152        pub scope: Option<::Value<String>>,
1153        /// Property [`SessionCookieName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-sessioncookiename).
1154        ///
1155        /// Update type: _Mutable_.
1156        /// AWS CloudFormation doesn't replace the resource when you change this property.
1157        pub session_cookie_name: Option<::Value<String>>,
1158        /// Property [`SessionTimeout`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-sessiontimeout).
1159        ///
1160        /// Update type: _Mutable_.
1161        /// AWS CloudFormation doesn't replace the resource when you change this property.
1162        pub session_timeout: Option<::Value<String>>,
1163        /// Property [`TokenEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-tokenendpoint).
1164        ///
1165        /// Update type: _Mutable_.
1166        /// AWS CloudFormation doesn't replace the resource when you change this property.
1167        pub token_endpoint: ::Value<String>,
1168        /// Property [`UserInfoEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listener-authenticateoidcconfig-userinfoendpoint).
1169        ///
1170        /// Update type: _Mutable_.
1171        /// AWS CloudFormation doesn't replace the resource when you change this property.
1172        pub user_info_endpoint: ::Value<String>,
1173    }
1174
1175    impl ::codec::SerializeValue for AuthenticateOidcConfig {
1176        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1177            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1178            if let Some(ref authentication_request_extra_params) = self.authentication_request_extra_params {
1179                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticationRequestExtraParams", authentication_request_extra_params)?;
1180            }
1181            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthorizationEndpoint", &self.authorization_endpoint)?;
1182            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientId", &self.client_id)?;
1183            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientSecret", &self.client_secret)?;
1184            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Issuer", &self.issuer)?;
1185            if let Some(ref on_unauthenticated_request) = self.on_unauthenticated_request {
1186                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OnUnauthenticatedRequest", on_unauthenticated_request)?;
1187            }
1188            if let Some(ref scope) = self.scope {
1189                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Scope", scope)?;
1190            }
1191            if let Some(ref session_cookie_name) = self.session_cookie_name {
1192                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionCookieName", session_cookie_name)?;
1193            }
1194            if let Some(ref session_timeout) = self.session_timeout {
1195                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionTimeout", session_timeout)?;
1196            }
1197            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenEndpoint", &self.token_endpoint)?;
1198            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserInfoEndpoint", &self.user_info_endpoint)?;
1199            ::serde::ser::SerializeMap::end(map)
1200        }
1201    }
1202
1203    impl ::codec::DeserializeValue for AuthenticateOidcConfig {
1204        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AuthenticateOidcConfig, D::Error> {
1205            struct Visitor;
1206
1207            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1208                type Value = AuthenticateOidcConfig;
1209
1210                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1211                    write!(f, "a struct of type AuthenticateOidcConfig")
1212                }
1213
1214                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1215                    let mut authentication_request_extra_params: Option<::ValueMap<String>> = None;
1216                    let mut authorization_endpoint: Option<::Value<String>> = None;
1217                    let mut client_id: Option<::Value<String>> = None;
1218                    let mut client_secret: Option<::Value<String>> = None;
1219                    let mut issuer: Option<::Value<String>> = None;
1220                    let mut on_unauthenticated_request: Option<::Value<String>> = None;
1221                    let mut scope: Option<::Value<String>> = None;
1222                    let mut session_cookie_name: Option<::Value<String>> = None;
1223                    let mut session_timeout: Option<::Value<String>> = None;
1224                    let mut token_endpoint: Option<::Value<String>> = None;
1225                    let mut user_info_endpoint: Option<::Value<String>> = None;
1226
1227                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1228                        match __cfn_key.as_ref() {
1229                            "AuthenticationRequestExtraParams" => {
1230                                authentication_request_extra_params = ::serde::de::MapAccess::next_value(&mut map)?;
1231                            }
1232                            "AuthorizationEndpoint" => {
1233                                authorization_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
1234                            }
1235                            "ClientId" => {
1236                                client_id = ::serde::de::MapAccess::next_value(&mut map)?;
1237                            }
1238                            "ClientSecret" => {
1239                                client_secret = ::serde::de::MapAccess::next_value(&mut map)?;
1240                            }
1241                            "Issuer" => {
1242                                issuer = ::serde::de::MapAccess::next_value(&mut map)?;
1243                            }
1244                            "OnUnauthenticatedRequest" => {
1245                                on_unauthenticated_request = ::serde::de::MapAccess::next_value(&mut map)?;
1246                            }
1247                            "Scope" => {
1248                                scope = ::serde::de::MapAccess::next_value(&mut map)?;
1249                            }
1250                            "SessionCookieName" => {
1251                                session_cookie_name = ::serde::de::MapAccess::next_value(&mut map)?;
1252                            }
1253                            "SessionTimeout" => {
1254                                session_timeout = ::serde::de::MapAccess::next_value(&mut map)?;
1255                            }
1256                            "TokenEndpoint" => {
1257                                token_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
1258                            }
1259                            "UserInfoEndpoint" => {
1260                                user_info_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
1261                            }
1262                            _ => {}
1263                        }
1264                    }
1265
1266                    Ok(AuthenticateOidcConfig {
1267                        authentication_request_extra_params: authentication_request_extra_params,
1268                        authorization_endpoint: authorization_endpoint.ok_or(::serde::de::Error::missing_field("AuthorizationEndpoint"))?,
1269                        client_id: client_id.ok_or(::serde::de::Error::missing_field("ClientId"))?,
1270                        client_secret: client_secret.ok_or(::serde::de::Error::missing_field("ClientSecret"))?,
1271                        issuer: issuer.ok_or(::serde::de::Error::missing_field("Issuer"))?,
1272                        on_unauthenticated_request: on_unauthenticated_request,
1273                        scope: scope,
1274                        session_cookie_name: session_cookie_name,
1275                        session_timeout: session_timeout,
1276                        token_endpoint: token_endpoint.ok_or(::serde::de::Error::missing_field("TokenEndpoint"))?,
1277                        user_info_endpoint: user_info_endpoint.ok_or(::serde::de::Error::missing_field("UserInfoEndpoint"))?,
1278                    })
1279                }
1280            }
1281
1282            d.deserialize_map(Visitor)
1283        }
1284    }
1285
1286    /// The [`AWS::ElasticLoadBalancingV2::Listener.Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html) property type.
1287    #[derive(Debug, Default)]
1288    pub struct Certificate {
1289        /// Property [`CertificateArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificate.html#cfn-elasticloadbalancingv2-listener-certificate-certificatearn).
1290        ///
1291        /// Update type: _Mutable_.
1292        /// AWS CloudFormation doesn't replace the resource when you change this property.
1293        pub certificate_arn: Option<::Value<String>>,
1294    }
1295
1296    impl ::codec::SerializeValue for Certificate {
1297        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1298            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1299            if let Some(ref certificate_arn) = self.certificate_arn {
1300                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CertificateArn", certificate_arn)?;
1301            }
1302            ::serde::ser::SerializeMap::end(map)
1303        }
1304    }
1305
1306    impl ::codec::DeserializeValue for Certificate {
1307        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Certificate, D::Error> {
1308            struct Visitor;
1309
1310            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1311                type Value = Certificate;
1312
1313                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1314                    write!(f, "a struct of type Certificate")
1315                }
1316
1317                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1318                    let mut certificate_arn: Option<::Value<String>> = None;
1319
1320                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1321                        match __cfn_key.as_ref() {
1322                            "CertificateArn" => {
1323                                certificate_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1324                            }
1325                            _ => {}
1326                        }
1327                    }
1328
1329                    Ok(Certificate {
1330                        certificate_arn: certificate_arn,
1331                    })
1332                }
1333            }
1334
1335            d.deserialize_map(Visitor)
1336        }
1337    }
1338
1339    /// The [`AWS::ElasticLoadBalancingV2::Listener.FixedResponseConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-fixedresponseconfig.html) property type.
1340    #[derive(Debug, Default)]
1341    pub struct FixedResponseConfig {
1342        /// Property [`ContentType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listener-fixedresponseconfig-contenttype).
1343        ///
1344        /// Update type: _Mutable_.
1345        /// AWS CloudFormation doesn't replace the resource when you change this property.
1346        pub content_type: Option<::Value<String>>,
1347        /// Property [`MessageBody`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listener-fixedresponseconfig-messagebody).
1348        ///
1349        /// Update type: _Mutable_.
1350        /// AWS CloudFormation doesn't replace the resource when you change this property.
1351        pub message_body: Option<::Value<String>>,
1352        /// Property [`StatusCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listener-fixedresponseconfig-statuscode).
1353        ///
1354        /// Update type: _Mutable_.
1355        /// AWS CloudFormation doesn't replace the resource when you change this property.
1356        pub status_code: ::Value<String>,
1357    }
1358
1359    impl ::codec::SerializeValue for FixedResponseConfig {
1360        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1361            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1362            if let Some(ref content_type) = self.content_type {
1363                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ContentType", content_type)?;
1364            }
1365            if let Some(ref message_body) = self.message_body {
1366                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessageBody", message_body)?;
1367            }
1368            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StatusCode", &self.status_code)?;
1369            ::serde::ser::SerializeMap::end(map)
1370        }
1371    }
1372
1373    impl ::codec::DeserializeValue for FixedResponseConfig {
1374        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<FixedResponseConfig, D::Error> {
1375            struct Visitor;
1376
1377            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1378                type Value = FixedResponseConfig;
1379
1380                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1381                    write!(f, "a struct of type FixedResponseConfig")
1382                }
1383
1384                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1385                    let mut content_type: Option<::Value<String>> = None;
1386                    let mut message_body: Option<::Value<String>> = None;
1387                    let mut status_code: Option<::Value<String>> = None;
1388
1389                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1390                        match __cfn_key.as_ref() {
1391                            "ContentType" => {
1392                                content_type = ::serde::de::MapAccess::next_value(&mut map)?;
1393                            }
1394                            "MessageBody" => {
1395                                message_body = ::serde::de::MapAccess::next_value(&mut map)?;
1396                            }
1397                            "StatusCode" => {
1398                                status_code = ::serde::de::MapAccess::next_value(&mut map)?;
1399                            }
1400                            _ => {}
1401                        }
1402                    }
1403
1404                    Ok(FixedResponseConfig {
1405                        content_type: content_type,
1406                        message_body: message_body,
1407                        status_code: status_code.ok_or(::serde::de::Error::missing_field("StatusCode"))?,
1408                    })
1409                }
1410            }
1411
1412            d.deserialize_map(Visitor)
1413        }
1414    }
1415
1416    /// The [`AWS::ElasticLoadBalancingV2::Listener.ForwardConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-forwardconfig.html) property type.
1417    #[derive(Debug, Default)]
1418    pub struct ForwardConfig {
1419        /// Property [`TargetGroupStickinessConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-forwardconfig.html#cfn-elasticloadbalancingv2-listener-forwardconfig-targetgroupstickinessconfig).
1420        ///
1421        /// Update type: _Mutable_.
1422        /// AWS CloudFormation doesn't replace the resource when you change this property.
1423        pub target_group_stickiness_config: Option<::Value<TargetGroupStickinessConfig>>,
1424        /// Property [`TargetGroups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-forwardconfig.html#cfn-elasticloadbalancingv2-listener-forwardconfig-targetgroups).
1425        ///
1426        /// Update type: _Mutable_.
1427        /// AWS CloudFormation doesn't replace the resource when you change this property.
1428        pub target_groups: Option<::ValueList<TargetGroupTuple>>,
1429    }
1430
1431    impl ::codec::SerializeValue for ForwardConfig {
1432        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1433            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1434            if let Some(ref target_group_stickiness_config) = self.target_group_stickiness_config {
1435                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupStickinessConfig", target_group_stickiness_config)?;
1436            }
1437            if let Some(ref target_groups) = self.target_groups {
1438                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroups", target_groups)?;
1439            }
1440            ::serde::ser::SerializeMap::end(map)
1441        }
1442    }
1443
1444    impl ::codec::DeserializeValue for ForwardConfig {
1445        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ForwardConfig, D::Error> {
1446            struct Visitor;
1447
1448            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1449                type Value = ForwardConfig;
1450
1451                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1452                    write!(f, "a struct of type ForwardConfig")
1453                }
1454
1455                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1456                    let mut target_group_stickiness_config: Option<::Value<TargetGroupStickinessConfig>> = None;
1457                    let mut target_groups: Option<::ValueList<TargetGroupTuple>> = None;
1458
1459                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1460                        match __cfn_key.as_ref() {
1461                            "TargetGroupStickinessConfig" => {
1462                                target_group_stickiness_config = ::serde::de::MapAccess::next_value(&mut map)?;
1463                            }
1464                            "TargetGroups" => {
1465                                target_groups = ::serde::de::MapAccess::next_value(&mut map)?;
1466                            }
1467                            _ => {}
1468                        }
1469                    }
1470
1471                    Ok(ForwardConfig {
1472                        target_group_stickiness_config: target_group_stickiness_config,
1473                        target_groups: target_groups,
1474                    })
1475                }
1476            }
1477
1478            d.deserialize_map(Visitor)
1479        }
1480    }
1481
1482    /// The [`AWS::ElasticLoadBalancingV2::Listener.RedirectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html) property type.
1483    #[derive(Debug, Default)]
1484    pub struct RedirectConfig {
1485        /// Property [`Host`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-host).
1486        ///
1487        /// Update type: _Mutable_.
1488        /// AWS CloudFormation doesn't replace the resource when you change this property.
1489        pub host: Option<::Value<String>>,
1490        /// Property [`Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-path).
1491        ///
1492        /// Update type: _Mutable_.
1493        /// AWS CloudFormation doesn't replace the resource when you change this property.
1494        pub path: Option<::Value<String>>,
1495        /// Property [`Port`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-port).
1496        ///
1497        /// Update type: _Mutable_.
1498        /// AWS CloudFormation doesn't replace the resource when you change this property.
1499        pub port: Option<::Value<String>>,
1500        /// Property [`Protocol`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-protocol).
1501        ///
1502        /// Update type: _Mutable_.
1503        /// AWS CloudFormation doesn't replace the resource when you change this property.
1504        pub protocol: Option<::Value<String>>,
1505        /// Property [`Query`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-query).
1506        ///
1507        /// Update type: _Mutable_.
1508        /// AWS CloudFormation doesn't replace the resource when you change this property.
1509        pub query: Option<::Value<String>>,
1510        /// Property [`StatusCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-redirectconfig.html#cfn-elasticloadbalancingv2-listener-redirectconfig-statuscode).
1511        ///
1512        /// Update type: _Mutable_.
1513        /// AWS CloudFormation doesn't replace the resource when you change this property.
1514        pub status_code: ::Value<String>,
1515    }
1516
1517    impl ::codec::SerializeValue for RedirectConfig {
1518        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1519            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1520            if let Some(ref host) = self.host {
1521                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Host", host)?;
1522            }
1523            if let Some(ref path) = self.path {
1524                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Path", path)?;
1525            }
1526            if let Some(ref port) = self.port {
1527                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Port", port)?;
1528            }
1529            if let Some(ref protocol) = self.protocol {
1530                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Protocol", protocol)?;
1531            }
1532            if let Some(ref query) = self.query {
1533                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Query", query)?;
1534            }
1535            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StatusCode", &self.status_code)?;
1536            ::serde::ser::SerializeMap::end(map)
1537        }
1538    }
1539
1540    impl ::codec::DeserializeValue for RedirectConfig {
1541        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<RedirectConfig, D::Error> {
1542            struct Visitor;
1543
1544            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1545                type Value = RedirectConfig;
1546
1547                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1548                    write!(f, "a struct of type RedirectConfig")
1549                }
1550
1551                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1552                    let mut host: Option<::Value<String>> = None;
1553                    let mut path: Option<::Value<String>> = None;
1554                    let mut port: Option<::Value<String>> = None;
1555                    let mut protocol: Option<::Value<String>> = None;
1556                    let mut query: Option<::Value<String>> = None;
1557                    let mut status_code: Option<::Value<String>> = None;
1558
1559                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1560                        match __cfn_key.as_ref() {
1561                            "Host" => {
1562                                host = ::serde::de::MapAccess::next_value(&mut map)?;
1563                            }
1564                            "Path" => {
1565                                path = ::serde::de::MapAccess::next_value(&mut map)?;
1566                            }
1567                            "Port" => {
1568                                port = ::serde::de::MapAccess::next_value(&mut map)?;
1569                            }
1570                            "Protocol" => {
1571                                protocol = ::serde::de::MapAccess::next_value(&mut map)?;
1572                            }
1573                            "Query" => {
1574                                query = ::serde::de::MapAccess::next_value(&mut map)?;
1575                            }
1576                            "StatusCode" => {
1577                                status_code = ::serde::de::MapAccess::next_value(&mut map)?;
1578                            }
1579                            _ => {}
1580                        }
1581                    }
1582
1583                    Ok(RedirectConfig {
1584                        host: host,
1585                        path: path,
1586                        port: port,
1587                        protocol: protocol,
1588                        query: query,
1589                        status_code: status_code.ok_or(::serde::de::Error::missing_field("StatusCode"))?,
1590                    })
1591                }
1592            }
1593
1594            d.deserialize_map(Visitor)
1595        }
1596    }
1597
1598    /// The [`AWS::ElasticLoadBalancingV2::Listener.TargetGroupStickinessConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html) property type.
1599    #[derive(Debug, Default)]
1600    pub struct TargetGroupStickinessConfig {
1601        /// Property [`DurationSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listener-targetgroupstickinessconfig-durationseconds).
1602        ///
1603        /// Update type: _Mutable_.
1604        /// AWS CloudFormation doesn't replace the resource when you change this property.
1605        pub duration_seconds: Option<::Value<u32>>,
1606        /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listener-targetgroupstickinessconfig-enabled).
1607        ///
1608        /// Update type: _Mutable_.
1609        /// AWS CloudFormation doesn't replace the resource when you change this property.
1610        pub enabled: Option<::Value<bool>>,
1611    }
1612
1613    impl ::codec::SerializeValue for TargetGroupStickinessConfig {
1614        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1615            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1616            if let Some(ref duration_seconds) = self.duration_seconds {
1617                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DurationSeconds", duration_seconds)?;
1618            }
1619            if let Some(ref enabled) = self.enabled {
1620                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
1621            }
1622            ::serde::ser::SerializeMap::end(map)
1623        }
1624    }
1625
1626    impl ::codec::DeserializeValue for TargetGroupStickinessConfig {
1627        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupStickinessConfig, D::Error> {
1628            struct Visitor;
1629
1630            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1631                type Value = TargetGroupStickinessConfig;
1632
1633                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1634                    write!(f, "a struct of type TargetGroupStickinessConfig")
1635                }
1636
1637                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1638                    let mut duration_seconds: Option<::Value<u32>> = None;
1639                    let mut enabled: Option<::Value<bool>> = None;
1640
1641                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1642                        match __cfn_key.as_ref() {
1643                            "DurationSeconds" => {
1644                                duration_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
1645                            }
1646                            "Enabled" => {
1647                                enabled = ::serde::de::MapAccess::next_value(&mut map)?;
1648                            }
1649                            _ => {}
1650                        }
1651                    }
1652
1653                    Ok(TargetGroupStickinessConfig {
1654                        duration_seconds: duration_seconds,
1655                        enabled: enabled,
1656                    })
1657                }
1658            }
1659
1660            d.deserialize_map(Visitor)
1661        }
1662    }
1663
1664    /// The [`AWS::ElasticLoadBalancingV2::Listener.TargetGroupTuple`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html) property type.
1665    #[derive(Debug, Default)]
1666    pub struct TargetGroupTuple {
1667        /// Property [`TargetGroupArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html#cfn-elasticloadbalancingv2-listener-targetgrouptuple-targetgrouparn).
1668        ///
1669        /// Update type: _Mutable_.
1670        /// AWS CloudFormation doesn't replace the resource when you change this property.
1671        pub target_group_arn: Option<::Value<String>>,
1672        /// Property [`Weight`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-targetgrouptuple.html#cfn-elasticloadbalancingv2-listener-targetgrouptuple-weight).
1673        ///
1674        /// Update type: _Mutable_.
1675        /// AWS CloudFormation doesn't replace the resource when you change this property.
1676        pub weight: Option<::Value<u32>>,
1677    }
1678
1679    impl ::codec::SerializeValue for TargetGroupTuple {
1680        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1681            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1682            if let Some(ref target_group_arn) = self.target_group_arn {
1683                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupArn", target_group_arn)?;
1684            }
1685            if let Some(ref weight) = self.weight {
1686                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Weight", weight)?;
1687            }
1688            ::serde::ser::SerializeMap::end(map)
1689        }
1690    }
1691
1692    impl ::codec::DeserializeValue for TargetGroupTuple {
1693        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupTuple, D::Error> {
1694            struct Visitor;
1695
1696            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1697                type Value = TargetGroupTuple;
1698
1699                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1700                    write!(f, "a struct of type TargetGroupTuple")
1701                }
1702
1703                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1704                    let mut target_group_arn: Option<::Value<String>> = None;
1705                    let mut weight: Option<::Value<u32>> = None;
1706
1707                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1708                        match __cfn_key.as_ref() {
1709                            "TargetGroupArn" => {
1710                                target_group_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1711                            }
1712                            "Weight" => {
1713                                weight = ::serde::de::MapAccess::next_value(&mut map)?;
1714                            }
1715                            _ => {}
1716                        }
1717                    }
1718
1719                    Ok(TargetGroupTuple {
1720                        target_group_arn: target_group_arn,
1721                        weight: weight,
1722                    })
1723                }
1724            }
1725
1726            d.deserialize_map(Visitor)
1727        }
1728    }
1729}
1730
1731pub mod listener_certificate {
1732    //! Property types for the `ListenerCertificate` resource.
1733
1734    /// The [`AWS::ElasticLoadBalancingV2::ListenerCertificate.Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html) property type.
1735    #[derive(Debug, Default)]
1736    pub struct Certificate {
1737        /// Property [`CertificateArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listener-certificates.html#cfn-elasticloadbalancingv2-listener-certificates-certificatearn).
1738        ///
1739        /// Update type: _Mutable_.
1740        /// AWS CloudFormation doesn't replace the resource when you change this property.
1741        pub certificate_arn: Option<::Value<String>>,
1742    }
1743
1744    impl ::codec::SerializeValue for Certificate {
1745        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1746            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1747            if let Some(ref certificate_arn) = self.certificate_arn {
1748                ::serde::ser::SerializeMap::serialize_entry(&mut map, "CertificateArn", certificate_arn)?;
1749            }
1750            ::serde::ser::SerializeMap::end(map)
1751        }
1752    }
1753
1754    impl ::codec::DeserializeValue for Certificate {
1755        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Certificate, D::Error> {
1756            struct Visitor;
1757
1758            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1759                type Value = Certificate;
1760
1761                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1762                    write!(f, "a struct of type Certificate")
1763                }
1764
1765                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1766                    let mut certificate_arn: Option<::Value<String>> = None;
1767
1768                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1769                        match __cfn_key.as_ref() {
1770                            "CertificateArn" => {
1771                                certificate_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1772                            }
1773                            _ => {}
1774                        }
1775                    }
1776
1777                    Ok(Certificate {
1778                        certificate_arn: certificate_arn,
1779                    })
1780                }
1781            }
1782
1783            d.deserialize_map(Visitor)
1784        }
1785    }
1786}
1787
1788pub mod listener_rule {
1789    //! Property types for the `ListenerRule` resource.
1790
1791    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html) property type.
1792    #[derive(Debug, Default)]
1793    pub struct Action {
1794        /// Property [`AuthenticateCognitoConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-authenticatecognitoconfig).
1795        ///
1796        /// Update type: _Mutable_.
1797        /// AWS CloudFormation doesn't replace the resource when you change this property.
1798        pub authenticate_cognito_config: Option<::Value<AuthenticateCognitoConfig>>,
1799        /// Property [`AuthenticateOidcConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-authenticateoidcconfig).
1800        ///
1801        /// Update type: _Mutable_.
1802        /// AWS CloudFormation doesn't replace the resource when you change this property.
1803        pub authenticate_oidc_config: Option<::Value<AuthenticateOidcConfig>>,
1804        /// Property [`FixedResponseConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-fixedresponseconfig).
1805        ///
1806        /// Update type: _Mutable_.
1807        /// AWS CloudFormation doesn't replace the resource when you change this property.
1808        pub fixed_response_config: Option<::Value<FixedResponseConfig>>,
1809        /// Property [`ForwardConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-forwardconfig).
1810        ///
1811        /// Update type: _Mutable_.
1812        /// AWS CloudFormation doesn't replace the resource when you change this property.
1813        pub forward_config: Option<::Value<ForwardConfig>>,
1814        /// Property [`Order`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-order).
1815        ///
1816        /// Update type: _Mutable_.
1817        /// AWS CloudFormation doesn't replace the resource when you change this property.
1818        pub order: Option<::Value<u32>>,
1819        /// Property [`RedirectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-redirectconfig).
1820        ///
1821        /// Update type: _Mutable_.
1822        /// AWS CloudFormation doesn't replace the resource when you change this property.
1823        pub redirect_config: Option<::Value<RedirectConfig>>,
1824        /// Property [`TargetGroupArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-targetgrouparn).
1825        ///
1826        /// Update type: _Mutable_.
1827        /// AWS CloudFormation doesn't replace the resource when you change this property.
1828        pub target_group_arn: Option<::Value<String>>,
1829        /// Property [`Type`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-action.html#cfn-elasticloadbalancingv2-listenerrule-action-type).
1830        ///
1831        /// Update type: _Mutable_.
1832        /// AWS CloudFormation doesn't replace the resource when you change this property.
1833        pub r#type: ::Value<String>,
1834    }
1835
1836    impl ::codec::SerializeValue for Action {
1837        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1838            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1839            if let Some(ref authenticate_cognito_config) = self.authenticate_cognito_config {
1840                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticateCognitoConfig", authenticate_cognito_config)?;
1841            }
1842            if let Some(ref authenticate_oidc_config) = self.authenticate_oidc_config {
1843                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticateOidcConfig", authenticate_oidc_config)?;
1844            }
1845            if let Some(ref fixed_response_config) = self.fixed_response_config {
1846                ::serde::ser::SerializeMap::serialize_entry(&mut map, "FixedResponseConfig", fixed_response_config)?;
1847            }
1848            if let Some(ref forward_config) = self.forward_config {
1849                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ForwardConfig", forward_config)?;
1850            }
1851            if let Some(ref order) = self.order {
1852                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Order", order)?;
1853            }
1854            if let Some(ref redirect_config) = self.redirect_config {
1855                ::serde::ser::SerializeMap::serialize_entry(&mut map, "RedirectConfig", redirect_config)?;
1856            }
1857            if let Some(ref target_group_arn) = self.target_group_arn {
1858                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupArn", target_group_arn)?;
1859            }
1860            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Type", &self.r#type)?;
1861            ::serde::ser::SerializeMap::end(map)
1862        }
1863    }
1864
1865    impl ::codec::DeserializeValue for Action {
1866        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Action, D::Error> {
1867            struct Visitor;
1868
1869            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1870                type Value = Action;
1871
1872                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1873                    write!(f, "a struct of type Action")
1874                }
1875
1876                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1877                    let mut authenticate_cognito_config: Option<::Value<AuthenticateCognitoConfig>> = None;
1878                    let mut authenticate_oidc_config: Option<::Value<AuthenticateOidcConfig>> = None;
1879                    let mut fixed_response_config: Option<::Value<FixedResponseConfig>> = None;
1880                    let mut forward_config: Option<::Value<ForwardConfig>> = None;
1881                    let mut order: Option<::Value<u32>> = None;
1882                    let mut redirect_config: Option<::Value<RedirectConfig>> = None;
1883                    let mut target_group_arn: Option<::Value<String>> = None;
1884                    let mut r#type: Option<::Value<String>> = None;
1885
1886                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1887                        match __cfn_key.as_ref() {
1888                            "AuthenticateCognitoConfig" => {
1889                                authenticate_cognito_config = ::serde::de::MapAccess::next_value(&mut map)?;
1890                            }
1891                            "AuthenticateOidcConfig" => {
1892                                authenticate_oidc_config = ::serde::de::MapAccess::next_value(&mut map)?;
1893                            }
1894                            "FixedResponseConfig" => {
1895                                fixed_response_config = ::serde::de::MapAccess::next_value(&mut map)?;
1896                            }
1897                            "ForwardConfig" => {
1898                                forward_config = ::serde::de::MapAccess::next_value(&mut map)?;
1899                            }
1900                            "Order" => {
1901                                order = ::serde::de::MapAccess::next_value(&mut map)?;
1902                            }
1903                            "RedirectConfig" => {
1904                                redirect_config = ::serde::de::MapAccess::next_value(&mut map)?;
1905                            }
1906                            "TargetGroupArn" => {
1907                                target_group_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1908                            }
1909                            "Type" => {
1910                                r#type = ::serde::de::MapAccess::next_value(&mut map)?;
1911                            }
1912                            _ => {}
1913                        }
1914                    }
1915
1916                    Ok(Action {
1917                        authenticate_cognito_config: authenticate_cognito_config,
1918                        authenticate_oidc_config: authenticate_oidc_config,
1919                        fixed_response_config: fixed_response_config,
1920                        forward_config: forward_config,
1921                        order: order,
1922                        redirect_config: redirect_config,
1923                        target_group_arn: target_group_arn,
1924                        r#type: r#type.ok_or(::serde::de::Error::missing_field("Type"))?,
1925                    })
1926                }
1927            }
1928
1929            d.deserialize_map(Visitor)
1930        }
1931    }
1932
1933    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.AuthenticateCognitoConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html) property type.
1934    #[derive(Debug, Default)]
1935    pub struct AuthenticateCognitoConfig {
1936        /// Property [`AuthenticationRequestExtraParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-authenticationrequestextraparams).
1937        ///
1938        /// Update type: _Mutable_.
1939        /// AWS CloudFormation doesn't replace the resource when you change this property.
1940        pub authentication_request_extra_params: Option<::ValueMap<String>>,
1941        /// Property [`OnUnauthenticatedRequest`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-onunauthenticatedrequest).
1942        ///
1943        /// Update type: _Mutable_.
1944        /// AWS CloudFormation doesn't replace the resource when you change this property.
1945        pub on_unauthenticated_request: Option<::Value<String>>,
1946        /// Property [`Scope`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-scope).
1947        ///
1948        /// Update type: _Mutable_.
1949        /// AWS CloudFormation doesn't replace the resource when you change this property.
1950        pub scope: Option<::Value<String>>,
1951        /// Property [`SessionCookieName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-sessioncookiename).
1952        ///
1953        /// Update type: _Mutable_.
1954        /// AWS CloudFormation doesn't replace the resource when you change this property.
1955        pub session_cookie_name: Option<::Value<String>>,
1956        /// Property [`SessionTimeout`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-sessiontimeout).
1957        ///
1958        /// Update type: _Mutable_.
1959        /// AWS CloudFormation doesn't replace the resource when you change this property.
1960        pub session_timeout: Option<::Value<u32>>,
1961        /// Property [`UserPoolArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-userpoolarn).
1962        ///
1963        /// Update type: _Mutable_.
1964        /// AWS CloudFormation doesn't replace the resource when you change this property.
1965        pub user_pool_arn: ::Value<String>,
1966        /// Property [`UserPoolClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-userpoolclientid).
1967        ///
1968        /// Update type: _Mutable_.
1969        /// AWS CloudFormation doesn't replace the resource when you change this property.
1970        pub user_pool_client_id: ::Value<String>,
1971        /// Property [`UserPoolDomain`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticatecognitoconfig-userpooldomain).
1972        ///
1973        /// Update type: _Mutable_.
1974        /// AWS CloudFormation doesn't replace the resource when you change this property.
1975        pub user_pool_domain: ::Value<String>,
1976    }
1977
1978    impl ::codec::SerializeValue for AuthenticateCognitoConfig {
1979        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1980            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1981            if let Some(ref authentication_request_extra_params) = self.authentication_request_extra_params {
1982                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticationRequestExtraParams", authentication_request_extra_params)?;
1983            }
1984            if let Some(ref on_unauthenticated_request) = self.on_unauthenticated_request {
1985                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OnUnauthenticatedRequest", on_unauthenticated_request)?;
1986            }
1987            if let Some(ref scope) = self.scope {
1988                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Scope", scope)?;
1989            }
1990            if let Some(ref session_cookie_name) = self.session_cookie_name {
1991                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionCookieName", session_cookie_name)?;
1992            }
1993            if let Some(ref session_timeout) = self.session_timeout {
1994                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionTimeout", session_timeout)?;
1995            }
1996            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolArn", &self.user_pool_arn)?;
1997            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolClientId", &self.user_pool_client_id)?;
1998            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserPoolDomain", &self.user_pool_domain)?;
1999            ::serde::ser::SerializeMap::end(map)
2000        }
2001    }
2002
2003    impl ::codec::DeserializeValue for AuthenticateCognitoConfig {
2004        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AuthenticateCognitoConfig, D::Error> {
2005            struct Visitor;
2006
2007            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2008                type Value = AuthenticateCognitoConfig;
2009
2010                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2011                    write!(f, "a struct of type AuthenticateCognitoConfig")
2012                }
2013
2014                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2015                    let mut authentication_request_extra_params: Option<::ValueMap<String>> = None;
2016                    let mut on_unauthenticated_request: Option<::Value<String>> = None;
2017                    let mut scope: Option<::Value<String>> = None;
2018                    let mut session_cookie_name: Option<::Value<String>> = None;
2019                    let mut session_timeout: Option<::Value<u32>> = None;
2020                    let mut user_pool_arn: Option<::Value<String>> = None;
2021                    let mut user_pool_client_id: Option<::Value<String>> = None;
2022                    let mut user_pool_domain: Option<::Value<String>> = None;
2023
2024                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2025                        match __cfn_key.as_ref() {
2026                            "AuthenticationRequestExtraParams" => {
2027                                authentication_request_extra_params = ::serde::de::MapAccess::next_value(&mut map)?;
2028                            }
2029                            "OnUnauthenticatedRequest" => {
2030                                on_unauthenticated_request = ::serde::de::MapAccess::next_value(&mut map)?;
2031                            }
2032                            "Scope" => {
2033                                scope = ::serde::de::MapAccess::next_value(&mut map)?;
2034                            }
2035                            "SessionCookieName" => {
2036                                session_cookie_name = ::serde::de::MapAccess::next_value(&mut map)?;
2037                            }
2038                            "SessionTimeout" => {
2039                                session_timeout = ::serde::de::MapAccess::next_value(&mut map)?;
2040                            }
2041                            "UserPoolArn" => {
2042                                user_pool_arn = ::serde::de::MapAccess::next_value(&mut map)?;
2043                            }
2044                            "UserPoolClientId" => {
2045                                user_pool_client_id = ::serde::de::MapAccess::next_value(&mut map)?;
2046                            }
2047                            "UserPoolDomain" => {
2048                                user_pool_domain = ::serde::de::MapAccess::next_value(&mut map)?;
2049                            }
2050                            _ => {}
2051                        }
2052                    }
2053
2054                    Ok(AuthenticateCognitoConfig {
2055                        authentication_request_extra_params: authentication_request_extra_params,
2056                        on_unauthenticated_request: on_unauthenticated_request,
2057                        scope: scope,
2058                        session_cookie_name: session_cookie_name,
2059                        session_timeout: session_timeout,
2060                        user_pool_arn: user_pool_arn.ok_or(::serde::de::Error::missing_field("UserPoolArn"))?,
2061                        user_pool_client_id: user_pool_client_id.ok_or(::serde::de::Error::missing_field("UserPoolClientId"))?,
2062                        user_pool_domain: user_pool_domain.ok_or(::serde::de::Error::missing_field("UserPoolDomain"))?,
2063                    })
2064                }
2065            }
2066
2067            d.deserialize_map(Visitor)
2068        }
2069    }
2070
2071    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.AuthenticateOidcConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html) property type.
2072    #[derive(Debug, Default)]
2073    pub struct AuthenticateOidcConfig {
2074        /// Property [`AuthenticationRequestExtraParams`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-authenticationrequestextraparams).
2075        ///
2076        /// Update type: _Mutable_.
2077        /// AWS CloudFormation doesn't replace the resource when you change this property.
2078        pub authentication_request_extra_params: Option<::ValueMap<String>>,
2079        /// Property [`AuthorizationEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-authorizationendpoint).
2080        ///
2081        /// Update type: _Mutable_.
2082        /// AWS CloudFormation doesn't replace the resource when you change this property.
2083        pub authorization_endpoint: ::Value<String>,
2084        /// Property [`ClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-clientid).
2085        ///
2086        /// Update type: _Mutable_.
2087        /// AWS CloudFormation doesn't replace the resource when you change this property.
2088        pub client_id: ::Value<String>,
2089        /// Property [`ClientSecret`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-clientsecret).
2090        ///
2091        /// Update type: _Mutable_.
2092        /// AWS CloudFormation doesn't replace the resource when you change this property.
2093        pub client_secret: ::Value<String>,
2094        /// Property [`Issuer`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-issuer).
2095        ///
2096        /// Update type: _Mutable_.
2097        /// AWS CloudFormation doesn't replace the resource when you change this property.
2098        pub issuer: ::Value<String>,
2099        /// Property [`OnUnauthenticatedRequest`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-onunauthenticatedrequest).
2100        ///
2101        /// Update type: _Mutable_.
2102        /// AWS CloudFormation doesn't replace the resource when you change this property.
2103        pub on_unauthenticated_request: Option<::Value<String>>,
2104        /// Property [`Scope`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-scope).
2105        ///
2106        /// Update type: _Mutable_.
2107        /// AWS CloudFormation doesn't replace the resource when you change this property.
2108        pub scope: Option<::Value<String>>,
2109        /// Property [`SessionCookieName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-sessioncookiename).
2110        ///
2111        /// Update type: _Mutable_.
2112        /// AWS CloudFormation doesn't replace the resource when you change this property.
2113        pub session_cookie_name: Option<::Value<String>>,
2114        /// Property [`SessionTimeout`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-sessiontimeout).
2115        ///
2116        /// Update type: _Mutable_.
2117        /// AWS CloudFormation doesn't replace the resource when you change this property.
2118        pub session_timeout: Option<::Value<u32>>,
2119        /// Property [`TokenEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-tokenendpoint).
2120        ///
2121        /// Update type: _Mutable_.
2122        /// AWS CloudFormation doesn't replace the resource when you change this property.
2123        pub token_endpoint: ::Value<String>,
2124        /// Property [`UseExistingClientSecret`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-useexistingclientsecret).
2125        ///
2126        /// Update type: _Mutable_.
2127        /// AWS CloudFormation doesn't replace the resource when you change this property.
2128        pub use_existing_client_secret: Option<::Value<bool>>,
2129        /// Property [`UserInfoEndpoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-authenticateoidcconfig.html#cfn-elasticloadbalancingv2-listenerrule-authenticateoidcconfig-userinfoendpoint).
2130        ///
2131        /// Update type: _Mutable_.
2132        /// AWS CloudFormation doesn't replace the resource when you change this property.
2133        pub user_info_endpoint: ::Value<String>,
2134    }
2135
2136    impl ::codec::SerializeValue for AuthenticateOidcConfig {
2137        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2138            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2139            if let Some(ref authentication_request_extra_params) = self.authentication_request_extra_params {
2140                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthenticationRequestExtraParams", authentication_request_extra_params)?;
2141            }
2142            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AuthorizationEndpoint", &self.authorization_endpoint)?;
2143            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientId", &self.client_id)?;
2144            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientSecret", &self.client_secret)?;
2145            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Issuer", &self.issuer)?;
2146            if let Some(ref on_unauthenticated_request) = self.on_unauthenticated_request {
2147                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OnUnauthenticatedRequest", on_unauthenticated_request)?;
2148            }
2149            if let Some(ref scope) = self.scope {
2150                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Scope", scope)?;
2151            }
2152            if let Some(ref session_cookie_name) = self.session_cookie_name {
2153                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionCookieName", session_cookie_name)?;
2154            }
2155            if let Some(ref session_timeout) = self.session_timeout {
2156                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SessionTimeout", session_timeout)?;
2157            }
2158            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenEndpoint", &self.token_endpoint)?;
2159            if let Some(ref use_existing_client_secret) = self.use_existing_client_secret {
2160                ::serde::ser::SerializeMap::serialize_entry(&mut map, "UseExistingClientSecret", use_existing_client_secret)?;
2161            }
2162            ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserInfoEndpoint", &self.user_info_endpoint)?;
2163            ::serde::ser::SerializeMap::end(map)
2164        }
2165    }
2166
2167    impl ::codec::DeserializeValue for AuthenticateOidcConfig {
2168        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AuthenticateOidcConfig, D::Error> {
2169            struct Visitor;
2170
2171            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2172                type Value = AuthenticateOidcConfig;
2173
2174                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2175                    write!(f, "a struct of type AuthenticateOidcConfig")
2176                }
2177
2178                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2179                    let mut authentication_request_extra_params: Option<::ValueMap<String>> = None;
2180                    let mut authorization_endpoint: Option<::Value<String>> = None;
2181                    let mut client_id: Option<::Value<String>> = None;
2182                    let mut client_secret: Option<::Value<String>> = None;
2183                    let mut issuer: Option<::Value<String>> = None;
2184                    let mut on_unauthenticated_request: Option<::Value<String>> = None;
2185                    let mut scope: Option<::Value<String>> = None;
2186                    let mut session_cookie_name: Option<::Value<String>> = None;
2187                    let mut session_timeout: Option<::Value<u32>> = None;
2188                    let mut token_endpoint: Option<::Value<String>> = None;
2189                    let mut use_existing_client_secret: Option<::Value<bool>> = None;
2190                    let mut user_info_endpoint: Option<::Value<String>> = None;
2191
2192                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2193                        match __cfn_key.as_ref() {
2194                            "AuthenticationRequestExtraParams" => {
2195                                authentication_request_extra_params = ::serde::de::MapAccess::next_value(&mut map)?;
2196                            }
2197                            "AuthorizationEndpoint" => {
2198                                authorization_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
2199                            }
2200                            "ClientId" => {
2201                                client_id = ::serde::de::MapAccess::next_value(&mut map)?;
2202                            }
2203                            "ClientSecret" => {
2204                                client_secret = ::serde::de::MapAccess::next_value(&mut map)?;
2205                            }
2206                            "Issuer" => {
2207                                issuer = ::serde::de::MapAccess::next_value(&mut map)?;
2208                            }
2209                            "OnUnauthenticatedRequest" => {
2210                                on_unauthenticated_request = ::serde::de::MapAccess::next_value(&mut map)?;
2211                            }
2212                            "Scope" => {
2213                                scope = ::serde::de::MapAccess::next_value(&mut map)?;
2214                            }
2215                            "SessionCookieName" => {
2216                                session_cookie_name = ::serde::de::MapAccess::next_value(&mut map)?;
2217                            }
2218                            "SessionTimeout" => {
2219                                session_timeout = ::serde::de::MapAccess::next_value(&mut map)?;
2220                            }
2221                            "TokenEndpoint" => {
2222                                token_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
2223                            }
2224                            "UseExistingClientSecret" => {
2225                                use_existing_client_secret = ::serde::de::MapAccess::next_value(&mut map)?;
2226                            }
2227                            "UserInfoEndpoint" => {
2228                                user_info_endpoint = ::serde::de::MapAccess::next_value(&mut map)?;
2229                            }
2230                            _ => {}
2231                        }
2232                    }
2233
2234                    Ok(AuthenticateOidcConfig {
2235                        authentication_request_extra_params: authentication_request_extra_params,
2236                        authorization_endpoint: authorization_endpoint.ok_or(::serde::de::Error::missing_field("AuthorizationEndpoint"))?,
2237                        client_id: client_id.ok_or(::serde::de::Error::missing_field("ClientId"))?,
2238                        client_secret: client_secret.ok_or(::serde::de::Error::missing_field("ClientSecret"))?,
2239                        issuer: issuer.ok_or(::serde::de::Error::missing_field("Issuer"))?,
2240                        on_unauthenticated_request: on_unauthenticated_request,
2241                        scope: scope,
2242                        session_cookie_name: session_cookie_name,
2243                        session_timeout: session_timeout,
2244                        token_endpoint: token_endpoint.ok_or(::serde::de::Error::missing_field("TokenEndpoint"))?,
2245                        use_existing_client_secret: use_existing_client_secret,
2246                        user_info_endpoint: user_info_endpoint.ok_or(::serde::de::Error::missing_field("UserInfoEndpoint"))?,
2247                    })
2248                }
2249            }
2250
2251            d.deserialize_map(Visitor)
2252        }
2253    }
2254
2255    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.FixedResponseConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html) property type.
2256    #[derive(Debug, Default)]
2257    pub struct FixedResponseConfig {
2258        /// Property [`ContentType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-contenttype).
2259        ///
2260        /// Update type: _Mutable_.
2261        /// AWS CloudFormation doesn't replace the resource when you change this property.
2262        pub content_type: Option<::Value<String>>,
2263        /// Property [`MessageBody`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-messagebody).
2264        ///
2265        /// Update type: _Mutable_.
2266        /// AWS CloudFormation doesn't replace the resource when you change this property.
2267        pub message_body: Option<::Value<String>>,
2268        /// Property [`StatusCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-fixedresponseconfig.html#cfn-elasticloadbalancingv2-listenerrule-fixedresponseconfig-statuscode).
2269        ///
2270        /// Update type: _Mutable_.
2271        /// AWS CloudFormation doesn't replace the resource when you change this property.
2272        pub status_code: ::Value<String>,
2273    }
2274
2275    impl ::codec::SerializeValue for FixedResponseConfig {
2276        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2277            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2278            if let Some(ref content_type) = self.content_type {
2279                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ContentType", content_type)?;
2280            }
2281            if let Some(ref message_body) = self.message_body {
2282                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessageBody", message_body)?;
2283            }
2284            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StatusCode", &self.status_code)?;
2285            ::serde::ser::SerializeMap::end(map)
2286        }
2287    }
2288
2289    impl ::codec::DeserializeValue for FixedResponseConfig {
2290        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<FixedResponseConfig, D::Error> {
2291            struct Visitor;
2292
2293            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2294                type Value = FixedResponseConfig;
2295
2296                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2297                    write!(f, "a struct of type FixedResponseConfig")
2298                }
2299
2300                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2301                    let mut content_type: Option<::Value<String>> = None;
2302                    let mut message_body: Option<::Value<String>> = None;
2303                    let mut status_code: Option<::Value<String>> = None;
2304
2305                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2306                        match __cfn_key.as_ref() {
2307                            "ContentType" => {
2308                                content_type = ::serde::de::MapAccess::next_value(&mut map)?;
2309                            }
2310                            "MessageBody" => {
2311                                message_body = ::serde::de::MapAccess::next_value(&mut map)?;
2312                            }
2313                            "StatusCode" => {
2314                                status_code = ::serde::de::MapAccess::next_value(&mut map)?;
2315                            }
2316                            _ => {}
2317                        }
2318                    }
2319
2320                    Ok(FixedResponseConfig {
2321                        content_type: content_type,
2322                        message_body: message_body,
2323                        status_code: status_code.ok_or(::serde::de::Error::missing_field("StatusCode"))?,
2324                    })
2325                }
2326            }
2327
2328            d.deserialize_map(Visitor)
2329        }
2330    }
2331
2332    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.ForwardConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-forwardconfig.html) property type.
2333    #[derive(Debug, Default)]
2334    pub struct ForwardConfig {
2335        /// Property [`TargetGroupStickinessConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-forwardconfig.html#cfn-elasticloadbalancingv2-listenerrule-forwardconfig-targetgroupstickinessconfig).
2336        ///
2337        /// Update type: _Mutable_.
2338        /// AWS CloudFormation doesn't replace the resource when you change this property.
2339        pub target_group_stickiness_config: Option<::Value<TargetGroupStickinessConfig>>,
2340        /// Property [`TargetGroups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-forwardconfig.html#cfn-elasticloadbalancingv2-listenerrule-forwardconfig-targetgroups).
2341        ///
2342        /// Update type: _Mutable_.
2343        /// AWS CloudFormation doesn't replace the resource when you change this property.
2344        pub target_groups: Option<::ValueList<TargetGroupTuple>>,
2345    }
2346
2347    impl ::codec::SerializeValue for ForwardConfig {
2348        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2349            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2350            if let Some(ref target_group_stickiness_config) = self.target_group_stickiness_config {
2351                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupStickinessConfig", target_group_stickiness_config)?;
2352            }
2353            if let Some(ref target_groups) = self.target_groups {
2354                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroups", target_groups)?;
2355            }
2356            ::serde::ser::SerializeMap::end(map)
2357        }
2358    }
2359
2360    impl ::codec::DeserializeValue for ForwardConfig {
2361        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<ForwardConfig, D::Error> {
2362            struct Visitor;
2363
2364            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2365                type Value = ForwardConfig;
2366
2367                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2368                    write!(f, "a struct of type ForwardConfig")
2369                }
2370
2371                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2372                    let mut target_group_stickiness_config: Option<::Value<TargetGroupStickinessConfig>> = None;
2373                    let mut target_groups: Option<::ValueList<TargetGroupTuple>> = None;
2374
2375                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2376                        match __cfn_key.as_ref() {
2377                            "TargetGroupStickinessConfig" => {
2378                                target_group_stickiness_config = ::serde::de::MapAccess::next_value(&mut map)?;
2379                            }
2380                            "TargetGroups" => {
2381                                target_groups = ::serde::de::MapAccess::next_value(&mut map)?;
2382                            }
2383                            _ => {}
2384                        }
2385                    }
2386
2387                    Ok(ForwardConfig {
2388                        target_group_stickiness_config: target_group_stickiness_config,
2389                        target_groups: target_groups,
2390                    })
2391                }
2392            }
2393
2394            d.deserialize_map(Visitor)
2395        }
2396    }
2397
2398    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.HostHeaderConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-hostheaderconfig.html) property type.
2399    #[derive(Debug, Default)]
2400    pub struct HostHeaderConfig {
2401        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-hostheaderconfig.html#cfn-elasticloadbalancingv2-listenerrule-hostheaderconfig-values).
2402        ///
2403        /// Update type: _Mutable_.
2404        /// AWS CloudFormation doesn't replace the resource when you change this property.
2405        pub values: Option<::ValueList<String>>,
2406    }
2407
2408    impl ::codec::SerializeValue for HostHeaderConfig {
2409        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2410            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2411            if let Some(ref values) = self.values {
2412                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2413            }
2414            ::serde::ser::SerializeMap::end(map)
2415        }
2416    }
2417
2418    impl ::codec::DeserializeValue for HostHeaderConfig {
2419        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<HostHeaderConfig, D::Error> {
2420            struct Visitor;
2421
2422            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2423                type Value = HostHeaderConfig;
2424
2425                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2426                    write!(f, "a struct of type HostHeaderConfig")
2427                }
2428
2429                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2430                    let mut values: Option<::ValueList<String>> = None;
2431
2432                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2433                        match __cfn_key.as_ref() {
2434                            "Values" => {
2435                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2436                            }
2437                            _ => {}
2438                        }
2439                    }
2440
2441                    Ok(HostHeaderConfig {
2442                        values: values,
2443                    })
2444                }
2445            }
2446
2447            d.deserialize_map(Visitor)
2448        }
2449    }
2450
2451    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.HttpHeaderConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-httpheaderconfig.html) property type.
2452    #[derive(Debug, Default)]
2453    pub struct HttpHeaderConfig {
2454        /// Property [`HttpHeaderName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-httpheaderconfig.html#cfn-elasticloadbalancingv2-listenerrule-httpheaderconfig-httpheadername).
2455        ///
2456        /// Update type: _Mutable_.
2457        /// AWS CloudFormation doesn't replace the resource when you change this property.
2458        pub http_header_name: Option<::Value<String>>,
2459        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-httpheaderconfig.html#cfn-elasticloadbalancingv2-listenerrule-httpheaderconfig-values).
2460        ///
2461        /// Update type: _Mutable_.
2462        /// AWS CloudFormation doesn't replace the resource when you change this property.
2463        pub values: Option<::ValueList<String>>,
2464    }
2465
2466    impl ::codec::SerializeValue for HttpHeaderConfig {
2467        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2468            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2469            if let Some(ref http_header_name) = self.http_header_name {
2470                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HttpHeaderName", http_header_name)?;
2471            }
2472            if let Some(ref values) = self.values {
2473                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2474            }
2475            ::serde::ser::SerializeMap::end(map)
2476        }
2477    }
2478
2479    impl ::codec::DeserializeValue for HttpHeaderConfig {
2480        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<HttpHeaderConfig, D::Error> {
2481            struct Visitor;
2482
2483            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2484                type Value = HttpHeaderConfig;
2485
2486                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2487                    write!(f, "a struct of type HttpHeaderConfig")
2488                }
2489
2490                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2491                    let mut http_header_name: Option<::Value<String>> = None;
2492                    let mut values: Option<::ValueList<String>> = None;
2493
2494                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2495                        match __cfn_key.as_ref() {
2496                            "HttpHeaderName" => {
2497                                http_header_name = ::serde::de::MapAccess::next_value(&mut map)?;
2498                            }
2499                            "Values" => {
2500                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2501                            }
2502                            _ => {}
2503                        }
2504                    }
2505
2506                    Ok(HttpHeaderConfig {
2507                        http_header_name: http_header_name,
2508                        values: values,
2509                    })
2510                }
2511            }
2512
2513            d.deserialize_map(Visitor)
2514        }
2515    }
2516
2517    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.HttpRequestMethodConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-httprequestmethodconfig.html) property type.
2518    #[derive(Debug, Default)]
2519    pub struct HttpRequestMethodConfig {
2520        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-httprequestmethodconfig.html#cfn-elasticloadbalancingv2-listenerrule-httprequestmethodconfig-values).
2521        ///
2522        /// Update type: _Mutable_.
2523        /// AWS CloudFormation doesn't replace the resource when you change this property.
2524        pub values: Option<::ValueList<String>>,
2525    }
2526
2527    impl ::codec::SerializeValue for HttpRequestMethodConfig {
2528        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2529            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2530            if let Some(ref values) = self.values {
2531                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2532            }
2533            ::serde::ser::SerializeMap::end(map)
2534        }
2535    }
2536
2537    impl ::codec::DeserializeValue for HttpRequestMethodConfig {
2538        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<HttpRequestMethodConfig, D::Error> {
2539            struct Visitor;
2540
2541            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2542                type Value = HttpRequestMethodConfig;
2543
2544                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2545                    write!(f, "a struct of type HttpRequestMethodConfig")
2546                }
2547
2548                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2549                    let mut values: Option<::ValueList<String>> = None;
2550
2551                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2552                        match __cfn_key.as_ref() {
2553                            "Values" => {
2554                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2555                            }
2556                            _ => {}
2557                        }
2558                    }
2559
2560                    Ok(HttpRequestMethodConfig {
2561                        values: values,
2562                    })
2563                }
2564            }
2565
2566            d.deserialize_map(Visitor)
2567        }
2568    }
2569
2570    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.PathPatternConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-pathpatternconfig.html) property type.
2571    #[derive(Debug, Default)]
2572    pub struct PathPatternConfig {
2573        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-pathpatternconfig.html#cfn-elasticloadbalancingv2-listenerrule-pathpatternconfig-values).
2574        ///
2575        /// Update type: _Mutable_.
2576        /// AWS CloudFormation doesn't replace the resource when you change this property.
2577        pub values: Option<::ValueList<String>>,
2578    }
2579
2580    impl ::codec::SerializeValue for PathPatternConfig {
2581        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2582            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2583            if let Some(ref values) = self.values {
2584                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2585            }
2586            ::serde::ser::SerializeMap::end(map)
2587        }
2588    }
2589
2590    impl ::codec::DeserializeValue for PathPatternConfig {
2591        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<PathPatternConfig, D::Error> {
2592            struct Visitor;
2593
2594            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2595                type Value = PathPatternConfig;
2596
2597                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2598                    write!(f, "a struct of type PathPatternConfig")
2599                }
2600
2601                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2602                    let mut values: Option<::ValueList<String>> = None;
2603
2604                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2605                        match __cfn_key.as_ref() {
2606                            "Values" => {
2607                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2608                            }
2609                            _ => {}
2610                        }
2611                    }
2612
2613                    Ok(PathPatternConfig {
2614                        values: values,
2615                    })
2616                }
2617            }
2618
2619            d.deserialize_map(Visitor)
2620        }
2621    }
2622
2623    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.QueryStringConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringconfig.html) property type.
2624    #[derive(Debug, Default)]
2625    pub struct QueryStringConfig {
2626        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringconfig.html#cfn-elasticloadbalancingv2-listenerrule-querystringconfig-values).
2627        ///
2628        /// Update type: _Mutable_.
2629        /// AWS CloudFormation doesn't replace the resource when you change this property.
2630        pub values: Option<::ValueList<QueryStringKeyValue>>,
2631    }
2632
2633    impl ::codec::SerializeValue for QueryStringConfig {
2634        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2635            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2636            if let Some(ref values) = self.values {
2637                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2638            }
2639            ::serde::ser::SerializeMap::end(map)
2640        }
2641    }
2642
2643    impl ::codec::DeserializeValue for QueryStringConfig {
2644        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QueryStringConfig, D::Error> {
2645            struct Visitor;
2646
2647            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2648                type Value = QueryStringConfig;
2649
2650                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2651                    write!(f, "a struct of type QueryStringConfig")
2652                }
2653
2654                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2655                    let mut values: Option<::ValueList<QueryStringKeyValue>> = None;
2656
2657                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2658                        match __cfn_key.as_ref() {
2659                            "Values" => {
2660                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2661                            }
2662                            _ => {}
2663                        }
2664                    }
2665
2666                    Ok(QueryStringConfig {
2667                        values: values,
2668                    })
2669                }
2670            }
2671
2672            d.deserialize_map(Visitor)
2673        }
2674    }
2675
2676    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.QueryStringKeyValue`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringkeyvalue.html) property type.
2677    #[derive(Debug, Default)]
2678    pub struct QueryStringKeyValue {
2679        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringkeyvalue.html#cfn-elasticloadbalancingv2-listenerrule-querystringkeyvalue-key).
2680        ///
2681        /// Update type: _Mutable_.
2682        /// AWS CloudFormation doesn't replace the resource when you change this property.
2683        pub key: Option<::Value<String>>,
2684        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-querystringkeyvalue.html#cfn-elasticloadbalancingv2-listenerrule-querystringkeyvalue-value).
2685        ///
2686        /// Update type: _Mutable_.
2687        /// AWS CloudFormation doesn't replace the resource when you change this property.
2688        pub value: Option<::Value<String>>,
2689    }
2690
2691    impl ::codec::SerializeValue for QueryStringKeyValue {
2692        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2693            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2694            if let Some(ref key) = self.key {
2695                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", key)?;
2696            }
2697            if let Some(ref value) = self.value {
2698                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", value)?;
2699            }
2700            ::serde::ser::SerializeMap::end(map)
2701        }
2702    }
2703
2704    impl ::codec::DeserializeValue for QueryStringKeyValue {
2705        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QueryStringKeyValue, D::Error> {
2706            struct Visitor;
2707
2708            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2709                type Value = QueryStringKeyValue;
2710
2711                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2712                    write!(f, "a struct of type QueryStringKeyValue")
2713                }
2714
2715                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2716                    let mut key: Option<::Value<String>> = None;
2717                    let mut value: Option<::Value<String>> = None;
2718
2719                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2720                        match __cfn_key.as_ref() {
2721                            "Key" => {
2722                                key = ::serde::de::MapAccess::next_value(&mut map)?;
2723                            }
2724                            "Value" => {
2725                                value = ::serde::de::MapAccess::next_value(&mut map)?;
2726                            }
2727                            _ => {}
2728                        }
2729                    }
2730
2731                    Ok(QueryStringKeyValue {
2732                        key: key,
2733                        value: value,
2734                    })
2735                }
2736            }
2737
2738            d.deserialize_map(Visitor)
2739        }
2740    }
2741
2742    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.RedirectConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html) property type.
2743    #[derive(Debug, Default)]
2744    pub struct RedirectConfig {
2745        /// Property [`Host`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-host).
2746        ///
2747        /// Update type: _Mutable_.
2748        /// AWS CloudFormation doesn't replace the resource when you change this property.
2749        pub host: Option<::Value<String>>,
2750        /// Property [`Path`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-path).
2751        ///
2752        /// Update type: _Mutable_.
2753        /// AWS CloudFormation doesn't replace the resource when you change this property.
2754        pub path: Option<::Value<String>>,
2755        /// Property [`Port`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-port).
2756        ///
2757        /// Update type: _Mutable_.
2758        /// AWS CloudFormation doesn't replace the resource when you change this property.
2759        pub port: Option<::Value<String>>,
2760        /// Property [`Protocol`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-protocol).
2761        ///
2762        /// Update type: _Mutable_.
2763        /// AWS CloudFormation doesn't replace the resource when you change this property.
2764        pub protocol: Option<::Value<String>>,
2765        /// Property [`Query`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-query).
2766        ///
2767        /// Update type: _Mutable_.
2768        /// AWS CloudFormation doesn't replace the resource when you change this property.
2769        pub query: Option<::Value<String>>,
2770        /// Property [`StatusCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-redirectconfig.html#cfn-elasticloadbalancingv2-listenerrule-redirectconfig-statuscode).
2771        ///
2772        /// Update type: _Mutable_.
2773        /// AWS CloudFormation doesn't replace the resource when you change this property.
2774        pub status_code: ::Value<String>,
2775    }
2776
2777    impl ::codec::SerializeValue for RedirectConfig {
2778        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2779            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2780            if let Some(ref host) = self.host {
2781                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Host", host)?;
2782            }
2783            if let Some(ref path) = self.path {
2784                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Path", path)?;
2785            }
2786            if let Some(ref port) = self.port {
2787                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Port", port)?;
2788            }
2789            if let Some(ref protocol) = self.protocol {
2790                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Protocol", protocol)?;
2791            }
2792            if let Some(ref query) = self.query {
2793                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Query", query)?;
2794            }
2795            ::serde::ser::SerializeMap::serialize_entry(&mut map, "StatusCode", &self.status_code)?;
2796            ::serde::ser::SerializeMap::end(map)
2797        }
2798    }
2799
2800    impl ::codec::DeserializeValue for RedirectConfig {
2801        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<RedirectConfig, D::Error> {
2802            struct Visitor;
2803
2804            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2805                type Value = RedirectConfig;
2806
2807                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2808                    write!(f, "a struct of type RedirectConfig")
2809                }
2810
2811                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2812                    let mut host: Option<::Value<String>> = None;
2813                    let mut path: Option<::Value<String>> = None;
2814                    let mut port: Option<::Value<String>> = None;
2815                    let mut protocol: Option<::Value<String>> = None;
2816                    let mut query: Option<::Value<String>> = None;
2817                    let mut status_code: Option<::Value<String>> = None;
2818
2819                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2820                        match __cfn_key.as_ref() {
2821                            "Host" => {
2822                                host = ::serde::de::MapAccess::next_value(&mut map)?;
2823                            }
2824                            "Path" => {
2825                                path = ::serde::de::MapAccess::next_value(&mut map)?;
2826                            }
2827                            "Port" => {
2828                                port = ::serde::de::MapAccess::next_value(&mut map)?;
2829                            }
2830                            "Protocol" => {
2831                                protocol = ::serde::de::MapAccess::next_value(&mut map)?;
2832                            }
2833                            "Query" => {
2834                                query = ::serde::de::MapAccess::next_value(&mut map)?;
2835                            }
2836                            "StatusCode" => {
2837                                status_code = ::serde::de::MapAccess::next_value(&mut map)?;
2838                            }
2839                            _ => {}
2840                        }
2841                    }
2842
2843                    Ok(RedirectConfig {
2844                        host: host,
2845                        path: path,
2846                        port: port,
2847                        protocol: protocol,
2848                        query: query,
2849                        status_code: status_code.ok_or(::serde::de::Error::missing_field("StatusCode"))?,
2850                    })
2851                }
2852            }
2853
2854            d.deserialize_map(Visitor)
2855        }
2856    }
2857
2858    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.RuleCondition`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html) property type.
2859    #[derive(Debug, Default)]
2860    pub struct RuleCondition {
2861        /// Property [`Field`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-field).
2862        ///
2863        /// Update type: _Mutable_.
2864        /// AWS CloudFormation doesn't replace the resource when you change this property.
2865        pub field: Option<::Value<String>>,
2866        /// Property [`HostHeaderConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-hostheaderconfig).
2867        ///
2868        /// Update type: _Mutable_.
2869        /// AWS CloudFormation doesn't replace the resource when you change this property.
2870        pub host_header_config: Option<::Value<HostHeaderConfig>>,
2871        /// Property [`HttpHeaderConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-httpheaderconfig).
2872        ///
2873        /// Update type: _Mutable_.
2874        /// AWS CloudFormation doesn't replace the resource when you change this property.
2875        pub http_header_config: Option<::Value<HttpHeaderConfig>>,
2876        /// Property [`HttpRequestMethodConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-httprequestmethodconfig).
2877        ///
2878        /// Update type: _Mutable_.
2879        /// AWS CloudFormation doesn't replace the resource when you change this property.
2880        pub http_request_method_config: Option<::Value<HttpRequestMethodConfig>>,
2881        /// Property [`PathPatternConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-pathpatternconfig).
2882        ///
2883        /// Update type: _Mutable_.
2884        /// AWS CloudFormation doesn't replace the resource when you change this property.
2885        pub path_pattern_config: Option<::Value<PathPatternConfig>>,
2886        /// Property [`QueryStringConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-querystringconfig).
2887        ///
2888        /// Update type: _Mutable_.
2889        /// AWS CloudFormation doesn't replace the resource when you change this property.
2890        pub query_string_config: Option<::Value<QueryStringConfig>>,
2891        /// Property [`SourceIpConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-sourceipconfig).
2892        ///
2893        /// Update type: _Mutable_.
2894        /// AWS CloudFormation doesn't replace the resource when you change this property.
2895        pub source_ip_config: Option<::Value<SourceIpConfig>>,
2896        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-rulecondition.html#cfn-elasticloadbalancingv2-listenerrule-rulecondition-values).
2897        ///
2898        /// Update type: _Mutable_.
2899        /// AWS CloudFormation doesn't replace the resource when you change this property.
2900        pub values: Option<::ValueList<String>>,
2901    }
2902
2903    impl ::codec::SerializeValue for RuleCondition {
2904        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2905            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2906            if let Some(ref field) = self.field {
2907                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Field", field)?;
2908            }
2909            if let Some(ref host_header_config) = self.host_header_config {
2910                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HostHeaderConfig", host_header_config)?;
2911            }
2912            if let Some(ref http_header_config) = self.http_header_config {
2913                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HttpHeaderConfig", http_header_config)?;
2914            }
2915            if let Some(ref http_request_method_config) = self.http_request_method_config {
2916                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HttpRequestMethodConfig", http_request_method_config)?;
2917            }
2918            if let Some(ref path_pattern_config) = self.path_pattern_config {
2919                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PathPatternConfig", path_pattern_config)?;
2920            }
2921            if let Some(ref query_string_config) = self.query_string_config {
2922                ::serde::ser::SerializeMap::serialize_entry(&mut map, "QueryStringConfig", query_string_config)?;
2923            }
2924            if let Some(ref source_ip_config) = self.source_ip_config {
2925                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SourceIpConfig", source_ip_config)?;
2926            }
2927            if let Some(ref values) = self.values {
2928                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2929            }
2930            ::serde::ser::SerializeMap::end(map)
2931        }
2932    }
2933
2934    impl ::codec::DeserializeValue for RuleCondition {
2935        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<RuleCondition, D::Error> {
2936            struct Visitor;
2937
2938            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2939                type Value = RuleCondition;
2940
2941                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2942                    write!(f, "a struct of type RuleCondition")
2943                }
2944
2945                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2946                    let mut field: Option<::Value<String>> = None;
2947                    let mut host_header_config: Option<::Value<HostHeaderConfig>> = None;
2948                    let mut http_header_config: Option<::Value<HttpHeaderConfig>> = None;
2949                    let mut http_request_method_config: Option<::Value<HttpRequestMethodConfig>> = None;
2950                    let mut path_pattern_config: Option<::Value<PathPatternConfig>> = None;
2951                    let mut query_string_config: Option<::Value<QueryStringConfig>> = None;
2952                    let mut source_ip_config: Option<::Value<SourceIpConfig>> = None;
2953                    let mut values: Option<::ValueList<String>> = None;
2954
2955                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2956                        match __cfn_key.as_ref() {
2957                            "Field" => {
2958                                field = ::serde::de::MapAccess::next_value(&mut map)?;
2959                            }
2960                            "HostHeaderConfig" => {
2961                                host_header_config = ::serde::de::MapAccess::next_value(&mut map)?;
2962                            }
2963                            "HttpHeaderConfig" => {
2964                                http_header_config = ::serde::de::MapAccess::next_value(&mut map)?;
2965                            }
2966                            "HttpRequestMethodConfig" => {
2967                                http_request_method_config = ::serde::de::MapAccess::next_value(&mut map)?;
2968                            }
2969                            "PathPatternConfig" => {
2970                                path_pattern_config = ::serde::de::MapAccess::next_value(&mut map)?;
2971                            }
2972                            "QueryStringConfig" => {
2973                                query_string_config = ::serde::de::MapAccess::next_value(&mut map)?;
2974                            }
2975                            "SourceIpConfig" => {
2976                                source_ip_config = ::serde::de::MapAccess::next_value(&mut map)?;
2977                            }
2978                            "Values" => {
2979                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2980                            }
2981                            _ => {}
2982                        }
2983                    }
2984
2985                    Ok(RuleCondition {
2986                        field: field,
2987                        host_header_config: host_header_config,
2988                        http_header_config: http_header_config,
2989                        http_request_method_config: http_request_method_config,
2990                        path_pattern_config: path_pattern_config,
2991                        query_string_config: query_string_config,
2992                        source_ip_config: source_ip_config,
2993                        values: values,
2994                    })
2995                }
2996            }
2997
2998            d.deserialize_map(Visitor)
2999        }
3000    }
3001
3002    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.SourceIpConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-sourceipconfig.html) property type.
3003    #[derive(Debug, Default)]
3004    pub struct SourceIpConfig {
3005        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-sourceipconfig.html#cfn-elasticloadbalancingv2-listenerrule-sourceipconfig-values).
3006        ///
3007        /// Update type: _Mutable_.
3008        /// AWS CloudFormation doesn't replace the resource when you change this property.
3009        pub values: Option<::ValueList<String>>,
3010    }
3011
3012    impl ::codec::SerializeValue for SourceIpConfig {
3013        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3014            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3015            if let Some(ref values) = self.values {
3016                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
3017            }
3018            ::serde::ser::SerializeMap::end(map)
3019        }
3020    }
3021
3022    impl ::codec::DeserializeValue for SourceIpConfig {
3023        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SourceIpConfig, D::Error> {
3024            struct Visitor;
3025
3026            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3027                type Value = SourceIpConfig;
3028
3029                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3030                    write!(f, "a struct of type SourceIpConfig")
3031                }
3032
3033                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3034                    let mut values: Option<::ValueList<String>> = None;
3035
3036                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3037                        match __cfn_key.as_ref() {
3038                            "Values" => {
3039                                values = ::serde::de::MapAccess::next_value(&mut map)?;
3040                            }
3041                            _ => {}
3042                        }
3043                    }
3044
3045                    Ok(SourceIpConfig {
3046                        values: values,
3047                    })
3048                }
3049            }
3050
3051            d.deserialize_map(Visitor)
3052        }
3053    }
3054
3055    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.TargetGroupStickinessConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgroupstickinessconfig.html) property type.
3056    #[derive(Debug, Default)]
3057    pub struct TargetGroupStickinessConfig {
3058        /// Property [`DurationSeconds`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listenerrule-targetgroupstickinessconfig-durationseconds).
3059        ///
3060        /// Update type: _Mutable_.
3061        /// AWS CloudFormation doesn't replace the resource when you change this property.
3062        pub duration_seconds: Option<::Value<u32>>,
3063        /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgroupstickinessconfig.html#cfn-elasticloadbalancingv2-listenerrule-targetgroupstickinessconfig-enabled).
3064        ///
3065        /// Update type: _Mutable_.
3066        /// AWS CloudFormation doesn't replace the resource when you change this property.
3067        pub enabled: Option<::Value<bool>>,
3068    }
3069
3070    impl ::codec::SerializeValue for TargetGroupStickinessConfig {
3071        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3072            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3073            if let Some(ref duration_seconds) = self.duration_seconds {
3074                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DurationSeconds", duration_seconds)?;
3075            }
3076            if let Some(ref enabled) = self.enabled {
3077                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
3078            }
3079            ::serde::ser::SerializeMap::end(map)
3080        }
3081    }
3082
3083    impl ::codec::DeserializeValue for TargetGroupStickinessConfig {
3084        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupStickinessConfig, D::Error> {
3085            struct Visitor;
3086
3087            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3088                type Value = TargetGroupStickinessConfig;
3089
3090                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3091                    write!(f, "a struct of type TargetGroupStickinessConfig")
3092                }
3093
3094                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3095                    let mut duration_seconds: Option<::Value<u32>> = None;
3096                    let mut enabled: Option<::Value<bool>> = None;
3097
3098                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3099                        match __cfn_key.as_ref() {
3100                            "DurationSeconds" => {
3101                                duration_seconds = ::serde::de::MapAccess::next_value(&mut map)?;
3102                            }
3103                            "Enabled" => {
3104                                enabled = ::serde::de::MapAccess::next_value(&mut map)?;
3105                            }
3106                            _ => {}
3107                        }
3108                    }
3109
3110                    Ok(TargetGroupStickinessConfig {
3111                        duration_seconds: duration_seconds,
3112                        enabled: enabled,
3113                    })
3114                }
3115            }
3116
3117            d.deserialize_map(Visitor)
3118        }
3119    }
3120
3121    /// The [`AWS::ElasticLoadBalancingV2::ListenerRule.TargetGroupTuple`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgrouptuple.html) property type.
3122    #[derive(Debug, Default)]
3123    pub struct TargetGroupTuple {
3124        /// Property [`TargetGroupArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgrouptuple.html#cfn-elasticloadbalancingv2-listenerrule-targetgrouptuple-targetgrouparn).
3125        ///
3126        /// Update type: _Mutable_.
3127        /// AWS CloudFormation doesn't replace the resource when you change this property.
3128        pub target_group_arn: Option<::Value<String>>,
3129        /// Property [`Weight`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-listenerrule-targetgrouptuple.html#cfn-elasticloadbalancingv2-listenerrule-targetgrouptuple-weight).
3130        ///
3131        /// Update type: _Mutable_.
3132        /// AWS CloudFormation doesn't replace the resource when you change this property.
3133        pub weight: Option<::Value<u32>>,
3134    }
3135
3136    impl ::codec::SerializeValue for TargetGroupTuple {
3137        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3138            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3139            if let Some(ref target_group_arn) = self.target_group_arn {
3140                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TargetGroupArn", target_group_arn)?;
3141            }
3142            if let Some(ref weight) = self.weight {
3143                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Weight", weight)?;
3144            }
3145            ::serde::ser::SerializeMap::end(map)
3146        }
3147    }
3148
3149    impl ::codec::DeserializeValue for TargetGroupTuple {
3150        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupTuple, D::Error> {
3151            struct Visitor;
3152
3153            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3154                type Value = TargetGroupTuple;
3155
3156                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3157                    write!(f, "a struct of type TargetGroupTuple")
3158                }
3159
3160                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3161                    let mut target_group_arn: Option<::Value<String>> = None;
3162                    let mut weight: Option<::Value<u32>> = None;
3163
3164                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3165                        match __cfn_key.as_ref() {
3166                            "TargetGroupArn" => {
3167                                target_group_arn = ::serde::de::MapAccess::next_value(&mut map)?;
3168                            }
3169                            "Weight" => {
3170                                weight = ::serde::de::MapAccess::next_value(&mut map)?;
3171                            }
3172                            _ => {}
3173                        }
3174                    }
3175
3176                    Ok(TargetGroupTuple {
3177                        target_group_arn: target_group_arn,
3178                        weight: weight,
3179                    })
3180                }
3181            }
3182
3183            d.deserialize_map(Visitor)
3184        }
3185    }
3186}
3187
3188pub mod load_balancer {
3189    //! Property types for the `LoadBalancer` resource.
3190
3191    /// The [`AWS::ElasticLoadBalancingV2::LoadBalancer.LoadBalancerAttribute`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattributes.html) property type.
3192    #[derive(Debug, Default)]
3193    pub struct LoadBalancerAttribute {
3194        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattributes.html#cfn-elasticloadbalancingv2-loadbalancer-loadbalancerattributes-key).
3195        ///
3196        /// Update type: _Mutable_.
3197        /// AWS CloudFormation doesn't replace the resource when you change this property.
3198        pub key: Option<::Value<String>>,
3199        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-loadbalancerattributes.html#cfn-elasticloadbalancingv2-loadbalancer-loadbalancerattributes-value).
3200        ///
3201        /// Update type: _Mutable_.
3202        /// AWS CloudFormation doesn't replace the resource when you change this property.
3203        pub value: Option<::Value<String>>,
3204    }
3205
3206    impl ::codec::SerializeValue for LoadBalancerAttribute {
3207        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3208            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3209            if let Some(ref key) = self.key {
3210                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", key)?;
3211            }
3212            if let Some(ref value) = self.value {
3213                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", value)?;
3214            }
3215            ::serde::ser::SerializeMap::end(map)
3216        }
3217    }
3218
3219    impl ::codec::DeserializeValue for LoadBalancerAttribute {
3220        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<LoadBalancerAttribute, D::Error> {
3221            struct Visitor;
3222
3223            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3224                type Value = LoadBalancerAttribute;
3225
3226                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3227                    write!(f, "a struct of type LoadBalancerAttribute")
3228                }
3229
3230                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3231                    let mut key: Option<::Value<String>> = None;
3232                    let mut value: Option<::Value<String>> = None;
3233
3234                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3235                        match __cfn_key.as_ref() {
3236                            "Key" => {
3237                                key = ::serde::de::MapAccess::next_value(&mut map)?;
3238                            }
3239                            "Value" => {
3240                                value = ::serde::de::MapAccess::next_value(&mut map)?;
3241                            }
3242                            _ => {}
3243                        }
3244                    }
3245
3246                    Ok(LoadBalancerAttribute {
3247                        key: key,
3248                        value: value,
3249                    })
3250                }
3251            }
3252
3253            d.deserialize_map(Visitor)
3254        }
3255    }
3256
3257    /// The [`AWS::ElasticLoadBalancingV2::LoadBalancer.SubnetMapping`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html) property type.
3258    #[derive(Debug, Default)]
3259    pub struct SubnetMapping {
3260        /// Property [`AllocationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-allocationid).
3261        ///
3262        /// Update type: _Mutable_.
3263        /// AWS CloudFormation doesn't replace the resource when you change this property.
3264        pub allocation_id: Option<::Value<String>>,
3265        /// Property [`IPv6Address`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-ipv6address).
3266        ///
3267        /// Update type: _Mutable_.
3268        /// AWS CloudFormation doesn't replace the resource when you change this property.
3269        pub i_pv6_address: Option<::Value<String>>,
3270        /// Property [`PrivateIPv4Address`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-privateipv4address).
3271        ///
3272        /// Update type: _Mutable_.
3273        /// AWS CloudFormation doesn't replace the resource when you change this property.
3274        pub private_i_pv4_address: Option<::Value<String>>,
3275        /// Property [`SubnetId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-loadbalancer-subnetmapping.html#cfn-elasticloadbalancingv2-loadbalancer-subnetmapping-subnetid).
3276        ///
3277        /// Update type: _Mutable_.
3278        /// AWS CloudFormation doesn't replace the resource when you change this property.
3279        pub subnet_id: ::Value<String>,
3280    }
3281
3282    impl ::codec::SerializeValue for SubnetMapping {
3283        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3284            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3285            if let Some(ref allocation_id) = self.allocation_id {
3286                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AllocationId", allocation_id)?;
3287            }
3288            if let Some(ref i_pv6_address) = self.i_pv6_address {
3289                ::serde::ser::SerializeMap::serialize_entry(&mut map, "IPv6Address", i_pv6_address)?;
3290            }
3291            if let Some(ref private_i_pv4_address) = self.private_i_pv4_address {
3292                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrivateIPv4Address", private_i_pv4_address)?;
3293            }
3294            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubnetId", &self.subnet_id)?;
3295            ::serde::ser::SerializeMap::end(map)
3296        }
3297    }
3298
3299    impl ::codec::DeserializeValue for SubnetMapping {
3300        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SubnetMapping, D::Error> {
3301            struct Visitor;
3302
3303            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3304                type Value = SubnetMapping;
3305
3306                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3307                    write!(f, "a struct of type SubnetMapping")
3308                }
3309
3310                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3311                    let mut allocation_id: Option<::Value<String>> = None;
3312                    let mut i_pv6_address: Option<::Value<String>> = None;
3313                    let mut private_i_pv4_address: Option<::Value<String>> = None;
3314                    let mut subnet_id: Option<::Value<String>> = None;
3315
3316                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3317                        match __cfn_key.as_ref() {
3318                            "AllocationId" => {
3319                                allocation_id = ::serde::de::MapAccess::next_value(&mut map)?;
3320                            }
3321                            "IPv6Address" => {
3322                                i_pv6_address = ::serde::de::MapAccess::next_value(&mut map)?;
3323                            }
3324                            "PrivateIPv4Address" => {
3325                                private_i_pv4_address = ::serde::de::MapAccess::next_value(&mut map)?;
3326                            }
3327                            "SubnetId" => {
3328                                subnet_id = ::serde::de::MapAccess::next_value(&mut map)?;
3329                            }
3330                            _ => {}
3331                        }
3332                    }
3333
3334                    Ok(SubnetMapping {
3335                        allocation_id: allocation_id,
3336                        i_pv6_address: i_pv6_address,
3337                        private_i_pv4_address: private_i_pv4_address,
3338                        subnet_id: subnet_id.ok_or(::serde::de::Error::missing_field("SubnetId"))?,
3339                    })
3340                }
3341            }
3342
3343            d.deserialize_map(Visitor)
3344        }
3345    }
3346}
3347
3348pub mod target_group {
3349    //! Property types for the `TargetGroup` resource.
3350
3351    /// The [`AWS::ElasticLoadBalancingV2::TargetGroup.Matcher`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-matcher.html) property type.
3352    #[derive(Debug, Default)]
3353    pub struct Matcher {
3354        /// Property [`GrpcCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-matcher.html#cfn-elasticloadbalancingv2-targetgroup-matcher-grpccode).
3355        ///
3356        /// Update type: _Mutable_.
3357        /// AWS CloudFormation doesn't replace the resource when you change this property.
3358        pub grpc_code: Option<::Value<String>>,
3359        /// Property [`HttpCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-matcher.html#cfn-elasticloadbalancingv2-targetgroup-matcher-httpcode).
3360        ///
3361        /// Update type: _Mutable_.
3362        /// AWS CloudFormation doesn't replace the resource when you change this property.
3363        pub http_code: Option<::Value<String>>,
3364    }
3365
3366    impl ::codec::SerializeValue for Matcher {
3367        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3368            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3369            if let Some(ref grpc_code) = self.grpc_code {
3370                ::serde::ser::SerializeMap::serialize_entry(&mut map, "GrpcCode", grpc_code)?;
3371            }
3372            if let Some(ref http_code) = self.http_code {
3373                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HttpCode", http_code)?;
3374            }
3375            ::serde::ser::SerializeMap::end(map)
3376        }
3377    }
3378
3379    impl ::codec::DeserializeValue for Matcher {
3380        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Matcher, D::Error> {
3381            struct Visitor;
3382
3383            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3384                type Value = Matcher;
3385
3386                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3387                    write!(f, "a struct of type Matcher")
3388                }
3389
3390                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3391                    let mut grpc_code: Option<::Value<String>> = None;
3392                    let mut http_code: Option<::Value<String>> = None;
3393
3394                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3395                        match __cfn_key.as_ref() {
3396                            "GrpcCode" => {
3397                                grpc_code = ::serde::de::MapAccess::next_value(&mut map)?;
3398                            }
3399                            "HttpCode" => {
3400                                http_code = ::serde::de::MapAccess::next_value(&mut map)?;
3401                            }
3402                            _ => {}
3403                        }
3404                    }
3405
3406                    Ok(Matcher {
3407                        grpc_code: grpc_code,
3408                        http_code: http_code,
3409                    })
3410                }
3411            }
3412
3413            d.deserialize_map(Visitor)
3414        }
3415    }
3416
3417    /// The [`AWS::ElasticLoadBalancingV2::TargetGroup.TargetDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html) property type.
3418    #[derive(Debug, Default)]
3419    pub struct TargetDescription {
3420        /// Property [`AvailabilityZone`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-availabilityzone).
3421        ///
3422        /// Update type: _Mutable_.
3423        /// AWS CloudFormation doesn't replace the resource when you change this property.
3424        pub availability_zone: Option<::Value<String>>,
3425        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-id).
3426        ///
3427        /// Update type: _Mutable_.
3428        /// AWS CloudFormation doesn't replace the resource when you change this property.
3429        pub id: ::Value<String>,
3430        /// Property [`Port`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetdescription.html#cfn-elasticloadbalancingv2-targetgroup-targetdescription-port).
3431        ///
3432        /// Update type: _Mutable_.
3433        /// AWS CloudFormation doesn't replace the resource when you change this property.
3434        pub port: Option<::Value<u32>>,
3435    }
3436
3437    impl ::codec::SerializeValue for TargetDescription {
3438        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3439            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3440            if let Some(ref availability_zone) = self.availability_zone {
3441                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AvailabilityZone", availability_zone)?;
3442            }
3443            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", &self.id)?;
3444            if let Some(ref port) = self.port {
3445                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Port", port)?;
3446            }
3447            ::serde::ser::SerializeMap::end(map)
3448        }
3449    }
3450
3451    impl ::codec::DeserializeValue for TargetDescription {
3452        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetDescription, D::Error> {
3453            struct Visitor;
3454
3455            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3456                type Value = TargetDescription;
3457
3458                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3459                    write!(f, "a struct of type TargetDescription")
3460                }
3461
3462                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3463                    let mut availability_zone: Option<::Value<String>> = None;
3464                    let mut id: Option<::Value<String>> = None;
3465                    let mut port: Option<::Value<u32>> = None;
3466
3467                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3468                        match __cfn_key.as_ref() {
3469                            "AvailabilityZone" => {
3470                                availability_zone = ::serde::de::MapAccess::next_value(&mut map)?;
3471                            }
3472                            "Id" => {
3473                                id = ::serde::de::MapAccess::next_value(&mut map)?;
3474                            }
3475                            "Port" => {
3476                                port = ::serde::de::MapAccess::next_value(&mut map)?;
3477                            }
3478                            _ => {}
3479                        }
3480                    }
3481
3482                    Ok(TargetDescription {
3483                        availability_zone: availability_zone,
3484                        id: id.ok_or(::serde::de::Error::missing_field("Id"))?,
3485                        port: port,
3486                    })
3487                }
3488            }
3489
3490            d.deserialize_map(Visitor)
3491        }
3492    }
3493
3494    /// The [`AWS::ElasticLoadBalancingV2::TargetGroup.TargetGroupAttribute`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html) property type.
3495    #[derive(Debug, Default)]
3496    pub struct TargetGroupAttribute {
3497        /// Property [`Key`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html#cfn-elasticloadbalancingv2-targetgroup-targetgroupattribute-key).
3498        ///
3499        /// Update type: _Mutable_.
3500        /// AWS CloudFormation doesn't replace the resource when you change this property.
3501        pub key: Option<::Value<String>>,
3502        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-elasticloadbalancingv2-targetgroup-targetgroupattribute.html#cfn-elasticloadbalancingv2-targetgroup-targetgroupattribute-value).
3503        ///
3504        /// Update type: _Mutable_.
3505        /// AWS CloudFormation doesn't replace the resource when you change this property.
3506        pub value: Option<::Value<String>>,
3507    }
3508
3509    impl ::codec::SerializeValue for TargetGroupAttribute {
3510        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3511            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3512            if let Some(ref key) = self.key {
3513                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Key", key)?;
3514            }
3515            if let Some(ref value) = self.value {
3516                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", value)?;
3517            }
3518            ::serde::ser::SerializeMap::end(map)
3519        }
3520    }
3521
3522    impl ::codec::DeserializeValue for TargetGroupAttribute {
3523        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<TargetGroupAttribute, D::Error> {
3524            struct Visitor;
3525
3526            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3527                type Value = TargetGroupAttribute;
3528
3529                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3530                    write!(f, "a struct of type TargetGroupAttribute")
3531                }
3532
3533                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3534                    let mut key: Option<::Value<String>> = None;
3535                    let mut value: Option<::Value<String>> = None;
3536
3537                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3538                        match __cfn_key.as_ref() {
3539                            "Key" => {
3540                                key = ::serde::de::MapAccess::next_value(&mut map)?;
3541                            }
3542                            "Value" => {
3543                                value = ::serde::de::MapAccess::next_value(&mut map)?;
3544                            }
3545                            _ => {}
3546                        }
3547                    }
3548
3549                    Ok(TargetGroupAttribute {
3550                        key: key,
3551                        value: value,
3552                    })
3553                }
3554            }
3555
3556            d.deserialize_map(Visitor)
3557        }
3558    }
3559}