aws_sdk_amplify/operation/create_branch/
_create_branch_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request structure for the create branch request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct CreateBranchInput {
7    /// <p>The unique ID for an Amplify app.</p>
8    pub app_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name for the branch.</p>
10    pub branch_name: ::std::option::Option<::std::string::String>,
11    /// <p>The description for the branch.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>Describes the current stage for the branch.</p>
14    pub stage: ::std::option::Option<crate::types::Stage>,
15    /// <p>The framework for the branch.</p>
16    pub framework: ::std::option::Option<::std::string::String>,
17    /// <p>Enables notifications for the branch.</p>
18    pub enable_notification: ::std::option::Option<bool>,
19    /// <p>Enables auto building for the branch.</p>
20    pub enable_auto_build: ::std::option::Option<bool>,
21    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
22    /// <p>Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html">Skew protection for Amplify deployments</a> in the <i>Amplify User Guide</i>.</p>
23    pub enable_skew_protection: ::std::option::Option<bool>,
24    /// <p>The environment variables for the branch.</p>
25    pub environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26    /// <p>The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
27    pub basic_auth_credentials: ::std::option::Option<::std::string::String>,
28    /// <p>Enables basic authorization for the branch.</p>
29    pub enable_basic_auth: ::std::option::Option<bool>,
30    /// <p>Enables performance mode for the branch.</p>
31    /// <p>Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.</p>
32    pub enable_performance_mode: ::std::option::Option<bool>,
33    /// <p>The tag for the branch.</p>
34    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
35    /// <p>The build specification (build spec) for the branch.</p>
36    pub build_spec: ::std::option::Option<::std::string::String>,
37    /// <p>The content Time To Live (TTL) for the website in seconds.</p>
38    pub ttl: ::std::option::Option<::std::string::String>,
39    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
40    pub display_name: ::std::option::Option<::std::string::String>,
41    /// <p>Enables pull request previews for this branch.</p>
42    pub enable_pull_request_preview: ::std::option::Option<bool>,
43    /// <p>The Amplify environment name for the pull request.</p>
44    pub pull_request_environment_name: ::std::option::Option<::std::string::String>,
45    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
46    /// <p>This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).</p>
47    pub backend_environment_arn: ::std::option::Option<::std::string::String>,
48    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
49    /// <p>This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.</p>
50    pub backend: ::std::option::Option<crate::types::Backend>,
51    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
52    pub compute_role_arn: ::std::option::Option<::std::string::String>,
53}
54impl CreateBranchInput {
55    /// <p>The unique ID for an Amplify app.</p>
56    pub fn app_id(&self) -> ::std::option::Option<&str> {
57        self.app_id.as_deref()
58    }
59    /// <p>The name for the branch.</p>
60    pub fn branch_name(&self) -> ::std::option::Option<&str> {
61        self.branch_name.as_deref()
62    }
63    /// <p>The description for the branch.</p>
64    pub fn description(&self) -> ::std::option::Option<&str> {
65        self.description.as_deref()
66    }
67    /// <p>Describes the current stage for the branch.</p>
68    pub fn stage(&self) -> ::std::option::Option<&crate::types::Stage> {
69        self.stage.as_ref()
70    }
71    /// <p>The framework for the branch.</p>
72    pub fn framework(&self) -> ::std::option::Option<&str> {
73        self.framework.as_deref()
74    }
75    /// <p>Enables notifications for the branch.</p>
76    pub fn enable_notification(&self) -> ::std::option::Option<bool> {
77        self.enable_notification
78    }
79    /// <p>Enables auto building for the branch.</p>
80    pub fn enable_auto_build(&self) -> ::std::option::Option<bool> {
81        self.enable_auto_build
82    }
83    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
84    /// <p>Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html">Skew protection for Amplify deployments</a> in the <i>Amplify User Guide</i>.</p>
85    pub fn enable_skew_protection(&self) -> ::std::option::Option<bool> {
86        self.enable_skew_protection
87    }
88    /// <p>The environment variables for the branch.</p>
89    pub fn environment_variables(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
90        self.environment_variables.as_ref()
91    }
92    /// <p>The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
93    pub fn basic_auth_credentials(&self) -> ::std::option::Option<&str> {
94        self.basic_auth_credentials.as_deref()
95    }
96    /// <p>Enables basic authorization for the branch.</p>
97    pub fn enable_basic_auth(&self) -> ::std::option::Option<bool> {
98        self.enable_basic_auth
99    }
100    /// <p>Enables performance mode for the branch.</p>
101    /// <p>Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.</p>
102    pub fn enable_performance_mode(&self) -> ::std::option::Option<bool> {
103        self.enable_performance_mode
104    }
105    /// <p>The tag for the branch.</p>
106    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
107        self.tags.as_ref()
108    }
109    /// <p>The build specification (build spec) for the branch.</p>
110    pub fn build_spec(&self) -> ::std::option::Option<&str> {
111        self.build_spec.as_deref()
112    }
113    /// <p>The content Time To Live (TTL) for the website in seconds.</p>
114    pub fn ttl(&self) -> ::std::option::Option<&str> {
115        self.ttl.as_deref()
116    }
117    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
118    pub fn display_name(&self) -> ::std::option::Option<&str> {
119        self.display_name.as_deref()
120    }
121    /// <p>Enables pull request previews for this branch.</p>
122    pub fn enable_pull_request_preview(&self) -> ::std::option::Option<bool> {
123        self.enable_pull_request_preview
124    }
125    /// <p>The Amplify environment name for the pull request.</p>
126    pub fn pull_request_environment_name(&self) -> ::std::option::Option<&str> {
127        self.pull_request_environment_name.as_deref()
128    }
129    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
130    /// <p>This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).</p>
131    pub fn backend_environment_arn(&self) -> ::std::option::Option<&str> {
132        self.backend_environment_arn.as_deref()
133    }
134    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
135    /// <p>This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.</p>
136    pub fn backend(&self) -> ::std::option::Option<&crate::types::Backend> {
137        self.backend.as_ref()
138    }
139    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
140    pub fn compute_role_arn(&self) -> ::std::option::Option<&str> {
141        self.compute_role_arn.as_deref()
142    }
143}
144impl ::std::fmt::Debug for CreateBranchInput {
145    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
146        let mut formatter = f.debug_struct("CreateBranchInput");
147        formatter.field("app_id", &self.app_id);
148        formatter.field("branch_name", &self.branch_name);
149        formatter.field("description", &self.description);
150        formatter.field("stage", &self.stage);
151        formatter.field("framework", &self.framework);
152        formatter.field("enable_notification", &self.enable_notification);
153        formatter.field("enable_auto_build", &self.enable_auto_build);
154        formatter.field("enable_skew_protection", &self.enable_skew_protection);
155        formatter.field("environment_variables", &self.environment_variables);
156        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
157        formatter.field("enable_basic_auth", &self.enable_basic_auth);
158        formatter.field("enable_performance_mode", &self.enable_performance_mode);
159        formatter.field("tags", &self.tags);
160        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
161        formatter.field("ttl", &self.ttl);
162        formatter.field("display_name", &self.display_name);
163        formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
164        formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
165        formatter.field("backend_environment_arn", &self.backend_environment_arn);
166        formatter.field("backend", &self.backend);
167        formatter.field("compute_role_arn", &self.compute_role_arn);
168        formatter.finish()
169    }
170}
171impl CreateBranchInput {
172    /// Creates a new builder-style object to manufacture [`CreateBranchInput`](crate::operation::create_branch::CreateBranchInput).
173    pub fn builder() -> crate::operation::create_branch::builders::CreateBranchInputBuilder {
174        crate::operation::create_branch::builders::CreateBranchInputBuilder::default()
175    }
176}
177
178/// A builder for [`CreateBranchInput`](crate::operation::create_branch::CreateBranchInput).
179#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
180#[non_exhaustive]
181pub struct CreateBranchInputBuilder {
182    pub(crate) app_id: ::std::option::Option<::std::string::String>,
183    pub(crate) branch_name: ::std::option::Option<::std::string::String>,
184    pub(crate) description: ::std::option::Option<::std::string::String>,
185    pub(crate) stage: ::std::option::Option<crate::types::Stage>,
186    pub(crate) framework: ::std::option::Option<::std::string::String>,
187    pub(crate) enable_notification: ::std::option::Option<bool>,
188    pub(crate) enable_auto_build: ::std::option::Option<bool>,
189    pub(crate) enable_skew_protection: ::std::option::Option<bool>,
190    pub(crate) environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
191    pub(crate) basic_auth_credentials: ::std::option::Option<::std::string::String>,
192    pub(crate) enable_basic_auth: ::std::option::Option<bool>,
193    pub(crate) enable_performance_mode: ::std::option::Option<bool>,
194    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
195    pub(crate) build_spec: ::std::option::Option<::std::string::String>,
196    pub(crate) ttl: ::std::option::Option<::std::string::String>,
197    pub(crate) display_name: ::std::option::Option<::std::string::String>,
198    pub(crate) enable_pull_request_preview: ::std::option::Option<bool>,
199    pub(crate) pull_request_environment_name: ::std::option::Option<::std::string::String>,
200    pub(crate) backend_environment_arn: ::std::option::Option<::std::string::String>,
201    pub(crate) backend: ::std::option::Option<crate::types::Backend>,
202    pub(crate) compute_role_arn: ::std::option::Option<::std::string::String>,
203}
204impl CreateBranchInputBuilder {
205    /// <p>The unique ID for an Amplify app.</p>
206    /// This field is required.
207    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
208        self.app_id = ::std::option::Option::Some(input.into());
209        self
210    }
211    /// <p>The unique ID for an Amplify app.</p>
212    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
213        self.app_id = input;
214        self
215    }
216    /// <p>The unique ID for an Amplify app.</p>
217    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
218        &self.app_id
219    }
220    /// <p>The name for the branch.</p>
221    /// This field is required.
222    pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
223        self.branch_name = ::std::option::Option::Some(input.into());
224        self
225    }
226    /// <p>The name for the branch.</p>
227    pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
228        self.branch_name = input;
229        self
230    }
231    /// <p>The name for the branch.</p>
232    pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
233        &self.branch_name
234    }
235    /// <p>The description for the branch.</p>
236    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
237        self.description = ::std::option::Option::Some(input.into());
238        self
239    }
240    /// <p>The description for the branch.</p>
241    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
242        self.description = input;
243        self
244    }
245    /// <p>The description for the branch.</p>
246    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
247        &self.description
248    }
249    /// <p>Describes the current stage for the branch.</p>
250    pub fn stage(mut self, input: crate::types::Stage) -> Self {
251        self.stage = ::std::option::Option::Some(input);
252        self
253    }
254    /// <p>Describes the current stage for the branch.</p>
255    pub fn set_stage(mut self, input: ::std::option::Option<crate::types::Stage>) -> Self {
256        self.stage = input;
257        self
258    }
259    /// <p>Describes the current stage for the branch.</p>
260    pub fn get_stage(&self) -> &::std::option::Option<crate::types::Stage> {
261        &self.stage
262    }
263    /// <p>The framework for the branch.</p>
264    pub fn framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
265        self.framework = ::std::option::Option::Some(input.into());
266        self
267    }
268    /// <p>The framework for the branch.</p>
269    pub fn set_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
270        self.framework = input;
271        self
272    }
273    /// <p>The framework for the branch.</p>
274    pub fn get_framework(&self) -> &::std::option::Option<::std::string::String> {
275        &self.framework
276    }
277    /// <p>Enables notifications for the branch.</p>
278    pub fn enable_notification(mut self, input: bool) -> Self {
279        self.enable_notification = ::std::option::Option::Some(input);
280        self
281    }
282    /// <p>Enables notifications for the branch.</p>
283    pub fn set_enable_notification(mut self, input: ::std::option::Option<bool>) -> Self {
284        self.enable_notification = input;
285        self
286    }
287    /// <p>Enables notifications for the branch.</p>
288    pub fn get_enable_notification(&self) -> &::std::option::Option<bool> {
289        &self.enable_notification
290    }
291    /// <p>Enables auto building for the branch.</p>
292    pub fn enable_auto_build(mut self, input: bool) -> Self {
293        self.enable_auto_build = ::std::option::Option::Some(input);
294        self
295    }
296    /// <p>Enables auto building for the branch.</p>
297    pub fn set_enable_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
298        self.enable_auto_build = input;
299        self
300    }
301    /// <p>Enables auto building for the branch.</p>
302    pub fn get_enable_auto_build(&self) -> &::std::option::Option<bool> {
303        &self.enable_auto_build
304    }
305    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
306    /// <p>Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html">Skew protection for Amplify deployments</a> in the <i>Amplify User Guide</i>.</p>
307    pub fn enable_skew_protection(mut self, input: bool) -> Self {
308        self.enable_skew_protection = ::std::option::Option::Some(input);
309        self
310    }
311    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
312    /// <p>Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html">Skew protection for Amplify deployments</a> in the <i>Amplify User Guide</i>.</p>
313    pub fn set_enable_skew_protection(mut self, input: ::std::option::Option<bool>) -> Self {
314        self.enable_skew_protection = input;
315        self
316    }
317    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
318    /// <p>Deployment skew protection is available to Amplify applications to eliminate version skew issues between client and servers in web applications. When you apply skew protection to a branch, you can ensure that your clients always interact with the correct version of server-side assets, regardless of when a deployment occurs. For more information about skew protection, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/skew-protection.html">Skew protection for Amplify deployments</a> in the <i>Amplify User Guide</i>.</p>
319    pub fn get_enable_skew_protection(&self) -> &::std::option::Option<bool> {
320        &self.enable_skew_protection
321    }
322    /// Adds a key-value pair to `environment_variables`.
323    ///
324    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
325    ///
326    /// <p>The environment variables for the branch.</p>
327    pub fn environment_variables(
328        mut self,
329        k: impl ::std::convert::Into<::std::string::String>,
330        v: impl ::std::convert::Into<::std::string::String>,
331    ) -> Self {
332        let mut hash_map = self.environment_variables.unwrap_or_default();
333        hash_map.insert(k.into(), v.into());
334        self.environment_variables = ::std::option::Option::Some(hash_map);
335        self
336    }
337    /// <p>The environment variables for the branch.</p>
338    pub fn set_environment_variables(
339        mut self,
340        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
341    ) -> Self {
342        self.environment_variables = input;
343        self
344    }
345    /// <p>The environment variables for the branch.</p>
346    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
347        &self.environment_variables
348    }
349    /// <p>The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
350    pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
351        self.basic_auth_credentials = ::std::option::Option::Some(input.into());
352        self
353    }
354    /// <p>The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
355    pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
356        self.basic_auth_credentials = input;
357        self
358    }
359    /// <p>The basic authorization credentials for the branch. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
360    pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
361        &self.basic_auth_credentials
362    }
363    /// <p>Enables basic authorization for the branch.</p>
364    pub fn enable_basic_auth(mut self, input: bool) -> Self {
365        self.enable_basic_auth = ::std::option::Option::Some(input);
366        self
367    }
368    /// <p>Enables basic authorization for the branch.</p>
369    pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
370        self.enable_basic_auth = input;
371        self
372    }
373    /// <p>Enables basic authorization for the branch.</p>
374    pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
375        &self.enable_basic_auth
376    }
377    /// <p>Enables performance mode for the branch.</p>
378    /// <p>Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.</p>
379    pub fn enable_performance_mode(mut self, input: bool) -> Self {
380        self.enable_performance_mode = ::std::option::Option::Some(input);
381        self
382    }
383    /// <p>Enables performance mode for the branch.</p>
384    /// <p>Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.</p>
385    pub fn set_enable_performance_mode(mut self, input: ::std::option::Option<bool>) -> Self {
386        self.enable_performance_mode = input;
387        self
388    }
389    /// <p>Enables performance mode for the branch.</p>
390    /// <p>Performance mode optimizes for faster hosting performance by keeping content cached at the edge for a longer interval. When performance mode is enabled, hosting configuration or code changes can take up to 10 minutes to roll out.</p>
391    pub fn get_enable_performance_mode(&self) -> &::std::option::Option<bool> {
392        &self.enable_performance_mode
393    }
394    /// Adds a key-value pair to `tags`.
395    ///
396    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
397    ///
398    /// <p>The tag for the branch.</p>
399    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
400        let mut hash_map = self.tags.unwrap_or_default();
401        hash_map.insert(k.into(), v.into());
402        self.tags = ::std::option::Option::Some(hash_map);
403        self
404    }
405    /// <p>The tag for the branch.</p>
406    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
407        self.tags = input;
408        self
409    }
410    /// <p>The tag for the branch.</p>
411    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
412        &self.tags
413    }
414    /// <p>The build specification (build spec) for the branch.</p>
415    pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416        self.build_spec = ::std::option::Option::Some(input.into());
417        self
418    }
419    /// <p>The build specification (build spec) for the branch.</p>
420    pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421        self.build_spec = input;
422        self
423    }
424    /// <p>The build specification (build spec) for the branch.</p>
425    pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
426        &self.build_spec
427    }
428    /// <p>The content Time To Live (TTL) for the website in seconds.</p>
429    pub fn ttl(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
430        self.ttl = ::std::option::Option::Some(input.into());
431        self
432    }
433    /// <p>The content Time To Live (TTL) for the website in seconds.</p>
434    pub fn set_ttl(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435        self.ttl = input;
436        self
437    }
438    /// <p>The content Time To Live (TTL) for the website in seconds.</p>
439    pub fn get_ttl(&self) -> &::std::option::Option<::std::string::String> {
440        &self.ttl
441    }
442    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
443    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444        self.display_name = ::std::option::Option::Some(input.into());
445        self
446    }
447    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
448    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449        self.display_name = input;
450        self
451    }
452    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
453    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
454        &self.display_name
455    }
456    /// <p>Enables pull request previews for this branch.</p>
457    pub fn enable_pull_request_preview(mut self, input: bool) -> Self {
458        self.enable_pull_request_preview = ::std::option::Option::Some(input);
459        self
460    }
461    /// <p>Enables pull request previews for this branch.</p>
462    pub fn set_enable_pull_request_preview(mut self, input: ::std::option::Option<bool>) -> Self {
463        self.enable_pull_request_preview = input;
464        self
465    }
466    /// <p>Enables pull request previews for this branch.</p>
467    pub fn get_enable_pull_request_preview(&self) -> &::std::option::Option<bool> {
468        &self.enable_pull_request_preview
469    }
470    /// <p>The Amplify environment name for the pull request.</p>
471    pub fn pull_request_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
472        self.pull_request_environment_name = ::std::option::Option::Some(input.into());
473        self
474    }
475    /// <p>The Amplify environment name for the pull request.</p>
476    pub fn set_pull_request_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
477        self.pull_request_environment_name = input;
478        self
479    }
480    /// <p>The Amplify environment name for the pull request.</p>
481    pub fn get_pull_request_environment_name(&self) -> &::std::option::Option<::std::string::String> {
482        &self.pull_request_environment_name
483    }
484    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
485    /// <p>This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).</p>
486    pub fn backend_environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
487        self.backend_environment_arn = ::std::option::Option::Some(input.into());
488        self
489    }
490    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
491    /// <p>This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).</p>
492    pub fn set_backend_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
493        self.backend_environment_arn = input;
494        self
495    }
496    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
497    /// <p>This field is available to Amplify Gen 1 apps only where the backend is created using Amplify Studio or the Amplify command line interface (CLI).</p>
498    pub fn get_backend_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
499        &self.backend_environment_arn
500    }
501    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
502    /// <p>This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.</p>
503    pub fn backend(mut self, input: crate::types::Backend) -> Self {
504        self.backend = ::std::option::Option::Some(input);
505        self
506    }
507    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
508    /// <p>This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.</p>
509    pub fn set_backend(mut self, input: ::std::option::Option<crate::types::Backend>) -> Self {
510        self.backend = input;
511        self
512    }
513    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
514    /// <p>This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.</p>
515    pub fn get_backend(&self) -> &::std::option::Option<crate::types::Backend> {
516        &self.backend
517    }
518    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
519    pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
520        self.compute_role_arn = ::std::option::Option::Some(input.into());
521        self
522    }
523    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
524    pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
525        self.compute_role_arn = input;
526        self
527    }
528    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to a branch of an SSR app. The SSR Compute role allows the Amplify Hosting compute service to securely access specific Amazon Web Services resources based on the role's permissions. For more information about the SSR Compute role, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/amplify-SSR-compute-role.html">Adding an SSR Compute role</a> in the <i>Amplify User Guide</i>.</p>
529    pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
530        &self.compute_role_arn
531    }
532    /// Consumes the builder and constructs a [`CreateBranchInput`](crate::operation::create_branch::CreateBranchInput).
533    pub fn build(
534        self,
535    ) -> ::std::result::Result<crate::operation::create_branch::CreateBranchInput, ::aws_smithy_types::error::operation::BuildError> {
536        ::std::result::Result::Ok(crate::operation::create_branch::CreateBranchInput {
537            app_id: self.app_id,
538            branch_name: self.branch_name,
539            description: self.description,
540            stage: self.stage,
541            framework: self.framework,
542            enable_notification: self.enable_notification,
543            enable_auto_build: self.enable_auto_build,
544            enable_skew_protection: self.enable_skew_protection,
545            environment_variables: self.environment_variables,
546            basic_auth_credentials: self.basic_auth_credentials,
547            enable_basic_auth: self.enable_basic_auth,
548            enable_performance_mode: self.enable_performance_mode,
549            tags: self.tags,
550            build_spec: self.build_spec,
551            ttl: self.ttl,
552            display_name: self.display_name,
553            enable_pull_request_preview: self.enable_pull_request_preview,
554            pull_request_environment_name: self.pull_request_environment_name,
555            backend_environment_arn: self.backend_environment_arn,
556            backend: self.backend,
557            compute_role_arn: self.compute_role_arn,
558        })
559    }
560}
561impl ::std::fmt::Debug for CreateBranchInputBuilder {
562    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
563        let mut formatter = f.debug_struct("CreateBranchInputBuilder");
564        formatter.field("app_id", &self.app_id);
565        formatter.field("branch_name", &self.branch_name);
566        formatter.field("description", &self.description);
567        formatter.field("stage", &self.stage);
568        formatter.field("framework", &self.framework);
569        formatter.field("enable_notification", &self.enable_notification);
570        formatter.field("enable_auto_build", &self.enable_auto_build);
571        formatter.field("enable_skew_protection", &self.enable_skew_protection);
572        formatter.field("environment_variables", &self.environment_variables);
573        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
574        formatter.field("enable_basic_auth", &self.enable_basic_auth);
575        formatter.field("enable_performance_mode", &self.enable_performance_mode);
576        formatter.field("tags", &self.tags);
577        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
578        formatter.field("ttl", &self.ttl);
579        formatter.field("display_name", &self.display_name);
580        formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
581        formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
582        formatter.field("backend_environment_arn", &self.backend_environment_arn);
583        formatter.field("backend", &self.backend);
584        formatter.field("compute_role_arn", &self.compute_role_arn);
585        formatter.finish()
586    }
587}