aws_sdk_amplify/operation/update_branch/
_update_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 update branch request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct UpdateBranchInput {
7    /// <p>The unique ID for an Amplify app.</p>
8    pub app_id: ::std::option::Option<::std::string::String>,
9    /// <p>The name of 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>The framework for the branch.</p>
14    pub framework: ::std::option::Option<::std::string::String>,
15    /// <p>Describes the current stage for the branch.</p>
16    pub stage: ::std::option::Option<crate::types::Stage>,
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 build specification (build spec) for the branch.</p>
34    pub build_spec: ::std::option::Option<::std::string::String>,
35    /// <p>The content Time to Live (TTL) for the website in seconds.</p>
36    pub ttl: ::std::option::Option<::std::string::String>,
37    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
38    pub display_name: ::std::option::Option<::std::string::String>,
39    /// <p>Enables pull request previews for this branch.</p>
40    pub enable_pull_request_preview: ::std::option::Option<bool>,
41    /// <p>The Amplify environment name for the pull request.</p>
42    pub pull_request_environment_name: ::std::option::Option<::std::string::String>,
43    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
44    /// <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>
45    pub backend_environment_arn: ::std::option::Option<::std::string::String>,
46    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
47    /// <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>
48    pub backend: ::std::option::Option<crate::types::Backend>,
49    /// <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>
50    pub compute_role_arn: ::std::option::Option<::std::string::String>,
51}
52impl UpdateBranchInput {
53    /// <p>The unique ID for an Amplify app.</p>
54    pub fn app_id(&self) -> ::std::option::Option<&str> {
55        self.app_id.as_deref()
56    }
57    /// <p>The name of the branch.</p>
58    pub fn branch_name(&self) -> ::std::option::Option<&str> {
59        self.branch_name.as_deref()
60    }
61    /// <p>The description for the branch.</p>
62    pub fn description(&self) -> ::std::option::Option<&str> {
63        self.description.as_deref()
64    }
65    /// <p>The framework for the branch.</p>
66    pub fn framework(&self) -> ::std::option::Option<&str> {
67        self.framework.as_deref()
68    }
69    /// <p>Describes the current stage for the branch.</p>
70    pub fn stage(&self) -> ::std::option::Option<&crate::types::Stage> {
71        self.stage.as_ref()
72    }
73    /// <p>Enables notifications for the branch.</p>
74    pub fn enable_notification(&self) -> ::std::option::Option<bool> {
75        self.enable_notification
76    }
77    /// <p>Enables auto building for the branch.</p>
78    pub fn enable_auto_build(&self) -> ::std::option::Option<bool> {
79        self.enable_auto_build
80    }
81    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
82    /// <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>
83    pub fn enable_skew_protection(&self) -> ::std::option::Option<bool> {
84        self.enable_skew_protection
85    }
86    /// <p>The environment variables for the branch.</p>
87    pub fn environment_variables(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
88        self.environment_variables.as_ref()
89    }
90    /// <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>
91    pub fn basic_auth_credentials(&self) -> ::std::option::Option<&str> {
92        self.basic_auth_credentials.as_deref()
93    }
94    /// <p>Enables basic authorization for the branch.</p>
95    pub fn enable_basic_auth(&self) -> ::std::option::Option<bool> {
96        self.enable_basic_auth
97    }
98    /// <p>Enables performance mode for the branch.</p>
99    /// <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>
100    pub fn enable_performance_mode(&self) -> ::std::option::Option<bool> {
101        self.enable_performance_mode
102    }
103    /// <p>The build specification (build spec) for the branch.</p>
104    pub fn build_spec(&self) -> ::std::option::Option<&str> {
105        self.build_spec.as_deref()
106    }
107    /// <p>The content Time to Live (TTL) for the website in seconds.</p>
108    pub fn ttl(&self) -> ::std::option::Option<&str> {
109        self.ttl.as_deref()
110    }
111    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
112    pub fn display_name(&self) -> ::std::option::Option<&str> {
113        self.display_name.as_deref()
114    }
115    /// <p>Enables pull request previews for this branch.</p>
116    pub fn enable_pull_request_preview(&self) -> ::std::option::Option<bool> {
117        self.enable_pull_request_preview
118    }
119    /// <p>The Amplify environment name for the pull request.</p>
120    pub fn pull_request_environment_name(&self) -> ::std::option::Option<&str> {
121        self.pull_request_environment_name.as_deref()
122    }
123    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
124    /// <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>
125    pub fn backend_environment_arn(&self) -> ::std::option::Option<&str> {
126        self.backend_environment_arn.as_deref()
127    }
128    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
129    /// <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>
130    pub fn backend(&self) -> ::std::option::Option<&crate::types::Backend> {
131        self.backend.as_ref()
132    }
133    /// <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>
134    pub fn compute_role_arn(&self) -> ::std::option::Option<&str> {
135        self.compute_role_arn.as_deref()
136    }
137}
138impl ::std::fmt::Debug for UpdateBranchInput {
139    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
140        let mut formatter = f.debug_struct("UpdateBranchInput");
141        formatter.field("app_id", &self.app_id);
142        formatter.field("branch_name", &self.branch_name);
143        formatter.field("description", &self.description);
144        formatter.field("framework", &self.framework);
145        formatter.field("stage", &self.stage);
146        formatter.field("enable_notification", &self.enable_notification);
147        formatter.field("enable_auto_build", &self.enable_auto_build);
148        formatter.field("enable_skew_protection", &self.enable_skew_protection);
149        formatter.field("environment_variables", &self.environment_variables);
150        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
151        formatter.field("enable_basic_auth", &self.enable_basic_auth);
152        formatter.field("enable_performance_mode", &self.enable_performance_mode);
153        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
154        formatter.field("ttl", &self.ttl);
155        formatter.field("display_name", &self.display_name);
156        formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
157        formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
158        formatter.field("backend_environment_arn", &self.backend_environment_arn);
159        formatter.field("backend", &self.backend);
160        formatter.field("compute_role_arn", &self.compute_role_arn);
161        formatter.finish()
162    }
163}
164impl UpdateBranchInput {
165    /// Creates a new builder-style object to manufacture [`UpdateBranchInput`](crate::operation::update_branch::UpdateBranchInput).
166    pub fn builder() -> crate::operation::update_branch::builders::UpdateBranchInputBuilder {
167        crate::operation::update_branch::builders::UpdateBranchInputBuilder::default()
168    }
169}
170
171/// A builder for [`UpdateBranchInput`](crate::operation::update_branch::UpdateBranchInput).
172#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
173#[non_exhaustive]
174pub struct UpdateBranchInputBuilder {
175    pub(crate) app_id: ::std::option::Option<::std::string::String>,
176    pub(crate) branch_name: ::std::option::Option<::std::string::String>,
177    pub(crate) description: ::std::option::Option<::std::string::String>,
178    pub(crate) framework: ::std::option::Option<::std::string::String>,
179    pub(crate) stage: ::std::option::Option<crate::types::Stage>,
180    pub(crate) enable_notification: ::std::option::Option<bool>,
181    pub(crate) enable_auto_build: ::std::option::Option<bool>,
182    pub(crate) enable_skew_protection: ::std::option::Option<bool>,
183    pub(crate) environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
184    pub(crate) basic_auth_credentials: ::std::option::Option<::std::string::String>,
185    pub(crate) enable_basic_auth: ::std::option::Option<bool>,
186    pub(crate) enable_performance_mode: ::std::option::Option<bool>,
187    pub(crate) build_spec: ::std::option::Option<::std::string::String>,
188    pub(crate) ttl: ::std::option::Option<::std::string::String>,
189    pub(crate) display_name: ::std::option::Option<::std::string::String>,
190    pub(crate) enable_pull_request_preview: ::std::option::Option<bool>,
191    pub(crate) pull_request_environment_name: ::std::option::Option<::std::string::String>,
192    pub(crate) backend_environment_arn: ::std::option::Option<::std::string::String>,
193    pub(crate) backend: ::std::option::Option<crate::types::Backend>,
194    pub(crate) compute_role_arn: ::std::option::Option<::std::string::String>,
195}
196impl UpdateBranchInputBuilder {
197    /// <p>The unique ID for an Amplify app.</p>
198    /// This field is required.
199    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
200        self.app_id = ::std::option::Option::Some(input.into());
201        self
202    }
203    /// <p>The unique ID for an Amplify app.</p>
204    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
205        self.app_id = input;
206        self
207    }
208    /// <p>The unique ID for an Amplify app.</p>
209    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
210        &self.app_id
211    }
212    /// <p>The name of the branch.</p>
213    /// This field is required.
214    pub fn branch_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
215        self.branch_name = ::std::option::Option::Some(input.into());
216        self
217    }
218    /// <p>The name of the branch.</p>
219    pub fn set_branch_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
220        self.branch_name = input;
221        self
222    }
223    /// <p>The name of the branch.</p>
224    pub fn get_branch_name(&self) -> &::std::option::Option<::std::string::String> {
225        &self.branch_name
226    }
227    /// <p>The description for the branch.</p>
228    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229        self.description = ::std::option::Option::Some(input.into());
230        self
231    }
232    /// <p>The description for the branch.</p>
233    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
234        self.description = input;
235        self
236    }
237    /// <p>The description for the branch.</p>
238    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
239        &self.description
240    }
241    /// <p>The framework for the branch.</p>
242    pub fn framework(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
243        self.framework = ::std::option::Option::Some(input.into());
244        self
245    }
246    /// <p>The framework for the branch.</p>
247    pub fn set_framework(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
248        self.framework = input;
249        self
250    }
251    /// <p>The framework for the branch.</p>
252    pub fn get_framework(&self) -> &::std::option::Option<::std::string::String> {
253        &self.framework
254    }
255    /// <p>Describes the current stage for the branch.</p>
256    pub fn stage(mut self, input: crate::types::Stage) -> Self {
257        self.stage = ::std::option::Option::Some(input);
258        self
259    }
260    /// <p>Describes the current stage for the branch.</p>
261    pub fn set_stage(mut self, input: ::std::option::Option<crate::types::Stage>) -> Self {
262        self.stage = input;
263        self
264    }
265    /// <p>Describes the current stage for the branch.</p>
266    pub fn get_stage(&self) -> &::std::option::Option<crate::types::Stage> {
267        &self.stage
268    }
269    /// <p>Enables notifications for the branch.</p>
270    pub fn enable_notification(mut self, input: bool) -> Self {
271        self.enable_notification = ::std::option::Option::Some(input);
272        self
273    }
274    /// <p>Enables notifications for the branch.</p>
275    pub fn set_enable_notification(mut self, input: ::std::option::Option<bool>) -> Self {
276        self.enable_notification = input;
277        self
278    }
279    /// <p>Enables notifications for the branch.</p>
280    pub fn get_enable_notification(&self) -> &::std::option::Option<bool> {
281        &self.enable_notification
282    }
283    /// <p>Enables auto building for the branch.</p>
284    pub fn enable_auto_build(mut self, input: bool) -> Self {
285        self.enable_auto_build = ::std::option::Option::Some(input);
286        self
287    }
288    /// <p>Enables auto building for the branch.</p>
289    pub fn set_enable_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
290        self.enable_auto_build = input;
291        self
292    }
293    /// <p>Enables auto building for the branch.</p>
294    pub fn get_enable_auto_build(&self) -> &::std::option::Option<bool> {
295        &self.enable_auto_build
296    }
297    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
298    /// <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>
299    pub fn enable_skew_protection(mut self, input: bool) -> Self {
300        self.enable_skew_protection = ::std::option::Option::Some(input);
301        self
302    }
303    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
304    /// <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>
305    pub fn set_enable_skew_protection(mut self, input: ::std::option::Option<bool>) -> Self {
306        self.enable_skew_protection = input;
307        self
308    }
309    /// <p>Specifies whether the skew protection feature is enabled for the branch.</p>
310    /// <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>
311    pub fn get_enable_skew_protection(&self) -> &::std::option::Option<bool> {
312        &self.enable_skew_protection
313    }
314    /// Adds a key-value pair to `environment_variables`.
315    ///
316    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
317    ///
318    /// <p>The environment variables for the branch.</p>
319    pub fn environment_variables(
320        mut self,
321        k: impl ::std::convert::Into<::std::string::String>,
322        v: impl ::std::convert::Into<::std::string::String>,
323    ) -> Self {
324        let mut hash_map = self.environment_variables.unwrap_or_default();
325        hash_map.insert(k.into(), v.into());
326        self.environment_variables = ::std::option::Option::Some(hash_map);
327        self
328    }
329    /// <p>The environment variables for the branch.</p>
330    pub fn set_environment_variables(
331        mut self,
332        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
333    ) -> Self {
334        self.environment_variables = input;
335        self
336    }
337    /// <p>The environment variables for the branch.</p>
338    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
339        &self.environment_variables
340    }
341    /// <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>
342    pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
343        self.basic_auth_credentials = ::std::option::Option::Some(input.into());
344        self
345    }
346    /// <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>
347    pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
348        self.basic_auth_credentials = input;
349        self
350    }
351    /// <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>
352    pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
353        &self.basic_auth_credentials
354    }
355    /// <p>Enables basic authorization for the branch.</p>
356    pub fn enable_basic_auth(mut self, input: bool) -> Self {
357        self.enable_basic_auth = ::std::option::Option::Some(input);
358        self
359    }
360    /// <p>Enables basic authorization for the branch.</p>
361    pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
362        self.enable_basic_auth = input;
363        self
364    }
365    /// <p>Enables basic authorization for the branch.</p>
366    pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
367        &self.enable_basic_auth
368    }
369    /// <p>Enables performance mode for the branch.</p>
370    /// <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>
371    pub fn enable_performance_mode(mut self, input: bool) -> Self {
372        self.enable_performance_mode = ::std::option::Option::Some(input);
373        self
374    }
375    /// <p>Enables performance mode for the branch.</p>
376    /// <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>
377    pub fn set_enable_performance_mode(mut self, input: ::std::option::Option<bool>) -> Self {
378        self.enable_performance_mode = input;
379        self
380    }
381    /// <p>Enables performance mode for the branch.</p>
382    /// <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>
383    pub fn get_enable_performance_mode(&self) -> &::std::option::Option<bool> {
384        &self.enable_performance_mode
385    }
386    /// <p>The build specification (build spec) for the branch.</p>
387    pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
388        self.build_spec = ::std::option::Option::Some(input.into());
389        self
390    }
391    /// <p>The build specification (build spec) for the branch.</p>
392    pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
393        self.build_spec = input;
394        self
395    }
396    /// <p>The build specification (build spec) for the branch.</p>
397    pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
398        &self.build_spec
399    }
400    /// <p>The content Time to Live (TTL) for the website in seconds.</p>
401    pub fn ttl(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402        self.ttl = ::std::option::Option::Some(input.into());
403        self
404    }
405    /// <p>The content Time to Live (TTL) for the website in seconds.</p>
406    pub fn set_ttl(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
407        self.ttl = input;
408        self
409    }
410    /// <p>The content Time to Live (TTL) for the website in seconds.</p>
411    pub fn get_ttl(&self) -> &::std::option::Option<::std::string::String> {
412        &self.ttl
413    }
414    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
415    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416        self.display_name = ::std::option::Option::Some(input.into());
417        self
418    }
419    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
420    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421        self.display_name = input;
422        self
423    }
424    /// <p>The display name for a branch. This is used as the default domain prefix.</p>
425    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
426        &self.display_name
427    }
428    /// <p>Enables pull request previews for this branch.</p>
429    pub fn enable_pull_request_preview(mut self, input: bool) -> Self {
430        self.enable_pull_request_preview = ::std::option::Option::Some(input);
431        self
432    }
433    /// <p>Enables pull request previews for this branch.</p>
434    pub fn set_enable_pull_request_preview(mut self, input: ::std::option::Option<bool>) -> Self {
435        self.enable_pull_request_preview = input;
436        self
437    }
438    /// <p>Enables pull request previews for this branch.</p>
439    pub fn get_enable_pull_request_preview(&self) -> &::std::option::Option<bool> {
440        &self.enable_pull_request_preview
441    }
442    /// <p>The Amplify environment name for the pull request.</p>
443    pub fn pull_request_environment_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
444        self.pull_request_environment_name = ::std::option::Option::Some(input.into());
445        self
446    }
447    /// <p>The Amplify environment name for the pull request.</p>
448    pub fn set_pull_request_environment_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
449        self.pull_request_environment_name = input;
450        self
451    }
452    /// <p>The Amplify environment name for the pull request.</p>
453    pub fn get_pull_request_environment_name(&self) -> &::std::option::Option<::std::string::String> {
454        &self.pull_request_environment_name
455    }
456    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
457    /// <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>
458    pub fn backend_environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
459        self.backend_environment_arn = ::std::option::Option::Some(input.into());
460        self
461    }
462    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
463    /// <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>
464    pub fn set_backend_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
465        self.backend_environment_arn = input;
466        self
467    }
468    /// <p>The Amazon Resource Name (ARN) for a backend environment that is part of a Gen 1 Amplify app.</p>
469    /// <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>
470    pub fn get_backend_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
471        &self.backend_environment_arn
472    }
473    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
474    /// <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>
475    pub fn backend(mut self, input: crate::types::Backend) -> Self {
476        self.backend = ::std::option::Option::Some(input);
477        self
478    }
479    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
480    /// <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>
481    pub fn set_backend(mut self, input: ::std::option::Option<crate::types::Backend>) -> Self {
482        self.backend = input;
483        self
484    }
485    /// <p>The backend for a <code>Branch</code> of an Amplify app. Use for a backend created from an CloudFormation stack.</p>
486    /// <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>
487    pub fn get_backend(&self) -> &::std::option::Option<crate::types::Backend> {
488        &self.backend
489    }
490    /// <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>
491    pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
492        self.compute_role_arn = ::std::option::Option::Some(input.into());
493        self
494    }
495    /// <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>
496    pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
497        self.compute_role_arn = input;
498        self
499    }
500    /// <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>
501    pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
502        &self.compute_role_arn
503    }
504    /// Consumes the builder and constructs a [`UpdateBranchInput`](crate::operation::update_branch::UpdateBranchInput).
505    pub fn build(
506        self,
507    ) -> ::std::result::Result<crate::operation::update_branch::UpdateBranchInput, ::aws_smithy_types::error::operation::BuildError> {
508        ::std::result::Result::Ok(crate::operation::update_branch::UpdateBranchInput {
509            app_id: self.app_id,
510            branch_name: self.branch_name,
511            description: self.description,
512            framework: self.framework,
513            stage: self.stage,
514            enable_notification: self.enable_notification,
515            enable_auto_build: self.enable_auto_build,
516            enable_skew_protection: self.enable_skew_protection,
517            environment_variables: self.environment_variables,
518            basic_auth_credentials: self.basic_auth_credentials,
519            enable_basic_auth: self.enable_basic_auth,
520            enable_performance_mode: self.enable_performance_mode,
521            build_spec: self.build_spec,
522            ttl: self.ttl,
523            display_name: self.display_name,
524            enable_pull_request_preview: self.enable_pull_request_preview,
525            pull_request_environment_name: self.pull_request_environment_name,
526            backend_environment_arn: self.backend_environment_arn,
527            backend: self.backend,
528            compute_role_arn: self.compute_role_arn,
529        })
530    }
531}
532impl ::std::fmt::Debug for UpdateBranchInputBuilder {
533    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
534        let mut formatter = f.debug_struct("UpdateBranchInputBuilder");
535        formatter.field("app_id", &self.app_id);
536        formatter.field("branch_name", &self.branch_name);
537        formatter.field("description", &self.description);
538        formatter.field("framework", &self.framework);
539        formatter.field("stage", &self.stage);
540        formatter.field("enable_notification", &self.enable_notification);
541        formatter.field("enable_auto_build", &self.enable_auto_build);
542        formatter.field("enable_skew_protection", &self.enable_skew_protection);
543        formatter.field("environment_variables", &self.environment_variables);
544        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
545        formatter.field("enable_basic_auth", &self.enable_basic_auth);
546        formatter.field("enable_performance_mode", &self.enable_performance_mode);
547        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
548        formatter.field("ttl", &self.ttl);
549        formatter.field("display_name", &self.display_name);
550        formatter.field("enable_pull_request_preview", &self.enable_pull_request_preview);
551        formatter.field("pull_request_environment_name", &self.pull_request_environment_name);
552        formatter.field("backend_environment_arn", &self.backend_environment_arn);
553        formatter.field("backend", &self.backend);
554        formatter.field("compute_role_arn", &self.compute_role_arn);
555        formatter.finish()
556    }
557}