cfn/aws/
pinpoint.rs

1//! Types for the `Pinpoint` service.
2
3/// The [`AWS::Pinpoint::ADMChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-admchannel.html) resource type.
4#[derive(Debug, Default)]
5pub struct ADMChannel {
6    properties: ADMChannelProperties
7}
8
9/// Properties for the `ADMChannel` resource.
10#[derive(Debug, Default)]
11pub struct ADMChannelProperties {
12    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-admchannel.html#cfn-pinpoint-admchannel-applicationid).
13    ///
14    /// Update type: _Immutable_.
15    /// AWS CloudFormation replaces the resource when you change this property.
16    pub application_id: ::Value<String>,
17    /// Property [`ClientId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-admchannel.html#cfn-pinpoint-admchannel-clientid).
18    ///
19    /// Update type: _Mutable_.
20    /// AWS CloudFormation doesn't replace the resource when you change this property.
21    pub client_id: ::Value<String>,
22    /// Property [`ClientSecret`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-admchannel.html#cfn-pinpoint-admchannel-clientsecret).
23    ///
24    /// Update type: _Mutable_.
25    /// AWS CloudFormation doesn't replace the resource when you change this property.
26    pub client_secret: ::Value<String>,
27    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-admchannel.html#cfn-pinpoint-admchannel-enabled).
28    ///
29    /// Update type: _Mutable_.
30    /// AWS CloudFormation doesn't replace the resource when you change this property.
31    pub enabled: Option<::Value<bool>>,
32}
33
34impl ::serde::Serialize for ADMChannelProperties {
35    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
36        let mut map = ::serde::Serializer::serialize_map(s, None)?;
37        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
38        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientId", &self.client_id)?;
39        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ClientSecret", &self.client_secret)?;
40        if let Some(ref enabled) = self.enabled {
41            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
42        }
43        ::serde::ser::SerializeMap::end(map)
44    }
45}
46
47impl<'de> ::serde::Deserialize<'de> for ADMChannelProperties {
48    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ADMChannelProperties, D::Error> {
49        struct Visitor;
50
51        impl<'de> ::serde::de::Visitor<'de> for Visitor {
52            type Value = ADMChannelProperties;
53
54            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
55                write!(f, "a struct of type ADMChannelProperties")
56            }
57
58            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
59                let mut application_id: Option<::Value<String>> = None;
60                let mut client_id: Option<::Value<String>> = None;
61                let mut client_secret: Option<::Value<String>> = None;
62                let mut enabled: Option<::Value<bool>> = None;
63
64                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
65                    match __cfn_key.as_ref() {
66                        "ApplicationId" => {
67                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
68                        }
69                        "ClientId" => {
70                            client_id = ::serde::de::MapAccess::next_value(&mut map)?;
71                        }
72                        "ClientSecret" => {
73                            client_secret = ::serde::de::MapAccess::next_value(&mut map)?;
74                        }
75                        "Enabled" => {
76                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
77                        }
78                        _ => {}
79                    }
80                }
81
82                Ok(ADMChannelProperties {
83                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
84                    client_id: client_id.ok_or(::serde::de::Error::missing_field("ClientId"))?,
85                    client_secret: client_secret.ok_or(::serde::de::Error::missing_field("ClientSecret"))?,
86                    enabled: enabled,
87                })
88            }
89        }
90
91        d.deserialize_map(Visitor)
92    }
93}
94
95impl ::Resource for ADMChannel {
96    type Properties = ADMChannelProperties;
97    const TYPE: &'static str = "AWS::Pinpoint::ADMChannel";
98    fn properties(&self) -> &ADMChannelProperties {
99        &self.properties
100    }
101    fn properties_mut(&mut self) -> &mut ADMChannelProperties {
102        &mut self.properties
103    }
104}
105
106impl ::private::Sealed for ADMChannel {}
107
108impl From<ADMChannelProperties> for ADMChannel {
109    fn from(properties: ADMChannelProperties) -> ADMChannel {
110        ADMChannel { properties }
111    }
112}
113
114/// The [`AWS::Pinpoint::APNSChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html) resource type.
115#[derive(Debug, Default)]
116pub struct APNSChannel {
117    properties: APNSChannelProperties
118}
119
120/// Properties for the `APNSChannel` resource.
121#[derive(Debug, Default)]
122pub struct APNSChannelProperties {
123    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-applicationid).
124    ///
125    /// Update type: _Immutable_.
126    /// AWS CloudFormation replaces the resource when you change this property.
127    pub application_id: ::Value<String>,
128    /// Property [`BundleId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-bundleid).
129    ///
130    /// Update type: _Mutable_.
131    /// AWS CloudFormation doesn't replace the resource when you change this property.
132    pub bundle_id: Option<::Value<String>>,
133    /// Property [`Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-certificate).
134    ///
135    /// Update type: _Mutable_.
136    /// AWS CloudFormation doesn't replace the resource when you change this property.
137    pub certificate: Option<::Value<String>>,
138    /// Property [`DefaultAuthenticationMethod`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-defaultauthenticationmethod).
139    ///
140    /// Update type: _Mutable_.
141    /// AWS CloudFormation doesn't replace the resource when you change this property.
142    pub default_authentication_method: Option<::Value<String>>,
143    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-enabled).
144    ///
145    /// Update type: _Mutable_.
146    /// AWS CloudFormation doesn't replace the resource when you change this property.
147    pub enabled: Option<::Value<bool>>,
148    /// Property [`PrivateKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-privatekey).
149    ///
150    /// Update type: _Mutable_.
151    /// AWS CloudFormation doesn't replace the resource when you change this property.
152    pub private_key: Option<::Value<String>>,
153    /// Property [`TeamId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-teamid).
154    ///
155    /// Update type: _Mutable_.
156    /// AWS CloudFormation doesn't replace the resource when you change this property.
157    pub team_id: Option<::Value<String>>,
158    /// Property [`TokenKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-tokenkey).
159    ///
160    /// Update type: _Mutable_.
161    /// AWS CloudFormation doesn't replace the resource when you change this property.
162    pub token_key: Option<::Value<String>>,
163    /// Property [`TokenKeyId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnschannel.html#cfn-pinpoint-apnschannel-tokenkeyid).
164    ///
165    /// Update type: _Mutable_.
166    /// AWS CloudFormation doesn't replace the resource when you change this property.
167    pub token_key_id: Option<::Value<String>>,
168}
169
170impl ::serde::Serialize for APNSChannelProperties {
171    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
172        let mut map = ::serde::Serializer::serialize_map(s, None)?;
173        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
174        if let Some(ref bundle_id) = self.bundle_id {
175            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BundleId", bundle_id)?;
176        }
177        if let Some(ref certificate) = self.certificate {
178            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificate", certificate)?;
179        }
180        if let Some(ref default_authentication_method) = self.default_authentication_method {
181            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultAuthenticationMethod", default_authentication_method)?;
182        }
183        if let Some(ref enabled) = self.enabled {
184            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
185        }
186        if let Some(ref private_key) = self.private_key {
187            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrivateKey", private_key)?;
188        }
189        if let Some(ref team_id) = self.team_id {
190            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TeamId", team_id)?;
191        }
192        if let Some(ref token_key) = self.token_key {
193            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKey", token_key)?;
194        }
195        if let Some(ref token_key_id) = self.token_key_id {
196            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKeyId", token_key_id)?;
197        }
198        ::serde::ser::SerializeMap::end(map)
199    }
200}
201
202impl<'de> ::serde::Deserialize<'de> for APNSChannelProperties {
203    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<APNSChannelProperties, D::Error> {
204        struct Visitor;
205
206        impl<'de> ::serde::de::Visitor<'de> for Visitor {
207            type Value = APNSChannelProperties;
208
209            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
210                write!(f, "a struct of type APNSChannelProperties")
211            }
212
213            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
214                let mut application_id: Option<::Value<String>> = None;
215                let mut bundle_id: Option<::Value<String>> = None;
216                let mut certificate: Option<::Value<String>> = None;
217                let mut default_authentication_method: Option<::Value<String>> = None;
218                let mut enabled: Option<::Value<bool>> = None;
219                let mut private_key: Option<::Value<String>> = None;
220                let mut team_id: Option<::Value<String>> = None;
221                let mut token_key: Option<::Value<String>> = None;
222                let mut token_key_id: Option<::Value<String>> = None;
223
224                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
225                    match __cfn_key.as_ref() {
226                        "ApplicationId" => {
227                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
228                        }
229                        "BundleId" => {
230                            bundle_id = ::serde::de::MapAccess::next_value(&mut map)?;
231                        }
232                        "Certificate" => {
233                            certificate = ::serde::de::MapAccess::next_value(&mut map)?;
234                        }
235                        "DefaultAuthenticationMethod" => {
236                            default_authentication_method = ::serde::de::MapAccess::next_value(&mut map)?;
237                        }
238                        "Enabled" => {
239                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
240                        }
241                        "PrivateKey" => {
242                            private_key = ::serde::de::MapAccess::next_value(&mut map)?;
243                        }
244                        "TeamId" => {
245                            team_id = ::serde::de::MapAccess::next_value(&mut map)?;
246                        }
247                        "TokenKey" => {
248                            token_key = ::serde::de::MapAccess::next_value(&mut map)?;
249                        }
250                        "TokenKeyId" => {
251                            token_key_id = ::serde::de::MapAccess::next_value(&mut map)?;
252                        }
253                        _ => {}
254                    }
255                }
256
257                Ok(APNSChannelProperties {
258                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
259                    bundle_id: bundle_id,
260                    certificate: certificate,
261                    default_authentication_method: default_authentication_method,
262                    enabled: enabled,
263                    private_key: private_key,
264                    team_id: team_id,
265                    token_key: token_key,
266                    token_key_id: token_key_id,
267                })
268            }
269        }
270
271        d.deserialize_map(Visitor)
272    }
273}
274
275impl ::Resource for APNSChannel {
276    type Properties = APNSChannelProperties;
277    const TYPE: &'static str = "AWS::Pinpoint::APNSChannel";
278    fn properties(&self) -> &APNSChannelProperties {
279        &self.properties
280    }
281    fn properties_mut(&mut self) -> &mut APNSChannelProperties {
282        &mut self.properties
283    }
284}
285
286impl ::private::Sealed for APNSChannel {}
287
288impl From<APNSChannelProperties> for APNSChannel {
289    fn from(properties: APNSChannelProperties) -> APNSChannel {
290        APNSChannel { properties }
291    }
292}
293
294/// The [`AWS::Pinpoint::APNSSandboxChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html) resource type.
295#[derive(Debug, Default)]
296pub struct APNSSandboxChannel {
297    properties: APNSSandboxChannelProperties
298}
299
300/// Properties for the `APNSSandboxChannel` resource.
301#[derive(Debug, Default)]
302pub struct APNSSandboxChannelProperties {
303    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-applicationid).
304    ///
305    /// Update type: _Immutable_.
306    /// AWS CloudFormation replaces the resource when you change this property.
307    pub application_id: ::Value<String>,
308    /// Property [`BundleId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-bundleid).
309    ///
310    /// Update type: _Mutable_.
311    /// AWS CloudFormation doesn't replace the resource when you change this property.
312    pub bundle_id: Option<::Value<String>>,
313    /// Property [`Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-certificate).
314    ///
315    /// Update type: _Mutable_.
316    /// AWS CloudFormation doesn't replace the resource when you change this property.
317    pub certificate: Option<::Value<String>>,
318    /// Property [`DefaultAuthenticationMethod`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-defaultauthenticationmethod).
319    ///
320    /// Update type: _Mutable_.
321    /// AWS CloudFormation doesn't replace the resource when you change this property.
322    pub default_authentication_method: Option<::Value<String>>,
323    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-enabled).
324    ///
325    /// Update type: _Mutable_.
326    /// AWS CloudFormation doesn't replace the resource when you change this property.
327    pub enabled: Option<::Value<bool>>,
328    /// Property [`PrivateKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-privatekey).
329    ///
330    /// Update type: _Mutable_.
331    /// AWS CloudFormation doesn't replace the resource when you change this property.
332    pub private_key: Option<::Value<String>>,
333    /// Property [`TeamId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-teamid).
334    ///
335    /// Update type: _Mutable_.
336    /// AWS CloudFormation doesn't replace the resource when you change this property.
337    pub team_id: Option<::Value<String>>,
338    /// Property [`TokenKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-tokenkey).
339    ///
340    /// Update type: _Mutable_.
341    /// AWS CloudFormation doesn't replace the resource when you change this property.
342    pub token_key: Option<::Value<String>>,
343    /// Property [`TokenKeyId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnssandboxchannel.html#cfn-pinpoint-apnssandboxchannel-tokenkeyid).
344    ///
345    /// Update type: _Mutable_.
346    /// AWS CloudFormation doesn't replace the resource when you change this property.
347    pub token_key_id: Option<::Value<String>>,
348}
349
350impl ::serde::Serialize for APNSSandboxChannelProperties {
351    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
352        let mut map = ::serde::Serializer::serialize_map(s, None)?;
353        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
354        if let Some(ref bundle_id) = self.bundle_id {
355            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BundleId", bundle_id)?;
356        }
357        if let Some(ref certificate) = self.certificate {
358            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificate", certificate)?;
359        }
360        if let Some(ref default_authentication_method) = self.default_authentication_method {
361            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultAuthenticationMethod", default_authentication_method)?;
362        }
363        if let Some(ref enabled) = self.enabled {
364            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
365        }
366        if let Some(ref private_key) = self.private_key {
367            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrivateKey", private_key)?;
368        }
369        if let Some(ref team_id) = self.team_id {
370            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TeamId", team_id)?;
371        }
372        if let Some(ref token_key) = self.token_key {
373            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKey", token_key)?;
374        }
375        if let Some(ref token_key_id) = self.token_key_id {
376            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKeyId", token_key_id)?;
377        }
378        ::serde::ser::SerializeMap::end(map)
379    }
380}
381
382impl<'de> ::serde::Deserialize<'de> for APNSSandboxChannelProperties {
383    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<APNSSandboxChannelProperties, D::Error> {
384        struct Visitor;
385
386        impl<'de> ::serde::de::Visitor<'de> for Visitor {
387            type Value = APNSSandboxChannelProperties;
388
389            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
390                write!(f, "a struct of type APNSSandboxChannelProperties")
391            }
392
393            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
394                let mut application_id: Option<::Value<String>> = None;
395                let mut bundle_id: Option<::Value<String>> = None;
396                let mut certificate: Option<::Value<String>> = None;
397                let mut default_authentication_method: Option<::Value<String>> = None;
398                let mut enabled: Option<::Value<bool>> = None;
399                let mut private_key: Option<::Value<String>> = None;
400                let mut team_id: Option<::Value<String>> = None;
401                let mut token_key: Option<::Value<String>> = None;
402                let mut token_key_id: Option<::Value<String>> = None;
403
404                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
405                    match __cfn_key.as_ref() {
406                        "ApplicationId" => {
407                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
408                        }
409                        "BundleId" => {
410                            bundle_id = ::serde::de::MapAccess::next_value(&mut map)?;
411                        }
412                        "Certificate" => {
413                            certificate = ::serde::de::MapAccess::next_value(&mut map)?;
414                        }
415                        "DefaultAuthenticationMethod" => {
416                            default_authentication_method = ::serde::de::MapAccess::next_value(&mut map)?;
417                        }
418                        "Enabled" => {
419                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
420                        }
421                        "PrivateKey" => {
422                            private_key = ::serde::de::MapAccess::next_value(&mut map)?;
423                        }
424                        "TeamId" => {
425                            team_id = ::serde::de::MapAccess::next_value(&mut map)?;
426                        }
427                        "TokenKey" => {
428                            token_key = ::serde::de::MapAccess::next_value(&mut map)?;
429                        }
430                        "TokenKeyId" => {
431                            token_key_id = ::serde::de::MapAccess::next_value(&mut map)?;
432                        }
433                        _ => {}
434                    }
435                }
436
437                Ok(APNSSandboxChannelProperties {
438                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
439                    bundle_id: bundle_id,
440                    certificate: certificate,
441                    default_authentication_method: default_authentication_method,
442                    enabled: enabled,
443                    private_key: private_key,
444                    team_id: team_id,
445                    token_key: token_key,
446                    token_key_id: token_key_id,
447                })
448            }
449        }
450
451        d.deserialize_map(Visitor)
452    }
453}
454
455impl ::Resource for APNSSandboxChannel {
456    type Properties = APNSSandboxChannelProperties;
457    const TYPE: &'static str = "AWS::Pinpoint::APNSSandboxChannel";
458    fn properties(&self) -> &APNSSandboxChannelProperties {
459        &self.properties
460    }
461    fn properties_mut(&mut self) -> &mut APNSSandboxChannelProperties {
462        &mut self.properties
463    }
464}
465
466impl ::private::Sealed for APNSSandboxChannel {}
467
468impl From<APNSSandboxChannelProperties> for APNSSandboxChannel {
469    fn from(properties: APNSSandboxChannelProperties) -> APNSSandboxChannel {
470        APNSSandboxChannel { properties }
471    }
472}
473
474/// The [`AWS::Pinpoint::APNSVoipChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html) resource type.
475#[derive(Debug, Default)]
476pub struct APNSVoipChannel {
477    properties: APNSVoipChannelProperties
478}
479
480/// Properties for the `APNSVoipChannel` resource.
481#[derive(Debug, Default)]
482pub struct APNSVoipChannelProperties {
483    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-applicationid).
484    ///
485    /// Update type: _Immutable_.
486    /// AWS CloudFormation replaces the resource when you change this property.
487    pub application_id: ::Value<String>,
488    /// Property [`BundleId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-bundleid).
489    ///
490    /// Update type: _Mutable_.
491    /// AWS CloudFormation doesn't replace the resource when you change this property.
492    pub bundle_id: Option<::Value<String>>,
493    /// Property [`Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-certificate).
494    ///
495    /// Update type: _Mutable_.
496    /// AWS CloudFormation doesn't replace the resource when you change this property.
497    pub certificate: Option<::Value<String>>,
498    /// Property [`DefaultAuthenticationMethod`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-defaultauthenticationmethod).
499    ///
500    /// Update type: _Mutable_.
501    /// AWS CloudFormation doesn't replace the resource when you change this property.
502    pub default_authentication_method: Option<::Value<String>>,
503    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-enabled).
504    ///
505    /// Update type: _Mutable_.
506    /// AWS CloudFormation doesn't replace the resource when you change this property.
507    pub enabled: Option<::Value<bool>>,
508    /// Property [`PrivateKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-privatekey).
509    ///
510    /// Update type: _Mutable_.
511    /// AWS CloudFormation doesn't replace the resource when you change this property.
512    pub private_key: Option<::Value<String>>,
513    /// Property [`TeamId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-teamid).
514    ///
515    /// Update type: _Mutable_.
516    /// AWS CloudFormation doesn't replace the resource when you change this property.
517    pub team_id: Option<::Value<String>>,
518    /// Property [`TokenKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-tokenkey).
519    ///
520    /// Update type: _Mutable_.
521    /// AWS CloudFormation doesn't replace the resource when you change this property.
522    pub token_key: Option<::Value<String>>,
523    /// Property [`TokenKeyId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipchannel.html#cfn-pinpoint-apnsvoipchannel-tokenkeyid).
524    ///
525    /// Update type: _Mutable_.
526    /// AWS CloudFormation doesn't replace the resource when you change this property.
527    pub token_key_id: Option<::Value<String>>,
528}
529
530impl ::serde::Serialize for APNSVoipChannelProperties {
531    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
532        let mut map = ::serde::Serializer::serialize_map(s, None)?;
533        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
534        if let Some(ref bundle_id) = self.bundle_id {
535            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BundleId", bundle_id)?;
536        }
537        if let Some(ref certificate) = self.certificate {
538            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificate", certificate)?;
539        }
540        if let Some(ref default_authentication_method) = self.default_authentication_method {
541            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultAuthenticationMethod", default_authentication_method)?;
542        }
543        if let Some(ref enabled) = self.enabled {
544            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
545        }
546        if let Some(ref private_key) = self.private_key {
547            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrivateKey", private_key)?;
548        }
549        if let Some(ref team_id) = self.team_id {
550            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TeamId", team_id)?;
551        }
552        if let Some(ref token_key) = self.token_key {
553            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKey", token_key)?;
554        }
555        if let Some(ref token_key_id) = self.token_key_id {
556            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKeyId", token_key_id)?;
557        }
558        ::serde::ser::SerializeMap::end(map)
559    }
560}
561
562impl<'de> ::serde::Deserialize<'de> for APNSVoipChannelProperties {
563    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<APNSVoipChannelProperties, D::Error> {
564        struct Visitor;
565
566        impl<'de> ::serde::de::Visitor<'de> for Visitor {
567            type Value = APNSVoipChannelProperties;
568
569            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
570                write!(f, "a struct of type APNSVoipChannelProperties")
571            }
572
573            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
574                let mut application_id: Option<::Value<String>> = None;
575                let mut bundle_id: Option<::Value<String>> = None;
576                let mut certificate: Option<::Value<String>> = None;
577                let mut default_authentication_method: Option<::Value<String>> = None;
578                let mut enabled: Option<::Value<bool>> = None;
579                let mut private_key: Option<::Value<String>> = None;
580                let mut team_id: Option<::Value<String>> = None;
581                let mut token_key: Option<::Value<String>> = None;
582                let mut token_key_id: Option<::Value<String>> = None;
583
584                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
585                    match __cfn_key.as_ref() {
586                        "ApplicationId" => {
587                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
588                        }
589                        "BundleId" => {
590                            bundle_id = ::serde::de::MapAccess::next_value(&mut map)?;
591                        }
592                        "Certificate" => {
593                            certificate = ::serde::de::MapAccess::next_value(&mut map)?;
594                        }
595                        "DefaultAuthenticationMethod" => {
596                            default_authentication_method = ::serde::de::MapAccess::next_value(&mut map)?;
597                        }
598                        "Enabled" => {
599                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
600                        }
601                        "PrivateKey" => {
602                            private_key = ::serde::de::MapAccess::next_value(&mut map)?;
603                        }
604                        "TeamId" => {
605                            team_id = ::serde::de::MapAccess::next_value(&mut map)?;
606                        }
607                        "TokenKey" => {
608                            token_key = ::serde::de::MapAccess::next_value(&mut map)?;
609                        }
610                        "TokenKeyId" => {
611                            token_key_id = ::serde::de::MapAccess::next_value(&mut map)?;
612                        }
613                        _ => {}
614                    }
615                }
616
617                Ok(APNSVoipChannelProperties {
618                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
619                    bundle_id: bundle_id,
620                    certificate: certificate,
621                    default_authentication_method: default_authentication_method,
622                    enabled: enabled,
623                    private_key: private_key,
624                    team_id: team_id,
625                    token_key: token_key,
626                    token_key_id: token_key_id,
627                })
628            }
629        }
630
631        d.deserialize_map(Visitor)
632    }
633}
634
635impl ::Resource for APNSVoipChannel {
636    type Properties = APNSVoipChannelProperties;
637    const TYPE: &'static str = "AWS::Pinpoint::APNSVoipChannel";
638    fn properties(&self) -> &APNSVoipChannelProperties {
639        &self.properties
640    }
641    fn properties_mut(&mut self) -> &mut APNSVoipChannelProperties {
642        &mut self.properties
643    }
644}
645
646impl ::private::Sealed for APNSVoipChannel {}
647
648impl From<APNSVoipChannelProperties> for APNSVoipChannel {
649    fn from(properties: APNSVoipChannelProperties) -> APNSVoipChannel {
650        APNSVoipChannel { properties }
651    }
652}
653
654/// The [`AWS::Pinpoint::APNSVoipSandboxChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html) resource type.
655#[derive(Debug, Default)]
656pub struct APNSVoipSandboxChannel {
657    properties: APNSVoipSandboxChannelProperties
658}
659
660/// Properties for the `APNSVoipSandboxChannel` resource.
661#[derive(Debug, Default)]
662pub struct APNSVoipSandboxChannelProperties {
663    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-applicationid).
664    ///
665    /// Update type: _Immutable_.
666    /// AWS CloudFormation replaces the resource when you change this property.
667    pub application_id: ::Value<String>,
668    /// Property [`BundleId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-bundleid).
669    ///
670    /// Update type: _Mutable_.
671    /// AWS CloudFormation doesn't replace the resource when you change this property.
672    pub bundle_id: Option<::Value<String>>,
673    /// Property [`Certificate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-certificate).
674    ///
675    /// Update type: _Mutable_.
676    /// AWS CloudFormation doesn't replace the resource when you change this property.
677    pub certificate: Option<::Value<String>>,
678    /// Property [`DefaultAuthenticationMethod`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-defaultauthenticationmethod).
679    ///
680    /// Update type: _Mutable_.
681    /// AWS CloudFormation doesn't replace the resource when you change this property.
682    pub default_authentication_method: Option<::Value<String>>,
683    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-enabled).
684    ///
685    /// Update type: _Mutable_.
686    /// AWS CloudFormation doesn't replace the resource when you change this property.
687    pub enabled: Option<::Value<bool>>,
688    /// Property [`PrivateKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-privatekey).
689    ///
690    /// Update type: _Mutable_.
691    /// AWS CloudFormation doesn't replace the resource when you change this property.
692    pub private_key: Option<::Value<String>>,
693    /// Property [`TeamId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-teamid).
694    ///
695    /// Update type: _Mutable_.
696    /// AWS CloudFormation doesn't replace the resource when you change this property.
697    pub team_id: Option<::Value<String>>,
698    /// Property [`TokenKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-tokenkey).
699    ///
700    /// Update type: _Mutable_.
701    /// AWS CloudFormation doesn't replace the resource when you change this property.
702    pub token_key: Option<::Value<String>>,
703    /// Property [`TokenKeyId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-apnsvoipsandboxchannel.html#cfn-pinpoint-apnsvoipsandboxchannel-tokenkeyid).
704    ///
705    /// Update type: _Mutable_.
706    /// AWS CloudFormation doesn't replace the resource when you change this property.
707    pub token_key_id: Option<::Value<String>>,
708}
709
710impl ::serde::Serialize for APNSVoipSandboxChannelProperties {
711    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
712        let mut map = ::serde::Serializer::serialize_map(s, None)?;
713        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
714        if let Some(ref bundle_id) = self.bundle_id {
715            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BundleId", bundle_id)?;
716        }
717        if let Some(ref certificate) = self.certificate {
718            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Certificate", certificate)?;
719        }
720        if let Some(ref default_authentication_method) = self.default_authentication_method {
721            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultAuthenticationMethod", default_authentication_method)?;
722        }
723        if let Some(ref enabled) = self.enabled {
724            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
725        }
726        if let Some(ref private_key) = self.private_key {
727            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PrivateKey", private_key)?;
728        }
729        if let Some(ref team_id) = self.team_id {
730            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TeamId", team_id)?;
731        }
732        if let Some(ref token_key) = self.token_key {
733            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKey", token_key)?;
734        }
735        if let Some(ref token_key_id) = self.token_key_id {
736            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TokenKeyId", token_key_id)?;
737        }
738        ::serde::ser::SerializeMap::end(map)
739    }
740}
741
742impl<'de> ::serde::Deserialize<'de> for APNSVoipSandboxChannelProperties {
743    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<APNSVoipSandboxChannelProperties, D::Error> {
744        struct Visitor;
745
746        impl<'de> ::serde::de::Visitor<'de> for Visitor {
747            type Value = APNSVoipSandboxChannelProperties;
748
749            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
750                write!(f, "a struct of type APNSVoipSandboxChannelProperties")
751            }
752
753            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
754                let mut application_id: Option<::Value<String>> = None;
755                let mut bundle_id: Option<::Value<String>> = None;
756                let mut certificate: Option<::Value<String>> = None;
757                let mut default_authentication_method: Option<::Value<String>> = None;
758                let mut enabled: Option<::Value<bool>> = None;
759                let mut private_key: Option<::Value<String>> = None;
760                let mut team_id: Option<::Value<String>> = None;
761                let mut token_key: Option<::Value<String>> = None;
762                let mut token_key_id: Option<::Value<String>> = None;
763
764                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
765                    match __cfn_key.as_ref() {
766                        "ApplicationId" => {
767                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
768                        }
769                        "BundleId" => {
770                            bundle_id = ::serde::de::MapAccess::next_value(&mut map)?;
771                        }
772                        "Certificate" => {
773                            certificate = ::serde::de::MapAccess::next_value(&mut map)?;
774                        }
775                        "DefaultAuthenticationMethod" => {
776                            default_authentication_method = ::serde::de::MapAccess::next_value(&mut map)?;
777                        }
778                        "Enabled" => {
779                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
780                        }
781                        "PrivateKey" => {
782                            private_key = ::serde::de::MapAccess::next_value(&mut map)?;
783                        }
784                        "TeamId" => {
785                            team_id = ::serde::de::MapAccess::next_value(&mut map)?;
786                        }
787                        "TokenKey" => {
788                            token_key = ::serde::de::MapAccess::next_value(&mut map)?;
789                        }
790                        "TokenKeyId" => {
791                            token_key_id = ::serde::de::MapAccess::next_value(&mut map)?;
792                        }
793                        _ => {}
794                    }
795                }
796
797                Ok(APNSVoipSandboxChannelProperties {
798                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
799                    bundle_id: bundle_id,
800                    certificate: certificate,
801                    default_authentication_method: default_authentication_method,
802                    enabled: enabled,
803                    private_key: private_key,
804                    team_id: team_id,
805                    token_key: token_key,
806                    token_key_id: token_key_id,
807                })
808            }
809        }
810
811        d.deserialize_map(Visitor)
812    }
813}
814
815impl ::Resource for APNSVoipSandboxChannel {
816    type Properties = APNSVoipSandboxChannelProperties;
817    const TYPE: &'static str = "AWS::Pinpoint::APNSVoipSandboxChannel";
818    fn properties(&self) -> &APNSVoipSandboxChannelProperties {
819        &self.properties
820    }
821    fn properties_mut(&mut self) -> &mut APNSVoipSandboxChannelProperties {
822        &mut self.properties
823    }
824}
825
826impl ::private::Sealed for APNSVoipSandboxChannel {}
827
828impl From<APNSVoipSandboxChannelProperties> for APNSVoipSandboxChannel {
829    fn from(properties: APNSVoipSandboxChannelProperties) -> APNSVoipSandboxChannel {
830        APNSVoipSandboxChannel { properties }
831    }
832}
833
834/// The [`AWS::Pinpoint::App`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-app.html) resource type.
835#[derive(Debug, Default)]
836pub struct App {
837    properties: AppProperties
838}
839
840/// Properties for the `App` resource.
841#[derive(Debug, Default)]
842pub struct AppProperties {
843    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-app.html#cfn-pinpoint-app-name).
844    ///
845    /// Update type: _Immutable_.
846    /// AWS CloudFormation replaces the resource when you change this property.
847    pub name: ::Value<String>,
848    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-app.html#cfn-pinpoint-app-tags).
849    ///
850    /// Update type: _Mutable_.
851    /// AWS CloudFormation doesn't replace the resource when you change this property.
852    pub tags: Option<::Value<::json::Value>>,
853}
854
855impl ::serde::Serialize for AppProperties {
856    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
857        let mut map = ::serde::Serializer::serialize_map(s, None)?;
858        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
859        if let Some(ref tags) = self.tags {
860            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
861        }
862        ::serde::ser::SerializeMap::end(map)
863    }
864}
865
866impl<'de> ::serde::Deserialize<'de> for AppProperties {
867    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<AppProperties, D::Error> {
868        struct Visitor;
869
870        impl<'de> ::serde::de::Visitor<'de> for Visitor {
871            type Value = AppProperties;
872
873            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
874                write!(f, "a struct of type AppProperties")
875            }
876
877            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
878                let mut name: Option<::Value<String>> = None;
879                let mut tags: Option<::Value<::json::Value>> = None;
880
881                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
882                    match __cfn_key.as_ref() {
883                        "Name" => {
884                            name = ::serde::de::MapAccess::next_value(&mut map)?;
885                        }
886                        "Tags" => {
887                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
888                        }
889                        _ => {}
890                    }
891                }
892
893                Ok(AppProperties {
894                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
895                    tags: tags,
896                })
897            }
898        }
899
900        d.deserialize_map(Visitor)
901    }
902}
903
904impl ::Resource for App {
905    type Properties = AppProperties;
906    const TYPE: &'static str = "AWS::Pinpoint::App";
907    fn properties(&self) -> &AppProperties {
908        &self.properties
909    }
910    fn properties_mut(&mut self) -> &mut AppProperties {
911        &mut self.properties
912    }
913}
914
915impl ::private::Sealed for App {}
916
917impl From<AppProperties> for App {
918    fn from(properties: AppProperties) -> App {
919        App { properties }
920    }
921}
922
923/// The [`AWS::Pinpoint::ApplicationSettings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html) resource type.
924#[derive(Debug, Default)]
925pub struct ApplicationSettings {
926    properties: ApplicationSettingsProperties
927}
928
929/// Properties for the `ApplicationSettings` resource.
930#[derive(Debug, Default)]
931pub struct ApplicationSettingsProperties {
932    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html#cfn-pinpoint-applicationsettings-applicationid).
933    ///
934    /// Update type: _Immutable_.
935    /// AWS CloudFormation replaces the resource when you change this property.
936    pub application_id: ::Value<String>,
937    /// Property [`CampaignHook`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html#cfn-pinpoint-applicationsettings-campaignhook).
938    ///
939    /// Update type: _Mutable_.
940    /// AWS CloudFormation doesn't replace the resource when you change this property.
941    pub campaign_hook: Option<::Value<self::application_settings::CampaignHook>>,
942    /// Property [`CloudWatchMetricsEnabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html#cfn-pinpoint-applicationsettings-cloudwatchmetricsenabled).
943    ///
944    /// Update type: _Mutable_.
945    /// AWS CloudFormation doesn't replace the resource when you change this property.
946    pub cloud_watch_metrics_enabled: Option<::Value<bool>>,
947    /// Property [`Limits`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html#cfn-pinpoint-applicationsettings-limits).
948    ///
949    /// Update type: _Mutable_.
950    /// AWS CloudFormation doesn't replace the resource when you change this property.
951    pub limits: Option<::Value<self::application_settings::Limits>>,
952    /// Property [`QuietTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-applicationsettings.html#cfn-pinpoint-applicationsettings-quiettime).
953    ///
954    /// Update type: _Mutable_.
955    /// AWS CloudFormation doesn't replace the resource when you change this property.
956    pub quiet_time: Option<::Value<self::application_settings::QuietTime>>,
957}
958
959impl ::serde::Serialize for ApplicationSettingsProperties {
960    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
961        let mut map = ::serde::Serializer::serialize_map(s, None)?;
962        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
963        if let Some(ref campaign_hook) = self.campaign_hook {
964            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CampaignHook", campaign_hook)?;
965        }
966        if let Some(ref cloud_watch_metrics_enabled) = self.cloud_watch_metrics_enabled {
967            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CloudWatchMetricsEnabled", cloud_watch_metrics_enabled)?;
968        }
969        if let Some(ref limits) = self.limits {
970            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Limits", limits)?;
971        }
972        if let Some(ref quiet_time) = self.quiet_time {
973            ::serde::ser::SerializeMap::serialize_entry(&mut map, "QuietTime", quiet_time)?;
974        }
975        ::serde::ser::SerializeMap::end(map)
976    }
977}
978
979impl<'de> ::serde::Deserialize<'de> for ApplicationSettingsProperties {
980    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<ApplicationSettingsProperties, D::Error> {
981        struct Visitor;
982
983        impl<'de> ::serde::de::Visitor<'de> for Visitor {
984            type Value = ApplicationSettingsProperties;
985
986            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
987                write!(f, "a struct of type ApplicationSettingsProperties")
988            }
989
990            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
991                let mut application_id: Option<::Value<String>> = None;
992                let mut campaign_hook: Option<::Value<self::application_settings::CampaignHook>> = None;
993                let mut cloud_watch_metrics_enabled: Option<::Value<bool>> = None;
994                let mut limits: Option<::Value<self::application_settings::Limits>> = None;
995                let mut quiet_time: Option<::Value<self::application_settings::QuietTime>> = None;
996
997                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
998                    match __cfn_key.as_ref() {
999                        "ApplicationId" => {
1000                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1001                        }
1002                        "CampaignHook" => {
1003                            campaign_hook = ::serde::de::MapAccess::next_value(&mut map)?;
1004                        }
1005                        "CloudWatchMetricsEnabled" => {
1006                            cloud_watch_metrics_enabled = ::serde::de::MapAccess::next_value(&mut map)?;
1007                        }
1008                        "Limits" => {
1009                            limits = ::serde::de::MapAccess::next_value(&mut map)?;
1010                        }
1011                        "QuietTime" => {
1012                            quiet_time = ::serde::de::MapAccess::next_value(&mut map)?;
1013                        }
1014                        _ => {}
1015                    }
1016                }
1017
1018                Ok(ApplicationSettingsProperties {
1019                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1020                    campaign_hook: campaign_hook,
1021                    cloud_watch_metrics_enabled: cloud_watch_metrics_enabled,
1022                    limits: limits,
1023                    quiet_time: quiet_time,
1024                })
1025            }
1026        }
1027
1028        d.deserialize_map(Visitor)
1029    }
1030}
1031
1032impl ::Resource for ApplicationSettings {
1033    type Properties = ApplicationSettingsProperties;
1034    const TYPE: &'static str = "AWS::Pinpoint::ApplicationSettings";
1035    fn properties(&self) -> &ApplicationSettingsProperties {
1036        &self.properties
1037    }
1038    fn properties_mut(&mut self) -> &mut ApplicationSettingsProperties {
1039        &mut self.properties
1040    }
1041}
1042
1043impl ::private::Sealed for ApplicationSettings {}
1044
1045impl From<ApplicationSettingsProperties> for ApplicationSettings {
1046    fn from(properties: ApplicationSettingsProperties) -> ApplicationSettings {
1047        ApplicationSettings { properties }
1048    }
1049}
1050
1051/// The [`AWS::Pinpoint::BaiduChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-baiduchannel.html) resource type.
1052#[derive(Debug, Default)]
1053pub struct BaiduChannel {
1054    properties: BaiduChannelProperties
1055}
1056
1057/// Properties for the `BaiduChannel` resource.
1058#[derive(Debug, Default)]
1059pub struct BaiduChannelProperties {
1060    /// Property [`ApiKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-baiduchannel.html#cfn-pinpoint-baiduchannel-apikey).
1061    ///
1062    /// Update type: _Mutable_.
1063    /// AWS CloudFormation doesn't replace the resource when you change this property.
1064    pub api_key: ::Value<String>,
1065    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-baiduchannel.html#cfn-pinpoint-baiduchannel-applicationid).
1066    ///
1067    /// Update type: _Immutable_.
1068    /// AWS CloudFormation replaces the resource when you change this property.
1069    pub application_id: ::Value<String>,
1070    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-baiduchannel.html#cfn-pinpoint-baiduchannel-enabled).
1071    ///
1072    /// Update type: _Mutable_.
1073    /// AWS CloudFormation doesn't replace the resource when you change this property.
1074    pub enabled: Option<::Value<bool>>,
1075    /// Property [`SecretKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-baiduchannel.html#cfn-pinpoint-baiduchannel-secretkey).
1076    ///
1077    /// Update type: _Mutable_.
1078    /// AWS CloudFormation doesn't replace the resource when you change this property.
1079    pub secret_key: ::Value<String>,
1080}
1081
1082impl ::serde::Serialize for BaiduChannelProperties {
1083    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1084        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1085        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApiKey", &self.api_key)?;
1086        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
1087        if let Some(ref enabled) = self.enabled {
1088            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
1089        }
1090        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SecretKey", &self.secret_key)?;
1091        ::serde::ser::SerializeMap::end(map)
1092    }
1093}
1094
1095impl<'de> ::serde::Deserialize<'de> for BaiduChannelProperties {
1096    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BaiduChannelProperties, D::Error> {
1097        struct Visitor;
1098
1099        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1100            type Value = BaiduChannelProperties;
1101
1102            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1103                write!(f, "a struct of type BaiduChannelProperties")
1104            }
1105
1106            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1107                let mut api_key: Option<::Value<String>> = None;
1108                let mut application_id: Option<::Value<String>> = None;
1109                let mut enabled: Option<::Value<bool>> = None;
1110                let mut secret_key: Option<::Value<String>> = None;
1111
1112                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1113                    match __cfn_key.as_ref() {
1114                        "ApiKey" => {
1115                            api_key = ::serde::de::MapAccess::next_value(&mut map)?;
1116                        }
1117                        "ApplicationId" => {
1118                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1119                        }
1120                        "Enabled" => {
1121                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
1122                        }
1123                        "SecretKey" => {
1124                            secret_key = ::serde::de::MapAccess::next_value(&mut map)?;
1125                        }
1126                        _ => {}
1127                    }
1128                }
1129
1130                Ok(BaiduChannelProperties {
1131                    api_key: api_key.ok_or(::serde::de::Error::missing_field("ApiKey"))?,
1132                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1133                    enabled: enabled,
1134                    secret_key: secret_key.ok_or(::serde::de::Error::missing_field("SecretKey"))?,
1135                })
1136            }
1137        }
1138
1139        d.deserialize_map(Visitor)
1140    }
1141}
1142
1143impl ::Resource for BaiduChannel {
1144    type Properties = BaiduChannelProperties;
1145    const TYPE: &'static str = "AWS::Pinpoint::BaiduChannel";
1146    fn properties(&self) -> &BaiduChannelProperties {
1147        &self.properties
1148    }
1149    fn properties_mut(&mut self) -> &mut BaiduChannelProperties {
1150        &mut self.properties
1151    }
1152}
1153
1154impl ::private::Sealed for BaiduChannel {}
1155
1156impl From<BaiduChannelProperties> for BaiduChannel {
1157    fn from(properties: BaiduChannelProperties) -> BaiduChannel {
1158        BaiduChannel { properties }
1159    }
1160}
1161
1162/// The [`AWS::Pinpoint::Campaign`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html) resource type.
1163#[derive(Debug, Default)]
1164pub struct Campaign {
1165    properties: CampaignProperties
1166}
1167
1168/// Properties for the `Campaign` resource.
1169#[derive(Debug, Default)]
1170pub struct CampaignProperties {
1171    /// Property [`AdditionalTreatments`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-additionaltreatments).
1172    ///
1173    /// Update type: _Mutable_.
1174    /// AWS CloudFormation doesn't replace the resource when you change this property.
1175    pub additional_treatments: Option<::ValueList<self::campaign::WriteTreatmentResource>>,
1176    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-applicationid).
1177    ///
1178    /// Update type: _Immutable_.
1179    /// AWS CloudFormation replaces the resource when you change this property.
1180    pub application_id: ::Value<String>,
1181    /// Property [`CampaignHook`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-campaignhook).
1182    ///
1183    /// Update type: _Mutable_.
1184    /// AWS CloudFormation doesn't replace the resource when you change this property.
1185    pub campaign_hook: Option<::Value<self::campaign::CampaignHook>>,
1186    /// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-description).
1187    ///
1188    /// Update type: _Mutable_.
1189    /// AWS CloudFormation doesn't replace the resource when you change this property.
1190    pub description: Option<::Value<String>>,
1191    /// Property [`HoldoutPercent`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-holdoutpercent).
1192    ///
1193    /// Update type: _Mutable_.
1194    /// AWS CloudFormation doesn't replace the resource when you change this property.
1195    pub holdout_percent: Option<::Value<u32>>,
1196    /// Property [`IsPaused`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-ispaused).
1197    ///
1198    /// Update type: _Mutable_.
1199    /// AWS CloudFormation doesn't replace the resource when you change this property.
1200    pub is_paused: Option<::Value<bool>>,
1201    /// Property [`Limits`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-limits).
1202    ///
1203    /// Update type: _Mutable_.
1204    /// AWS CloudFormation doesn't replace the resource when you change this property.
1205    pub limits: Option<::Value<self::campaign::Limits>>,
1206    /// Property [`MessageConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-messageconfiguration).
1207    ///
1208    /// Update type: _Mutable_.
1209    /// AWS CloudFormation doesn't replace the resource when you change this property.
1210    pub message_configuration: ::Value<self::campaign::MessageConfiguration>,
1211    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-name).
1212    ///
1213    /// Update type: _Mutable_.
1214    /// AWS CloudFormation doesn't replace the resource when you change this property.
1215    pub name: ::Value<String>,
1216    /// Property [`Schedule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-schedule).
1217    ///
1218    /// Update type: _Mutable_.
1219    /// AWS CloudFormation doesn't replace the resource when you change this property.
1220    pub schedule: ::Value<self::campaign::Schedule>,
1221    /// Property [`SegmentId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-segmentid).
1222    ///
1223    /// Update type: _Mutable_.
1224    /// AWS CloudFormation doesn't replace the resource when you change this property.
1225    pub segment_id: ::Value<String>,
1226    /// Property [`SegmentVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-segmentversion).
1227    ///
1228    /// Update type: _Mutable_.
1229    /// AWS CloudFormation doesn't replace the resource when you change this property.
1230    pub segment_version: Option<::Value<u32>>,
1231    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-tags).
1232    ///
1233    /// Update type: _Mutable_.
1234    /// AWS CloudFormation doesn't replace the resource when you change this property.
1235    pub tags: Option<::Value<::json::Value>>,
1236    /// Property [`TreatmentDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-treatmentdescription).
1237    ///
1238    /// Update type: _Mutable_.
1239    /// AWS CloudFormation doesn't replace the resource when you change this property.
1240    pub treatment_description: Option<::Value<String>>,
1241    /// Property [`TreatmentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-campaign.html#cfn-pinpoint-campaign-treatmentname).
1242    ///
1243    /// Update type: _Mutable_.
1244    /// AWS CloudFormation doesn't replace the resource when you change this property.
1245    pub treatment_name: Option<::Value<String>>,
1246}
1247
1248impl ::serde::Serialize for CampaignProperties {
1249    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1250        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1251        if let Some(ref additional_treatments) = self.additional_treatments {
1252            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AdditionalTreatments", additional_treatments)?;
1253        }
1254        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
1255        if let Some(ref campaign_hook) = self.campaign_hook {
1256            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CampaignHook", campaign_hook)?;
1257        }
1258        if let Some(ref description) = self.description {
1259            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Description", description)?;
1260        }
1261        if let Some(ref holdout_percent) = self.holdout_percent {
1262            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HoldoutPercent", holdout_percent)?;
1263        }
1264        if let Some(ref is_paused) = self.is_paused {
1265            ::serde::ser::SerializeMap::serialize_entry(&mut map, "IsPaused", is_paused)?;
1266        }
1267        if let Some(ref limits) = self.limits {
1268            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Limits", limits)?;
1269        }
1270        ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessageConfiguration", &self.message_configuration)?;
1271        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
1272        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Schedule", &self.schedule)?;
1273        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SegmentId", &self.segment_id)?;
1274        if let Some(ref segment_version) = self.segment_version {
1275            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SegmentVersion", segment_version)?;
1276        }
1277        if let Some(ref tags) = self.tags {
1278            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
1279        }
1280        if let Some(ref treatment_description) = self.treatment_description {
1281            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TreatmentDescription", treatment_description)?;
1282        }
1283        if let Some(ref treatment_name) = self.treatment_name {
1284            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TreatmentName", treatment_name)?;
1285        }
1286        ::serde::ser::SerializeMap::end(map)
1287    }
1288}
1289
1290impl<'de> ::serde::Deserialize<'de> for CampaignProperties {
1291    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignProperties, D::Error> {
1292        struct Visitor;
1293
1294        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1295            type Value = CampaignProperties;
1296
1297            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1298                write!(f, "a struct of type CampaignProperties")
1299            }
1300
1301            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1302                let mut additional_treatments: Option<::ValueList<self::campaign::WriteTreatmentResource>> = None;
1303                let mut application_id: Option<::Value<String>> = None;
1304                let mut campaign_hook: Option<::Value<self::campaign::CampaignHook>> = None;
1305                let mut description: Option<::Value<String>> = None;
1306                let mut holdout_percent: Option<::Value<u32>> = None;
1307                let mut is_paused: Option<::Value<bool>> = None;
1308                let mut limits: Option<::Value<self::campaign::Limits>> = None;
1309                let mut message_configuration: Option<::Value<self::campaign::MessageConfiguration>> = None;
1310                let mut name: Option<::Value<String>> = None;
1311                let mut schedule: Option<::Value<self::campaign::Schedule>> = None;
1312                let mut segment_id: Option<::Value<String>> = None;
1313                let mut segment_version: Option<::Value<u32>> = None;
1314                let mut tags: Option<::Value<::json::Value>> = None;
1315                let mut treatment_description: Option<::Value<String>> = None;
1316                let mut treatment_name: Option<::Value<String>> = None;
1317
1318                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1319                    match __cfn_key.as_ref() {
1320                        "AdditionalTreatments" => {
1321                            additional_treatments = ::serde::de::MapAccess::next_value(&mut map)?;
1322                        }
1323                        "ApplicationId" => {
1324                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1325                        }
1326                        "CampaignHook" => {
1327                            campaign_hook = ::serde::de::MapAccess::next_value(&mut map)?;
1328                        }
1329                        "Description" => {
1330                            description = ::serde::de::MapAccess::next_value(&mut map)?;
1331                        }
1332                        "HoldoutPercent" => {
1333                            holdout_percent = ::serde::de::MapAccess::next_value(&mut map)?;
1334                        }
1335                        "IsPaused" => {
1336                            is_paused = ::serde::de::MapAccess::next_value(&mut map)?;
1337                        }
1338                        "Limits" => {
1339                            limits = ::serde::de::MapAccess::next_value(&mut map)?;
1340                        }
1341                        "MessageConfiguration" => {
1342                            message_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
1343                        }
1344                        "Name" => {
1345                            name = ::serde::de::MapAccess::next_value(&mut map)?;
1346                        }
1347                        "Schedule" => {
1348                            schedule = ::serde::de::MapAccess::next_value(&mut map)?;
1349                        }
1350                        "SegmentId" => {
1351                            segment_id = ::serde::de::MapAccess::next_value(&mut map)?;
1352                        }
1353                        "SegmentVersion" => {
1354                            segment_version = ::serde::de::MapAccess::next_value(&mut map)?;
1355                        }
1356                        "Tags" => {
1357                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
1358                        }
1359                        "TreatmentDescription" => {
1360                            treatment_description = ::serde::de::MapAccess::next_value(&mut map)?;
1361                        }
1362                        "TreatmentName" => {
1363                            treatment_name = ::serde::de::MapAccess::next_value(&mut map)?;
1364                        }
1365                        _ => {}
1366                    }
1367                }
1368
1369                Ok(CampaignProperties {
1370                    additional_treatments: additional_treatments,
1371                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1372                    campaign_hook: campaign_hook,
1373                    description: description,
1374                    holdout_percent: holdout_percent,
1375                    is_paused: is_paused,
1376                    limits: limits,
1377                    message_configuration: message_configuration.ok_or(::serde::de::Error::missing_field("MessageConfiguration"))?,
1378                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
1379                    schedule: schedule.ok_or(::serde::de::Error::missing_field("Schedule"))?,
1380                    segment_id: segment_id.ok_or(::serde::de::Error::missing_field("SegmentId"))?,
1381                    segment_version: segment_version,
1382                    tags: tags,
1383                    treatment_description: treatment_description,
1384                    treatment_name: treatment_name,
1385                })
1386            }
1387        }
1388
1389        d.deserialize_map(Visitor)
1390    }
1391}
1392
1393impl ::Resource for Campaign {
1394    type Properties = CampaignProperties;
1395    const TYPE: &'static str = "AWS::Pinpoint::Campaign";
1396    fn properties(&self) -> &CampaignProperties {
1397        &self.properties
1398    }
1399    fn properties_mut(&mut self) -> &mut CampaignProperties {
1400        &mut self.properties
1401    }
1402}
1403
1404impl ::private::Sealed for Campaign {}
1405
1406impl From<CampaignProperties> for Campaign {
1407    fn from(properties: CampaignProperties) -> Campaign {
1408        Campaign { properties }
1409    }
1410}
1411
1412/// The [`AWS::Pinpoint::EmailChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html) resource type.
1413#[derive(Debug, Default)]
1414pub struct EmailChannel {
1415    properties: EmailChannelProperties
1416}
1417
1418/// Properties for the `EmailChannel` resource.
1419#[derive(Debug, Default)]
1420pub struct EmailChannelProperties {
1421    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-applicationid).
1422    ///
1423    /// Update type: _Immutable_.
1424    /// AWS CloudFormation replaces the resource when you change this property.
1425    pub application_id: ::Value<String>,
1426    /// Property [`ConfigurationSet`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-configurationset).
1427    ///
1428    /// Update type: _Mutable_.
1429    /// AWS CloudFormation doesn't replace the resource when you change this property.
1430    pub configuration_set: Option<::Value<String>>,
1431    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-enabled).
1432    ///
1433    /// Update type: _Mutable_.
1434    /// AWS CloudFormation doesn't replace the resource when you change this property.
1435    pub enabled: Option<::Value<bool>>,
1436    /// Property [`FromAddress`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-fromaddress).
1437    ///
1438    /// Update type: _Mutable_.
1439    /// AWS CloudFormation doesn't replace the resource when you change this property.
1440    pub from_address: ::Value<String>,
1441    /// Property [`Identity`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-identity).
1442    ///
1443    /// Update type: _Mutable_.
1444    /// AWS CloudFormation doesn't replace the resource when you change this property.
1445    pub identity: ::Value<String>,
1446    /// Property [`RoleArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailchannel.html#cfn-pinpoint-emailchannel-rolearn).
1447    ///
1448    /// Update type: _Mutable_.
1449    /// AWS CloudFormation doesn't replace the resource when you change this property.
1450    pub role_arn: Option<::Value<String>>,
1451}
1452
1453impl ::serde::Serialize for EmailChannelProperties {
1454    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1455        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1456        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
1457        if let Some(ref configuration_set) = self.configuration_set {
1458            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ConfigurationSet", configuration_set)?;
1459        }
1460        if let Some(ref enabled) = self.enabled {
1461            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
1462        }
1463        ::serde::ser::SerializeMap::serialize_entry(&mut map, "FromAddress", &self.from_address)?;
1464        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Identity", &self.identity)?;
1465        if let Some(ref role_arn) = self.role_arn {
1466            ::serde::ser::SerializeMap::serialize_entry(&mut map, "RoleArn", role_arn)?;
1467        }
1468        ::serde::ser::SerializeMap::end(map)
1469    }
1470}
1471
1472impl<'de> ::serde::Deserialize<'de> for EmailChannelProperties {
1473    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<EmailChannelProperties, D::Error> {
1474        struct Visitor;
1475
1476        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1477            type Value = EmailChannelProperties;
1478
1479            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1480                write!(f, "a struct of type EmailChannelProperties")
1481            }
1482
1483            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1484                let mut application_id: Option<::Value<String>> = None;
1485                let mut configuration_set: Option<::Value<String>> = None;
1486                let mut enabled: Option<::Value<bool>> = None;
1487                let mut from_address: Option<::Value<String>> = None;
1488                let mut identity: Option<::Value<String>> = None;
1489                let mut role_arn: Option<::Value<String>> = None;
1490
1491                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1492                    match __cfn_key.as_ref() {
1493                        "ApplicationId" => {
1494                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1495                        }
1496                        "ConfigurationSet" => {
1497                            configuration_set = ::serde::de::MapAccess::next_value(&mut map)?;
1498                        }
1499                        "Enabled" => {
1500                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
1501                        }
1502                        "FromAddress" => {
1503                            from_address = ::serde::de::MapAccess::next_value(&mut map)?;
1504                        }
1505                        "Identity" => {
1506                            identity = ::serde::de::MapAccess::next_value(&mut map)?;
1507                        }
1508                        "RoleArn" => {
1509                            role_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1510                        }
1511                        _ => {}
1512                    }
1513                }
1514
1515                Ok(EmailChannelProperties {
1516                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1517                    configuration_set: configuration_set,
1518                    enabled: enabled,
1519                    from_address: from_address.ok_or(::serde::de::Error::missing_field("FromAddress"))?,
1520                    identity: identity.ok_or(::serde::de::Error::missing_field("Identity"))?,
1521                    role_arn: role_arn,
1522                })
1523            }
1524        }
1525
1526        d.deserialize_map(Visitor)
1527    }
1528}
1529
1530impl ::Resource for EmailChannel {
1531    type Properties = EmailChannelProperties;
1532    const TYPE: &'static str = "AWS::Pinpoint::EmailChannel";
1533    fn properties(&self) -> &EmailChannelProperties {
1534        &self.properties
1535    }
1536    fn properties_mut(&mut self) -> &mut EmailChannelProperties {
1537        &mut self.properties
1538    }
1539}
1540
1541impl ::private::Sealed for EmailChannel {}
1542
1543impl From<EmailChannelProperties> for EmailChannel {
1544    fn from(properties: EmailChannelProperties) -> EmailChannel {
1545        EmailChannel { properties }
1546    }
1547}
1548
1549/// The [`AWS::Pinpoint::EmailTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html) resource type.
1550#[derive(Debug, Default)]
1551pub struct EmailTemplate {
1552    properties: EmailTemplateProperties
1553}
1554
1555/// Properties for the `EmailTemplate` resource.
1556#[derive(Debug, Default)]
1557pub struct EmailTemplateProperties {
1558    /// Property [`DefaultSubstitutions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-defaultsubstitutions).
1559    ///
1560    /// Update type: _Mutable_.
1561    /// AWS CloudFormation doesn't replace the resource when you change this property.
1562    pub default_substitutions: Option<::Value<String>>,
1563    /// Property [`HtmlPart`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-htmlpart).
1564    ///
1565    /// Update type: _Mutable_.
1566    /// AWS CloudFormation doesn't replace the resource when you change this property.
1567    pub html_part: Option<::Value<String>>,
1568    /// Property [`Subject`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-subject).
1569    ///
1570    /// Update type: _Mutable_.
1571    /// AWS CloudFormation doesn't replace the resource when you change this property.
1572    pub subject: ::Value<String>,
1573    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-tags).
1574    ///
1575    /// Update type: _Mutable_.
1576    /// AWS CloudFormation doesn't replace the resource when you change this property.
1577    pub tags: Option<::Value<::json::Value>>,
1578    /// Property [`TemplateDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-templatedescription).
1579    ///
1580    /// Update type: _Mutable_.
1581    /// AWS CloudFormation doesn't replace the resource when you change this property.
1582    pub template_description: Option<::Value<String>>,
1583    /// Property [`TemplateName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-templatename).
1584    ///
1585    /// Update type: _Immutable_.
1586    /// AWS CloudFormation replaces the resource when you change this property.
1587    pub template_name: ::Value<String>,
1588    /// Property [`TextPart`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-emailtemplate.html#cfn-pinpoint-emailtemplate-textpart).
1589    ///
1590    /// Update type: _Mutable_.
1591    /// AWS CloudFormation doesn't replace the resource when you change this property.
1592    pub text_part: Option<::Value<String>>,
1593}
1594
1595impl ::serde::Serialize for EmailTemplateProperties {
1596    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1597        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1598        if let Some(ref default_substitutions) = self.default_substitutions {
1599            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultSubstitutions", default_substitutions)?;
1600        }
1601        if let Some(ref html_part) = self.html_part {
1602            ::serde::ser::SerializeMap::serialize_entry(&mut map, "HtmlPart", html_part)?;
1603        }
1604        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Subject", &self.subject)?;
1605        if let Some(ref tags) = self.tags {
1606            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
1607        }
1608        if let Some(ref template_description) = self.template_description {
1609            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateDescription", template_description)?;
1610        }
1611        ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateName", &self.template_name)?;
1612        if let Some(ref text_part) = self.text_part {
1613            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TextPart", text_part)?;
1614        }
1615        ::serde::ser::SerializeMap::end(map)
1616    }
1617}
1618
1619impl<'de> ::serde::Deserialize<'de> for EmailTemplateProperties {
1620    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<EmailTemplateProperties, D::Error> {
1621        struct Visitor;
1622
1623        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1624            type Value = EmailTemplateProperties;
1625
1626            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1627                write!(f, "a struct of type EmailTemplateProperties")
1628            }
1629
1630            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1631                let mut default_substitutions: Option<::Value<String>> = None;
1632                let mut html_part: Option<::Value<String>> = None;
1633                let mut subject: Option<::Value<String>> = None;
1634                let mut tags: Option<::Value<::json::Value>> = None;
1635                let mut template_description: Option<::Value<String>> = None;
1636                let mut template_name: Option<::Value<String>> = None;
1637                let mut text_part: Option<::Value<String>> = None;
1638
1639                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1640                    match __cfn_key.as_ref() {
1641                        "DefaultSubstitutions" => {
1642                            default_substitutions = ::serde::de::MapAccess::next_value(&mut map)?;
1643                        }
1644                        "HtmlPart" => {
1645                            html_part = ::serde::de::MapAccess::next_value(&mut map)?;
1646                        }
1647                        "Subject" => {
1648                            subject = ::serde::de::MapAccess::next_value(&mut map)?;
1649                        }
1650                        "Tags" => {
1651                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
1652                        }
1653                        "TemplateDescription" => {
1654                            template_description = ::serde::de::MapAccess::next_value(&mut map)?;
1655                        }
1656                        "TemplateName" => {
1657                            template_name = ::serde::de::MapAccess::next_value(&mut map)?;
1658                        }
1659                        "TextPart" => {
1660                            text_part = ::serde::de::MapAccess::next_value(&mut map)?;
1661                        }
1662                        _ => {}
1663                    }
1664                }
1665
1666                Ok(EmailTemplateProperties {
1667                    default_substitutions: default_substitutions,
1668                    html_part: html_part,
1669                    subject: subject.ok_or(::serde::de::Error::missing_field("Subject"))?,
1670                    tags: tags,
1671                    template_description: template_description,
1672                    template_name: template_name.ok_or(::serde::de::Error::missing_field("TemplateName"))?,
1673                    text_part: text_part,
1674                })
1675            }
1676        }
1677
1678        d.deserialize_map(Visitor)
1679    }
1680}
1681
1682impl ::Resource for EmailTemplate {
1683    type Properties = EmailTemplateProperties;
1684    const TYPE: &'static str = "AWS::Pinpoint::EmailTemplate";
1685    fn properties(&self) -> &EmailTemplateProperties {
1686        &self.properties
1687    }
1688    fn properties_mut(&mut self) -> &mut EmailTemplateProperties {
1689        &mut self.properties
1690    }
1691}
1692
1693impl ::private::Sealed for EmailTemplate {}
1694
1695impl From<EmailTemplateProperties> for EmailTemplate {
1696    fn from(properties: EmailTemplateProperties) -> EmailTemplate {
1697        EmailTemplate { properties }
1698    }
1699}
1700
1701/// The [`AWS::Pinpoint::EventStream`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-eventstream.html) resource type.
1702#[derive(Debug, Default)]
1703pub struct EventStream {
1704    properties: EventStreamProperties
1705}
1706
1707/// Properties for the `EventStream` resource.
1708#[derive(Debug, Default)]
1709pub struct EventStreamProperties {
1710    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-eventstream.html#cfn-pinpoint-eventstream-applicationid).
1711    ///
1712    /// Update type: _Immutable_.
1713    /// AWS CloudFormation replaces the resource when you change this property.
1714    pub application_id: ::Value<String>,
1715    /// Property [`DestinationStreamArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-eventstream.html#cfn-pinpoint-eventstream-destinationstreamarn).
1716    ///
1717    /// Update type: _Mutable_.
1718    /// AWS CloudFormation doesn't replace the resource when you change this property.
1719    pub destination_stream_arn: ::Value<String>,
1720    /// Property [`RoleArn`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-eventstream.html#cfn-pinpoint-eventstream-rolearn).
1721    ///
1722    /// Update type: _Mutable_.
1723    /// AWS CloudFormation doesn't replace the resource when you change this property.
1724    pub role_arn: ::Value<String>,
1725}
1726
1727impl ::serde::Serialize for EventStreamProperties {
1728    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1729        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1730        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
1731        ::serde::ser::SerializeMap::serialize_entry(&mut map, "DestinationStreamArn", &self.destination_stream_arn)?;
1732        ::serde::ser::SerializeMap::serialize_entry(&mut map, "RoleArn", &self.role_arn)?;
1733        ::serde::ser::SerializeMap::end(map)
1734    }
1735}
1736
1737impl<'de> ::serde::Deserialize<'de> for EventStreamProperties {
1738    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<EventStreamProperties, D::Error> {
1739        struct Visitor;
1740
1741        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1742            type Value = EventStreamProperties;
1743
1744            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1745                write!(f, "a struct of type EventStreamProperties")
1746            }
1747
1748            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1749                let mut application_id: Option<::Value<String>> = None;
1750                let mut destination_stream_arn: Option<::Value<String>> = None;
1751                let mut role_arn: Option<::Value<String>> = None;
1752
1753                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1754                    match __cfn_key.as_ref() {
1755                        "ApplicationId" => {
1756                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1757                        }
1758                        "DestinationStreamArn" => {
1759                            destination_stream_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1760                        }
1761                        "RoleArn" => {
1762                            role_arn = ::serde::de::MapAccess::next_value(&mut map)?;
1763                        }
1764                        _ => {}
1765                    }
1766                }
1767
1768                Ok(EventStreamProperties {
1769                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1770                    destination_stream_arn: destination_stream_arn.ok_or(::serde::de::Error::missing_field("DestinationStreamArn"))?,
1771                    role_arn: role_arn.ok_or(::serde::de::Error::missing_field("RoleArn"))?,
1772                })
1773            }
1774        }
1775
1776        d.deserialize_map(Visitor)
1777    }
1778}
1779
1780impl ::Resource for EventStream {
1781    type Properties = EventStreamProperties;
1782    const TYPE: &'static str = "AWS::Pinpoint::EventStream";
1783    fn properties(&self) -> &EventStreamProperties {
1784        &self.properties
1785    }
1786    fn properties_mut(&mut self) -> &mut EventStreamProperties {
1787        &mut self.properties
1788    }
1789}
1790
1791impl ::private::Sealed for EventStream {}
1792
1793impl From<EventStreamProperties> for EventStream {
1794    fn from(properties: EventStreamProperties) -> EventStream {
1795        EventStream { properties }
1796    }
1797}
1798
1799/// The [`AWS::Pinpoint::GCMChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-gcmchannel.html) resource type.
1800#[derive(Debug, Default)]
1801pub struct GCMChannel {
1802    properties: GCMChannelProperties
1803}
1804
1805/// Properties for the `GCMChannel` resource.
1806#[derive(Debug, Default)]
1807pub struct GCMChannelProperties {
1808    /// Property [`ApiKey`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-gcmchannel.html#cfn-pinpoint-gcmchannel-apikey).
1809    ///
1810    /// Update type: _Mutable_.
1811    /// AWS CloudFormation doesn't replace the resource when you change this property.
1812    pub api_key: ::Value<String>,
1813    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-gcmchannel.html#cfn-pinpoint-gcmchannel-applicationid).
1814    ///
1815    /// Update type: _Immutable_.
1816    /// AWS CloudFormation replaces the resource when you change this property.
1817    pub application_id: ::Value<String>,
1818    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-gcmchannel.html#cfn-pinpoint-gcmchannel-enabled).
1819    ///
1820    /// Update type: _Mutable_.
1821    /// AWS CloudFormation doesn't replace the resource when you change this property.
1822    pub enabled: Option<::Value<bool>>,
1823}
1824
1825impl ::serde::Serialize for GCMChannelProperties {
1826    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1827        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1828        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApiKey", &self.api_key)?;
1829        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
1830        if let Some(ref enabled) = self.enabled {
1831            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
1832        }
1833        ::serde::ser::SerializeMap::end(map)
1834    }
1835}
1836
1837impl<'de> ::serde::Deserialize<'de> for GCMChannelProperties {
1838    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<GCMChannelProperties, D::Error> {
1839        struct Visitor;
1840
1841        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1842            type Value = GCMChannelProperties;
1843
1844            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1845                write!(f, "a struct of type GCMChannelProperties")
1846            }
1847
1848            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1849                let mut api_key: Option<::Value<String>> = None;
1850                let mut application_id: Option<::Value<String>> = None;
1851                let mut enabled: Option<::Value<bool>> = None;
1852
1853                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1854                    match __cfn_key.as_ref() {
1855                        "ApiKey" => {
1856                            api_key = ::serde::de::MapAccess::next_value(&mut map)?;
1857                        }
1858                        "ApplicationId" => {
1859                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
1860                        }
1861                        "Enabled" => {
1862                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
1863                        }
1864                        _ => {}
1865                    }
1866                }
1867
1868                Ok(GCMChannelProperties {
1869                    api_key: api_key.ok_or(::serde::de::Error::missing_field("ApiKey"))?,
1870                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
1871                    enabled: enabled,
1872                })
1873            }
1874        }
1875
1876        d.deserialize_map(Visitor)
1877    }
1878}
1879
1880impl ::Resource for GCMChannel {
1881    type Properties = GCMChannelProperties;
1882    const TYPE: &'static str = "AWS::Pinpoint::GCMChannel";
1883    fn properties(&self) -> &GCMChannelProperties {
1884        &self.properties
1885    }
1886    fn properties_mut(&mut self) -> &mut GCMChannelProperties {
1887        &mut self.properties
1888    }
1889}
1890
1891impl ::private::Sealed for GCMChannel {}
1892
1893impl From<GCMChannelProperties> for GCMChannel {
1894    fn from(properties: GCMChannelProperties) -> GCMChannel {
1895        GCMChannel { properties }
1896    }
1897}
1898
1899/// The [`AWS::Pinpoint::PushTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html) resource type.
1900#[derive(Debug, Default)]
1901pub struct PushTemplate {
1902    properties: PushTemplateProperties
1903}
1904
1905/// Properties for the `PushTemplate` resource.
1906#[derive(Debug, Default)]
1907pub struct PushTemplateProperties {
1908    /// Property [`ADM`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-adm).
1909    ///
1910    /// Update type: _Mutable_.
1911    /// AWS CloudFormation doesn't replace the resource when you change this property.
1912    pub adm: Option<::Value<self::push_template::AndroidPushNotificationTemplate>>,
1913    /// Property [`APNS`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-apns).
1914    ///
1915    /// Update type: _Mutable_.
1916    /// AWS CloudFormation doesn't replace the resource when you change this property.
1917    pub apns: Option<::Value<self::push_template::APNSPushNotificationTemplate>>,
1918    /// Property [`Baidu`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-baidu).
1919    ///
1920    /// Update type: _Mutable_.
1921    /// AWS CloudFormation doesn't replace the resource when you change this property.
1922    pub baidu: Option<::Value<self::push_template::AndroidPushNotificationTemplate>>,
1923    /// Property [`Default`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-default).
1924    ///
1925    /// Update type: _Mutable_.
1926    /// AWS CloudFormation doesn't replace the resource when you change this property.
1927    pub default: Option<::Value<self::push_template::DefaultPushNotificationTemplate>>,
1928    /// Property [`DefaultSubstitutions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-defaultsubstitutions).
1929    ///
1930    /// Update type: _Mutable_.
1931    /// AWS CloudFormation doesn't replace the resource when you change this property.
1932    pub default_substitutions: Option<::Value<String>>,
1933    /// Property [`GCM`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-gcm).
1934    ///
1935    /// Update type: _Mutable_.
1936    /// AWS CloudFormation doesn't replace the resource when you change this property.
1937    pub gcm: Option<::Value<self::push_template::AndroidPushNotificationTemplate>>,
1938    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-tags).
1939    ///
1940    /// Update type: _Mutable_.
1941    /// AWS CloudFormation doesn't replace the resource when you change this property.
1942    pub tags: Option<::Value<::json::Value>>,
1943    /// Property [`TemplateDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-templatedescription).
1944    ///
1945    /// Update type: _Mutable_.
1946    /// AWS CloudFormation doesn't replace the resource when you change this property.
1947    pub template_description: Option<::Value<String>>,
1948    /// Property [`TemplateName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-pushtemplate.html#cfn-pinpoint-pushtemplate-templatename).
1949    ///
1950    /// Update type: _Immutable_.
1951    /// AWS CloudFormation replaces the resource when you change this property.
1952    pub template_name: ::Value<String>,
1953}
1954
1955impl ::serde::Serialize for PushTemplateProperties {
1956    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1957        let mut map = ::serde::Serializer::serialize_map(s, None)?;
1958        if let Some(ref adm) = self.adm {
1959            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ADM", adm)?;
1960        }
1961        if let Some(ref apns) = self.apns {
1962            ::serde::ser::SerializeMap::serialize_entry(&mut map, "APNS", apns)?;
1963        }
1964        if let Some(ref baidu) = self.baidu {
1965            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Baidu", baidu)?;
1966        }
1967        if let Some(ref default) = self.default {
1968            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Default", default)?;
1969        }
1970        if let Some(ref default_substitutions) = self.default_substitutions {
1971            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultSubstitutions", default_substitutions)?;
1972        }
1973        if let Some(ref gcm) = self.gcm {
1974            ::serde::ser::SerializeMap::serialize_entry(&mut map, "GCM", gcm)?;
1975        }
1976        if let Some(ref tags) = self.tags {
1977            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
1978        }
1979        if let Some(ref template_description) = self.template_description {
1980            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateDescription", template_description)?;
1981        }
1982        ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateName", &self.template_name)?;
1983        ::serde::ser::SerializeMap::end(map)
1984    }
1985}
1986
1987impl<'de> ::serde::Deserialize<'de> for PushTemplateProperties {
1988    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<PushTemplateProperties, D::Error> {
1989        struct Visitor;
1990
1991        impl<'de> ::serde::de::Visitor<'de> for Visitor {
1992            type Value = PushTemplateProperties;
1993
1994            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1995                write!(f, "a struct of type PushTemplateProperties")
1996            }
1997
1998            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1999                let mut adm: Option<::Value<self::push_template::AndroidPushNotificationTemplate>> = None;
2000                let mut apns: Option<::Value<self::push_template::APNSPushNotificationTemplate>> = None;
2001                let mut baidu: Option<::Value<self::push_template::AndroidPushNotificationTemplate>> = None;
2002                let mut default: Option<::Value<self::push_template::DefaultPushNotificationTemplate>> = None;
2003                let mut default_substitutions: Option<::Value<String>> = None;
2004                let mut gcm: Option<::Value<self::push_template::AndroidPushNotificationTemplate>> = None;
2005                let mut tags: Option<::Value<::json::Value>> = None;
2006                let mut template_description: Option<::Value<String>> = None;
2007                let mut template_name: Option<::Value<String>> = None;
2008
2009                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2010                    match __cfn_key.as_ref() {
2011                        "ADM" => {
2012                            adm = ::serde::de::MapAccess::next_value(&mut map)?;
2013                        }
2014                        "APNS" => {
2015                            apns = ::serde::de::MapAccess::next_value(&mut map)?;
2016                        }
2017                        "Baidu" => {
2018                            baidu = ::serde::de::MapAccess::next_value(&mut map)?;
2019                        }
2020                        "Default" => {
2021                            default = ::serde::de::MapAccess::next_value(&mut map)?;
2022                        }
2023                        "DefaultSubstitutions" => {
2024                            default_substitutions = ::serde::de::MapAccess::next_value(&mut map)?;
2025                        }
2026                        "GCM" => {
2027                            gcm = ::serde::de::MapAccess::next_value(&mut map)?;
2028                        }
2029                        "Tags" => {
2030                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
2031                        }
2032                        "TemplateDescription" => {
2033                            template_description = ::serde::de::MapAccess::next_value(&mut map)?;
2034                        }
2035                        "TemplateName" => {
2036                            template_name = ::serde::de::MapAccess::next_value(&mut map)?;
2037                        }
2038                        _ => {}
2039                    }
2040                }
2041
2042                Ok(PushTemplateProperties {
2043                    adm: adm,
2044                    apns: apns,
2045                    baidu: baidu,
2046                    default: default,
2047                    default_substitutions: default_substitutions,
2048                    gcm: gcm,
2049                    tags: tags,
2050                    template_description: template_description,
2051                    template_name: template_name.ok_or(::serde::de::Error::missing_field("TemplateName"))?,
2052                })
2053            }
2054        }
2055
2056        d.deserialize_map(Visitor)
2057    }
2058}
2059
2060impl ::Resource for PushTemplate {
2061    type Properties = PushTemplateProperties;
2062    const TYPE: &'static str = "AWS::Pinpoint::PushTemplate";
2063    fn properties(&self) -> &PushTemplateProperties {
2064        &self.properties
2065    }
2066    fn properties_mut(&mut self) -> &mut PushTemplateProperties {
2067        &mut self.properties
2068    }
2069}
2070
2071impl ::private::Sealed for PushTemplate {}
2072
2073impl From<PushTemplateProperties> for PushTemplate {
2074    fn from(properties: PushTemplateProperties) -> PushTemplate {
2075        PushTemplate { properties }
2076    }
2077}
2078
2079/// The [`AWS::Pinpoint::SMSChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html) resource type.
2080#[derive(Debug, Default)]
2081pub struct SMSChannel {
2082    properties: SMSChannelProperties
2083}
2084
2085/// Properties for the `SMSChannel` resource.
2086#[derive(Debug, Default)]
2087pub struct SMSChannelProperties {
2088    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-applicationid).
2089    ///
2090    /// Update type: _Immutable_.
2091    /// AWS CloudFormation replaces the resource when you change this property.
2092    pub application_id: ::Value<String>,
2093    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-enabled).
2094    ///
2095    /// Update type: _Mutable_.
2096    /// AWS CloudFormation doesn't replace the resource when you change this property.
2097    pub enabled: Option<::Value<bool>>,
2098    /// Property [`SenderId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-senderid).
2099    ///
2100    /// Update type: _Mutable_.
2101    /// AWS CloudFormation doesn't replace the resource when you change this property.
2102    pub sender_id: Option<::Value<String>>,
2103    /// Property [`ShortCode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smschannel.html#cfn-pinpoint-smschannel-shortcode).
2104    ///
2105    /// Update type: _Mutable_.
2106    /// AWS CloudFormation doesn't replace the resource when you change this property.
2107    pub short_code: Option<::Value<String>>,
2108}
2109
2110impl ::serde::Serialize for SMSChannelProperties {
2111    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2112        let mut map = ::serde::Serializer::serialize_map(s, None)?;
2113        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
2114        if let Some(ref enabled) = self.enabled {
2115            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
2116        }
2117        if let Some(ref sender_id) = self.sender_id {
2118            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SenderId", sender_id)?;
2119        }
2120        if let Some(ref short_code) = self.short_code {
2121            ::serde::ser::SerializeMap::serialize_entry(&mut map, "ShortCode", short_code)?;
2122        }
2123        ::serde::ser::SerializeMap::end(map)
2124    }
2125}
2126
2127impl<'de> ::serde::Deserialize<'de> for SMSChannelProperties {
2128    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<SMSChannelProperties, D::Error> {
2129        struct Visitor;
2130
2131        impl<'de> ::serde::de::Visitor<'de> for Visitor {
2132            type Value = SMSChannelProperties;
2133
2134            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2135                write!(f, "a struct of type SMSChannelProperties")
2136            }
2137
2138            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2139                let mut application_id: Option<::Value<String>> = None;
2140                let mut enabled: Option<::Value<bool>> = None;
2141                let mut sender_id: Option<::Value<String>> = None;
2142                let mut short_code: Option<::Value<String>> = None;
2143
2144                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2145                    match __cfn_key.as_ref() {
2146                        "ApplicationId" => {
2147                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
2148                        }
2149                        "Enabled" => {
2150                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
2151                        }
2152                        "SenderId" => {
2153                            sender_id = ::serde::de::MapAccess::next_value(&mut map)?;
2154                        }
2155                        "ShortCode" => {
2156                            short_code = ::serde::de::MapAccess::next_value(&mut map)?;
2157                        }
2158                        _ => {}
2159                    }
2160                }
2161
2162                Ok(SMSChannelProperties {
2163                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
2164                    enabled: enabled,
2165                    sender_id: sender_id,
2166                    short_code: short_code,
2167                })
2168            }
2169        }
2170
2171        d.deserialize_map(Visitor)
2172    }
2173}
2174
2175impl ::Resource for SMSChannel {
2176    type Properties = SMSChannelProperties;
2177    const TYPE: &'static str = "AWS::Pinpoint::SMSChannel";
2178    fn properties(&self) -> &SMSChannelProperties {
2179        &self.properties
2180    }
2181    fn properties_mut(&mut self) -> &mut SMSChannelProperties {
2182        &mut self.properties
2183    }
2184}
2185
2186impl ::private::Sealed for SMSChannel {}
2187
2188impl From<SMSChannelProperties> for SMSChannel {
2189    fn from(properties: SMSChannelProperties) -> SMSChannel {
2190        SMSChannel { properties }
2191    }
2192}
2193
2194/// The [`AWS::Pinpoint::Segment`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html) resource type.
2195#[derive(Debug, Default)]
2196pub struct Segment {
2197    properties: SegmentProperties
2198}
2199
2200/// Properties for the `Segment` resource.
2201#[derive(Debug, Default)]
2202pub struct SegmentProperties {
2203    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-applicationid).
2204    ///
2205    /// Update type: _Immutable_.
2206    /// AWS CloudFormation replaces the resource when you change this property.
2207    pub application_id: ::Value<String>,
2208    /// Property [`Dimensions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-dimensions).
2209    ///
2210    /// Update type: _Mutable_.
2211    /// AWS CloudFormation doesn't replace the resource when you change this property.
2212    pub dimensions: Option<::Value<self::segment::SegmentDimensions>>,
2213    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-name).
2214    ///
2215    /// Update type: _Mutable_.
2216    /// AWS CloudFormation doesn't replace the resource when you change this property.
2217    pub name: ::Value<String>,
2218    /// Property [`SegmentGroups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-segmentgroups).
2219    ///
2220    /// Update type: _Mutable_.
2221    /// AWS CloudFormation doesn't replace the resource when you change this property.
2222    pub segment_groups: Option<::Value<self::segment::SegmentGroups>>,
2223    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-segment.html#cfn-pinpoint-segment-tags).
2224    ///
2225    /// Update type: _Mutable_.
2226    /// AWS CloudFormation doesn't replace the resource when you change this property.
2227    pub tags: Option<::Value<::json::Value>>,
2228}
2229
2230impl ::serde::Serialize for SegmentProperties {
2231    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2232        let mut map = ::serde::Serializer::serialize_map(s, None)?;
2233        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
2234        if let Some(ref dimensions) = self.dimensions {
2235            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Dimensions", dimensions)?;
2236        }
2237        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
2238        if let Some(ref segment_groups) = self.segment_groups {
2239            ::serde::ser::SerializeMap::serialize_entry(&mut map, "SegmentGroups", segment_groups)?;
2240        }
2241        if let Some(ref tags) = self.tags {
2242            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
2243        }
2244        ::serde::ser::SerializeMap::end(map)
2245    }
2246}
2247
2248impl<'de> ::serde::Deserialize<'de> for SegmentProperties {
2249    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<SegmentProperties, D::Error> {
2250        struct Visitor;
2251
2252        impl<'de> ::serde::de::Visitor<'de> for Visitor {
2253            type Value = SegmentProperties;
2254
2255            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2256                write!(f, "a struct of type SegmentProperties")
2257            }
2258
2259            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2260                let mut application_id: Option<::Value<String>> = None;
2261                let mut dimensions: Option<::Value<self::segment::SegmentDimensions>> = None;
2262                let mut name: Option<::Value<String>> = None;
2263                let mut segment_groups: Option<::Value<self::segment::SegmentGroups>> = None;
2264                let mut tags: Option<::Value<::json::Value>> = None;
2265
2266                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2267                    match __cfn_key.as_ref() {
2268                        "ApplicationId" => {
2269                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
2270                        }
2271                        "Dimensions" => {
2272                            dimensions = ::serde::de::MapAccess::next_value(&mut map)?;
2273                        }
2274                        "Name" => {
2275                            name = ::serde::de::MapAccess::next_value(&mut map)?;
2276                        }
2277                        "SegmentGroups" => {
2278                            segment_groups = ::serde::de::MapAccess::next_value(&mut map)?;
2279                        }
2280                        "Tags" => {
2281                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
2282                        }
2283                        _ => {}
2284                    }
2285                }
2286
2287                Ok(SegmentProperties {
2288                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
2289                    dimensions: dimensions,
2290                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
2291                    segment_groups: segment_groups,
2292                    tags: tags,
2293                })
2294            }
2295        }
2296
2297        d.deserialize_map(Visitor)
2298    }
2299}
2300
2301impl ::Resource for Segment {
2302    type Properties = SegmentProperties;
2303    const TYPE: &'static str = "AWS::Pinpoint::Segment";
2304    fn properties(&self) -> &SegmentProperties {
2305        &self.properties
2306    }
2307    fn properties_mut(&mut self) -> &mut SegmentProperties {
2308        &mut self.properties
2309    }
2310}
2311
2312impl ::private::Sealed for Segment {}
2313
2314impl From<SegmentProperties> for Segment {
2315    fn from(properties: SegmentProperties) -> Segment {
2316        Segment { properties }
2317    }
2318}
2319
2320/// The [`AWS::Pinpoint::SmsTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html) resource type.
2321#[derive(Debug, Default)]
2322pub struct SmsTemplate {
2323    properties: SmsTemplateProperties
2324}
2325
2326/// Properties for the `SmsTemplate` resource.
2327#[derive(Debug, Default)]
2328pub struct SmsTemplateProperties {
2329    /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-body).
2330    ///
2331    /// Update type: _Mutable_.
2332    /// AWS CloudFormation doesn't replace the resource when you change this property.
2333    pub body: ::Value<String>,
2334    /// Property [`DefaultSubstitutions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-defaultsubstitutions).
2335    ///
2336    /// Update type: _Mutable_.
2337    /// AWS CloudFormation doesn't replace the resource when you change this property.
2338    pub default_substitutions: Option<::Value<String>>,
2339    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-tags).
2340    ///
2341    /// Update type: _Mutable_.
2342    /// AWS CloudFormation doesn't replace the resource when you change this property.
2343    pub tags: Option<::Value<::json::Value>>,
2344    /// Property [`TemplateDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-templatedescription).
2345    ///
2346    /// Update type: _Mutable_.
2347    /// AWS CloudFormation doesn't replace the resource when you change this property.
2348    pub template_description: Option<::Value<String>>,
2349    /// Property [`TemplateName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-smstemplate.html#cfn-pinpoint-smstemplate-templatename).
2350    ///
2351    /// Update type: _Immutable_.
2352    /// AWS CloudFormation replaces the resource when you change this property.
2353    pub template_name: ::Value<String>,
2354}
2355
2356impl ::serde::Serialize for SmsTemplateProperties {
2357    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2358        let mut map = ::serde::Serializer::serialize_map(s, None)?;
2359        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", &self.body)?;
2360        if let Some(ref default_substitutions) = self.default_substitutions {
2361            ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultSubstitutions", default_substitutions)?;
2362        }
2363        if let Some(ref tags) = self.tags {
2364            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
2365        }
2366        if let Some(ref template_description) = self.template_description {
2367            ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateDescription", template_description)?;
2368        }
2369        ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateName", &self.template_name)?;
2370        ::serde::ser::SerializeMap::end(map)
2371    }
2372}
2373
2374impl<'de> ::serde::Deserialize<'de> for SmsTemplateProperties {
2375    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<SmsTemplateProperties, D::Error> {
2376        struct Visitor;
2377
2378        impl<'de> ::serde::de::Visitor<'de> for Visitor {
2379            type Value = SmsTemplateProperties;
2380
2381            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2382                write!(f, "a struct of type SmsTemplateProperties")
2383            }
2384
2385            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2386                let mut body: Option<::Value<String>> = None;
2387                let mut default_substitutions: Option<::Value<String>> = None;
2388                let mut tags: Option<::Value<::json::Value>> = None;
2389                let mut template_description: Option<::Value<String>> = None;
2390                let mut template_name: Option<::Value<String>> = None;
2391
2392                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2393                    match __cfn_key.as_ref() {
2394                        "Body" => {
2395                            body = ::serde::de::MapAccess::next_value(&mut map)?;
2396                        }
2397                        "DefaultSubstitutions" => {
2398                            default_substitutions = ::serde::de::MapAccess::next_value(&mut map)?;
2399                        }
2400                        "Tags" => {
2401                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
2402                        }
2403                        "TemplateDescription" => {
2404                            template_description = ::serde::de::MapAccess::next_value(&mut map)?;
2405                        }
2406                        "TemplateName" => {
2407                            template_name = ::serde::de::MapAccess::next_value(&mut map)?;
2408                        }
2409                        _ => {}
2410                    }
2411                }
2412
2413                Ok(SmsTemplateProperties {
2414                    body: body.ok_or(::serde::de::Error::missing_field("Body"))?,
2415                    default_substitutions: default_substitutions,
2416                    tags: tags,
2417                    template_description: template_description,
2418                    template_name: template_name.ok_or(::serde::de::Error::missing_field("TemplateName"))?,
2419                })
2420            }
2421        }
2422
2423        d.deserialize_map(Visitor)
2424    }
2425}
2426
2427impl ::Resource for SmsTemplate {
2428    type Properties = SmsTemplateProperties;
2429    const TYPE: &'static str = "AWS::Pinpoint::SmsTemplate";
2430    fn properties(&self) -> &SmsTemplateProperties {
2431        &self.properties
2432    }
2433    fn properties_mut(&mut self) -> &mut SmsTemplateProperties {
2434        &mut self.properties
2435    }
2436}
2437
2438impl ::private::Sealed for SmsTemplate {}
2439
2440impl From<SmsTemplateProperties> for SmsTemplate {
2441    fn from(properties: SmsTemplateProperties) -> SmsTemplate {
2442        SmsTemplate { properties }
2443    }
2444}
2445
2446/// The [`AWS::Pinpoint::VoiceChannel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html) resource type.
2447#[derive(Debug, Default)]
2448pub struct VoiceChannel {
2449    properties: VoiceChannelProperties
2450}
2451
2452/// Properties for the `VoiceChannel` resource.
2453#[derive(Debug, Default)]
2454pub struct VoiceChannelProperties {
2455    /// Property [`ApplicationId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html#cfn-pinpoint-voicechannel-applicationid).
2456    ///
2457    /// Update type: _Immutable_.
2458    /// AWS CloudFormation replaces the resource when you change this property.
2459    pub application_id: ::Value<String>,
2460    /// Property [`Enabled`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-pinpoint-voicechannel.html#cfn-pinpoint-voicechannel-enabled).
2461    ///
2462    /// Update type: _Mutable_.
2463    /// AWS CloudFormation doesn't replace the resource when you change this property.
2464    pub enabled: Option<::Value<bool>>,
2465}
2466
2467impl ::serde::Serialize for VoiceChannelProperties {
2468    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2469        let mut map = ::serde::Serializer::serialize_map(s, None)?;
2470        ::serde::ser::SerializeMap::serialize_entry(&mut map, "ApplicationId", &self.application_id)?;
2471        if let Some(ref enabled) = self.enabled {
2472            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Enabled", enabled)?;
2473        }
2474        ::serde::ser::SerializeMap::end(map)
2475    }
2476}
2477
2478impl<'de> ::serde::Deserialize<'de> for VoiceChannelProperties {
2479    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<VoiceChannelProperties, D::Error> {
2480        struct Visitor;
2481
2482        impl<'de> ::serde::de::Visitor<'de> for Visitor {
2483            type Value = VoiceChannelProperties;
2484
2485            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2486                write!(f, "a struct of type VoiceChannelProperties")
2487            }
2488
2489            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2490                let mut application_id: Option<::Value<String>> = None;
2491                let mut enabled: Option<::Value<bool>> = None;
2492
2493                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2494                    match __cfn_key.as_ref() {
2495                        "ApplicationId" => {
2496                            application_id = ::serde::de::MapAccess::next_value(&mut map)?;
2497                        }
2498                        "Enabled" => {
2499                            enabled = ::serde::de::MapAccess::next_value(&mut map)?;
2500                        }
2501                        _ => {}
2502                    }
2503                }
2504
2505                Ok(VoiceChannelProperties {
2506                    application_id: application_id.ok_or(::serde::de::Error::missing_field("ApplicationId"))?,
2507                    enabled: enabled,
2508                })
2509            }
2510        }
2511
2512        d.deserialize_map(Visitor)
2513    }
2514}
2515
2516impl ::Resource for VoiceChannel {
2517    type Properties = VoiceChannelProperties;
2518    const TYPE: &'static str = "AWS::Pinpoint::VoiceChannel";
2519    fn properties(&self) -> &VoiceChannelProperties {
2520        &self.properties
2521    }
2522    fn properties_mut(&mut self) -> &mut VoiceChannelProperties {
2523        &mut self.properties
2524    }
2525}
2526
2527impl ::private::Sealed for VoiceChannel {}
2528
2529impl From<VoiceChannelProperties> for VoiceChannel {
2530    fn from(properties: VoiceChannelProperties) -> VoiceChannel {
2531        VoiceChannel { properties }
2532    }
2533}
2534
2535pub mod application_settings {
2536    //! Property types for the `ApplicationSettings` resource.
2537
2538    /// The [`AWS::Pinpoint::ApplicationSettings.CampaignHook`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html) property type.
2539    #[derive(Debug, Default)]
2540    pub struct CampaignHook {
2541        /// Property [`LambdaFunctionName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html#cfn-pinpoint-applicationsettings-campaignhook-lambdafunctionname).
2542        ///
2543        /// Update type: _Mutable_.
2544        /// AWS CloudFormation doesn't replace the resource when you change this property.
2545        pub lambda_function_name: Option<::Value<String>>,
2546        /// Property [`Mode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html#cfn-pinpoint-applicationsettings-campaignhook-mode).
2547        ///
2548        /// Update type: _Mutable_.
2549        /// AWS CloudFormation doesn't replace the resource when you change this property.
2550        pub mode: Option<::Value<String>>,
2551        /// Property [`WebUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-campaignhook.html#cfn-pinpoint-applicationsettings-campaignhook-weburl).
2552        ///
2553        /// Update type: _Mutable_.
2554        /// AWS CloudFormation doesn't replace the resource when you change this property.
2555        pub web_url: Option<::Value<String>>,
2556    }
2557
2558    impl ::codec::SerializeValue for CampaignHook {
2559        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2560            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2561            if let Some(ref lambda_function_name) = self.lambda_function_name {
2562                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LambdaFunctionName", lambda_function_name)?;
2563            }
2564            if let Some(ref mode) = self.mode {
2565                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Mode", mode)?;
2566            }
2567            if let Some(ref web_url) = self.web_url {
2568                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WebUrl", web_url)?;
2569            }
2570            ::serde::ser::SerializeMap::end(map)
2571        }
2572    }
2573
2574    impl ::codec::DeserializeValue for CampaignHook {
2575        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignHook, D::Error> {
2576            struct Visitor;
2577
2578            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2579                type Value = CampaignHook;
2580
2581                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2582                    write!(f, "a struct of type CampaignHook")
2583                }
2584
2585                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2586                    let mut lambda_function_name: Option<::Value<String>> = None;
2587                    let mut mode: Option<::Value<String>> = None;
2588                    let mut web_url: Option<::Value<String>> = None;
2589
2590                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2591                        match __cfn_key.as_ref() {
2592                            "LambdaFunctionName" => {
2593                                lambda_function_name = ::serde::de::MapAccess::next_value(&mut map)?;
2594                            }
2595                            "Mode" => {
2596                                mode = ::serde::de::MapAccess::next_value(&mut map)?;
2597                            }
2598                            "WebUrl" => {
2599                                web_url = ::serde::de::MapAccess::next_value(&mut map)?;
2600                            }
2601                            _ => {}
2602                        }
2603                    }
2604
2605                    Ok(CampaignHook {
2606                        lambda_function_name: lambda_function_name,
2607                        mode: mode,
2608                        web_url: web_url,
2609                    })
2610                }
2611            }
2612
2613            d.deserialize_map(Visitor)
2614        }
2615    }
2616
2617    /// The [`AWS::Pinpoint::ApplicationSettings.Limits`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-limits.html) property type.
2618    #[derive(Debug, Default)]
2619    pub struct Limits {
2620        /// Property [`Daily`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-limits.html#cfn-pinpoint-applicationsettings-limits-daily).
2621        ///
2622        /// Update type: _Mutable_.
2623        /// AWS CloudFormation doesn't replace the resource when you change this property.
2624        pub daily: Option<::Value<u32>>,
2625        /// Property [`MaximumDuration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-limits.html#cfn-pinpoint-applicationsettings-limits-maximumduration).
2626        ///
2627        /// Update type: _Mutable_.
2628        /// AWS CloudFormation doesn't replace the resource when you change this property.
2629        pub maximum_duration: Option<::Value<u32>>,
2630        /// Property [`MessagesPerSecond`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-limits.html#cfn-pinpoint-applicationsettings-limits-messagespersecond).
2631        ///
2632        /// Update type: _Mutable_.
2633        /// AWS CloudFormation doesn't replace the resource when you change this property.
2634        pub messages_per_second: Option<::Value<u32>>,
2635        /// Property [`Total`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-limits.html#cfn-pinpoint-applicationsettings-limits-total).
2636        ///
2637        /// Update type: _Mutable_.
2638        /// AWS CloudFormation doesn't replace the resource when you change this property.
2639        pub total: Option<::Value<u32>>,
2640    }
2641
2642    impl ::codec::SerializeValue for Limits {
2643        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2644            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2645            if let Some(ref daily) = self.daily {
2646                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Daily", daily)?;
2647            }
2648            if let Some(ref maximum_duration) = self.maximum_duration {
2649                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaximumDuration", maximum_duration)?;
2650            }
2651            if let Some(ref messages_per_second) = self.messages_per_second {
2652                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessagesPerSecond", messages_per_second)?;
2653            }
2654            if let Some(ref total) = self.total {
2655                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Total", total)?;
2656            }
2657            ::serde::ser::SerializeMap::end(map)
2658        }
2659    }
2660
2661    impl ::codec::DeserializeValue for Limits {
2662        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Limits, D::Error> {
2663            struct Visitor;
2664
2665            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2666                type Value = Limits;
2667
2668                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2669                    write!(f, "a struct of type Limits")
2670                }
2671
2672                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2673                    let mut daily: Option<::Value<u32>> = None;
2674                    let mut maximum_duration: Option<::Value<u32>> = None;
2675                    let mut messages_per_second: Option<::Value<u32>> = None;
2676                    let mut total: Option<::Value<u32>> = None;
2677
2678                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2679                        match __cfn_key.as_ref() {
2680                            "Daily" => {
2681                                daily = ::serde::de::MapAccess::next_value(&mut map)?;
2682                            }
2683                            "MaximumDuration" => {
2684                                maximum_duration = ::serde::de::MapAccess::next_value(&mut map)?;
2685                            }
2686                            "MessagesPerSecond" => {
2687                                messages_per_second = ::serde::de::MapAccess::next_value(&mut map)?;
2688                            }
2689                            "Total" => {
2690                                total = ::serde::de::MapAccess::next_value(&mut map)?;
2691                            }
2692                            _ => {}
2693                        }
2694                    }
2695
2696                    Ok(Limits {
2697                        daily: daily,
2698                        maximum_duration: maximum_duration,
2699                        messages_per_second: messages_per_second,
2700                        total: total,
2701                    })
2702                }
2703            }
2704
2705            d.deserialize_map(Visitor)
2706        }
2707    }
2708
2709    /// The [`AWS::Pinpoint::ApplicationSettings.QuietTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-quiettime.html) property type.
2710    #[derive(Debug, Default)]
2711    pub struct QuietTime {
2712        /// Property [`End`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-quiettime.html#cfn-pinpoint-applicationsettings-quiettime-end).
2713        ///
2714        /// Update type: _Mutable_.
2715        /// AWS CloudFormation doesn't replace the resource when you change this property.
2716        pub end: ::Value<String>,
2717        /// Property [`Start`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-applicationsettings-quiettime.html#cfn-pinpoint-applicationsettings-quiettime-start).
2718        ///
2719        /// Update type: _Mutable_.
2720        /// AWS CloudFormation doesn't replace the resource when you change this property.
2721        pub start: ::Value<String>,
2722    }
2723
2724    impl ::codec::SerializeValue for QuietTime {
2725        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2726            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2727            ::serde::ser::SerializeMap::serialize_entry(&mut map, "End", &self.end)?;
2728            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Start", &self.start)?;
2729            ::serde::ser::SerializeMap::end(map)
2730        }
2731    }
2732
2733    impl ::codec::DeserializeValue for QuietTime {
2734        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QuietTime, D::Error> {
2735            struct Visitor;
2736
2737            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2738                type Value = QuietTime;
2739
2740                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2741                    write!(f, "a struct of type QuietTime")
2742                }
2743
2744                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2745                    let mut end: Option<::Value<String>> = None;
2746                    let mut start: Option<::Value<String>> = None;
2747
2748                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2749                        match __cfn_key.as_ref() {
2750                            "End" => {
2751                                end = ::serde::de::MapAccess::next_value(&mut map)?;
2752                            }
2753                            "Start" => {
2754                                start = ::serde::de::MapAccess::next_value(&mut map)?;
2755                            }
2756                            _ => {}
2757                        }
2758                    }
2759
2760                    Ok(QuietTime {
2761                        end: end.ok_or(::serde::de::Error::missing_field("End"))?,
2762                        start: start.ok_or(::serde::de::Error::missing_field("Start"))?,
2763                    })
2764                }
2765            }
2766
2767            d.deserialize_map(Visitor)
2768        }
2769    }
2770}
2771
2772pub mod campaign {
2773    //! Property types for the `Campaign` resource.
2774
2775    /// The [`AWS::Pinpoint::Campaign.AttributeDimension`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-attributedimension.html) property type.
2776    #[derive(Debug, Default)]
2777    pub struct AttributeDimension {
2778        /// Property [`AttributeType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-attributedimension.html#cfn-pinpoint-campaign-attributedimension-attributetype).
2779        ///
2780        /// Update type: _Mutable_.
2781        /// AWS CloudFormation doesn't replace the resource when you change this property.
2782        pub attribute_type: Option<::Value<String>>,
2783        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-attributedimension.html#cfn-pinpoint-campaign-attributedimension-values).
2784        ///
2785        /// Update type: _Mutable_.
2786        /// AWS CloudFormation doesn't replace the resource when you change this property.
2787        pub values: Option<::ValueList<String>>,
2788    }
2789
2790    impl ::codec::SerializeValue for AttributeDimension {
2791        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2792            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2793            if let Some(ref attribute_type) = self.attribute_type {
2794                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AttributeType", attribute_type)?;
2795            }
2796            if let Some(ref values) = self.values {
2797                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
2798            }
2799            ::serde::ser::SerializeMap::end(map)
2800        }
2801    }
2802
2803    impl ::codec::DeserializeValue for AttributeDimension {
2804        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AttributeDimension, D::Error> {
2805            struct Visitor;
2806
2807            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2808                type Value = AttributeDimension;
2809
2810                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2811                    write!(f, "a struct of type AttributeDimension")
2812                }
2813
2814                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2815                    let mut attribute_type: Option<::Value<String>> = None;
2816                    let mut values: Option<::ValueList<String>> = None;
2817
2818                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2819                        match __cfn_key.as_ref() {
2820                            "AttributeType" => {
2821                                attribute_type = ::serde::de::MapAccess::next_value(&mut map)?;
2822                            }
2823                            "Values" => {
2824                                values = ::serde::de::MapAccess::next_value(&mut map)?;
2825                            }
2826                            _ => {}
2827                        }
2828                    }
2829
2830                    Ok(AttributeDimension {
2831                        attribute_type: attribute_type,
2832                        values: values,
2833                    })
2834                }
2835            }
2836
2837            d.deserialize_map(Visitor)
2838        }
2839    }
2840
2841    /// The [`AWS::Pinpoint::Campaign.CampaignEmailMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html) property type.
2842    #[derive(Debug, Default)]
2843    pub struct CampaignEmailMessage {
2844        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html#cfn-pinpoint-campaign-campaignemailmessage-body).
2845        ///
2846        /// Update type: _Mutable_.
2847        /// AWS CloudFormation doesn't replace the resource when you change this property.
2848        pub body: Option<::Value<String>>,
2849        /// Property [`FromAddress`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html#cfn-pinpoint-campaign-campaignemailmessage-fromaddress).
2850        ///
2851        /// Update type: _Mutable_.
2852        /// AWS CloudFormation doesn't replace the resource when you change this property.
2853        pub from_address: Option<::Value<String>>,
2854        /// Property [`HtmlBody`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html#cfn-pinpoint-campaign-campaignemailmessage-htmlbody).
2855        ///
2856        /// Update type: _Mutable_.
2857        /// AWS CloudFormation doesn't replace the resource when you change this property.
2858        pub html_body: Option<::Value<String>>,
2859        /// Property [`Title`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignemailmessage.html#cfn-pinpoint-campaign-campaignemailmessage-title).
2860        ///
2861        /// Update type: _Mutable_.
2862        /// AWS CloudFormation doesn't replace the resource when you change this property.
2863        pub title: Option<::Value<String>>,
2864    }
2865
2866    impl ::codec::SerializeValue for CampaignEmailMessage {
2867        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2868            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2869            if let Some(ref body) = self.body {
2870                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
2871            }
2872            if let Some(ref from_address) = self.from_address {
2873                ::serde::ser::SerializeMap::serialize_entry(&mut map, "FromAddress", from_address)?;
2874            }
2875            if let Some(ref html_body) = self.html_body {
2876                ::serde::ser::SerializeMap::serialize_entry(&mut map, "HtmlBody", html_body)?;
2877            }
2878            if let Some(ref title) = self.title {
2879                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Title", title)?;
2880            }
2881            ::serde::ser::SerializeMap::end(map)
2882        }
2883    }
2884
2885    impl ::codec::DeserializeValue for CampaignEmailMessage {
2886        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignEmailMessage, D::Error> {
2887            struct Visitor;
2888
2889            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2890                type Value = CampaignEmailMessage;
2891
2892                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2893                    write!(f, "a struct of type CampaignEmailMessage")
2894                }
2895
2896                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2897                    let mut body: Option<::Value<String>> = None;
2898                    let mut from_address: Option<::Value<String>> = None;
2899                    let mut html_body: Option<::Value<String>> = None;
2900                    let mut title: Option<::Value<String>> = None;
2901
2902                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2903                        match __cfn_key.as_ref() {
2904                            "Body" => {
2905                                body = ::serde::de::MapAccess::next_value(&mut map)?;
2906                            }
2907                            "FromAddress" => {
2908                                from_address = ::serde::de::MapAccess::next_value(&mut map)?;
2909                            }
2910                            "HtmlBody" => {
2911                                html_body = ::serde::de::MapAccess::next_value(&mut map)?;
2912                            }
2913                            "Title" => {
2914                                title = ::serde::de::MapAccess::next_value(&mut map)?;
2915                            }
2916                            _ => {}
2917                        }
2918                    }
2919
2920                    Ok(CampaignEmailMessage {
2921                        body: body,
2922                        from_address: from_address,
2923                        html_body: html_body,
2924                        title: title,
2925                    })
2926                }
2927            }
2928
2929            d.deserialize_map(Visitor)
2930        }
2931    }
2932
2933    /// The [`AWS::Pinpoint::Campaign.CampaignEventFilter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaigneventfilter.html) property type.
2934    #[derive(Debug, Default)]
2935    pub struct CampaignEventFilter {
2936        /// Property [`Dimensions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaigneventfilter.html#cfn-pinpoint-campaign-campaigneventfilter-dimensions).
2937        ///
2938        /// Update type: _Mutable_.
2939        /// AWS CloudFormation doesn't replace the resource when you change this property.
2940        pub dimensions: Option<::Value<EventDimensions>>,
2941        /// Property [`FilterType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaigneventfilter.html#cfn-pinpoint-campaign-campaigneventfilter-filtertype).
2942        ///
2943        /// Update type: _Mutable_.
2944        /// AWS CloudFormation doesn't replace the resource when you change this property.
2945        pub filter_type: Option<::Value<String>>,
2946    }
2947
2948    impl ::codec::SerializeValue for CampaignEventFilter {
2949        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
2950            let mut map = ::serde::Serializer::serialize_map(s, None)?;
2951            if let Some(ref dimensions) = self.dimensions {
2952                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Dimensions", dimensions)?;
2953            }
2954            if let Some(ref filter_type) = self.filter_type {
2955                ::serde::ser::SerializeMap::serialize_entry(&mut map, "FilterType", filter_type)?;
2956            }
2957            ::serde::ser::SerializeMap::end(map)
2958        }
2959    }
2960
2961    impl ::codec::DeserializeValue for CampaignEventFilter {
2962        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignEventFilter, D::Error> {
2963            struct Visitor;
2964
2965            impl<'de> ::serde::de::Visitor<'de> for Visitor {
2966                type Value = CampaignEventFilter;
2967
2968                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2969                    write!(f, "a struct of type CampaignEventFilter")
2970                }
2971
2972                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
2973                    let mut dimensions: Option<::Value<EventDimensions>> = None;
2974                    let mut filter_type: Option<::Value<String>> = None;
2975
2976                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
2977                        match __cfn_key.as_ref() {
2978                            "Dimensions" => {
2979                                dimensions = ::serde::de::MapAccess::next_value(&mut map)?;
2980                            }
2981                            "FilterType" => {
2982                                filter_type = ::serde::de::MapAccess::next_value(&mut map)?;
2983                            }
2984                            _ => {}
2985                        }
2986                    }
2987
2988                    Ok(CampaignEventFilter {
2989                        dimensions: dimensions,
2990                        filter_type: filter_type,
2991                    })
2992                }
2993            }
2994
2995            d.deserialize_map(Visitor)
2996        }
2997    }
2998
2999    /// The [`AWS::Pinpoint::Campaign.CampaignHook`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignhook.html) property type.
3000    #[derive(Debug, Default)]
3001    pub struct CampaignHook {
3002        /// Property [`LambdaFunctionName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignhook.html#cfn-pinpoint-campaign-campaignhook-lambdafunctionname).
3003        ///
3004        /// Update type: _Mutable_.
3005        /// AWS CloudFormation doesn't replace the resource when you change this property.
3006        pub lambda_function_name: Option<::Value<String>>,
3007        /// Property [`Mode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignhook.html#cfn-pinpoint-campaign-campaignhook-mode).
3008        ///
3009        /// Update type: _Mutable_.
3010        /// AWS CloudFormation doesn't replace the resource when you change this property.
3011        pub mode: Option<::Value<String>>,
3012        /// Property [`WebUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignhook.html#cfn-pinpoint-campaign-campaignhook-weburl).
3013        ///
3014        /// Update type: _Mutable_.
3015        /// AWS CloudFormation doesn't replace the resource when you change this property.
3016        pub web_url: Option<::Value<String>>,
3017    }
3018
3019    impl ::codec::SerializeValue for CampaignHook {
3020        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3021            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3022            if let Some(ref lambda_function_name) = self.lambda_function_name {
3023                ::serde::ser::SerializeMap::serialize_entry(&mut map, "LambdaFunctionName", lambda_function_name)?;
3024            }
3025            if let Some(ref mode) = self.mode {
3026                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Mode", mode)?;
3027            }
3028            if let Some(ref web_url) = self.web_url {
3029                ::serde::ser::SerializeMap::serialize_entry(&mut map, "WebUrl", web_url)?;
3030            }
3031            ::serde::ser::SerializeMap::end(map)
3032        }
3033    }
3034
3035    impl ::codec::DeserializeValue for CampaignHook {
3036        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignHook, D::Error> {
3037            struct Visitor;
3038
3039            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3040                type Value = CampaignHook;
3041
3042                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3043                    write!(f, "a struct of type CampaignHook")
3044                }
3045
3046                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3047                    let mut lambda_function_name: Option<::Value<String>> = None;
3048                    let mut mode: Option<::Value<String>> = None;
3049                    let mut web_url: Option<::Value<String>> = None;
3050
3051                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3052                        match __cfn_key.as_ref() {
3053                            "LambdaFunctionName" => {
3054                                lambda_function_name = ::serde::de::MapAccess::next_value(&mut map)?;
3055                            }
3056                            "Mode" => {
3057                                mode = ::serde::de::MapAccess::next_value(&mut map)?;
3058                            }
3059                            "WebUrl" => {
3060                                web_url = ::serde::de::MapAccess::next_value(&mut map)?;
3061                            }
3062                            _ => {}
3063                        }
3064                    }
3065
3066                    Ok(CampaignHook {
3067                        lambda_function_name: lambda_function_name,
3068                        mode: mode,
3069                        web_url: web_url,
3070                    })
3071                }
3072            }
3073
3074            d.deserialize_map(Visitor)
3075        }
3076    }
3077
3078    /// The [`AWS::Pinpoint::Campaign.CampaignSmsMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html) property type.
3079    #[derive(Debug, Default)]
3080    pub struct CampaignSmsMessage {
3081        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-body).
3082        ///
3083        /// Update type: _Mutable_.
3084        /// AWS CloudFormation doesn't replace the resource when you change this property.
3085        pub body: Option<::Value<String>>,
3086        /// Property [`EntityId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-entityid).
3087        ///
3088        /// Update type: _Mutable_.
3089        /// AWS CloudFormation doesn't replace the resource when you change this property.
3090        pub entity_id: Option<::Value<String>>,
3091        /// Property [`MessageType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-messagetype).
3092        ///
3093        /// Update type: _Mutable_.
3094        /// AWS CloudFormation doesn't replace the resource when you change this property.
3095        pub message_type: Option<::Value<String>>,
3096        /// Property [`OriginationNumber`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-originationnumber).
3097        ///
3098        /// Update type: _Mutable_.
3099        /// AWS CloudFormation doesn't replace the resource when you change this property.
3100        pub origination_number: Option<::Value<String>>,
3101        /// Property [`SenderId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-senderid).
3102        ///
3103        /// Update type: _Mutable_.
3104        /// AWS CloudFormation doesn't replace the resource when you change this property.
3105        pub sender_id: Option<::Value<String>>,
3106        /// Property [`TemplateId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-campaignsmsmessage.html#cfn-pinpoint-campaign-campaignsmsmessage-templateid).
3107        ///
3108        /// Update type: _Mutable_.
3109        /// AWS CloudFormation doesn't replace the resource when you change this property.
3110        pub template_id: Option<::Value<String>>,
3111    }
3112
3113    impl ::codec::SerializeValue for CampaignSmsMessage {
3114        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3115            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3116            if let Some(ref body) = self.body {
3117                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
3118            }
3119            if let Some(ref entity_id) = self.entity_id {
3120                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EntityId", entity_id)?;
3121            }
3122            if let Some(ref message_type) = self.message_type {
3123                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessageType", message_type)?;
3124            }
3125            if let Some(ref origination_number) = self.origination_number {
3126                ::serde::ser::SerializeMap::serialize_entry(&mut map, "OriginationNumber", origination_number)?;
3127            }
3128            if let Some(ref sender_id) = self.sender_id {
3129                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SenderId", sender_id)?;
3130            }
3131            if let Some(ref template_id) = self.template_id {
3132                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TemplateId", template_id)?;
3133            }
3134            ::serde::ser::SerializeMap::end(map)
3135        }
3136    }
3137
3138    impl ::codec::DeserializeValue for CampaignSmsMessage {
3139        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CampaignSmsMessage, D::Error> {
3140            struct Visitor;
3141
3142            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3143                type Value = CampaignSmsMessage;
3144
3145                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3146                    write!(f, "a struct of type CampaignSmsMessage")
3147                }
3148
3149                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3150                    let mut body: Option<::Value<String>> = None;
3151                    let mut entity_id: Option<::Value<String>> = None;
3152                    let mut message_type: Option<::Value<String>> = None;
3153                    let mut origination_number: Option<::Value<String>> = None;
3154                    let mut sender_id: Option<::Value<String>> = None;
3155                    let mut template_id: Option<::Value<String>> = None;
3156
3157                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3158                        match __cfn_key.as_ref() {
3159                            "Body" => {
3160                                body = ::serde::de::MapAccess::next_value(&mut map)?;
3161                            }
3162                            "EntityId" => {
3163                                entity_id = ::serde::de::MapAccess::next_value(&mut map)?;
3164                            }
3165                            "MessageType" => {
3166                                message_type = ::serde::de::MapAccess::next_value(&mut map)?;
3167                            }
3168                            "OriginationNumber" => {
3169                                origination_number = ::serde::de::MapAccess::next_value(&mut map)?;
3170                            }
3171                            "SenderId" => {
3172                                sender_id = ::serde::de::MapAccess::next_value(&mut map)?;
3173                            }
3174                            "TemplateId" => {
3175                                template_id = ::serde::de::MapAccess::next_value(&mut map)?;
3176                            }
3177                            _ => {}
3178                        }
3179                    }
3180
3181                    Ok(CampaignSmsMessage {
3182                        body: body,
3183                        entity_id: entity_id,
3184                        message_type: message_type,
3185                        origination_number: origination_number,
3186                        sender_id: sender_id,
3187                        template_id: template_id,
3188                    })
3189                }
3190            }
3191
3192            d.deserialize_map(Visitor)
3193        }
3194    }
3195
3196    /// The [`AWS::Pinpoint::Campaign.EventDimensions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-eventdimensions.html) property type.
3197    #[derive(Debug, Default)]
3198    pub struct EventDimensions {
3199        /// Property [`Attributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-eventdimensions.html#cfn-pinpoint-campaign-eventdimensions-attributes).
3200        ///
3201        /// Update type: _Mutable_.
3202        /// AWS CloudFormation doesn't replace the resource when you change this property.
3203        pub attributes: Option<::Value<::json::Value>>,
3204        /// Property [`EventType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-eventdimensions.html#cfn-pinpoint-campaign-eventdimensions-eventtype).
3205        ///
3206        /// Update type: _Mutable_.
3207        /// AWS CloudFormation doesn't replace the resource when you change this property.
3208        pub event_type: Option<::Value<SetDimension>>,
3209        /// Property [`Metrics`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-eventdimensions.html#cfn-pinpoint-campaign-eventdimensions-metrics).
3210        ///
3211        /// Update type: _Mutable_.
3212        /// AWS CloudFormation doesn't replace the resource when you change this property.
3213        pub metrics: Option<::Value<::json::Value>>,
3214    }
3215
3216    impl ::codec::SerializeValue for EventDimensions {
3217        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3218            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3219            if let Some(ref attributes) = self.attributes {
3220                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Attributes", attributes)?;
3221            }
3222            if let Some(ref event_type) = self.event_type {
3223                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EventType", event_type)?;
3224            }
3225            if let Some(ref metrics) = self.metrics {
3226                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Metrics", metrics)?;
3227            }
3228            ::serde::ser::SerializeMap::end(map)
3229        }
3230    }
3231
3232    impl ::codec::DeserializeValue for EventDimensions {
3233        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EventDimensions, D::Error> {
3234            struct Visitor;
3235
3236            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3237                type Value = EventDimensions;
3238
3239                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3240                    write!(f, "a struct of type EventDimensions")
3241                }
3242
3243                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3244                    let mut attributes: Option<::Value<::json::Value>> = None;
3245                    let mut event_type: Option<::Value<SetDimension>> = None;
3246                    let mut metrics: Option<::Value<::json::Value>> = None;
3247
3248                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3249                        match __cfn_key.as_ref() {
3250                            "Attributes" => {
3251                                attributes = ::serde::de::MapAccess::next_value(&mut map)?;
3252                            }
3253                            "EventType" => {
3254                                event_type = ::serde::de::MapAccess::next_value(&mut map)?;
3255                            }
3256                            "Metrics" => {
3257                                metrics = ::serde::de::MapAccess::next_value(&mut map)?;
3258                            }
3259                            _ => {}
3260                        }
3261                    }
3262
3263                    Ok(EventDimensions {
3264                        attributes: attributes,
3265                        event_type: event_type,
3266                        metrics: metrics,
3267                    })
3268                }
3269            }
3270
3271            d.deserialize_map(Visitor)
3272        }
3273    }
3274
3275    /// The [`AWS::Pinpoint::Campaign.Limits`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-limits.html) property type.
3276    #[derive(Debug, Default)]
3277    pub struct Limits {
3278        /// Property [`Daily`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-limits.html#cfn-pinpoint-campaign-limits-daily).
3279        ///
3280        /// Update type: _Mutable_.
3281        /// AWS CloudFormation doesn't replace the resource when you change this property.
3282        pub daily: Option<::Value<u32>>,
3283        /// Property [`MaximumDuration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-limits.html#cfn-pinpoint-campaign-limits-maximumduration).
3284        ///
3285        /// Update type: _Mutable_.
3286        /// AWS CloudFormation doesn't replace the resource when you change this property.
3287        pub maximum_duration: Option<::Value<u32>>,
3288        /// Property [`MessagesPerSecond`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-limits.html#cfn-pinpoint-campaign-limits-messagespersecond).
3289        ///
3290        /// Update type: _Mutable_.
3291        /// AWS CloudFormation doesn't replace the resource when you change this property.
3292        pub messages_per_second: Option<::Value<u32>>,
3293        /// Property [`Total`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-limits.html#cfn-pinpoint-campaign-limits-total).
3294        ///
3295        /// Update type: _Mutable_.
3296        /// AWS CloudFormation doesn't replace the resource when you change this property.
3297        pub total: Option<::Value<u32>>,
3298    }
3299
3300    impl ::codec::SerializeValue for Limits {
3301        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3302            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3303            if let Some(ref daily) = self.daily {
3304                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Daily", daily)?;
3305            }
3306            if let Some(ref maximum_duration) = self.maximum_duration {
3307                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MaximumDuration", maximum_duration)?;
3308            }
3309            if let Some(ref messages_per_second) = self.messages_per_second {
3310                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessagesPerSecond", messages_per_second)?;
3311            }
3312            if let Some(ref total) = self.total {
3313                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Total", total)?;
3314            }
3315            ::serde::ser::SerializeMap::end(map)
3316        }
3317    }
3318
3319    impl ::codec::DeserializeValue for Limits {
3320        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Limits, D::Error> {
3321            struct Visitor;
3322
3323            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3324                type Value = Limits;
3325
3326                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3327                    write!(f, "a struct of type Limits")
3328                }
3329
3330                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3331                    let mut daily: Option<::Value<u32>> = None;
3332                    let mut maximum_duration: Option<::Value<u32>> = None;
3333                    let mut messages_per_second: Option<::Value<u32>> = None;
3334                    let mut total: Option<::Value<u32>> = None;
3335
3336                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3337                        match __cfn_key.as_ref() {
3338                            "Daily" => {
3339                                daily = ::serde::de::MapAccess::next_value(&mut map)?;
3340                            }
3341                            "MaximumDuration" => {
3342                                maximum_duration = ::serde::de::MapAccess::next_value(&mut map)?;
3343                            }
3344                            "MessagesPerSecond" => {
3345                                messages_per_second = ::serde::de::MapAccess::next_value(&mut map)?;
3346                            }
3347                            "Total" => {
3348                                total = ::serde::de::MapAccess::next_value(&mut map)?;
3349                            }
3350                            _ => {}
3351                        }
3352                    }
3353
3354                    Ok(Limits {
3355                        daily: daily,
3356                        maximum_duration: maximum_duration,
3357                        messages_per_second: messages_per_second,
3358                        total: total,
3359                    })
3360                }
3361            }
3362
3363            d.deserialize_map(Visitor)
3364        }
3365    }
3366
3367    /// The [`AWS::Pinpoint::Campaign.Message`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html) property type.
3368    #[derive(Debug, Default)]
3369    pub struct Message {
3370        /// Property [`Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-action).
3371        ///
3372        /// Update type: _Mutable_.
3373        /// AWS CloudFormation doesn't replace the resource when you change this property.
3374        pub action: Option<::Value<String>>,
3375        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-body).
3376        ///
3377        /// Update type: _Mutable_.
3378        /// AWS CloudFormation doesn't replace the resource when you change this property.
3379        pub body: Option<::Value<String>>,
3380        /// Property [`ImageIconUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-imageiconurl).
3381        ///
3382        /// Update type: _Mutable_.
3383        /// AWS CloudFormation doesn't replace the resource when you change this property.
3384        pub image_icon_url: Option<::Value<String>>,
3385        /// Property [`ImageSmallIconUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-imagesmalliconurl).
3386        ///
3387        /// Update type: _Mutable_.
3388        /// AWS CloudFormation doesn't replace the resource when you change this property.
3389        pub image_small_icon_url: Option<::Value<String>>,
3390        /// Property [`ImageUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-imageurl).
3391        ///
3392        /// Update type: _Mutable_.
3393        /// AWS CloudFormation doesn't replace the resource when you change this property.
3394        pub image_url: Option<::Value<String>>,
3395        /// Property [`JsonBody`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-jsonbody).
3396        ///
3397        /// Update type: _Mutable_.
3398        /// AWS CloudFormation doesn't replace the resource when you change this property.
3399        pub json_body: Option<::Value<String>>,
3400        /// Property [`MediaUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-mediaurl).
3401        ///
3402        /// Update type: _Mutable_.
3403        /// AWS CloudFormation doesn't replace the resource when you change this property.
3404        pub media_url: Option<::Value<String>>,
3405        /// Property [`RawContent`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-rawcontent).
3406        ///
3407        /// Update type: _Mutable_.
3408        /// AWS CloudFormation doesn't replace the resource when you change this property.
3409        pub raw_content: Option<::Value<String>>,
3410        /// Property [`SilentPush`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-silentpush).
3411        ///
3412        /// Update type: _Mutable_.
3413        /// AWS CloudFormation doesn't replace the resource when you change this property.
3414        pub silent_push: Option<::Value<bool>>,
3415        /// Property [`TimeToLive`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-timetolive).
3416        ///
3417        /// Update type: _Mutable_.
3418        /// AWS CloudFormation doesn't replace the resource when you change this property.
3419        pub time_to_live: Option<::Value<u32>>,
3420        /// Property [`Title`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-title).
3421        ///
3422        /// Update type: _Mutable_.
3423        /// AWS CloudFormation doesn't replace the resource when you change this property.
3424        pub title: Option<::Value<String>>,
3425        /// Property [`Url`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-message.html#cfn-pinpoint-campaign-message-url).
3426        ///
3427        /// Update type: _Mutable_.
3428        /// AWS CloudFormation doesn't replace the resource when you change this property.
3429        pub url: Option<::Value<String>>,
3430    }
3431
3432    impl ::codec::SerializeValue for Message {
3433        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3434            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3435            if let Some(ref action) = self.action {
3436                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Action", action)?;
3437            }
3438            if let Some(ref body) = self.body {
3439                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
3440            }
3441            if let Some(ref image_icon_url) = self.image_icon_url {
3442                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImageIconUrl", image_icon_url)?;
3443            }
3444            if let Some(ref image_small_icon_url) = self.image_small_icon_url {
3445                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImageSmallIconUrl", image_small_icon_url)?;
3446            }
3447            if let Some(ref image_url) = self.image_url {
3448                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImageUrl", image_url)?;
3449            }
3450            if let Some(ref json_body) = self.json_body {
3451                ::serde::ser::SerializeMap::serialize_entry(&mut map, "JsonBody", json_body)?;
3452            }
3453            if let Some(ref media_url) = self.media_url {
3454                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MediaUrl", media_url)?;
3455            }
3456            if let Some(ref raw_content) = self.raw_content {
3457                ::serde::ser::SerializeMap::serialize_entry(&mut map, "RawContent", raw_content)?;
3458            }
3459            if let Some(ref silent_push) = self.silent_push {
3460                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SilentPush", silent_push)?;
3461            }
3462            if let Some(ref time_to_live) = self.time_to_live {
3463                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TimeToLive", time_to_live)?;
3464            }
3465            if let Some(ref title) = self.title {
3466                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Title", title)?;
3467            }
3468            if let Some(ref url) = self.url {
3469                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Url", url)?;
3470            }
3471            ::serde::ser::SerializeMap::end(map)
3472        }
3473    }
3474
3475    impl ::codec::DeserializeValue for Message {
3476        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Message, D::Error> {
3477            struct Visitor;
3478
3479            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3480                type Value = Message;
3481
3482                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3483                    write!(f, "a struct of type Message")
3484                }
3485
3486                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3487                    let mut action: Option<::Value<String>> = None;
3488                    let mut body: Option<::Value<String>> = None;
3489                    let mut image_icon_url: Option<::Value<String>> = None;
3490                    let mut image_small_icon_url: Option<::Value<String>> = None;
3491                    let mut image_url: Option<::Value<String>> = None;
3492                    let mut json_body: Option<::Value<String>> = None;
3493                    let mut media_url: Option<::Value<String>> = None;
3494                    let mut raw_content: Option<::Value<String>> = None;
3495                    let mut silent_push: Option<::Value<bool>> = None;
3496                    let mut time_to_live: Option<::Value<u32>> = None;
3497                    let mut title: Option<::Value<String>> = None;
3498                    let mut url: Option<::Value<String>> = None;
3499
3500                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3501                        match __cfn_key.as_ref() {
3502                            "Action" => {
3503                                action = ::serde::de::MapAccess::next_value(&mut map)?;
3504                            }
3505                            "Body" => {
3506                                body = ::serde::de::MapAccess::next_value(&mut map)?;
3507                            }
3508                            "ImageIconUrl" => {
3509                                image_icon_url = ::serde::de::MapAccess::next_value(&mut map)?;
3510                            }
3511                            "ImageSmallIconUrl" => {
3512                                image_small_icon_url = ::serde::de::MapAccess::next_value(&mut map)?;
3513                            }
3514                            "ImageUrl" => {
3515                                image_url = ::serde::de::MapAccess::next_value(&mut map)?;
3516                            }
3517                            "JsonBody" => {
3518                                json_body = ::serde::de::MapAccess::next_value(&mut map)?;
3519                            }
3520                            "MediaUrl" => {
3521                                media_url = ::serde::de::MapAccess::next_value(&mut map)?;
3522                            }
3523                            "RawContent" => {
3524                                raw_content = ::serde::de::MapAccess::next_value(&mut map)?;
3525                            }
3526                            "SilentPush" => {
3527                                silent_push = ::serde::de::MapAccess::next_value(&mut map)?;
3528                            }
3529                            "TimeToLive" => {
3530                                time_to_live = ::serde::de::MapAccess::next_value(&mut map)?;
3531                            }
3532                            "Title" => {
3533                                title = ::serde::de::MapAccess::next_value(&mut map)?;
3534                            }
3535                            "Url" => {
3536                                url = ::serde::de::MapAccess::next_value(&mut map)?;
3537                            }
3538                            _ => {}
3539                        }
3540                    }
3541
3542                    Ok(Message {
3543                        action: action,
3544                        body: body,
3545                        image_icon_url: image_icon_url,
3546                        image_small_icon_url: image_small_icon_url,
3547                        image_url: image_url,
3548                        json_body: json_body,
3549                        media_url: media_url,
3550                        raw_content: raw_content,
3551                        silent_push: silent_push,
3552                        time_to_live: time_to_live,
3553                        title: title,
3554                        url: url,
3555                    })
3556                }
3557            }
3558
3559            d.deserialize_map(Visitor)
3560        }
3561    }
3562
3563    /// The [`AWS::Pinpoint::Campaign.MessageConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html) property type.
3564    #[derive(Debug, Default)]
3565    pub struct MessageConfiguration {
3566        /// Property [`ADMMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-admmessage).
3567        ///
3568        /// Update type: _Mutable_.
3569        /// AWS CloudFormation doesn't replace the resource when you change this property.
3570        pub adm_message: Option<::Value<Message>>,
3571        /// Property [`APNSMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-apnsmessage).
3572        ///
3573        /// Update type: _Mutable_.
3574        /// AWS CloudFormation doesn't replace the resource when you change this property.
3575        pub apns_message: Option<::Value<Message>>,
3576        /// Property [`BaiduMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-baidumessage).
3577        ///
3578        /// Update type: _Mutable_.
3579        /// AWS CloudFormation doesn't replace the resource when you change this property.
3580        pub baidu_message: Option<::Value<Message>>,
3581        /// Property [`DefaultMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-defaultmessage).
3582        ///
3583        /// Update type: _Mutable_.
3584        /// AWS CloudFormation doesn't replace the resource when you change this property.
3585        pub default_message: Option<::Value<Message>>,
3586        /// Property [`EmailMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-emailmessage).
3587        ///
3588        /// Update type: _Mutable_.
3589        /// AWS CloudFormation doesn't replace the resource when you change this property.
3590        pub email_message: Option<::Value<CampaignEmailMessage>>,
3591        /// Property [`GCMMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-gcmmessage).
3592        ///
3593        /// Update type: _Mutable_.
3594        /// AWS CloudFormation doesn't replace the resource when you change this property.
3595        pub gcm_message: Option<::Value<Message>>,
3596        /// Property [`SMSMessage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-messageconfiguration.html#cfn-pinpoint-campaign-messageconfiguration-smsmessage).
3597        ///
3598        /// Update type: _Mutable_.
3599        /// AWS CloudFormation doesn't replace the resource when you change this property.
3600        pub sms_message: Option<::Value<CampaignSmsMessage>>,
3601    }
3602
3603    impl ::codec::SerializeValue for MessageConfiguration {
3604        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3605            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3606            if let Some(ref adm_message) = self.adm_message {
3607                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ADMMessage", adm_message)?;
3608            }
3609            if let Some(ref apns_message) = self.apns_message {
3610                ::serde::ser::SerializeMap::serialize_entry(&mut map, "APNSMessage", apns_message)?;
3611            }
3612            if let Some(ref baidu_message) = self.baidu_message {
3613                ::serde::ser::SerializeMap::serialize_entry(&mut map, "BaiduMessage", baidu_message)?;
3614            }
3615            if let Some(ref default_message) = self.default_message {
3616                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DefaultMessage", default_message)?;
3617            }
3618            if let Some(ref email_message) = self.email_message {
3619                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EmailMessage", email_message)?;
3620            }
3621            if let Some(ref gcm_message) = self.gcm_message {
3622                ::serde::ser::SerializeMap::serialize_entry(&mut map, "GCMMessage", gcm_message)?;
3623            }
3624            if let Some(ref sms_message) = self.sms_message {
3625                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SMSMessage", sms_message)?;
3626            }
3627            ::serde::ser::SerializeMap::end(map)
3628        }
3629    }
3630
3631    impl ::codec::DeserializeValue for MessageConfiguration {
3632        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<MessageConfiguration, D::Error> {
3633            struct Visitor;
3634
3635            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3636                type Value = MessageConfiguration;
3637
3638                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3639                    write!(f, "a struct of type MessageConfiguration")
3640                }
3641
3642                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3643                    let mut adm_message: Option<::Value<Message>> = None;
3644                    let mut apns_message: Option<::Value<Message>> = None;
3645                    let mut baidu_message: Option<::Value<Message>> = None;
3646                    let mut default_message: Option<::Value<Message>> = None;
3647                    let mut email_message: Option<::Value<CampaignEmailMessage>> = None;
3648                    let mut gcm_message: Option<::Value<Message>> = None;
3649                    let mut sms_message: Option<::Value<CampaignSmsMessage>> = None;
3650
3651                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3652                        match __cfn_key.as_ref() {
3653                            "ADMMessage" => {
3654                                adm_message = ::serde::de::MapAccess::next_value(&mut map)?;
3655                            }
3656                            "APNSMessage" => {
3657                                apns_message = ::serde::de::MapAccess::next_value(&mut map)?;
3658                            }
3659                            "BaiduMessage" => {
3660                                baidu_message = ::serde::de::MapAccess::next_value(&mut map)?;
3661                            }
3662                            "DefaultMessage" => {
3663                                default_message = ::serde::de::MapAccess::next_value(&mut map)?;
3664                            }
3665                            "EmailMessage" => {
3666                                email_message = ::serde::de::MapAccess::next_value(&mut map)?;
3667                            }
3668                            "GCMMessage" => {
3669                                gcm_message = ::serde::de::MapAccess::next_value(&mut map)?;
3670                            }
3671                            "SMSMessage" => {
3672                                sms_message = ::serde::de::MapAccess::next_value(&mut map)?;
3673                            }
3674                            _ => {}
3675                        }
3676                    }
3677
3678                    Ok(MessageConfiguration {
3679                        adm_message: adm_message,
3680                        apns_message: apns_message,
3681                        baidu_message: baidu_message,
3682                        default_message: default_message,
3683                        email_message: email_message,
3684                        gcm_message: gcm_message,
3685                        sms_message: sms_message,
3686                    })
3687                }
3688            }
3689
3690            d.deserialize_map(Visitor)
3691        }
3692    }
3693
3694    /// The [`AWS::Pinpoint::Campaign.MetricDimension`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-metricdimension.html) property type.
3695    #[derive(Debug, Default)]
3696    pub struct MetricDimension {
3697        /// Property [`ComparisonOperator`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-metricdimension.html#cfn-pinpoint-campaign-metricdimension-comparisonoperator).
3698        ///
3699        /// Update type: _Mutable_.
3700        /// AWS CloudFormation doesn't replace the resource when you change this property.
3701        pub comparison_operator: Option<::Value<String>>,
3702        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-metricdimension.html#cfn-pinpoint-campaign-metricdimension-value).
3703        ///
3704        /// Update type: _Mutable_.
3705        /// AWS CloudFormation doesn't replace the resource when you change this property.
3706        pub value: Option<::Value<f64>>,
3707    }
3708
3709    impl ::codec::SerializeValue for MetricDimension {
3710        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3711            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3712            if let Some(ref comparison_operator) = self.comparison_operator {
3713                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ComparisonOperator", comparison_operator)?;
3714            }
3715            if let Some(ref value) = self.value {
3716                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", value)?;
3717            }
3718            ::serde::ser::SerializeMap::end(map)
3719        }
3720    }
3721
3722    impl ::codec::DeserializeValue for MetricDimension {
3723        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<MetricDimension, D::Error> {
3724            struct Visitor;
3725
3726            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3727                type Value = MetricDimension;
3728
3729                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3730                    write!(f, "a struct of type MetricDimension")
3731                }
3732
3733                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3734                    let mut comparison_operator: Option<::Value<String>> = None;
3735                    let mut value: Option<::Value<f64>> = None;
3736
3737                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3738                        match __cfn_key.as_ref() {
3739                            "ComparisonOperator" => {
3740                                comparison_operator = ::serde::de::MapAccess::next_value(&mut map)?;
3741                            }
3742                            "Value" => {
3743                                value = ::serde::de::MapAccess::next_value(&mut map)?;
3744                            }
3745                            _ => {}
3746                        }
3747                    }
3748
3749                    Ok(MetricDimension {
3750                        comparison_operator: comparison_operator,
3751                        value: value,
3752                    })
3753                }
3754            }
3755
3756            d.deserialize_map(Visitor)
3757        }
3758    }
3759
3760    /// The [`AWS::Pinpoint::Campaign.QuietTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule-quiettime.html) property type.
3761    #[derive(Debug, Default)]
3762    pub struct QuietTime {
3763        /// Property [`End`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule-quiettime.html#cfn-pinpoint-campaign-schedule-quiettime-end).
3764        ///
3765        /// Update type: _Mutable_.
3766        /// AWS CloudFormation doesn't replace the resource when you change this property.
3767        pub end: ::Value<String>,
3768        /// Property [`Start`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule-quiettime.html#cfn-pinpoint-campaign-schedule-quiettime-start).
3769        ///
3770        /// Update type: _Mutable_.
3771        /// AWS CloudFormation doesn't replace the resource when you change this property.
3772        pub start: ::Value<String>,
3773    }
3774
3775    impl ::codec::SerializeValue for QuietTime {
3776        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3777            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3778            ::serde::ser::SerializeMap::serialize_entry(&mut map, "End", &self.end)?;
3779            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Start", &self.start)?;
3780            ::serde::ser::SerializeMap::end(map)
3781        }
3782    }
3783
3784    impl ::codec::DeserializeValue for QuietTime {
3785        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<QuietTime, D::Error> {
3786            struct Visitor;
3787
3788            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3789                type Value = QuietTime;
3790
3791                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3792                    write!(f, "a struct of type QuietTime")
3793                }
3794
3795                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3796                    let mut end: Option<::Value<String>> = None;
3797                    let mut start: Option<::Value<String>> = None;
3798
3799                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3800                        match __cfn_key.as_ref() {
3801                            "End" => {
3802                                end = ::serde::de::MapAccess::next_value(&mut map)?;
3803                            }
3804                            "Start" => {
3805                                start = ::serde::de::MapAccess::next_value(&mut map)?;
3806                            }
3807                            _ => {}
3808                        }
3809                    }
3810
3811                    Ok(QuietTime {
3812                        end: end.ok_or(::serde::de::Error::missing_field("End"))?,
3813                        start: start.ok_or(::serde::de::Error::missing_field("Start"))?,
3814                    })
3815                }
3816            }
3817
3818            d.deserialize_map(Visitor)
3819        }
3820    }
3821
3822    /// The [`AWS::Pinpoint::Campaign.Schedule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html) property type.
3823    #[derive(Debug, Default)]
3824    pub struct Schedule {
3825        /// Property [`EndTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-endtime).
3826        ///
3827        /// Update type: _Mutable_.
3828        /// AWS CloudFormation doesn't replace the resource when you change this property.
3829        pub end_time: Option<::Value<String>>,
3830        /// Property [`EventFilter`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-eventfilter).
3831        ///
3832        /// Update type: _Mutable_.
3833        /// AWS CloudFormation doesn't replace the resource when you change this property.
3834        pub event_filter: Option<::Value<CampaignEventFilter>>,
3835        /// Property [`Frequency`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-frequency).
3836        ///
3837        /// Update type: _Mutable_.
3838        /// AWS CloudFormation doesn't replace the resource when you change this property.
3839        pub frequency: Option<::Value<String>>,
3840        /// Property [`IsLocalTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-islocaltime).
3841        ///
3842        /// Update type: _Mutable_.
3843        /// AWS CloudFormation doesn't replace the resource when you change this property.
3844        pub is_local_time: Option<::Value<bool>>,
3845        /// Property [`QuietTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-quiettime).
3846        ///
3847        /// Update type: _Mutable_.
3848        /// AWS CloudFormation doesn't replace the resource when you change this property.
3849        pub quiet_time: Option<::Value<QuietTime>>,
3850        /// Property [`StartTime`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-starttime).
3851        ///
3852        /// Update type: _Mutable_.
3853        /// AWS CloudFormation doesn't replace the resource when you change this property.
3854        pub start_time: Option<::Value<String>>,
3855        /// Property [`TimeZone`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-schedule.html#cfn-pinpoint-campaign-schedule-timezone).
3856        ///
3857        /// Update type: _Mutable_.
3858        /// AWS CloudFormation doesn't replace the resource when you change this property.
3859        pub time_zone: Option<::Value<String>>,
3860    }
3861
3862    impl ::codec::SerializeValue for Schedule {
3863        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3864            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3865            if let Some(ref end_time) = self.end_time {
3866                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EndTime", end_time)?;
3867            }
3868            if let Some(ref event_filter) = self.event_filter {
3869                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EventFilter", event_filter)?;
3870            }
3871            if let Some(ref frequency) = self.frequency {
3872                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Frequency", frequency)?;
3873            }
3874            if let Some(ref is_local_time) = self.is_local_time {
3875                ::serde::ser::SerializeMap::serialize_entry(&mut map, "IsLocalTime", is_local_time)?;
3876            }
3877            if let Some(ref quiet_time) = self.quiet_time {
3878                ::serde::ser::SerializeMap::serialize_entry(&mut map, "QuietTime", quiet_time)?;
3879            }
3880            if let Some(ref start_time) = self.start_time {
3881                ::serde::ser::SerializeMap::serialize_entry(&mut map, "StartTime", start_time)?;
3882            }
3883            if let Some(ref time_zone) = self.time_zone {
3884                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TimeZone", time_zone)?;
3885            }
3886            ::serde::ser::SerializeMap::end(map)
3887        }
3888    }
3889
3890    impl ::codec::DeserializeValue for Schedule {
3891        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Schedule, D::Error> {
3892            struct Visitor;
3893
3894            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3895                type Value = Schedule;
3896
3897                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3898                    write!(f, "a struct of type Schedule")
3899                }
3900
3901                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3902                    let mut end_time: Option<::Value<String>> = None;
3903                    let mut event_filter: Option<::Value<CampaignEventFilter>> = None;
3904                    let mut frequency: Option<::Value<String>> = None;
3905                    let mut is_local_time: Option<::Value<bool>> = None;
3906                    let mut quiet_time: Option<::Value<QuietTime>> = None;
3907                    let mut start_time: Option<::Value<String>> = None;
3908                    let mut time_zone: Option<::Value<String>> = None;
3909
3910                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3911                        match __cfn_key.as_ref() {
3912                            "EndTime" => {
3913                                end_time = ::serde::de::MapAccess::next_value(&mut map)?;
3914                            }
3915                            "EventFilter" => {
3916                                event_filter = ::serde::de::MapAccess::next_value(&mut map)?;
3917                            }
3918                            "Frequency" => {
3919                                frequency = ::serde::de::MapAccess::next_value(&mut map)?;
3920                            }
3921                            "IsLocalTime" => {
3922                                is_local_time = ::serde::de::MapAccess::next_value(&mut map)?;
3923                            }
3924                            "QuietTime" => {
3925                                quiet_time = ::serde::de::MapAccess::next_value(&mut map)?;
3926                            }
3927                            "StartTime" => {
3928                                start_time = ::serde::de::MapAccess::next_value(&mut map)?;
3929                            }
3930                            "TimeZone" => {
3931                                time_zone = ::serde::de::MapAccess::next_value(&mut map)?;
3932                            }
3933                            _ => {}
3934                        }
3935                    }
3936
3937                    Ok(Schedule {
3938                        end_time: end_time,
3939                        event_filter: event_filter,
3940                        frequency: frequency,
3941                        is_local_time: is_local_time,
3942                        quiet_time: quiet_time,
3943                        start_time: start_time,
3944                        time_zone: time_zone,
3945                    })
3946                }
3947            }
3948
3949            d.deserialize_map(Visitor)
3950        }
3951    }
3952
3953    /// The [`AWS::Pinpoint::Campaign.SetDimension`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-setdimension.html) property type.
3954    #[derive(Debug, Default)]
3955    pub struct SetDimension {
3956        /// Property [`DimensionType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-setdimension.html#cfn-pinpoint-campaign-setdimension-dimensiontype).
3957        ///
3958        /// Update type: _Mutable_.
3959        /// AWS CloudFormation doesn't replace the resource when you change this property.
3960        pub dimension_type: Option<::Value<String>>,
3961        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-setdimension.html#cfn-pinpoint-campaign-setdimension-values).
3962        ///
3963        /// Update type: _Mutable_.
3964        /// AWS CloudFormation doesn't replace the resource when you change this property.
3965        pub values: Option<::ValueList<String>>,
3966    }
3967
3968    impl ::codec::SerializeValue for SetDimension {
3969        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
3970            let mut map = ::serde::Serializer::serialize_map(s, None)?;
3971            if let Some(ref dimension_type) = self.dimension_type {
3972                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DimensionType", dimension_type)?;
3973            }
3974            if let Some(ref values) = self.values {
3975                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
3976            }
3977            ::serde::ser::SerializeMap::end(map)
3978        }
3979    }
3980
3981    impl ::codec::DeserializeValue for SetDimension {
3982        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SetDimension, D::Error> {
3983            struct Visitor;
3984
3985            impl<'de> ::serde::de::Visitor<'de> for Visitor {
3986                type Value = SetDimension;
3987
3988                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3989                    write!(f, "a struct of type SetDimension")
3990                }
3991
3992                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
3993                    let mut dimension_type: Option<::Value<String>> = None;
3994                    let mut values: Option<::ValueList<String>> = None;
3995
3996                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
3997                        match __cfn_key.as_ref() {
3998                            "DimensionType" => {
3999                                dimension_type = ::serde::de::MapAccess::next_value(&mut map)?;
4000                            }
4001                            "Values" => {
4002                                values = ::serde::de::MapAccess::next_value(&mut map)?;
4003                            }
4004                            _ => {}
4005                        }
4006                    }
4007
4008                    Ok(SetDimension {
4009                        dimension_type: dimension_type,
4010                        values: values,
4011                    })
4012                }
4013            }
4014
4015            d.deserialize_map(Visitor)
4016        }
4017    }
4018
4019    /// The [`AWS::Pinpoint::Campaign.WriteTreatmentResource`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html) property type.
4020    #[derive(Debug, Default)]
4021    pub struct WriteTreatmentResource {
4022        /// Property [`MessageConfiguration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-messageconfiguration).
4023        ///
4024        /// Update type: _Mutable_.
4025        /// AWS CloudFormation doesn't replace the resource when you change this property.
4026        pub message_configuration: Option<::Value<MessageConfiguration>>,
4027        /// Property [`Schedule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-schedule).
4028        ///
4029        /// Update type: _Mutable_.
4030        /// AWS CloudFormation doesn't replace the resource when you change this property.
4031        pub schedule: Option<::Value<Schedule>>,
4032        /// Property [`SizePercent`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-sizepercent).
4033        ///
4034        /// Update type: _Mutable_.
4035        /// AWS CloudFormation doesn't replace the resource when you change this property.
4036        pub size_percent: Option<::Value<u32>>,
4037        /// Property [`TreatmentDescription`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-treatmentdescription).
4038        ///
4039        /// Update type: _Mutable_.
4040        /// AWS CloudFormation doesn't replace the resource when you change this property.
4041        pub treatment_description: Option<::Value<String>>,
4042        /// Property [`TreatmentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-campaign-writetreatmentresource.html#cfn-pinpoint-campaign-writetreatmentresource-treatmentname).
4043        ///
4044        /// Update type: _Mutable_.
4045        /// AWS CloudFormation doesn't replace the resource when you change this property.
4046        pub treatment_name: Option<::Value<String>>,
4047    }
4048
4049    impl ::codec::SerializeValue for WriteTreatmentResource {
4050        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4051            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4052            if let Some(ref message_configuration) = self.message_configuration {
4053                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MessageConfiguration", message_configuration)?;
4054            }
4055            if let Some(ref schedule) = self.schedule {
4056                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Schedule", schedule)?;
4057            }
4058            if let Some(ref size_percent) = self.size_percent {
4059                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SizePercent", size_percent)?;
4060            }
4061            if let Some(ref treatment_description) = self.treatment_description {
4062                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TreatmentDescription", treatment_description)?;
4063            }
4064            if let Some(ref treatment_name) = self.treatment_name {
4065                ::serde::ser::SerializeMap::serialize_entry(&mut map, "TreatmentName", treatment_name)?;
4066            }
4067            ::serde::ser::SerializeMap::end(map)
4068        }
4069    }
4070
4071    impl ::codec::DeserializeValue for WriteTreatmentResource {
4072        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<WriteTreatmentResource, D::Error> {
4073            struct Visitor;
4074
4075            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4076                type Value = WriteTreatmentResource;
4077
4078                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4079                    write!(f, "a struct of type WriteTreatmentResource")
4080                }
4081
4082                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4083                    let mut message_configuration: Option<::Value<MessageConfiguration>> = None;
4084                    let mut schedule: Option<::Value<Schedule>> = None;
4085                    let mut size_percent: Option<::Value<u32>> = None;
4086                    let mut treatment_description: Option<::Value<String>> = None;
4087                    let mut treatment_name: Option<::Value<String>> = None;
4088
4089                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4090                        match __cfn_key.as_ref() {
4091                            "MessageConfiguration" => {
4092                                message_configuration = ::serde::de::MapAccess::next_value(&mut map)?;
4093                            }
4094                            "Schedule" => {
4095                                schedule = ::serde::de::MapAccess::next_value(&mut map)?;
4096                            }
4097                            "SizePercent" => {
4098                                size_percent = ::serde::de::MapAccess::next_value(&mut map)?;
4099                            }
4100                            "TreatmentDescription" => {
4101                                treatment_description = ::serde::de::MapAccess::next_value(&mut map)?;
4102                            }
4103                            "TreatmentName" => {
4104                                treatment_name = ::serde::de::MapAccess::next_value(&mut map)?;
4105                            }
4106                            _ => {}
4107                        }
4108                    }
4109
4110                    Ok(WriteTreatmentResource {
4111                        message_configuration: message_configuration,
4112                        schedule: schedule,
4113                        size_percent: size_percent,
4114                        treatment_description: treatment_description,
4115                        treatment_name: treatment_name,
4116                    })
4117                }
4118            }
4119
4120            d.deserialize_map(Visitor)
4121        }
4122    }
4123}
4124
4125pub mod push_template {
4126    //! Property types for the `PushTemplate` resource.
4127
4128    /// The [`AWS::Pinpoint::PushTemplate.APNSPushNotificationTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html) property type.
4129    #[derive(Debug, Default)]
4130    pub struct APNSPushNotificationTemplate {
4131        /// Property [`Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-action).
4132        ///
4133        /// Update type: _Mutable_.
4134        /// AWS CloudFormation doesn't replace the resource when you change this property.
4135        pub action: Option<::Value<String>>,
4136        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-body).
4137        ///
4138        /// Update type: _Mutable_.
4139        /// AWS CloudFormation doesn't replace the resource when you change this property.
4140        pub body: Option<::Value<String>>,
4141        /// Property [`MediaUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-mediaurl).
4142        ///
4143        /// Update type: _Mutable_.
4144        /// AWS CloudFormation doesn't replace the resource when you change this property.
4145        pub media_url: Option<::Value<String>>,
4146        /// Property [`Sound`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-sound).
4147        ///
4148        /// Update type: _Mutable_.
4149        /// AWS CloudFormation doesn't replace the resource when you change this property.
4150        pub sound: Option<::Value<String>>,
4151        /// Property [`Title`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-title).
4152        ///
4153        /// Update type: _Mutable_.
4154        /// AWS CloudFormation doesn't replace the resource when you change this property.
4155        pub title: Option<::Value<String>>,
4156        /// Property [`Url`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-apnspushnotificationtemplate.html#cfn-pinpoint-pushtemplate-apnspushnotificationtemplate-url).
4157        ///
4158        /// Update type: _Mutable_.
4159        /// AWS CloudFormation doesn't replace the resource when you change this property.
4160        pub url: Option<::Value<String>>,
4161    }
4162
4163    impl ::codec::SerializeValue for APNSPushNotificationTemplate {
4164        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4165            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4166            if let Some(ref action) = self.action {
4167                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Action", action)?;
4168            }
4169            if let Some(ref body) = self.body {
4170                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
4171            }
4172            if let Some(ref media_url) = self.media_url {
4173                ::serde::ser::SerializeMap::serialize_entry(&mut map, "MediaUrl", media_url)?;
4174            }
4175            if let Some(ref sound) = self.sound {
4176                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Sound", sound)?;
4177            }
4178            if let Some(ref title) = self.title {
4179                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Title", title)?;
4180            }
4181            if let Some(ref url) = self.url {
4182                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Url", url)?;
4183            }
4184            ::serde::ser::SerializeMap::end(map)
4185        }
4186    }
4187
4188    impl ::codec::DeserializeValue for APNSPushNotificationTemplate {
4189        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<APNSPushNotificationTemplate, D::Error> {
4190            struct Visitor;
4191
4192            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4193                type Value = APNSPushNotificationTemplate;
4194
4195                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4196                    write!(f, "a struct of type APNSPushNotificationTemplate")
4197                }
4198
4199                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4200                    let mut action: Option<::Value<String>> = None;
4201                    let mut body: Option<::Value<String>> = None;
4202                    let mut media_url: Option<::Value<String>> = None;
4203                    let mut sound: Option<::Value<String>> = None;
4204                    let mut title: Option<::Value<String>> = None;
4205                    let mut url: Option<::Value<String>> = None;
4206
4207                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4208                        match __cfn_key.as_ref() {
4209                            "Action" => {
4210                                action = ::serde::de::MapAccess::next_value(&mut map)?;
4211                            }
4212                            "Body" => {
4213                                body = ::serde::de::MapAccess::next_value(&mut map)?;
4214                            }
4215                            "MediaUrl" => {
4216                                media_url = ::serde::de::MapAccess::next_value(&mut map)?;
4217                            }
4218                            "Sound" => {
4219                                sound = ::serde::de::MapAccess::next_value(&mut map)?;
4220                            }
4221                            "Title" => {
4222                                title = ::serde::de::MapAccess::next_value(&mut map)?;
4223                            }
4224                            "Url" => {
4225                                url = ::serde::de::MapAccess::next_value(&mut map)?;
4226                            }
4227                            _ => {}
4228                        }
4229                    }
4230
4231                    Ok(APNSPushNotificationTemplate {
4232                        action: action,
4233                        body: body,
4234                        media_url: media_url,
4235                        sound: sound,
4236                        title: title,
4237                        url: url,
4238                    })
4239                }
4240            }
4241
4242            d.deserialize_map(Visitor)
4243        }
4244    }
4245
4246    /// The [`AWS::Pinpoint::PushTemplate.AndroidPushNotificationTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html) property type.
4247    #[derive(Debug, Default)]
4248    pub struct AndroidPushNotificationTemplate {
4249        /// Property [`Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-action).
4250        ///
4251        /// Update type: _Mutable_.
4252        /// AWS CloudFormation doesn't replace the resource when you change this property.
4253        pub action: Option<::Value<String>>,
4254        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-body).
4255        ///
4256        /// Update type: _Mutable_.
4257        /// AWS CloudFormation doesn't replace the resource when you change this property.
4258        pub body: Option<::Value<String>>,
4259        /// Property [`ImageIconUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-imageiconurl).
4260        ///
4261        /// Update type: _Mutable_.
4262        /// AWS CloudFormation doesn't replace the resource when you change this property.
4263        pub image_icon_url: Option<::Value<String>>,
4264        /// Property [`ImageUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-imageurl).
4265        ///
4266        /// Update type: _Mutable_.
4267        /// AWS CloudFormation doesn't replace the resource when you change this property.
4268        pub image_url: Option<::Value<String>>,
4269        /// Property [`SmallImageIconUrl`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-smallimageiconurl).
4270        ///
4271        /// Update type: _Mutable_.
4272        /// AWS CloudFormation doesn't replace the resource when you change this property.
4273        pub small_image_icon_url: Option<::Value<String>>,
4274        /// Property [`Sound`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-sound).
4275        ///
4276        /// Update type: _Mutable_.
4277        /// AWS CloudFormation doesn't replace the resource when you change this property.
4278        pub sound: Option<::Value<String>>,
4279        /// Property [`Title`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-title).
4280        ///
4281        /// Update type: _Mutable_.
4282        /// AWS CloudFormation doesn't replace the resource when you change this property.
4283        pub title: Option<::Value<String>>,
4284        /// Property [`Url`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-androidpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-androidpushnotificationtemplate-url).
4285        ///
4286        /// Update type: _Mutable_.
4287        /// AWS CloudFormation doesn't replace the resource when you change this property.
4288        pub url: Option<::Value<String>>,
4289    }
4290
4291    impl ::codec::SerializeValue for AndroidPushNotificationTemplate {
4292        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4293            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4294            if let Some(ref action) = self.action {
4295                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Action", action)?;
4296            }
4297            if let Some(ref body) = self.body {
4298                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
4299            }
4300            if let Some(ref image_icon_url) = self.image_icon_url {
4301                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImageIconUrl", image_icon_url)?;
4302            }
4303            if let Some(ref image_url) = self.image_url {
4304                ::serde::ser::SerializeMap::serialize_entry(&mut map, "ImageUrl", image_url)?;
4305            }
4306            if let Some(ref small_image_icon_url) = self.small_image_icon_url {
4307                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SmallImageIconUrl", small_image_icon_url)?;
4308            }
4309            if let Some(ref sound) = self.sound {
4310                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Sound", sound)?;
4311            }
4312            if let Some(ref title) = self.title {
4313                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Title", title)?;
4314            }
4315            if let Some(ref url) = self.url {
4316                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Url", url)?;
4317            }
4318            ::serde::ser::SerializeMap::end(map)
4319        }
4320    }
4321
4322    impl ::codec::DeserializeValue for AndroidPushNotificationTemplate {
4323        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AndroidPushNotificationTemplate, D::Error> {
4324            struct Visitor;
4325
4326            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4327                type Value = AndroidPushNotificationTemplate;
4328
4329                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4330                    write!(f, "a struct of type AndroidPushNotificationTemplate")
4331                }
4332
4333                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4334                    let mut action: Option<::Value<String>> = None;
4335                    let mut body: Option<::Value<String>> = None;
4336                    let mut image_icon_url: Option<::Value<String>> = None;
4337                    let mut image_url: Option<::Value<String>> = None;
4338                    let mut small_image_icon_url: Option<::Value<String>> = None;
4339                    let mut sound: Option<::Value<String>> = None;
4340                    let mut title: Option<::Value<String>> = None;
4341                    let mut url: Option<::Value<String>> = None;
4342
4343                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4344                        match __cfn_key.as_ref() {
4345                            "Action" => {
4346                                action = ::serde::de::MapAccess::next_value(&mut map)?;
4347                            }
4348                            "Body" => {
4349                                body = ::serde::de::MapAccess::next_value(&mut map)?;
4350                            }
4351                            "ImageIconUrl" => {
4352                                image_icon_url = ::serde::de::MapAccess::next_value(&mut map)?;
4353                            }
4354                            "ImageUrl" => {
4355                                image_url = ::serde::de::MapAccess::next_value(&mut map)?;
4356                            }
4357                            "SmallImageIconUrl" => {
4358                                small_image_icon_url = ::serde::de::MapAccess::next_value(&mut map)?;
4359                            }
4360                            "Sound" => {
4361                                sound = ::serde::de::MapAccess::next_value(&mut map)?;
4362                            }
4363                            "Title" => {
4364                                title = ::serde::de::MapAccess::next_value(&mut map)?;
4365                            }
4366                            "Url" => {
4367                                url = ::serde::de::MapAccess::next_value(&mut map)?;
4368                            }
4369                            _ => {}
4370                        }
4371                    }
4372
4373                    Ok(AndroidPushNotificationTemplate {
4374                        action: action,
4375                        body: body,
4376                        image_icon_url: image_icon_url,
4377                        image_url: image_url,
4378                        small_image_icon_url: small_image_icon_url,
4379                        sound: sound,
4380                        title: title,
4381                        url: url,
4382                    })
4383                }
4384            }
4385
4386            d.deserialize_map(Visitor)
4387        }
4388    }
4389
4390    /// The [`AWS::Pinpoint::PushTemplate.DefaultPushNotificationTemplate`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html) property type.
4391    #[derive(Debug, Default)]
4392    pub struct DefaultPushNotificationTemplate {
4393        /// Property [`Action`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-action).
4394        ///
4395        /// Update type: _Mutable_.
4396        /// AWS CloudFormation doesn't replace the resource when you change this property.
4397        pub action: Option<::Value<String>>,
4398        /// Property [`Body`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-body).
4399        ///
4400        /// Update type: _Mutable_.
4401        /// AWS CloudFormation doesn't replace the resource when you change this property.
4402        pub body: Option<::Value<String>>,
4403        /// Property [`Sound`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-sound).
4404        ///
4405        /// Update type: _Mutable_.
4406        /// AWS CloudFormation doesn't replace the resource when you change this property.
4407        pub sound: Option<::Value<String>>,
4408        /// Property [`Title`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-title).
4409        ///
4410        /// Update type: _Mutable_.
4411        /// AWS CloudFormation doesn't replace the resource when you change this property.
4412        pub title: Option<::Value<String>>,
4413        /// Property [`Url`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-pushtemplate-defaultpushnotificationtemplate.html#cfn-pinpoint-pushtemplate-defaultpushnotificationtemplate-url).
4414        ///
4415        /// Update type: _Mutable_.
4416        /// AWS CloudFormation doesn't replace the resource when you change this property.
4417        pub url: Option<::Value<String>>,
4418    }
4419
4420    impl ::codec::SerializeValue for DefaultPushNotificationTemplate {
4421        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4422            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4423            if let Some(ref action) = self.action {
4424                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Action", action)?;
4425            }
4426            if let Some(ref body) = self.body {
4427                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Body", body)?;
4428            }
4429            if let Some(ref sound) = self.sound {
4430                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Sound", sound)?;
4431            }
4432            if let Some(ref title) = self.title {
4433                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Title", title)?;
4434            }
4435            if let Some(ref url) = self.url {
4436                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Url", url)?;
4437            }
4438            ::serde::ser::SerializeMap::end(map)
4439        }
4440    }
4441
4442    impl ::codec::DeserializeValue for DefaultPushNotificationTemplate {
4443        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<DefaultPushNotificationTemplate, D::Error> {
4444            struct Visitor;
4445
4446            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4447                type Value = DefaultPushNotificationTemplate;
4448
4449                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4450                    write!(f, "a struct of type DefaultPushNotificationTemplate")
4451                }
4452
4453                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4454                    let mut action: Option<::Value<String>> = None;
4455                    let mut body: Option<::Value<String>> = None;
4456                    let mut sound: Option<::Value<String>> = None;
4457                    let mut title: Option<::Value<String>> = None;
4458                    let mut url: Option<::Value<String>> = None;
4459
4460                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4461                        match __cfn_key.as_ref() {
4462                            "Action" => {
4463                                action = ::serde::de::MapAccess::next_value(&mut map)?;
4464                            }
4465                            "Body" => {
4466                                body = ::serde::de::MapAccess::next_value(&mut map)?;
4467                            }
4468                            "Sound" => {
4469                                sound = ::serde::de::MapAccess::next_value(&mut map)?;
4470                            }
4471                            "Title" => {
4472                                title = ::serde::de::MapAccess::next_value(&mut map)?;
4473                            }
4474                            "Url" => {
4475                                url = ::serde::de::MapAccess::next_value(&mut map)?;
4476                            }
4477                            _ => {}
4478                        }
4479                    }
4480
4481                    Ok(DefaultPushNotificationTemplate {
4482                        action: action,
4483                        body: body,
4484                        sound: sound,
4485                        title: title,
4486                        url: url,
4487                    })
4488                }
4489            }
4490
4491            d.deserialize_map(Visitor)
4492        }
4493    }
4494}
4495
4496pub mod segment {
4497    //! Property types for the `Segment` resource.
4498
4499    /// The [`AWS::Pinpoint::Segment.AttributeDimension`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html) property type.
4500    #[derive(Debug, Default)]
4501    pub struct AttributeDimension {
4502        /// Property [`AttributeType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html#cfn-pinpoint-segment-attributedimension-attributetype).
4503        ///
4504        /// Update type: _Mutable_.
4505        /// AWS CloudFormation doesn't replace the resource when you change this property.
4506        pub attribute_type: Option<::Value<String>>,
4507        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-attributedimension.html#cfn-pinpoint-segment-attributedimension-values).
4508        ///
4509        /// Update type: _Mutable_.
4510        /// AWS CloudFormation doesn't replace the resource when you change this property.
4511        pub values: Option<::ValueList<String>>,
4512    }
4513
4514    impl ::codec::SerializeValue for AttributeDimension {
4515        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4516            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4517            if let Some(ref attribute_type) = self.attribute_type {
4518                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AttributeType", attribute_type)?;
4519            }
4520            if let Some(ref values) = self.values {
4521                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
4522            }
4523            ::serde::ser::SerializeMap::end(map)
4524        }
4525    }
4526
4527    impl ::codec::DeserializeValue for AttributeDimension {
4528        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AttributeDimension, D::Error> {
4529            struct Visitor;
4530
4531            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4532                type Value = AttributeDimension;
4533
4534                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4535                    write!(f, "a struct of type AttributeDimension")
4536                }
4537
4538                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4539                    let mut attribute_type: Option<::Value<String>> = None;
4540                    let mut values: Option<::ValueList<String>> = None;
4541
4542                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4543                        match __cfn_key.as_ref() {
4544                            "AttributeType" => {
4545                                attribute_type = ::serde::de::MapAccess::next_value(&mut map)?;
4546                            }
4547                            "Values" => {
4548                                values = ::serde::de::MapAccess::next_value(&mut map)?;
4549                            }
4550                            _ => {}
4551                        }
4552                    }
4553
4554                    Ok(AttributeDimension {
4555                        attribute_type: attribute_type,
4556                        values: values,
4557                    })
4558                }
4559            }
4560
4561            d.deserialize_map(Visitor)
4562        }
4563    }
4564
4565    /// The [`AWS::Pinpoint::Segment.Behavior`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior.html) property type.
4566    #[derive(Debug, Default)]
4567    pub struct Behavior {
4568        /// Property [`Recency`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency).
4569        ///
4570        /// Update type: _Mutable_.
4571        /// AWS CloudFormation doesn't replace the resource when you change this property.
4572        pub recency: Option<::Value<Recency>>,
4573    }
4574
4575    impl ::codec::SerializeValue for Behavior {
4576        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4577            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4578            if let Some(ref recency) = self.recency {
4579                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Recency", recency)?;
4580            }
4581            ::serde::ser::SerializeMap::end(map)
4582        }
4583    }
4584
4585    impl ::codec::DeserializeValue for Behavior {
4586        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Behavior, D::Error> {
4587            struct Visitor;
4588
4589            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4590                type Value = Behavior;
4591
4592                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4593                    write!(f, "a struct of type Behavior")
4594                }
4595
4596                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4597                    let mut recency: Option<::Value<Recency>> = None;
4598
4599                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4600                        match __cfn_key.as_ref() {
4601                            "Recency" => {
4602                                recency = ::serde::de::MapAccess::next_value(&mut map)?;
4603                            }
4604                            _ => {}
4605                        }
4606                    }
4607
4608                    Ok(Behavior {
4609                        recency: recency,
4610                    })
4611                }
4612            }
4613
4614            d.deserialize_map(Visitor)
4615        }
4616    }
4617
4618    /// The [`AWS::Pinpoint::Segment.Coordinates`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html) property type.
4619    #[derive(Debug, Default)]
4620    pub struct Coordinates {
4621        /// Property [`Latitude`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates-latitude).
4622        ///
4623        /// Update type: _Mutable_.
4624        /// AWS CloudFormation doesn't replace the resource when you change this property.
4625        pub latitude: ::Value<f64>,
4626        /// Property [`Longitude`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates-longitude).
4627        ///
4628        /// Update type: _Mutable_.
4629        /// AWS CloudFormation doesn't replace the resource when you change this property.
4630        pub longitude: ::Value<f64>,
4631    }
4632
4633    impl ::codec::SerializeValue for Coordinates {
4634        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4635            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4636            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Latitude", &self.latitude)?;
4637            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Longitude", &self.longitude)?;
4638            ::serde::ser::SerializeMap::end(map)
4639        }
4640    }
4641
4642    impl ::codec::DeserializeValue for Coordinates {
4643        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Coordinates, D::Error> {
4644            struct Visitor;
4645
4646            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4647                type Value = Coordinates;
4648
4649                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4650                    write!(f, "a struct of type Coordinates")
4651                }
4652
4653                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4654                    let mut latitude: Option<::Value<f64>> = None;
4655                    let mut longitude: Option<::Value<f64>> = None;
4656
4657                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4658                        match __cfn_key.as_ref() {
4659                            "Latitude" => {
4660                                latitude = ::serde::de::MapAccess::next_value(&mut map)?;
4661                            }
4662                            "Longitude" => {
4663                                longitude = ::serde::de::MapAccess::next_value(&mut map)?;
4664                            }
4665                            _ => {}
4666                        }
4667                    }
4668
4669                    Ok(Coordinates {
4670                        latitude: latitude.ok_or(::serde::de::Error::missing_field("Latitude"))?,
4671                        longitude: longitude.ok_or(::serde::de::Error::missing_field("Longitude"))?,
4672                    })
4673                }
4674            }
4675
4676            d.deserialize_map(Visitor)
4677        }
4678    }
4679
4680    /// The [`AWS::Pinpoint::Segment.Demographic`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html) property type.
4681    #[derive(Debug, Default)]
4682    pub struct Demographic {
4683        /// Property [`AppVersion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-appversion).
4684        ///
4685        /// Update type: _Mutable_.
4686        /// AWS CloudFormation doesn't replace the resource when you change this property.
4687        pub app_version: Option<::Value<SetDimension>>,
4688        /// Property [`Channel`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-channel).
4689        ///
4690        /// Update type: _Mutable_.
4691        /// AWS CloudFormation doesn't replace the resource when you change this property.
4692        pub channel: Option<::Value<SetDimension>>,
4693        /// Property [`DeviceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-devicetype).
4694        ///
4695        /// Update type: _Mutable_.
4696        /// AWS CloudFormation doesn't replace the resource when you change this property.
4697        pub device_type: Option<::Value<SetDimension>>,
4698        /// Property [`Make`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-make).
4699        ///
4700        /// Update type: _Mutable_.
4701        /// AWS CloudFormation doesn't replace the resource when you change this property.
4702        pub make: Option<::Value<SetDimension>>,
4703        /// Property [`Model`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-model).
4704        ///
4705        /// Update type: _Mutable_.
4706        /// AWS CloudFormation doesn't replace the resource when you change this property.
4707        pub model: Option<::Value<SetDimension>>,
4708        /// Property [`Platform`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-demographic.html#cfn-pinpoint-segment-segmentdimensions-demographic-platform).
4709        ///
4710        /// Update type: _Mutable_.
4711        /// AWS CloudFormation doesn't replace the resource when you change this property.
4712        pub platform: Option<::Value<SetDimension>>,
4713    }
4714
4715    impl ::codec::SerializeValue for Demographic {
4716        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4717            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4718            if let Some(ref app_version) = self.app_version {
4719                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AppVersion", app_version)?;
4720            }
4721            if let Some(ref channel) = self.channel {
4722                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Channel", channel)?;
4723            }
4724            if let Some(ref device_type) = self.device_type {
4725                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DeviceType", device_type)?;
4726            }
4727            if let Some(ref make) = self.make {
4728                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Make", make)?;
4729            }
4730            if let Some(ref model) = self.model {
4731                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Model", model)?;
4732            }
4733            if let Some(ref platform) = self.platform {
4734                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Platform", platform)?;
4735            }
4736            ::serde::ser::SerializeMap::end(map)
4737        }
4738    }
4739
4740    impl ::codec::DeserializeValue for Demographic {
4741        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Demographic, D::Error> {
4742            struct Visitor;
4743
4744            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4745                type Value = Demographic;
4746
4747                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4748                    write!(f, "a struct of type Demographic")
4749                }
4750
4751                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4752                    let mut app_version: Option<::Value<SetDimension>> = None;
4753                    let mut channel: Option<::Value<SetDimension>> = None;
4754                    let mut device_type: Option<::Value<SetDimension>> = None;
4755                    let mut make: Option<::Value<SetDimension>> = None;
4756                    let mut model: Option<::Value<SetDimension>> = None;
4757                    let mut platform: Option<::Value<SetDimension>> = None;
4758
4759                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4760                        match __cfn_key.as_ref() {
4761                            "AppVersion" => {
4762                                app_version = ::serde::de::MapAccess::next_value(&mut map)?;
4763                            }
4764                            "Channel" => {
4765                                channel = ::serde::de::MapAccess::next_value(&mut map)?;
4766                            }
4767                            "DeviceType" => {
4768                                device_type = ::serde::de::MapAccess::next_value(&mut map)?;
4769                            }
4770                            "Make" => {
4771                                make = ::serde::de::MapAccess::next_value(&mut map)?;
4772                            }
4773                            "Model" => {
4774                                model = ::serde::de::MapAccess::next_value(&mut map)?;
4775                            }
4776                            "Platform" => {
4777                                platform = ::serde::de::MapAccess::next_value(&mut map)?;
4778                            }
4779                            _ => {}
4780                        }
4781                    }
4782
4783                    Ok(Demographic {
4784                        app_version: app_version,
4785                        channel: channel,
4786                        device_type: device_type,
4787                        make: make,
4788                        model: model,
4789                        platform: platform,
4790                    })
4791                }
4792            }
4793
4794            d.deserialize_map(Visitor)
4795        }
4796    }
4797
4798    /// The [`AWS::Pinpoint::Segment.GPSPoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html) property type.
4799    #[derive(Debug, Default)]
4800    pub struct GPSPoint {
4801        /// Property [`Coordinates`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-coordinates).
4802        ///
4803        /// Update type: _Mutable_.
4804        /// AWS CloudFormation doesn't replace the resource when you change this property.
4805        pub coordinates: ::Value<Coordinates>,
4806        /// Property [`RangeInKilometers`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location-gpspoint.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint-rangeinkilometers).
4807        ///
4808        /// Update type: _Mutable_.
4809        /// AWS CloudFormation doesn't replace the resource when you change this property.
4810        pub range_in_kilometers: ::Value<f64>,
4811    }
4812
4813    impl ::codec::SerializeValue for GPSPoint {
4814        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4815            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4816            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Coordinates", &self.coordinates)?;
4817            ::serde::ser::SerializeMap::serialize_entry(&mut map, "RangeInKilometers", &self.range_in_kilometers)?;
4818            ::serde::ser::SerializeMap::end(map)
4819        }
4820    }
4821
4822    impl ::codec::DeserializeValue for GPSPoint {
4823        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<GPSPoint, D::Error> {
4824            struct Visitor;
4825
4826            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4827                type Value = GPSPoint;
4828
4829                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4830                    write!(f, "a struct of type GPSPoint")
4831                }
4832
4833                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4834                    let mut coordinates: Option<::Value<Coordinates>> = None;
4835                    let mut range_in_kilometers: Option<::Value<f64>> = None;
4836
4837                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4838                        match __cfn_key.as_ref() {
4839                            "Coordinates" => {
4840                                coordinates = ::serde::de::MapAccess::next_value(&mut map)?;
4841                            }
4842                            "RangeInKilometers" => {
4843                                range_in_kilometers = ::serde::de::MapAccess::next_value(&mut map)?;
4844                            }
4845                            _ => {}
4846                        }
4847                    }
4848
4849                    Ok(GPSPoint {
4850                        coordinates: coordinates.ok_or(::serde::de::Error::missing_field("Coordinates"))?,
4851                        range_in_kilometers: range_in_kilometers.ok_or(::serde::de::Error::missing_field("RangeInKilometers"))?,
4852                    })
4853                }
4854            }
4855
4856            d.deserialize_map(Visitor)
4857        }
4858    }
4859
4860    /// The [`AWS::Pinpoint::Segment.Groups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html) property type.
4861    #[derive(Debug, Default)]
4862    pub struct Groups {
4863        /// Property [`Dimensions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-dimensions).
4864        ///
4865        /// Update type: _Mutable_.
4866        /// AWS CloudFormation doesn't replace the resource when you change this property.
4867        pub dimensions: Option<::ValueList<SegmentDimensions>>,
4868        /// Property [`SourceSegments`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments).
4869        ///
4870        /// Update type: _Mutable_.
4871        /// AWS CloudFormation doesn't replace the resource when you change this property.
4872        pub source_segments: Option<::ValueList<SourceSegments>>,
4873        /// Property [`SourceType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-sourcetype).
4874        ///
4875        /// Update type: _Mutable_.
4876        /// AWS CloudFormation doesn't replace the resource when you change this property.
4877        pub source_type: Option<::Value<String>>,
4878        /// Property [`Type`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups.html#cfn-pinpoint-segment-segmentgroups-groups-type).
4879        ///
4880        /// Update type: _Mutable_.
4881        /// AWS CloudFormation doesn't replace the resource when you change this property.
4882        pub r#type: Option<::Value<String>>,
4883    }
4884
4885    impl ::codec::SerializeValue for Groups {
4886        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4887            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4888            if let Some(ref dimensions) = self.dimensions {
4889                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Dimensions", dimensions)?;
4890            }
4891            if let Some(ref source_segments) = self.source_segments {
4892                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SourceSegments", source_segments)?;
4893            }
4894            if let Some(ref source_type) = self.source_type {
4895                ::serde::ser::SerializeMap::serialize_entry(&mut map, "SourceType", source_type)?;
4896            }
4897            if let Some(ref r#type) = self.r#type {
4898                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Type", r#type)?;
4899            }
4900            ::serde::ser::SerializeMap::end(map)
4901        }
4902    }
4903
4904    impl ::codec::DeserializeValue for Groups {
4905        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Groups, D::Error> {
4906            struct Visitor;
4907
4908            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4909                type Value = Groups;
4910
4911                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4912                    write!(f, "a struct of type Groups")
4913                }
4914
4915                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4916                    let mut dimensions: Option<::ValueList<SegmentDimensions>> = None;
4917                    let mut source_segments: Option<::ValueList<SourceSegments>> = None;
4918                    let mut source_type: Option<::Value<String>> = None;
4919                    let mut r#type: Option<::Value<String>> = None;
4920
4921                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4922                        match __cfn_key.as_ref() {
4923                            "Dimensions" => {
4924                                dimensions = ::serde::de::MapAccess::next_value(&mut map)?;
4925                            }
4926                            "SourceSegments" => {
4927                                source_segments = ::serde::de::MapAccess::next_value(&mut map)?;
4928                            }
4929                            "SourceType" => {
4930                                source_type = ::serde::de::MapAccess::next_value(&mut map)?;
4931                            }
4932                            "Type" => {
4933                                r#type = ::serde::de::MapAccess::next_value(&mut map)?;
4934                            }
4935                            _ => {}
4936                        }
4937                    }
4938
4939                    Ok(Groups {
4940                        dimensions: dimensions,
4941                        source_segments: source_segments,
4942                        source_type: source_type,
4943                        r#type: r#type,
4944                    })
4945                }
4946            }
4947
4948            d.deserialize_map(Visitor)
4949        }
4950    }
4951
4952    /// The [`AWS::Pinpoint::Segment.Location`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html) property type.
4953    #[derive(Debug, Default)]
4954    pub struct Location {
4955        /// Property [`Country`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html#cfn-pinpoint-segment-segmentdimensions-location-country).
4956        ///
4957        /// Update type: _Mutable_.
4958        /// AWS CloudFormation doesn't replace the resource when you change this property.
4959        pub country: Option<::Value<SetDimension>>,
4960        /// Property [`GPSPoint`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-location.html#cfn-pinpoint-segment-segmentdimensions-location-gpspoint).
4961        ///
4962        /// Update type: _Mutable_.
4963        /// AWS CloudFormation doesn't replace the resource when you change this property.
4964        pub gps_point: Option<::Value<GPSPoint>>,
4965    }
4966
4967    impl ::codec::SerializeValue for Location {
4968        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
4969            let mut map = ::serde::Serializer::serialize_map(s, None)?;
4970            if let Some(ref country) = self.country {
4971                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Country", country)?;
4972            }
4973            if let Some(ref gps_point) = self.gps_point {
4974                ::serde::ser::SerializeMap::serialize_entry(&mut map, "GPSPoint", gps_point)?;
4975            }
4976            ::serde::ser::SerializeMap::end(map)
4977        }
4978    }
4979
4980    impl ::codec::DeserializeValue for Location {
4981        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Location, D::Error> {
4982            struct Visitor;
4983
4984            impl<'de> ::serde::de::Visitor<'de> for Visitor {
4985                type Value = Location;
4986
4987                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4988                    write!(f, "a struct of type Location")
4989                }
4990
4991                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
4992                    let mut country: Option<::Value<SetDimension>> = None;
4993                    let mut gps_point: Option<::Value<GPSPoint>> = None;
4994
4995                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
4996                        match __cfn_key.as_ref() {
4997                            "Country" => {
4998                                country = ::serde::de::MapAccess::next_value(&mut map)?;
4999                            }
5000                            "GPSPoint" => {
5001                                gps_point = ::serde::de::MapAccess::next_value(&mut map)?;
5002                            }
5003                            _ => {}
5004                        }
5005                    }
5006
5007                    Ok(Location {
5008                        country: country,
5009                        gps_point: gps_point,
5010                    })
5011                }
5012            }
5013
5014            d.deserialize_map(Visitor)
5015        }
5016    }
5017
5018    /// The [`AWS::Pinpoint::Segment.Recency`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html) property type.
5019    #[derive(Debug, Default)]
5020    pub struct Recency {
5021        /// Property [`Duration`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency-duration).
5022        ///
5023        /// Update type: _Mutable_.
5024        /// AWS CloudFormation doesn't replace the resource when you change this property.
5025        pub duration: ::Value<String>,
5026        /// Property [`RecencyType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions-behavior-recency.html#cfn-pinpoint-segment-segmentdimensions-behavior-recency-recencytype).
5027        ///
5028        /// Update type: _Mutable_.
5029        /// AWS CloudFormation doesn't replace the resource when you change this property.
5030        pub recency_type: ::Value<String>,
5031    }
5032
5033    impl ::codec::SerializeValue for Recency {
5034        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
5035            let mut map = ::serde::Serializer::serialize_map(s, None)?;
5036            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Duration", &self.duration)?;
5037            ::serde::ser::SerializeMap::serialize_entry(&mut map, "RecencyType", &self.recency_type)?;
5038            ::serde::ser::SerializeMap::end(map)
5039        }
5040    }
5041
5042    impl ::codec::DeserializeValue for Recency {
5043        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<Recency, D::Error> {
5044            struct Visitor;
5045
5046            impl<'de> ::serde::de::Visitor<'de> for Visitor {
5047                type Value = Recency;
5048
5049                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5050                    write!(f, "a struct of type Recency")
5051                }
5052
5053                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
5054                    let mut duration: Option<::Value<String>> = None;
5055                    let mut recency_type: Option<::Value<String>> = None;
5056
5057                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
5058                        match __cfn_key.as_ref() {
5059                            "Duration" => {
5060                                duration = ::serde::de::MapAccess::next_value(&mut map)?;
5061                            }
5062                            "RecencyType" => {
5063                                recency_type = ::serde::de::MapAccess::next_value(&mut map)?;
5064                            }
5065                            _ => {}
5066                        }
5067                    }
5068
5069                    Ok(Recency {
5070                        duration: duration.ok_or(::serde::de::Error::missing_field("Duration"))?,
5071                        recency_type: recency_type.ok_or(::serde::de::Error::missing_field("RecencyType"))?,
5072                    })
5073                }
5074            }
5075
5076            d.deserialize_map(Visitor)
5077        }
5078    }
5079
5080    /// The [`AWS::Pinpoint::Segment.SegmentDimensions`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html) property type.
5081    #[derive(Debug, Default)]
5082    pub struct SegmentDimensions {
5083        /// Property [`Attributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-attributes).
5084        ///
5085        /// Update type: _Mutable_.
5086        /// AWS CloudFormation doesn't replace the resource when you change this property.
5087        pub attributes: Option<::Value<::json::Value>>,
5088        /// Property [`Behavior`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-behavior).
5089        ///
5090        /// Update type: _Mutable_.
5091        /// AWS CloudFormation doesn't replace the resource when you change this property.
5092        pub behavior: Option<::Value<Behavior>>,
5093        /// Property [`Demographic`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-demographic).
5094        ///
5095        /// Update type: _Mutable_.
5096        /// AWS CloudFormation doesn't replace the resource when you change this property.
5097        pub demographic: Option<::Value<Demographic>>,
5098        /// Property [`Location`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-location).
5099        ///
5100        /// Update type: _Mutable_.
5101        /// AWS CloudFormation doesn't replace the resource when you change this property.
5102        pub location: Option<::Value<Location>>,
5103        /// Property [`Metrics`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-metrics).
5104        ///
5105        /// Update type: _Mutable_.
5106        /// AWS CloudFormation doesn't replace the resource when you change this property.
5107        pub metrics: Option<::Value<::json::Value>>,
5108        /// Property [`UserAttributes`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentdimensions.html#cfn-pinpoint-segment-segmentdimensions-userattributes).
5109        ///
5110        /// Update type: _Mutable_.
5111        /// AWS CloudFormation doesn't replace the resource when you change this property.
5112        pub user_attributes: Option<::Value<::json::Value>>,
5113    }
5114
5115    impl ::codec::SerializeValue for SegmentDimensions {
5116        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
5117            let mut map = ::serde::Serializer::serialize_map(s, None)?;
5118            if let Some(ref attributes) = self.attributes {
5119                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Attributes", attributes)?;
5120            }
5121            if let Some(ref behavior) = self.behavior {
5122                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Behavior", behavior)?;
5123            }
5124            if let Some(ref demographic) = self.demographic {
5125                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Demographic", demographic)?;
5126            }
5127            if let Some(ref location) = self.location {
5128                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Location", location)?;
5129            }
5130            if let Some(ref metrics) = self.metrics {
5131                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Metrics", metrics)?;
5132            }
5133            if let Some(ref user_attributes) = self.user_attributes {
5134                ::serde::ser::SerializeMap::serialize_entry(&mut map, "UserAttributes", user_attributes)?;
5135            }
5136            ::serde::ser::SerializeMap::end(map)
5137        }
5138    }
5139
5140    impl ::codec::DeserializeValue for SegmentDimensions {
5141        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SegmentDimensions, D::Error> {
5142            struct Visitor;
5143
5144            impl<'de> ::serde::de::Visitor<'de> for Visitor {
5145                type Value = SegmentDimensions;
5146
5147                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5148                    write!(f, "a struct of type SegmentDimensions")
5149                }
5150
5151                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
5152                    let mut attributes: Option<::Value<::json::Value>> = None;
5153                    let mut behavior: Option<::Value<Behavior>> = None;
5154                    let mut demographic: Option<::Value<Demographic>> = None;
5155                    let mut location: Option<::Value<Location>> = None;
5156                    let mut metrics: Option<::Value<::json::Value>> = None;
5157                    let mut user_attributes: Option<::Value<::json::Value>> = None;
5158
5159                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
5160                        match __cfn_key.as_ref() {
5161                            "Attributes" => {
5162                                attributes = ::serde::de::MapAccess::next_value(&mut map)?;
5163                            }
5164                            "Behavior" => {
5165                                behavior = ::serde::de::MapAccess::next_value(&mut map)?;
5166                            }
5167                            "Demographic" => {
5168                                demographic = ::serde::de::MapAccess::next_value(&mut map)?;
5169                            }
5170                            "Location" => {
5171                                location = ::serde::de::MapAccess::next_value(&mut map)?;
5172                            }
5173                            "Metrics" => {
5174                                metrics = ::serde::de::MapAccess::next_value(&mut map)?;
5175                            }
5176                            "UserAttributes" => {
5177                                user_attributes = ::serde::de::MapAccess::next_value(&mut map)?;
5178                            }
5179                            _ => {}
5180                        }
5181                    }
5182
5183                    Ok(SegmentDimensions {
5184                        attributes: attributes,
5185                        behavior: behavior,
5186                        demographic: demographic,
5187                        location: location,
5188                        metrics: metrics,
5189                        user_attributes: user_attributes,
5190                    })
5191                }
5192            }
5193
5194            d.deserialize_map(Visitor)
5195        }
5196    }
5197
5198    /// The [`AWS::Pinpoint::Segment.SegmentGroups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html) property type.
5199    #[derive(Debug, Default)]
5200    pub struct SegmentGroups {
5201        /// Property [`Groups`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html#cfn-pinpoint-segment-segmentgroups-groups).
5202        ///
5203        /// Update type: _Mutable_.
5204        /// AWS CloudFormation doesn't replace the resource when you change this property.
5205        pub groups: Option<::ValueList<Groups>>,
5206        /// Property [`Include`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups.html#cfn-pinpoint-segment-segmentgroups-include).
5207        ///
5208        /// Update type: _Mutable_.
5209        /// AWS CloudFormation doesn't replace the resource when you change this property.
5210        pub include: Option<::Value<String>>,
5211    }
5212
5213    impl ::codec::SerializeValue for SegmentGroups {
5214        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
5215            let mut map = ::serde::Serializer::serialize_map(s, None)?;
5216            if let Some(ref groups) = self.groups {
5217                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Groups", groups)?;
5218            }
5219            if let Some(ref include) = self.include {
5220                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Include", include)?;
5221            }
5222            ::serde::ser::SerializeMap::end(map)
5223        }
5224    }
5225
5226    impl ::codec::DeserializeValue for SegmentGroups {
5227        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SegmentGroups, D::Error> {
5228            struct Visitor;
5229
5230            impl<'de> ::serde::de::Visitor<'de> for Visitor {
5231                type Value = SegmentGroups;
5232
5233                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5234                    write!(f, "a struct of type SegmentGroups")
5235                }
5236
5237                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
5238                    let mut groups: Option<::ValueList<Groups>> = None;
5239                    let mut include: Option<::Value<String>> = None;
5240
5241                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
5242                        match __cfn_key.as_ref() {
5243                            "Groups" => {
5244                                groups = ::serde::de::MapAccess::next_value(&mut map)?;
5245                            }
5246                            "Include" => {
5247                                include = ::serde::de::MapAccess::next_value(&mut map)?;
5248                            }
5249                            _ => {}
5250                        }
5251                    }
5252
5253                    Ok(SegmentGroups {
5254                        groups: groups,
5255                        include: include,
5256                    })
5257                }
5258            }
5259
5260            d.deserialize_map(Visitor)
5261        }
5262    }
5263
5264    /// The [`AWS::Pinpoint::Segment.SetDimension`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html) property type.
5265    #[derive(Debug, Default)]
5266    pub struct SetDimension {
5267        /// Property [`DimensionType`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html#cfn-pinpoint-segment-setdimension-dimensiontype).
5268        ///
5269        /// Update type: _Mutable_.
5270        /// AWS CloudFormation doesn't replace the resource when you change this property.
5271        pub dimension_type: Option<::Value<String>>,
5272        /// Property [`Values`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-setdimension.html#cfn-pinpoint-segment-setdimension-values).
5273        ///
5274        /// Update type: _Mutable_.
5275        /// AWS CloudFormation doesn't replace the resource when you change this property.
5276        pub values: Option<::ValueList<String>>,
5277    }
5278
5279    impl ::codec::SerializeValue for SetDimension {
5280        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
5281            let mut map = ::serde::Serializer::serialize_map(s, None)?;
5282            if let Some(ref dimension_type) = self.dimension_type {
5283                ::serde::ser::SerializeMap::serialize_entry(&mut map, "DimensionType", dimension_type)?;
5284            }
5285            if let Some(ref values) = self.values {
5286                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Values", values)?;
5287            }
5288            ::serde::ser::SerializeMap::end(map)
5289        }
5290    }
5291
5292    impl ::codec::DeserializeValue for SetDimension {
5293        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SetDimension, D::Error> {
5294            struct Visitor;
5295
5296            impl<'de> ::serde::de::Visitor<'de> for Visitor {
5297                type Value = SetDimension;
5298
5299                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5300                    write!(f, "a struct of type SetDimension")
5301                }
5302
5303                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
5304                    let mut dimension_type: Option<::Value<String>> = None;
5305                    let mut values: Option<::ValueList<String>> = None;
5306
5307                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
5308                        match __cfn_key.as_ref() {
5309                            "DimensionType" => {
5310                                dimension_type = ::serde::de::MapAccess::next_value(&mut map)?;
5311                            }
5312                            "Values" => {
5313                                values = ::serde::de::MapAccess::next_value(&mut map)?;
5314                            }
5315                            _ => {}
5316                        }
5317                    }
5318
5319                    Ok(SetDimension {
5320                        dimension_type: dimension_type,
5321                        values: values,
5322                    })
5323                }
5324            }
5325
5326            d.deserialize_map(Visitor)
5327        }
5328    }
5329
5330    /// The [`AWS::Pinpoint::Segment.SourceSegments`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html) property type.
5331    #[derive(Debug, Default)]
5332    pub struct SourceSegments {
5333        /// Property [`Id`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments-id).
5334        ///
5335        /// Update type: _Mutable_.
5336        /// AWS CloudFormation doesn't replace the resource when you change this property.
5337        pub id: ::Value<String>,
5338        /// Property [`Version`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-pinpoint-segment-segmentgroups-groups-sourcesegments.html#cfn-pinpoint-segment-segmentgroups-groups-sourcesegments-version).
5339        ///
5340        /// Update type: _Mutable_.
5341        /// AWS CloudFormation doesn't replace the resource when you change this property.
5342        pub version: Option<::Value<u32>>,
5343    }
5344
5345    impl ::codec::SerializeValue for SourceSegments {
5346        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
5347            let mut map = ::serde::Serializer::serialize_map(s, None)?;
5348            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Id", &self.id)?;
5349            if let Some(ref version) = self.version {
5350                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Version", version)?;
5351            }
5352            ::serde::ser::SerializeMap::end(map)
5353        }
5354    }
5355
5356    impl ::codec::DeserializeValue for SourceSegments {
5357        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SourceSegments, D::Error> {
5358            struct Visitor;
5359
5360            impl<'de> ::serde::de::Visitor<'de> for Visitor {
5361                type Value = SourceSegments;
5362
5363                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
5364                    write!(f, "a struct of type SourceSegments")
5365                }
5366
5367                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
5368                    let mut id: Option<::Value<String>> = None;
5369                    let mut version: Option<::Value<u32>> = None;
5370
5371                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
5372                        match __cfn_key.as_ref() {
5373                            "Id" => {
5374                                id = ::serde::de::MapAccess::next_value(&mut map)?;
5375                            }
5376                            "Version" => {
5377                                version = ::serde::de::MapAccess::next_value(&mut map)?;
5378                            }
5379                            _ => {}
5380                        }
5381                    }
5382
5383                    Ok(SourceSegments {
5384                        id: id.ok_or(::serde::de::Error::missing_field("Id"))?,
5385                        version: version,
5386                    })
5387                }
5388            }
5389
5390            d.deserialize_map(Visitor)
5391        }
5392    }
5393}