cfn/aws/
amplify.rs

1//! Types for the `Amplify` service.
2
3/// The [`AWS::Amplify::App`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html) resource type.
4#[derive(Debug, Default)]
5pub struct App {
6    properties: AppProperties
7}
8
9/// Properties for the `App` resource.
10#[derive(Debug, Default)]
11pub struct AppProperties {
12    /// Property [`AccessToken`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-accesstoken).
13    ///
14    /// Update type: _Mutable_.
15    /// AWS CloudFormation doesn't replace the resource when you change this property.
16    pub access_token: Option<::Value<String>>,
17    /// Property [`AutoBranchCreationConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-autobranchcreationconfig).
18    ///
19    /// Update type: _Mutable_.
20    /// AWS CloudFormation doesn't replace the resource when you change this property.
21    pub auto_branch_creation_config: Option<::Value<self::app::AutoBranchCreationConfig>>,
22    /// Property [`BasicAuthConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-basicauthconfig).
23    ///
24    /// Update type: _Mutable_.
25    /// AWS CloudFormation doesn't replace the resource when you change this property.
26    pub basic_auth_config: Option<::Value<self::app::BasicAuthConfig>>,
27    /// Property [`BuildSpec`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-buildspec).
28    ///
29    /// Update type: _Mutable_.
30    /// AWS CloudFormation doesn't replace the resource when you change this property.
31    pub build_spec: Option<::Value<String>>,
32    /// Property [`CustomHeaders`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customheaders).
33    ///
34    /// Update type: _Mutable_.
35    /// AWS CloudFormation doesn't replace the resource when you change this property.
36    pub custom_headers: Option<::Value<String>>,
37    /// Property [`CustomRules`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-customrules).
38    ///
39    /// Update type: _Mutable_.
40    /// AWS CloudFormation doesn't replace the resource when you change this property.
41    pub custom_rules: Option<::ValueList<self::app::CustomRule>>,
42    /// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-description).
43    ///
44    /// Update type: _Mutable_.
45    /// AWS CloudFormation doesn't replace the resource when you change this property.
46    pub description: Option<::Value<String>>,
47    /// Property [`EnableBranchAutoDeletion`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-enablebranchautodeletion).
48    ///
49    /// Update type: _Mutable_.
50    /// AWS CloudFormation doesn't replace the resource when you change this property.
51    pub enable_branch_auto_deletion: Option<::Value<bool>>,
52    /// Property [`EnvironmentVariables`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-environmentvariables).
53    ///
54    /// Update type: _Mutable_.
55    /// AWS CloudFormation doesn't replace the resource when you change this property.
56    pub environment_variables: Option<::ValueList<self::app::EnvironmentVariable>>,
57    /// Property [`IAMServiceRole`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-iamservicerole).
58    ///
59    /// Update type: _Mutable_.
60    /// AWS CloudFormation doesn't replace the resource when you change this property.
61    pub iam_service_role: Option<::Value<String>>,
62    /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-name).
63    ///
64    /// Update type: _Mutable_.
65    /// AWS CloudFormation doesn't replace the resource when you change this property.
66    pub name: ::Value<String>,
67    /// Property [`OauthToken`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-oauthtoken).
68    ///
69    /// Update type: _Mutable_.
70    /// AWS CloudFormation doesn't replace the resource when you change this property.
71    pub oauth_token: Option<::Value<String>>,
72    /// Property [`Repository`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-repository).
73    ///
74    /// Update type: _Mutable_.
75    /// AWS CloudFormation doesn't replace the resource when you change this property.
76    pub repository: Option<::Value<String>>,
77    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-app.html#cfn-amplify-app-tags).
78    ///
79    /// Update type: _Mutable_.
80    /// AWS CloudFormation doesn't replace the resource when you change this property.
81    pub tags: Option<::ValueList<::Tag>>,
82}
83
84impl ::serde::Serialize for AppProperties {
85    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
86        let mut map = ::serde::Serializer::serialize_map(s, None)?;
87        if let Some(ref access_token) = self.access_token {
88            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AccessToken", access_token)?;
89        }
90        if let Some(ref auto_branch_creation_config) = self.auto_branch_creation_config {
91            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoBranchCreationConfig", auto_branch_creation_config)?;
92        }
93        if let Some(ref basic_auth_config) = self.basic_auth_config {
94            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BasicAuthConfig", basic_auth_config)?;
95        }
96        if let Some(ref build_spec) = self.build_spec {
97            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BuildSpec", build_spec)?;
98        }
99        if let Some(ref custom_headers) = self.custom_headers {
100            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CustomHeaders", custom_headers)?;
101        }
102        if let Some(ref custom_rules) = self.custom_rules {
103            ::serde::ser::SerializeMap::serialize_entry(&mut map, "CustomRules", custom_rules)?;
104        }
105        if let Some(ref description) = self.description {
106            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Description", description)?;
107        }
108        if let Some(ref enable_branch_auto_deletion) = self.enable_branch_auto_deletion {
109            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableBranchAutoDeletion", enable_branch_auto_deletion)?;
110        }
111        if let Some(ref environment_variables) = self.environment_variables {
112            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnvironmentVariables", environment_variables)?;
113        }
114        if let Some(ref iam_service_role) = self.iam_service_role {
115            ::serde::ser::SerializeMap::serialize_entry(&mut map, "IAMServiceRole", iam_service_role)?;
116        }
117        ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
118        if let Some(ref oauth_token) = self.oauth_token {
119            ::serde::ser::SerializeMap::serialize_entry(&mut map, "OauthToken", oauth_token)?;
120        }
121        if let Some(ref repository) = self.repository {
122            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Repository", repository)?;
123        }
124        if let Some(ref tags) = self.tags {
125            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
126        }
127        ::serde::ser::SerializeMap::end(map)
128    }
129}
130
131impl<'de> ::serde::Deserialize<'de> for AppProperties {
132    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<AppProperties, D::Error> {
133        struct Visitor;
134
135        impl<'de> ::serde::de::Visitor<'de> for Visitor {
136            type Value = AppProperties;
137
138            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
139                write!(f, "a struct of type AppProperties")
140            }
141
142            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
143                let mut access_token: Option<::Value<String>> = None;
144                let mut auto_branch_creation_config: Option<::Value<self::app::AutoBranchCreationConfig>> = None;
145                let mut basic_auth_config: Option<::Value<self::app::BasicAuthConfig>> = None;
146                let mut build_spec: Option<::Value<String>> = None;
147                let mut custom_headers: Option<::Value<String>> = None;
148                let mut custom_rules: Option<::ValueList<self::app::CustomRule>> = None;
149                let mut description: Option<::Value<String>> = None;
150                let mut enable_branch_auto_deletion: Option<::Value<bool>> = None;
151                let mut environment_variables: Option<::ValueList<self::app::EnvironmentVariable>> = None;
152                let mut iam_service_role: Option<::Value<String>> = None;
153                let mut name: Option<::Value<String>> = None;
154                let mut oauth_token: Option<::Value<String>> = None;
155                let mut repository: Option<::Value<String>> = None;
156                let mut tags: Option<::ValueList<::Tag>> = None;
157
158                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
159                    match __cfn_key.as_ref() {
160                        "AccessToken" => {
161                            access_token = ::serde::de::MapAccess::next_value(&mut map)?;
162                        }
163                        "AutoBranchCreationConfig" => {
164                            auto_branch_creation_config = ::serde::de::MapAccess::next_value(&mut map)?;
165                        }
166                        "BasicAuthConfig" => {
167                            basic_auth_config = ::serde::de::MapAccess::next_value(&mut map)?;
168                        }
169                        "BuildSpec" => {
170                            build_spec = ::serde::de::MapAccess::next_value(&mut map)?;
171                        }
172                        "CustomHeaders" => {
173                            custom_headers = ::serde::de::MapAccess::next_value(&mut map)?;
174                        }
175                        "CustomRules" => {
176                            custom_rules = ::serde::de::MapAccess::next_value(&mut map)?;
177                        }
178                        "Description" => {
179                            description = ::serde::de::MapAccess::next_value(&mut map)?;
180                        }
181                        "EnableBranchAutoDeletion" => {
182                            enable_branch_auto_deletion = ::serde::de::MapAccess::next_value(&mut map)?;
183                        }
184                        "EnvironmentVariables" => {
185                            environment_variables = ::serde::de::MapAccess::next_value(&mut map)?;
186                        }
187                        "IAMServiceRole" => {
188                            iam_service_role = ::serde::de::MapAccess::next_value(&mut map)?;
189                        }
190                        "Name" => {
191                            name = ::serde::de::MapAccess::next_value(&mut map)?;
192                        }
193                        "OauthToken" => {
194                            oauth_token = ::serde::de::MapAccess::next_value(&mut map)?;
195                        }
196                        "Repository" => {
197                            repository = ::serde::de::MapAccess::next_value(&mut map)?;
198                        }
199                        "Tags" => {
200                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
201                        }
202                        _ => {}
203                    }
204                }
205
206                Ok(AppProperties {
207                    access_token: access_token,
208                    auto_branch_creation_config: auto_branch_creation_config,
209                    basic_auth_config: basic_auth_config,
210                    build_spec: build_spec,
211                    custom_headers: custom_headers,
212                    custom_rules: custom_rules,
213                    description: description,
214                    enable_branch_auto_deletion: enable_branch_auto_deletion,
215                    environment_variables: environment_variables,
216                    iam_service_role: iam_service_role,
217                    name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
218                    oauth_token: oauth_token,
219                    repository: repository,
220                    tags: tags,
221                })
222            }
223        }
224
225        d.deserialize_map(Visitor)
226    }
227}
228
229impl ::Resource for App {
230    type Properties = AppProperties;
231    const TYPE: &'static str = "AWS::Amplify::App";
232    fn properties(&self) -> &AppProperties {
233        &self.properties
234    }
235    fn properties_mut(&mut self) -> &mut AppProperties {
236        &mut self.properties
237    }
238}
239
240impl ::private::Sealed for App {}
241
242impl From<AppProperties> for App {
243    fn from(properties: AppProperties) -> App {
244        App { properties }
245    }
246}
247
248/// The [`AWS::Amplify::Branch`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html) resource type.
249#[derive(Debug, Default)]
250pub struct Branch {
251    properties: BranchProperties
252}
253
254/// Properties for the `Branch` resource.
255#[derive(Debug, Default)]
256pub struct BranchProperties {
257    /// Property [`AppId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-appid).
258    ///
259    /// Update type: _Immutable_.
260    /// AWS CloudFormation replaces the resource when you change this property.
261    pub app_id: ::Value<String>,
262    /// Property [`BasicAuthConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-basicauthconfig).
263    ///
264    /// Update type: _Mutable_.
265    /// AWS CloudFormation doesn't replace the resource when you change this property.
266    pub basic_auth_config: Option<::Value<self::branch::BasicAuthConfig>>,
267    /// Property [`BranchName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-branchname).
268    ///
269    /// Update type: _Immutable_.
270    /// AWS CloudFormation replaces the resource when you change this property.
271    pub branch_name: ::Value<String>,
272    /// Property [`BuildSpec`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-buildspec).
273    ///
274    /// Update type: _Mutable_.
275    /// AWS CloudFormation doesn't replace the resource when you change this property.
276    pub build_spec: Option<::Value<String>>,
277    /// Property [`Description`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-description).
278    ///
279    /// Update type: _Mutable_.
280    /// AWS CloudFormation doesn't replace the resource when you change this property.
281    pub description: Option<::Value<String>>,
282    /// Property [`EnableAutoBuild`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enableautobuild).
283    ///
284    /// Update type: _Mutable_.
285    /// AWS CloudFormation doesn't replace the resource when you change this property.
286    pub enable_auto_build: Option<::Value<bool>>,
287    /// Property [`EnablePerformanceMode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enableperformancemode).
288    ///
289    /// Update type: _Mutable_.
290    /// AWS CloudFormation doesn't replace the resource when you change this property.
291    pub enable_performance_mode: Option<::Value<bool>>,
292    /// Property [`EnablePullRequestPreview`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-enablepullrequestpreview).
293    ///
294    /// Update type: _Mutable_.
295    /// AWS CloudFormation doesn't replace the resource when you change this property.
296    pub enable_pull_request_preview: Option<::Value<bool>>,
297    /// Property [`EnvironmentVariables`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-environmentvariables).
298    ///
299    /// Update type: _Mutable_.
300    /// AWS CloudFormation doesn't replace the resource when you change this property.
301    pub environment_variables: Option<::ValueList<self::branch::EnvironmentVariable>>,
302    /// Property [`PullRequestEnvironmentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-pullrequestenvironmentname).
303    ///
304    /// Update type: _Mutable_.
305    /// AWS CloudFormation doesn't replace the resource when you change this property.
306    pub pull_request_environment_name: Option<::Value<String>>,
307    /// Property [`Stage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-stage).
308    ///
309    /// Update type: _Mutable_.
310    /// AWS CloudFormation doesn't replace the resource when you change this property.
311    pub stage: Option<::Value<String>>,
312    /// Property [`Tags`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-tags).
313    ///
314    /// Update type: _Mutable_.
315    /// AWS CloudFormation doesn't replace the resource when you change this property.
316    pub tags: Option<::ValueList<::Tag>>,
317}
318
319impl ::serde::Serialize for BranchProperties {
320    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
321        let mut map = ::serde::Serializer::serialize_map(s, None)?;
322        ::serde::ser::SerializeMap::serialize_entry(&mut map, "AppId", &self.app_id)?;
323        if let Some(ref basic_auth_config) = self.basic_auth_config {
324            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BasicAuthConfig", basic_auth_config)?;
325        }
326        ::serde::ser::SerializeMap::serialize_entry(&mut map, "BranchName", &self.branch_name)?;
327        if let Some(ref build_spec) = self.build_spec {
328            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BuildSpec", build_spec)?;
329        }
330        if let Some(ref description) = self.description {
331            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Description", description)?;
332        }
333        if let Some(ref enable_auto_build) = self.enable_auto_build {
334            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableAutoBuild", enable_auto_build)?;
335        }
336        if let Some(ref enable_performance_mode) = self.enable_performance_mode {
337            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnablePerformanceMode", enable_performance_mode)?;
338        }
339        if let Some(ref enable_pull_request_preview) = self.enable_pull_request_preview {
340            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnablePullRequestPreview", enable_pull_request_preview)?;
341        }
342        if let Some(ref environment_variables) = self.environment_variables {
343            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnvironmentVariables", environment_variables)?;
344        }
345        if let Some(ref pull_request_environment_name) = self.pull_request_environment_name {
346            ::serde::ser::SerializeMap::serialize_entry(&mut map, "PullRequestEnvironmentName", pull_request_environment_name)?;
347        }
348        if let Some(ref stage) = self.stage {
349            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Stage", stage)?;
350        }
351        if let Some(ref tags) = self.tags {
352            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Tags", tags)?;
353        }
354        ::serde::ser::SerializeMap::end(map)
355    }
356}
357
358impl<'de> ::serde::Deserialize<'de> for BranchProperties {
359    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<BranchProperties, D::Error> {
360        struct Visitor;
361
362        impl<'de> ::serde::de::Visitor<'de> for Visitor {
363            type Value = BranchProperties;
364
365            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
366                write!(f, "a struct of type BranchProperties")
367            }
368
369            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
370                let mut app_id: Option<::Value<String>> = None;
371                let mut basic_auth_config: Option<::Value<self::branch::BasicAuthConfig>> = None;
372                let mut branch_name: Option<::Value<String>> = None;
373                let mut build_spec: Option<::Value<String>> = None;
374                let mut description: Option<::Value<String>> = None;
375                let mut enable_auto_build: Option<::Value<bool>> = None;
376                let mut enable_performance_mode: Option<::Value<bool>> = None;
377                let mut enable_pull_request_preview: Option<::Value<bool>> = None;
378                let mut environment_variables: Option<::ValueList<self::branch::EnvironmentVariable>> = None;
379                let mut pull_request_environment_name: Option<::Value<String>> = None;
380                let mut stage: Option<::Value<String>> = None;
381                let mut tags: Option<::ValueList<::Tag>> = None;
382
383                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
384                    match __cfn_key.as_ref() {
385                        "AppId" => {
386                            app_id = ::serde::de::MapAccess::next_value(&mut map)?;
387                        }
388                        "BasicAuthConfig" => {
389                            basic_auth_config = ::serde::de::MapAccess::next_value(&mut map)?;
390                        }
391                        "BranchName" => {
392                            branch_name = ::serde::de::MapAccess::next_value(&mut map)?;
393                        }
394                        "BuildSpec" => {
395                            build_spec = ::serde::de::MapAccess::next_value(&mut map)?;
396                        }
397                        "Description" => {
398                            description = ::serde::de::MapAccess::next_value(&mut map)?;
399                        }
400                        "EnableAutoBuild" => {
401                            enable_auto_build = ::serde::de::MapAccess::next_value(&mut map)?;
402                        }
403                        "EnablePerformanceMode" => {
404                            enable_performance_mode = ::serde::de::MapAccess::next_value(&mut map)?;
405                        }
406                        "EnablePullRequestPreview" => {
407                            enable_pull_request_preview = ::serde::de::MapAccess::next_value(&mut map)?;
408                        }
409                        "EnvironmentVariables" => {
410                            environment_variables = ::serde::de::MapAccess::next_value(&mut map)?;
411                        }
412                        "PullRequestEnvironmentName" => {
413                            pull_request_environment_name = ::serde::de::MapAccess::next_value(&mut map)?;
414                        }
415                        "Stage" => {
416                            stage = ::serde::de::MapAccess::next_value(&mut map)?;
417                        }
418                        "Tags" => {
419                            tags = ::serde::de::MapAccess::next_value(&mut map)?;
420                        }
421                        _ => {}
422                    }
423                }
424
425                Ok(BranchProperties {
426                    app_id: app_id.ok_or(::serde::de::Error::missing_field("AppId"))?,
427                    basic_auth_config: basic_auth_config,
428                    branch_name: branch_name.ok_or(::serde::de::Error::missing_field("BranchName"))?,
429                    build_spec: build_spec,
430                    description: description,
431                    enable_auto_build: enable_auto_build,
432                    enable_performance_mode: enable_performance_mode,
433                    enable_pull_request_preview: enable_pull_request_preview,
434                    environment_variables: environment_variables,
435                    pull_request_environment_name: pull_request_environment_name,
436                    stage: stage,
437                    tags: tags,
438                })
439            }
440        }
441
442        d.deserialize_map(Visitor)
443    }
444}
445
446impl ::Resource for Branch {
447    type Properties = BranchProperties;
448    const TYPE: &'static str = "AWS::Amplify::Branch";
449    fn properties(&self) -> &BranchProperties {
450        &self.properties
451    }
452    fn properties_mut(&mut self) -> &mut BranchProperties {
453        &mut self.properties
454    }
455}
456
457impl ::private::Sealed for Branch {}
458
459impl From<BranchProperties> for Branch {
460    fn from(properties: BranchProperties) -> Branch {
461        Branch { properties }
462    }
463}
464
465/// The [`AWS::Amplify::Domain`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html) resource type.
466#[derive(Debug, Default)]
467pub struct Domain {
468    properties: DomainProperties
469}
470
471/// Properties for the `Domain` resource.
472#[derive(Debug, Default)]
473pub struct DomainProperties {
474    /// Property [`AppId`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-appid).
475    ///
476    /// Update type: _Immutable_.
477    /// AWS CloudFormation replaces the resource when you change this property.
478    pub app_id: ::Value<String>,
479    /// Property [`AutoSubDomainCreationPatterns`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-autosubdomaincreationpatterns).
480    ///
481    /// Update type: _Mutable_.
482    /// AWS CloudFormation doesn't replace the resource when you change this property.
483    pub auto_sub_domain_creation_patterns: Option<::ValueList<String>>,
484    /// Property [`AutoSubDomainIAMRole`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-autosubdomainiamrole).
485    ///
486    /// Update type: _Mutable_.
487    /// AWS CloudFormation doesn't replace the resource when you change this property.
488    pub auto_sub_domain_iam_role: Option<::Value<String>>,
489    /// Property [`DomainName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-domainname).
490    ///
491    /// Update type: _Immutable_.
492    /// AWS CloudFormation replaces the resource when you change this property.
493    pub domain_name: ::Value<String>,
494    /// Property [`EnableAutoSubDomain`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-enableautosubdomain).
495    ///
496    /// Update type: _Mutable_.
497    /// AWS CloudFormation doesn't replace the resource when you change this property.
498    pub enable_auto_sub_domain: Option<::Value<bool>>,
499    /// Property [`SubDomainSettings`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-domain.html#cfn-amplify-domain-subdomainsettings).
500    ///
501    /// Update type: _Mutable_.
502    /// AWS CloudFormation doesn't replace the resource when you change this property.
503    pub sub_domain_settings: ::ValueList<self::domain::SubDomainSetting>,
504}
505
506impl ::serde::Serialize for DomainProperties {
507    fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
508        let mut map = ::serde::Serializer::serialize_map(s, None)?;
509        ::serde::ser::SerializeMap::serialize_entry(&mut map, "AppId", &self.app_id)?;
510        if let Some(ref auto_sub_domain_creation_patterns) = self.auto_sub_domain_creation_patterns {
511            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoSubDomainCreationPatterns", auto_sub_domain_creation_patterns)?;
512        }
513        if let Some(ref auto_sub_domain_iam_role) = self.auto_sub_domain_iam_role {
514            ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoSubDomainIAMRole", auto_sub_domain_iam_role)?;
515        }
516        ::serde::ser::SerializeMap::serialize_entry(&mut map, "DomainName", &self.domain_name)?;
517        if let Some(ref enable_auto_sub_domain) = self.enable_auto_sub_domain {
518            ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableAutoSubDomain", enable_auto_sub_domain)?;
519        }
520        ::serde::ser::SerializeMap::serialize_entry(&mut map, "SubDomainSettings", &self.sub_domain_settings)?;
521        ::serde::ser::SerializeMap::end(map)
522    }
523}
524
525impl<'de> ::serde::Deserialize<'de> for DomainProperties {
526    fn deserialize<D: ::serde::Deserializer<'de>>(d: D) -> Result<DomainProperties, D::Error> {
527        struct Visitor;
528
529        impl<'de> ::serde::de::Visitor<'de> for Visitor {
530            type Value = DomainProperties;
531
532            fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
533                write!(f, "a struct of type DomainProperties")
534            }
535
536            fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
537                let mut app_id: Option<::Value<String>> = None;
538                let mut auto_sub_domain_creation_patterns: Option<::ValueList<String>> = None;
539                let mut auto_sub_domain_iam_role: Option<::Value<String>> = None;
540                let mut domain_name: Option<::Value<String>> = None;
541                let mut enable_auto_sub_domain: Option<::Value<bool>> = None;
542                let mut sub_domain_settings: Option<::ValueList<self::domain::SubDomainSetting>> = None;
543
544                while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
545                    match __cfn_key.as_ref() {
546                        "AppId" => {
547                            app_id = ::serde::de::MapAccess::next_value(&mut map)?;
548                        }
549                        "AutoSubDomainCreationPatterns" => {
550                            auto_sub_domain_creation_patterns = ::serde::de::MapAccess::next_value(&mut map)?;
551                        }
552                        "AutoSubDomainIAMRole" => {
553                            auto_sub_domain_iam_role = ::serde::de::MapAccess::next_value(&mut map)?;
554                        }
555                        "DomainName" => {
556                            domain_name = ::serde::de::MapAccess::next_value(&mut map)?;
557                        }
558                        "EnableAutoSubDomain" => {
559                            enable_auto_sub_domain = ::serde::de::MapAccess::next_value(&mut map)?;
560                        }
561                        "SubDomainSettings" => {
562                            sub_domain_settings = ::serde::de::MapAccess::next_value(&mut map)?;
563                        }
564                        _ => {}
565                    }
566                }
567
568                Ok(DomainProperties {
569                    app_id: app_id.ok_or(::serde::de::Error::missing_field("AppId"))?,
570                    auto_sub_domain_creation_patterns: auto_sub_domain_creation_patterns,
571                    auto_sub_domain_iam_role: auto_sub_domain_iam_role,
572                    domain_name: domain_name.ok_or(::serde::de::Error::missing_field("DomainName"))?,
573                    enable_auto_sub_domain: enable_auto_sub_domain,
574                    sub_domain_settings: sub_domain_settings.ok_or(::serde::de::Error::missing_field("SubDomainSettings"))?,
575                })
576            }
577        }
578
579        d.deserialize_map(Visitor)
580    }
581}
582
583impl ::Resource for Domain {
584    type Properties = DomainProperties;
585    const TYPE: &'static str = "AWS::Amplify::Domain";
586    fn properties(&self) -> &DomainProperties {
587        &self.properties
588    }
589    fn properties_mut(&mut self) -> &mut DomainProperties {
590        &mut self.properties
591    }
592}
593
594impl ::private::Sealed for Domain {}
595
596impl From<DomainProperties> for Domain {
597    fn from(properties: DomainProperties) -> Domain {
598        Domain { properties }
599    }
600}
601
602pub mod app {
603    //! Property types for the `App` resource.
604
605    /// The [`AWS::Amplify::App.AutoBranchCreationConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html) property type.
606    #[derive(Debug, Default)]
607    pub struct AutoBranchCreationConfig {
608        /// Property [`AutoBranchCreationPatterns`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-autobranchcreationpatterns).
609        ///
610        /// Update type: _Mutable_.
611        /// AWS CloudFormation doesn't replace the resource when you change this property.
612        pub auto_branch_creation_patterns: Option<::ValueList<String>>,
613        /// Property [`BasicAuthConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-basicauthconfig).
614        ///
615        /// Update type: _Mutable_.
616        /// AWS CloudFormation doesn't replace the resource when you change this property.
617        pub basic_auth_config: Option<::Value<BasicAuthConfig>>,
618        /// Property [`BuildSpec`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-buildspec).
619        ///
620        /// Update type: _Mutable_.
621        /// AWS CloudFormation doesn't replace the resource when you change this property.
622        pub build_spec: Option<::Value<String>>,
623        /// Property [`EnableAutoBranchCreation`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableautobranchcreation).
624        ///
625        /// Update type: _Mutable_.
626        /// AWS CloudFormation doesn't replace the resource when you change this property.
627        pub enable_auto_branch_creation: Option<::Value<bool>>,
628        /// Property [`EnableAutoBuild`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableautobuild).
629        ///
630        /// Update type: _Mutable_.
631        /// AWS CloudFormation doesn't replace the resource when you change this property.
632        pub enable_auto_build: Option<::Value<bool>>,
633        /// Property [`EnablePerformanceMode`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enableperformancemode).
634        ///
635        /// Update type: _Mutable_.
636        /// AWS CloudFormation doesn't replace the resource when you change this property.
637        pub enable_performance_mode: Option<::Value<bool>>,
638        /// Property [`EnablePullRequestPreview`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-enablepullrequestpreview).
639        ///
640        /// Update type: _Mutable_.
641        /// AWS CloudFormation doesn't replace the resource when you change this property.
642        pub enable_pull_request_preview: Option<::Value<bool>>,
643        /// Property [`EnvironmentVariables`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-environmentvariables).
644        ///
645        /// Update type: _Mutable_.
646        /// AWS CloudFormation doesn't replace the resource when you change this property.
647        pub environment_variables: Option<::ValueList<EnvironmentVariable>>,
648        /// Property [`PullRequestEnvironmentName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-pullrequestenvironmentname).
649        ///
650        /// Update type: _Mutable_.
651        /// AWS CloudFormation doesn't replace the resource when you change this property.
652        pub pull_request_environment_name: Option<::Value<String>>,
653        /// Property [`Stage`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html#cfn-amplify-app-autobranchcreationconfig-stage).
654        ///
655        /// Update type: _Mutable_.
656        /// AWS CloudFormation doesn't replace the resource when you change this property.
657        pub stage: Option<::Value<String>>,
658    }
659
660    impl ::codec::SerializeValue for AutoBranchCreationConfig {
661        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
662            let mut map = ::serde::Serializer::serialize_map(s, None)?;
663            if let Some(ref auto_branch_creation_patterns) = self.auto_branch_creation_patterns {
664                ::serde::ser::SerializeMap::serialize_entry(&mut map, "AutoBranchCreationPatterns", auto_branch_creation_patterns)?;
665            }
666            if let Some(ref basic_auth_config) = self.basic_auth_config {
667                ::serde::ser::SerializeMap::serialize_entry(&mut map, "BasicAuthConfig", basic_auth_config)?;
668            }
669            if let Some(ref build_spec) = self.build_spec {
670                ::serde::ser::SerializeMap::serialize_entry(&mut map, "BuildSpec", build_spec)?;
671            }
672            if let Some(ref enable_auto_branch_creation) = self.enable_auto_branch_creation {
673                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableAutoBranchCreation", enable_auto_branch_creation)?;
674            }
675            if let Some(ref enable_auto_build) = self.enable_auto_build {
676                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableAutoBuild", enable_auto_build)?;
677            }
678            if let Some(ref enable_performance_mode) = self.enable_performance_mode {
679                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnablePerformanceMode", enable_performance_mode)?;
680            }
681            if let Some(ref enable_pull_request_preview) = self.enable_pull_request_preview {
682                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnablePullRequestPreview", enable_pull_request_preview)?;
683            }
684            if let Some(ref environment_variables) = self.environment_variables {
685                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnvironmentVariables", environment_variables)?;
686            }
687            if let Some(ref pull_request_environment_name) = self.pull_request_environment_name {
688                ::serde::ser::SerializeMap::serialize_entry(&mut map, "PullRequestEnvironmentName", pull_request_environment_name)?;
689            }
690            if let Some(ref stage) = self.stage {
691                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Stage", stage)?;
692            }
693            ::serde::ser::SerializeMap::end(map)
694        }
695    }
696
697    impl ::codec::DeserializeValue for AutoBranchCreationConfig {
698        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<AutoBranchCreationConfig, D::Error> {
699            struct Visitor;
700
701            impl<'de> ::serde::de::Visitor<'de> for Visitor {
702                type Value = AutoBranchCreationConfig;
703
704                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
705                    write!(f, "a struct of type AutoBranchCreationConfig")
706                }
707
708                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
709                    let mut auto_branch_creation_patterns: Option<::ValueList<String>> = None;
710                    let mut basic_auth_config: Option<::Value<BasicAuthConfig>> = None;
711                    let mut build_spec: Option<::Value<String>> = None;
712                    let mut enable_auto_branch_creation: Option<::Value<bool>> = None;
713                    let mut enable_auto_build: Option<::Value<bool>> = None;
714                    let mut enable_performance_mode: Option<::Value<bool>> = None;
715                    let mut enable_pull_request_preview: Option<::Value<bool>> = None;
716                    let mut environment_variables: Option<::ValueList<EnvironmentVariable>> = None;
717                    let mut pull_request_environment_name: Option<::Value<String>> = None;
718                    let mut stage: Option<::Value<String>> = None;
719
720                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
721                        match __cfn_key.as_ref() {
722                            "AutoBranchCreationPatterns" => {
723                                auto_branch_creation_patterns = ::serde::de::MapAccess::next_value(&mut map)?;
724                            }
725                            "BasicAuthConfig" => {
726                                basic_auth_config = ::serde::de::MapAccess::next_value(&mut map)?;
727                            }
728                            "BuildSpec" => {
729                                build_spec = ::serde::de::MapAccess::next_value(&mut map)?;
730                            }
731                            "EnableAutoBranchCreation" => {
732                                enable_auto_branch_creation = ::serde::de::MapAccess::next_value(&mut map)?;
733                            }
734                            "EnableAutoBuild" => {
735                                enable_auto_build = ::serde::de::MapAccess::next_value(&mut map)?;
736                            }
737                            "EnablePerformanceMode" => {
738                                enable_performance_mode = ::serde::de::MapAccess::next_value(&mut map)?;
739                            }
740                            "EnablePullRequestPreview" => {
741                                enable_pull_request_preview = ::serde::de::MapAccess::next_value(&mut map)?;
742                            }
743                            "EnvironmentVariables" => {
744                                environment_variables = ::serde::de::MapAccess::next_value(&mut map)?;
745                            }
746                            "PullRequestEnvironmentName" => {
747                                pull_request_environment_name = ::serde::de::MapAccess::next_value(&mut map)?;
748                            }
749                            "Stage" => {
750                                stage = ::serde::de::MapAccess::next_value(&mut map)?;
751                            }
752                            _ => {}
753                        }
754                    }
755
756                    Ok(AutoBranchCreationConfig {
757                        auto_branch_creation_patterns: auto_branch_creation_patterns,
758                        basic_auth_config: basic_auth_config,
759                        build_spec: build_spec,
760                        enable_auto_branch_creation: enable_auto_branch_creation,
761                        enable_auto_build: enable_auto_build,
762                        enable_performance_mode: enable_performance_mode,
763                        enable_pull_request_preview: enable_pull_request_preview,
764                        environment_variables: environment_variables,
765                        pull_request_environment_name: pull_request_environment_name,
766                        stage: stage,
767                    })
768                }
769            }
770
771            d.deserialize_map(Visitor)
772        }
773    }
774
775    /// The [`AWS::Amplify::App.BasicAuthConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html) property type.
776    #[derive(Debug, Default)]
777    pub struct BasicAuthConfig {
778        /// Property [`EnableBasicAuth`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-enablebasicauth).
779        ///
780        /// Update type: _Mutable_.
781        /// AWS CloudFormation doesn't replace the resource when you change this property.
782        pub enable_basic_auth: Option<::Value<bool>>,
783        /// Property [`Password`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-password).
784        ///
785        /// Update type: _Mutable_.
786        /// AWS CloudFormation doesn't replace the resource when you change this property.
787        pub password: Option<::Value<String>>,
788        /// Property [`Username`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-basicauthconfig.html#cfn-amplify-app-basicauthconfig-username).
789        ///
790        /// Update type: _Mutable_.
791        /// AWS CloudFormation doesn't replace the resource when you change this property.
792        pub username: Option<::Value<String>>,
793    }
794
795    impl ::codec::SerializeValue for BasicAuthConfig {
796        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
797            let mut map = ::serde::Serializer::serialize_map(s, None)?;
798            if let Some(ref enable_basic_auth) = self.enable_basic_auth {
799                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableBasicAuth", enable_basic_auth)?;
800            }
801            if let Some(ref password) = self.password {
802                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Password", password)?;
803            }
804            if let Some(ref username) = self.username {
805                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Username", username)?;
806            }
807            ::serde::ser::SerializeMap::end(map)
808        }
809    }
810
811    impl ::codec::DeserializeValue for BasicAuthConfig {
812        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<BasicAuthConfig, D::Error> {
813            struct Visitor;
814
815            impl<'de> ::serde::de::Visitor<'de> for Visitor {
816                type Value = BasicAuthConfig;
817
818                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
819                    write!(f, "a struct of type BasicAuthConfig")
820                }
821
822                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
823                    let mut enable_basic_auth: Option<::Value<bool>> = None;
824                    let mut password: Option<::Value<String>> = None;
825                    let mut username: Option<::Value<String>> = None;
826
827                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
828                        match __cfn_key.as_ref() {
829                            "EnableBasicAuth" => {
830                                enable_basic_auth = ::serde::de::MapAccess::next_value(&mut map)?;
831                            }
832                            "Password" => {
833                                password = ::serde::de::MapAccess::next_value(&mut map)?;
834                            }
835                            "Username" => {
836                                username = ::serde::de::MapAccess::next_value(&mut map)?;
837                            }
838                            _ => {}
839                        }
840                    }
841
842                    Ok(BasicAuthConfig {
843                        enable_basic_auth: enable_basic_auth,
844                        password: password,
845                        username: username,
846                    })
847                }
848            }
849
850            d.deserialize_map(Visitor)
851        }
852    }
853
854    /// The [`AWS::Amplify::App.CustomRule`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html) property type.
855    #[derive(Debug, Default)]
856    pub struct CustomRule {
857        /// Property [`Condition`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-condition).
858        ///
859        /// Update type: _Mutable_.
860        /// AWS CloudFormation doesn't replace the resource when you change this property.
861        pub condition: Option<::Value<String>>,
862        /// Property [`Source`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-source).
863        ///
864        /// Update type: _Mutable_.
865        /// AWS CloudFormation doesn't replace the resource when you change this property.
866        pub source: ::Value<String>,
867        /// Property [`Status`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-status).
868        ///
869        /// Update type: _Mutable_.
870        /// AWS CloudFormation doesn't replace the resource when you change this property.
871        pub status: Option<::Value<String>>,
872        /// Property [`Target`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-customrule.html#cfn-amplify-app-customrule-target).
873        ///
874        /// Update type: _Mutable_.
875        /// AWS CloudFormation doesn't replace the resource when you change this property.
876        pub target: ::Value<String>,
877    }
878
879    impl ::codec::SerializeValue for CustomRule {
880        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
881            let mut map = ::serde::Serializer::serialize_map(s, None)?;
882            if let Some(ref condition) = self.condition {
883                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Condition", condition)?;
884            }
885            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Source", &self.source)?;
886            if let Some(ref status) = self.status {
887                ::serde::ser::SerializeMap::serialize_entry(&mut map, "Status", status)?;
888            }
889            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Target", &self.target)?;
890            ::serde::ser::SerializeMap::end(map)
891        }
892    }
893
894    impl ::codec::DeserializeValue for CustomRule {
895        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<CustomRule, D::Error> {
896            struct Visitor;
897
898            impl<'de> ::serde::de::Visitor<'de> for Visitor {
899                type Value = CustomRule;
900
901                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
902                    write!(f, "a struct of type CustomRule")
903                }
904
905                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
906                    let mut condition: Option<::Value<String>> = None;
907                    let mut source: Option<::Value<String>> = None;
908                    let mut status: Option<::Value<String>> = None;
909                    let mut target: Option<::Value<String>> = None;
910
911                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
912                        match __cfn_key.as_ref() {
913                            "Condition" => {
914                                condition = ::serde::de::MapAccess::next_value(&mut map)?;
915                            }
916                            "Source" => {
917                                source = ::serde::de::MapAccess::next_value(&mut map)?;
918                            }
919                            "Status" => {
920                                status = ::serde::de::MapAccess::next_value(&mut map)?;
921                            }
922                            "Target" => {
923                                target = ::serde::de::MapAccess::next_value(&mut map)?;
924                            }
925                            _ => {}
926                        }
927                    }
928
929                    Ok(CustomRule {
930                        condition: condition,
931                        source: source.ok_or(::serde::de::Error::missing_field("Source"))?,
932                        status: status,
933                        target: target.ok_or(::serde::de::Error::missing_field("Target"))?,
934                    })
935                }
936            }
937
938            d.deserialize_map(Visitor)
939        }
940    }
941
942    /// The [`AWS::Amplify::App.EnvironmentVariable`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html) property type.
943    #[derive(Debug, Default)]
944    pub struct EnvironmentVariable {
945        /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html#cfn-amplify-app-environmentvariable-name).
946        ///
947        /// Update type: _Mutable_.
948        /// AWS CloudFormation doesn't replace the resource when you change this property.
949        pub name: ::Value<String>,
950        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-environmentvariable.html#cfn-amplify-app-environmentvariable-value).
951        ///
952        /// Update type: _Mutable_.
953        /// AWS CloudFormation doesn't replace the resource when you change this property.
954        pub value: ::Value<String>,
955    }
956
957    impl ::codec::SerializeValue for EnvironmentVariable {
958        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
959            let mut map = ::serde::Serializer::serialize_map(s, None)?;
960            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
961            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", &self.value)?;
962            ::serde::ser::SerializeMap::end(map)
963        }
964    }
965
966    impl ::codec::DeserializeValue for EnvironmentVariable {
967        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EnvironmentVariable, D::Error> {
968            struct Visitor;
969
970            impl<'de> ::serde::de::Visitor<'de> for Visitor {
971                type Value = EnvironmentVariable;
972
973                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
974                    write!(f, "a struct of type EnvironmentVariable")
975                }
976
977                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
978                    let mut name: Option<::Value<String>> = None;
979                    let mut value: Option<::Value<String>> = None;
980
981                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
982                        match __cfn_key.as_ref() {
983                            "Name" => {
984                                name = ::serde::de::MapAccess::next_value(&mut map)?;
985                            }
986                            "Value" => {
987                                value = ::serde::de::MapAccess::next_value(&mut map)?;
988                            }
989                            _ => {}
990                        }
991                    }
992
993                    Ok(EnvironmentVariable {
994                        name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
995                        value: value.ok_or(::serde::de::Error::missing_field("Value"))?,
996                    })
997                }
998            }
999
1000            d.deserialize_map(Visitor)
1001        }
1002    }
1003}
1004
1005pub mod branch {
1006    //! Property types for the `Branch` resource.
1007
1008    /// The [`AWS::Amplify::Branch.BasicAuthConfig`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html) property type.
1009    #[derive(Debug, Default)]
1010    pub struct BasicAuthConfig {
1011        /// Property [`EnableBasicAuth`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-enablebasicauth).
1012        ///
1013        /// Update type: _Mutable_.
1014        /// AWS CloudFormation doesn't replace the resource when you change this property.
1015        pub enable_basic_auth: Option<::Value<bool>>,
1016        /// Property [`Password`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-password).
1017        ///
1018        /// Update type: _Mutable_.
1019        /// AWS CloudFormation doesn't replace the resource when you change this property.
1020        pub password: ::Value<String>,
1021        /// Property [`Username`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-basicauthconfig.html#cfn-amplify-branch-basicauthconfig-username).
1022        ///
1023        /// Update type: _Mutable_.
1024        /// AWS CloudFormation doesn't replace the resource when you change this property.
1025        pub username: ::Value<String>,
1026    }
1027
1028    impl ::codec::SerializeValue for BasicAuthConfig {
1029        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1030            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1031            if let Some(ref enable_basic_auth) = self.enable_basic_auth {
1032                ::serde::ser::SerializeMap::serialize_entry(&mut map, "EnableBasicAuth", enable_basic_auth)?;
1033            }
1034            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Password", &self.password)?;
1035            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Username", &self.username)?;
1036            ::serde::ser::SerializeMap::end(map)
1037        }
1038    }
1039
1040    impl ::codec::DeserializeValue for BasicAuthConfig {
1041        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<BasicAuthConfig, D::Error> {
1042            struct Visitor;
1043
1044            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1045                type Value = BasicAuthConfig;
1046
1047                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1048                    write!(f, "a struct of type BasicAuthConfig")
1049                }
1050
1051                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1052                    let mut enable_basic_auth: Option<::Value<bool>> = None;
1053                    let mut password: Option<::Value<String>> = None;
1054                    let mut username: Option<::Value<String>> = None;
1055
1056                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1057                        match __cfn_key.as_ref() {
1058                            "EnableBasicAuth" => {
1059                                enable_basic_auth = ::serde::de::MapAccess::next_value(&mut map)?;
1060                            }
1061                            "Password" => {
1062                                password = ::serde::de::MapAccess::next_value(&mut map)?;
1063                            }
1064                            "Username" => {
1065                                username = ::serde::de::MapAccess::next_value(&mut map)?;
1066                            }
1067                            _ => {}
1068                        }
1069                    }
1070
1071                    Ok(BasicAuthConfig {
1072                        enable_basic_auth: enable_basic_auth,
1073                        password: password.ok_or(::serde::de::Error::missing_field("Password"))?,
1074                        username: username.ok_or(::serde::de::Error::missing_field("Username"))?,
1075                    })
1076                }
1077            }
1078
1079            d.deserialize_map(Visitor)
1080        }
1081    }
1082
1083    /// The [`AWS::Amplify::Branch.EnvironmentVariable`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html) property type.
1084    #[derive(Debug, Default)]
1085    pub struct EnvironmentVariable {
1086        /// Property [`Name`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-name).
1087        ///
1088        /// Update type: _Mutable_.
1089        /// AWS CloudFormation doesn't replace the resource when you change this property.
1090        pub name: ::Value<String>,
1091        /// Property [`Value`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-branch-environmentvariable.html#cfn-amplify-branch-environmentvariable-value).
1092        ///
1093        /// Update type: _Mutable_.
1094        /// AWS CloudFormation doesn't replace the resource when you change this property.
1095        pub value: ::Value<String>,
1096    }
1097
1098    impl ::codec::SerializeValue for EnvironmentVariable {
1099        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1100            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1101            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Name", &self.name)?;
1102            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Value", &self.value)?;
1103            ::serde::ser::SerializeMap::end(map)
1104        }
1105    }
1106
1107    impl ::codec::DeserializeValue for EnvironmentVariable {
1108        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<EnvironmentVariable, D::Error> {
1109            struct Visitor;
1110
1111            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1112                type Value = EnvironmentVariable;
1113
1114                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1115                    write!(f, "a struct of type EnvironmentVariable")
1116                }
1117
1118                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1119                    let mut name: Option<::Value<String>> = None;
1120                    let mut value: Option<::Value<String>> = None;
1121
1122                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1123                        match __cfn_key.as_ref() {
1124                            "Name" => {
1125                                name = ::serde::de::MapAccess::next_value(&mut map)?;
1126                            }
1127                            "Value" => {
1128                                value = ::serde::de::MapAccess::next_value(&mut map)?;
1129                            }
1130                            _ => {}
1131                        }
1132                    }
1133
1134                    Ok(EnvironmentVariable {
1135                        name: name.ok_or(::serde::de::Error::missing_field("Name"))?,
1136                        value: value.ok_or(::serde::de::Error::missing_field("Value"))?,
1137                    })
1138                }
1139            }
1140
1141            d.deserialize_map(Visitor)
1142        }
1143    }
1144}
1145
1146pub mod domain {
1147    //! Property types for the `Domain` resource.
1148
1149    /// The [`AWS::Amplify::Domain.SubDomainSetting`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-subdomainsetting.html) property type.
1150    #[derive(Debug, Default)]
1151    pub struct SubDomainSetting {
1152        /// Property [`BranchName`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-subdomainsetting.html#cfn-amplify-domain-subdomainsetting-branchname).
1153        ///
1154        /// Update type: _Mutable_.
1155        /// AWS CloudFormation doesn't replace the resource when you change this property.
1156        pub branch_name: ::Value<String>,
1157        /// Property [`Prefix`](http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-domain-subdomainsetting.html#cfn-amplify-domain-subdomainsetting-prefix).
1158        ///
1159        /// Update type: _Mutable_.
1160        /// AWS CloudFormation doesn't replace the resource when you change this property.
1161        pub prefix: ::Value<String>,
1162    }
1163
1164    impl ::codec::SerializeValue for SubDomainSetting {
1165        fn serialize<S: ::serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
1166            let mut map = ::serde::Serializer::serialize_map(s, None)?;
1167            ::serde::ser::SerializeMap::serialize_entry(&mut map, "BranchName", &self.branch_name)?;
1168            ::serde::ser::SerializeMap::serialize_entry(&mut map, "Prefix", &self.prefix)?;
1169            ::serde::ser::SerializeMap::end(map)
1170        }
1171    }
1172
1173    impl ::codec::DeserializeValue for SubDomainSetting {
1174        fn deserialize<'de, D: ::serde::Deserializer<'de>>(d: D) -> Result<SubDomainSetting, D::Error> {
1175            struct Visitor;
1176
1177            impl<'de> ::serde::de::Visitor<'de> for Visitor {
1178                type Value = SubDomainSetting;
1179
1180                fn expecting(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1181                    write!(f, "a struct of type SubDomainSetting")
1182                }
1183
1184                fn visit_map<A: ::serde::de::MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
1185                    let mut branch_name: Option<::Value<String>> = None;
1186                    let mut prefix: Option<::Value<String>> = None;
1187
1188                    while let Some(__cfn_key) = ::serde::de::MapAccess::next_key::<String>(&mut map)? {
1189                        match __cfn_key.as_ref() {
1190                            "BranchName" => {
1191                                branch_name = ::serde::de::MapAccess::next_value(&mut map)?;
1192                            }
1193                            "Prefix" => {
1194                                prefix = ::serde::de::MapAccess::next_value(&mut map)?;
1195                            }
1196                            _ => {}
1197                        }
1198                    }
1199
1200                    Ok(SubDomainSetting {
1201                        branch_name: branch_name.ok_or(::serde::de::Error::missing_field("BranchName"))?,
1202                        prefix: prefix.ok_or(::serde::de::Error::missing_field("Prefix"))?,
1203                    })
1204                }
1205            }
1206
1207            d.deserialize_map(Visitor)
1208        }
1209    }
1210}