aws_sdk_amplify/operation/update_app/
_update_app_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 app request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
6pub struct UpdateAppInput {
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 an Amplify app.</p>
10    pub name: ::std::option::Option<::std::string::String>,
11    /// <p>The description for an Amplify app.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
14    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code>.</p>
15    pub platform: ::std::option::Option<crate::types::Platform>,
16    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to 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>
17    pub compute_role_arn: ::std::option::Option<::std::string::String>,
18    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
19    pub iam_service_role_arn: ::std::option::Option<::std::string::String>,
20    /// <p>The environment variables for an Amplify app.</p>
21    pub environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
22    /// <p>Enables branch auto-building for an Amplify app.</p>
23    pub enable_branch_auto_build: ::std::option::Option<bool>,
24    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
25    pub enable_branch_auto_deletion: ::std::option::Option<bool>,
26    /// <p>Enables basic authorization for an Amplify app.</p>
27    pub enable_basic_auth: ::std::option::Option<bool>,
28    /// <p>The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
29    pub basic_auth_credentials: ::std::option::Option<::std::string::String>,
30    /// <p>The custom redirect and rewrite rules for an Amplify app.</p>
31    pub custom_rules: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>,
32    /// <p>The build specification (build spec) for an Amplify app.</p>
33    pub build_spec: ::std::option::Option<::std::string::String>,
34    /// <p>The custom HTTP headers for an Amplify app.</p>
35    pub custom_headers: ::std::option::Option<::std::string::String>,
36    /// <p>Enables automated branch creation for an Amplify app.</p>
37    pub enable_auto_branch_creation: ::std::option::Option<bool>,
38    /// <p>Describes the automated branch creation glob patterns for an Amplify app.</p>
39    pub auto_branch_creation_patterns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
40    /// <p>The automated branch creation configuration for an Amplify app.</p>
41    pub auto_branch_creation_config: ::std::option::Option<crate::types::AutoBranchCreationConfig>,
42    /// <p>The name of the Git repository for an Amplify app.</p>
43    pub repository: ::std::option::Option<::std::string::String>,
44    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
45    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit.</p>
46    /// <p>To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
47    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you update an app.</p>
48    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
49    pub oauth_token: ::std::option::Option<::std::string::String>,
50    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
51    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
52    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you update an app.</p>
53    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
54    pub access_token: ::std::option::Option<::std::string::String>,
55    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
56    pub job_config: ::std::option::Option<crate::types::JobConfig>,
57    /// <p>The cache configuration for the Amplify app.</p>
58    pub cache_config: ::std::option::Option<crate::types::CacheConfig>,
59}
60impl UpdateAppInput {
61    /// <p>The unique ID for an Amplify app.</p>
62    pub fn app_id(&self) -> ::std::option::Option<&str> {
63        self.app_id.as_deref()
64    }
65    /// <p>The name for an Amplify app.</p>
66    pub fn name(&self) -> ::std::option::Option<&str> {
67        self.name.as_deref()
68    }
69    /// <p>The description for an Amplify app.</p>
70    pub fn description(&self) -> ::std::option::Option<&str> {
71        self.description.as_deref()
72    }
73    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
74    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code>.</p>
75    pub fn platform(&self) -> ::std::option::Option<&crate::types::Platform> {
76        self.platform.as_ref()
77    }
78    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to 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>
79    pub fn compute_role_arn(&self) -> ::std::option::Option<&str> {
80        self.compute_role_arn.as_deref()
81    }
82    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
83    pub fn iam_service_role_arn(&self) -> ::std::option::Option<&str> {
84        self.iam_service_role_arn.as_deref()
85    }
86    /// <p>The environment variables for an Amplify app.</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>Enables branch auto-building for an Amplify app.</p>
91    pub fn enable_branch_auto_build(&self) -> ::std::option::Option<bool> {
92        self.enable_branch_auto_build
93    }
94    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
95    pub fn enable_branch_auto_deletion(&self) -> ::std::option::Option<bool> {
96        self.enable_branch_auto_deletion
97    }
98    /// <p>Enables basic authorization for an Amplify app.</p>
99    pub fn enable_basic_auth(&self) -> ::std::option::Option<bool> {
100        self.enable_basic_auth
101    }
102    /// <p>The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
103    pub fn basic_auth_credentials(&self) -> ::std::option::Option<&str> {
104        self.basic_auth_credentials.as_deref()
105    }
106    /// <p>The custom redirect and rewrite rules for an Amplify app.</p>
107    ///
108    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.custom_rules.is_none()`.
109    pub fn custom_rules(&self) -> &[crate::types::CustomRule] {
110        self.custom_rules.as_deref().unwrap_or_default()
111    }
112    /// <p>The build specification (build spec) for an Amplify app.</p>
113    pub fn build_spec(&self) -> ::std::option::Option<&str> {
114        self.build_spec.as_deref()
115    }
116    /// <p>The custom HTTP headers for an Amplify app.</p>
117    pub fn custom_headers(&self) -> ::std::option::Option<&str> {
118        self.custom_headers.as_deref()
119    }
120    /// <p>Enables automated branch creation for an Amplify app.</p>
121    pub fn enable_auto_branch_creation(&self) -> ::std::option::Option<bool> {
122        self.enable_auto_branch_creation
123    }
124    /// <p>Describes the automated branch creation glob patterns for an Amplify app.</p>
125    ///
126    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.auto_branch_creation_patterns.is_none()`.
127    pub fn auto_branch_creation_patterns(&self) -> &[::std::string::String] {
128        self.auto_branch_creation_patterns.as_deref().unwrap_or_default()
129    }
130    /// <p>The automated branch creation configuration for an Amplify app.</p>
131    pub fn auto_branch_creation_config(&self) -> ::std::option::Option<&crate::types::AutoBranchCreationConfig> {
132        self.auto_branch_creation_config.as_ref()
133    }
134    /// <p>The name of the Git repository for an Amplify app.</p>
135    pub fn repository(&self) -> ::std::option::Option<&str> {
136        self.repository.as_deref()
137    }
138    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
139    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit.</p>
140    /// <p>To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
141    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you update an app.</p>
142    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
143    pub fn oauth_token(&self) -> ::std::option::Option<&str> {
144        self.oauth_token.as_deref()
145    }
146    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
147    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
148    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you update an app.</p>
149    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
150    pub fn access_token(&self) -> ::std::option::Option<&str> {
151        self.access_token.as_deref()
152    }
153    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
154    pub fn job_config(&self) -> ::std::option::Option<&crate::types::JobConfig> {
155        self.job_config.as_ref()
156    }
157    /// <p>The cache configuration for the Amplify app.</p>
158    pub fn cache_config(&self) -> ::std::option::Option<&crate::types::CacheConfig> {
159        self.cache_config.as_ref()
160    }
161}
162impl ::std::fmt::Debug for UpdateAppInput {
163    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
164        let mut formatter = f.debug_struct("UpdateAppInput");
165        formatter.field("app_id", &self.app_id);
166        formatter.field("name", &self.name);
167        formatter.field("description", &self.description);
168        formatter.field("platform", &self.platform);
169        formatter.field("compute_role_arn", &self.compute_role_arn);
170        formatter.field("iam_service_role_arn", &self.iam_service_role_arn);
171        formatter.field("environment_variables", &self.environment_variables);
172        formatter.field("enable_branch_auto_build", &self.enable_branch_auto_build);
173        formatter.field("enable_branch_auto_deletion", &self.enable_branch_auto_deletion);
174        formatter.field("enable_basic_auth", &self.enable_basic_auth);
175        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
176        formatter.field("custom_rules", &self.custom_rules);
177        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
178        formatter.field("custom_headers", &self.custom_headers);
179        formatter.field("enable_auto_branch_creation", &self.enable_auto_branch_creation);
180        formatter.field("auto_branch_creation_patterns", &self.auto_branch_creation_patterns);
181        formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config);
182        formatter.field("repository", &self.repository);
183        formatter.field("oauth_token", &"*** Sensitive Data Redacted ***");
184        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
185        formatter.field("job_config", &self.job_config);
186        formatter.field("cache_config", &self.cache_config);
187        formatter.finish()
188    }
189}
190impl UpdateAppInput {
191    /// Creates a new builder-style object to manufacture [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
192    pub fn builder() -> crate::operation::update_app::builders::UpdateAppInputBuilder {
193        crate::operation::update_app::builders::UpdateAppInputBuilder::default()
194    }
195}
196
197/// A builder for [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
198#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
199#[non_exhaustive]
200pub struct UpdateAppInputBuilder {
201    pub(crate) app_id: ::std::option::Option<::std::string::String>,
202    pub(crate) name: ::std::option::Option<::std::string::String>,
203    pub(crate) description: ::std::option::Option<::std::string::String>,
204    pub(crate) platform: ::std::option::Option<crate::types::Platform>,
205    pub(crate) compute_role_arn: ::std::option::Option<::std::string::String>,
206    pub(crate) iam_service_role_arn: ::std::option::Option<::std::string::String>,
207    pub(crate) environment_variables: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
208    pub(crate) enable_branch_auto_build: ::std::option::Option<bool>,
209    pub(crate) enable_branch_auto_deletion: ::std::option::Option<bool>,
210    pub(crate) enable_basic_auth: ::std::option::Option<bool>,
211    pub(crate) basic_auth_credentials: ::std::option::Option<::std::string::String>,
212    pub(crate) custom_rules: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>,
213    pub(crate) build_spec: ::std::option::Option<::std::string::String>,
214    pub(crate) custom_headers: ::std::option::Option<::std::string::String>,
215    pub(crate) enable_auto_branch_creation: ::std::option::Option<bool>,
216    pub(crate) auto_branch_creation_patterns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
217    pub(crate) auto_branch_creation_config: ::std::option::Option<crate::types::AutoBranchCreationConfig>,
218    pub(crate) repository: ::std::option::Option<::std::string::String>,
219    pub(crate) oauth_token: ::std::option::Option<::std::string::String>,
220    pub(crate) access_token: ::std::option::Option<::std::string::String>,
221    pub(crate) job_config: ::std::option::Option<crate::types::JobConfig>,
222    pub(crate) cache_config: ::std::option::Option<crate::types::CacheConfig>,
223}
224impl UpdateAppInputBuilder {
225    /// <p>The unique ID for an Amplify app.</p>
226    /// This field is required.
227    pub fn app_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
228        self.app_id = ::std::option::Option::Some(input.into());
229        self
230    }
231    /// <p>The unique ID for an Amplify app.</p>
232    pub fn set_app_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
233        self.app_id = input;
234        self
235    }
236    /// <p>The unique ID for an Amplify app.</p>
237    pub fn get_app_id(&self) -> &::std::option::Option<::std::string::String> {
238        &self.app_id
239    }
240    /// <p>The name for an Amplify app.</p>
241    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
242        self.name = ::std::option::Option::Some(input.into());
243        self
244    }
245    /// <p>The name for an Amplify app.</p>
246    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
247        self.name = input;
248        self
249    }
250    /// <p>The name for an Amplify app.</p>
251    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
252        &self.name
253    }
254    /// <p>The description for an Amplify app.</p>
255    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.description = ::std::option::Option::Some(input.into());
257        self
258    }
259    /// <p>The description for an Amplify app.</p>
260    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261        self.description = input;
262        self
263    }
264    /// <p>The description for an Amplify app.</p>
265    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
266        &self.description
267    }
268    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
269    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code>.</p>
270    pub fn platform(mut self, input: crate::types::Platform) -> Self {
271        self.platform = ::std::option::Option::Some(input);
272        self
273    }
274    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
275    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code>.</p>
276    pub fn set_platform(mut self, input: ::std::option::Option<crate::types::Platform>) -> Self {
277        self.platform = input;
278        self
279    }
280    /// <p>The platform for the Amplify app. For a static app, set the platform type to <code>WEB</code>. For a dynamic server-side rendered (SSR) app, set the platform type to <code>WEB_COMPUTE</code>. For an app requiring Amplify Hosting's original SSR support only, set the platform type to <code>WEB_DYNAMIC</code>.</p>
281    /// <p>If you are deploying an SSG only app with Next.js version 14 or later, you must set the platform type to <code>WEB_COMPUTE</code>.</p>
282    pub fn get_platform(&self) -> &::std::option::Option<crate::types::Platform> {
283        &self.platform
284    }
285    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to 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>
286    pub fn compute_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
287        self.compute_role_arn = ::std::option::Option::Some(input.into());
288        self
289    }
290    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to 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>
291    pub fn set_compute_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
292        self.compute_role_arn = input;
293        self
294    }
295    /// <p>The Amazon Resource Name (ARN) of the IAM role to assign to 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>
296    pub fn get_compute_role_arn(&self) -> &::std::option::Option<::std::string::String> {
297        &self.compute_role_arn
298    }
299    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
300    pub fn iam_service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
301        self.iam_service_role_arn = ::std::option::Option::Some(input.into());
302        self
303    }
304    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
305    pub fn set_iam_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
306        self.iam_service_role_arn = input;
307        self
308    }
309    /// <p>The Amazon Resource Name (ARN) of the IAM service role for the Amplify app.</p>
310    pub fn get_iam_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
311        &self.iam_service_role_arn
312    }
313    /// Adds a key-value pair to `environment_variables`.
314    ///
315    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
316    ///
317    /// <p>The environment variables for an Amplify app.</p>
318    pub fn environment_variables(
319        mut self,
320        k: impl ::std::convert::Into<::std::string::String>,
321        v: impl ::std::convert::Into<::std::string::String>,
322    ) -> Self {
323        let mut hash_map = self.environment_variables.unwrap_or_default();
324        hash_map.insert(k.into(), v.into());
325        self.environment_variables = ::std::option::Option::Some(hash_map);
326        self
327    }
328    /// <p>The environment variables for an Amplify app.</p>
329    pub fn set_environment_variables(
330        mut self,
331        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
332    ) -> Self {
333        self.environment_variables = input;
334        self
335    }
336    /// <p>The environment variables for an Amplify app.</p>
337    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
338        &self.environment_variables
339    }
340    /// <p>Enables branch auto-building for an Amplify app.</p>
341    pub fn enable_branch_auto_build(mut self, input: bool) -> Self {
342        self.enable_branch_auto_build = ::std::option::Option::Some(input);
343        self
344    }
345    /// <p>Enables branch auto-building for an Amplify app.</p>
346    pub fn set_enable_branch_auto_build(mut self, input: ::std::option::Option<bool>) -> Self {
347        self.enable_branch_auto_build = input;
348        self
349    }
350    /// <p>Enables branch auto-building for an Amplify app.</p>
351    pub fn get_enable_branch_auto_build(&self) -> &::std::option::Option<bool> {
352        &self.enable_branch_auto_build
353    }
354    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
355    pub fn enable_branch_auto_deletion(mut self, input: bool) -> Self {
356        self.enable_branch_auto_deletion = ::std::option::Option::Some(input);
357        self
358    }
359    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
360    pub fn set_enable_branch_auto_deletion(mut self, input: ::std::option::Option<bool>) -> Self {
361        self.enable_branch_auto_deletion = input;
362        self
363    }
364    /// <p>Automatically disconnects a branch in the Amplify console when you delete a branch from your Git repository.</p>
365    pub fn get_enable_branch_auto_deletion(&self) -> &::std::option::Option<bool> {
366        &self.enable_branch_auto_deletion
367    }
368    /// <p>Enables basic authorization for an Amplify app.</p>
369    pub fn enable_basic_auth(mut self, input: bool) -> Self {
370        self.enable_basic_auth = ::std::option::Option::Some(input);
371        self
372    }
373    /// <p>Enables basic authorization for an Amplify app.</p>
374    pub fn set_enable_basic_auth(mut self, input: ::std::option::Option<bool>) -> Self {
375        self.enable_basic_auth = input;
376        self
377    }
378    /// <p>Enables basic authorization for an Amplify app.</p>
379    pub fn get_enable_basic_auth(&self) -> &::std::option::Option<bool> {
380        &self.enable_basic_auth
381    }
382    /// <p>The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
383    pub fn basic_auth_credentials(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
384        self.basic_auth_credentials = ::std::option::Option::Some(input.into());
385        self
386    }
387    /// <p>The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
388    pub fn set_basic_auth_credentials(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
389        self.basic_auth_credentials = input;
390        self
391    }
392    /// <p>The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and provide them in the format <code>user:password</code>.</p>
393    pub fn get_basic_auth_credentials(&self) -> &::std::option::Option<::std::string::String> {
394        &self.basic_auth_credentials
395    }
396    /// Appends an item to `custom_rules`.
397    ///
398    /// To override the contents of this collection use [`set_custom_rules`](Self::set_custom_rules).
399    ///
400    /// <p>The custom redirect and rewrite rules for an Amplify app.</p>
401    pub fn custom_rules(mut self, input: crate::types::CustomRule) -> Self {
402        let mut v = self.custom_rules.unwrap_or_default();
403        v.push(input);
404        self.custom_rules = ::std::option::Option::Some(v);
405        self
406    }
407    /// <p>The custom redirect and rewrite rules for an Amplify app.</p>
408    pub fn set_custom_rules(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::CustomRule>>) -> Self {
409        self.custom_rules = input;
410        self
411    }
412    /// <p>The custom redirect and rewrite rules for an Amplify app.</p>
413    pub fn get_custom_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CustomRule>> {
414        &self.custom_rules
415    }
416    /// <p>The build specification (build spec) for an Amplify app.</p>
417    pub fn build_spec(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
418        self.build_spec = ::std::option::Option::Some(input.into());
419        self
420    }
421    /// <p>The build specification (build spec) for an Amplify app.</p>
422    pub fn set_build_spec(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
423        self.build_spec = input;
424        self
425    }
426    /// <p>The build specification (build spec) for an Amplify app.</p>
427    pub fn get_build_spec(&self) -> &::std::option::Option<::std::string::String> {
428        &self.build_spec
429    }
430    /// <p>The custom HTTP headers for an Amplify app.</p>
431    pub fn custom_headers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
432        self.custom_headers = ::std::option::Option::Some(input.into());
433        self
434    }
435    /// <p>The custom HTTP headers for an Amplify app.</p>
436    pub fn set_custom_headers(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
437        self.custom_headers = input;
438        self
439    }
440    /// <p>The custom HTTP headers for an Amplify app.</p>
441    pub fn get_custom_headers(&self) -> &::std::option::Option<::std::string::String> {
442        &self.custom_headers
443    }
444    /// <p>Enables automated branch creation for an Amplify app.</p>
445    pub fn enable_auto_branch_creation(mut self, input: bool) -> Self {
446        self.enable_auto_branch_creation = ::std::option::Option::Some(input);
447        self
448    }
449    /// <p>Enables automated branch creation for an Amplify app.</p>
450    pub fn set_enable_auto_branch_creation(mut self, input: ::std::option::Option<bool>) -> Self {
451        self.enable_auto_branch_creation = input;
452        self
453    }
454    /// <p>Enables automated branch creation for an Amplify app.</p>
455    pub fn get_enable_auto_branch_creation(&self) -> &::std::option::Option<bool> {
456        &self.enable_auto_branch_creation
457    }
458    /// Appends an item to `auto_branch_creation_patterns`.
459    ///
460    /// To override the contents of this collection use [`set_auto_branch_creation_patterns`](Self::set_auto_branch_creation_patterns).
461    ///
462    /// <p>Describes the automated branch creation glob patterns for an Amplify app.</p>
463    pub fn auto_branch_creation_patterns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
464        let mut v = self.auto_branch_creation_patterns.unwrap_or_default();
465        v.push(input.into());
466        self.auto_branch_creation_patterns = ::std::option::Option::Some(v);
467        self
468    }
469    /// <p>Describes the automated branch creation glob patterns for an Amplify app.</p>
470    pub fn set_auto_branch_creation_patterns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
471        self.auto_branch_creation_patterns = input;
472        self
473    }
474    /// <p>Describes the automated branch creation glob patterns for an Amplify app.</p>
475    pub fn get_auto_branch_creation_patterns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
476        &self.auto_branch_creation_patterns
477    }
478    /// <p>The automated branch creation configuration for an Amplify app.</p>
479    pub fn auto_branch_creation_config(mut self, input: crate::types::AutoBranchCreationConfig) -> Self {
480        self.auto_branch_creation_config = ::std::option::Option::Some(input);
481        self
482    }
483    /// <p>The automated branch creation configuration for an Amplify app.</p>
484    pub fn set_auto_branch_creation_config(mut self, input: ::std::option::Option<crate::types::AutoBranchCreationConfig>) -> Self {
485        self.auto_branch_creation_config = input;
486        self
487    }
488    /// <p>The automated branch creation configuration for an Amplify app.</p>
489    pub fn get_auto_branch_creation_config(&self) -> &::std::option::Option<crate::types::AutoBranchCreationConfig> {
490        &self.auto_branch_creation_config
491    }
492    /// <p>The name of the Git repository for an Amplify app.</p>
493    pub fn repository(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
494        self.repository = ::std::option::Option::Some(input.into());
495        self
496    }
497    /// <p>The name of the Git repository for an Amplify app.</p>
498    pub fn set_repository(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
499        self.repository = input;
500        self
501    }
502    /// <p>The name of the Git repository for an Amplify app.</p>
503    pub fn get_repository(&self) -> &::std::option::Option<::std::string::String> {
504        &self.repository
505    }
506    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
507    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit.</p>
508    /// <p>To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
509    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you update an app.</p>
510    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
511    pub fn oauth_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
512        self.oauth_token = ::std::option::Option::Some(input.into());
513        self
514    }
515    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
516    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit.</p>
517    /// <p>To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
518    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you update an app.</p>
519    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
520    pub fn set_oauth_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
521        self.oauth_token = input;
522        self
523    }
524    /// <p>The OAuth token for a third-party source control system for an Amplify app. The OAuth token is used to create a webhook and a read-only deploy key using SSH cloning. The OAuth token is not stored.</p>
525    /// <p>Use <code>oauthToken</code> for repository providers other than GitHub, such as Bitbucket or CodeCommit.</p>
526    /// <p>To authorize access to GitHub as your repository provider, use <code>accessToken</code>.</p>
527    /// <p>You must specify either <code>oauthToken</code> or <code>accessToken</code> when you update an app.</p>
528    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
529    pub fn get_oauth_token(&self) -> &::std::option::Option<::std::string::String> {
530        &self.oauth_token
531    }
532    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
533    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
534    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you update an app.</p>
535    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
536    pub fn access_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
537        self.access_token = ::std::option::Option::Some(input.into());
538        self
539    }
540    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
541    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
542    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you update an app.</p>
543    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
544    pub fn set_access_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
545        self.access_token = input;
546        self
547    }
548    /// <p>The personal access token for a GitHub repository for an Amplify app. The personal access token is used to authorize access to a GitHub repository using the Amplify GitHub App. The token is not stored.</p>
549    /// <p>Use <code>accessToken</code> for GitHub repositories only. To authorize access to a repository provider such as Bitbucket or CodeCommit, use <code>oauthToken</code>.</p>
550    /// <p>You must specify either <code>accessToken</code> or <code>oauthToken</code> when you update an app.</p>
551    /// <p>Existing Amplify apps deployed from a GitHub repository using OAuth continue to work with CI/CD. However, we strongly recommend that you migrate these apps to use the GitHub App. For more information, see <a href="https://docs.aws.amazon.com/amplify/latest/userguide/setting-up-GitHub-access.html#migrating-to-github-app-auth">Migrating an existing OAuth app to the Amplify GitHub App</a> in the <i>Amplify User Guide</i> .</p>
552    pub fn get_access_token(&self) -> &::std::option::Option<::std::string::String> {
553        &self.access_token
554    }
555    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
556    pub fn job_config(mut self, input: crate::types::JobConfig) -> Self {
557        self.job_config = ::std::option::Option::Some(input);
558        self
559    }
560    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
561    pub fn set_job_config(mut self, input: ::std::option::Option<crate::types::JobConfig>) -> Self {
562        self.job_config = input;
563        self
564    }
565    /// <p>Describes the configuration details that apply to the jobs for an Amplify app.</p>
566    pub fn get_job_config(&self) -> &::std::option::Option<crate::types::JobConfig> {
567        &self.job_config
568    }
569    /// <p>The cache configuration for the Amplify app.</p>
570    pub fn cache_config(mut self, input: crate::types::CacheConfig) -> Self {
571        self.cache_config = ::std::option::Option::Some(input);
572        self
573    }
574    /// <p>The cache configuration for the Amplify app.</p>
575    pub fn set_cache_config(mut self, input: ::std::option::Option<crate::types::CacheConfig>) -> Self {
576        self.cache_config = input;
577        self
578    }
579    /// <p>The cache configuration for the Amplify app.</p>
580    pub fn get_cache_config(&self) -> &::std::option::Option<crate::types::CacheConfig> {
581        &self.cache_config
582    }
583    /// Consumes the builder and constructs a [`UpdateAppInput`](crate::operation::update_app::UpdateAppInput).
584    pub fn build(self) -> ::std::result::Result<crate::operation::update_app::UpdateAppInput, ::aws_smithy_types::error::operation::BuildError> {
585        ::std::result::Result::Ok(crate::operation::update_app::UpdateAppInput {
586            app_id: self.app_id,
587            name: self.name,
588            description: self.description,
589            platform: self.platform,
590            compute_role_arn: self.compute_role_arn,
591            iam_service_role_arn: self.iam_service_role_arn,
592            environment_variables: self.environment_variables,
593            enable_branch_auto_build: self.enable_branch_auto_build,
594            enable_branch_auto_deletion: self.enable_branch_auto_deletion,
595            enable_basic_auth: self.enable_basic_auth,
596            basic_auth_credentials: self.basic_auth_credentials,
597            custom_rules: self.custom_rules,
598            build_spec: self.build_spec,
599            custom_headers: self.custom_headers,
600            enable_auto_branch_creation: self.enable_auto_branch_creation,
601            auto_branch_creation_patterns: self.auto_branch_creation_patterns,
602            auto_branch_creation_config: self.auto_branch_creation_config,
603            repository: self.repository,
604            oauth_token: self.oauth_token,
605            access_token: self.access_token,
606            job_config: self.job_config,
607            cache_config: self.cache_config,
608        })
609    }
610}
611impl ::std::fmt::Debug for UpdateAppInputBuilder {
612    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
613        let mut formatter = f.debug_struct("UpdateAppInputBuilder");
614        formatter.field("app_id", &self.app_id);
615        formatter.field("name", &self.name);
616        formatter.field("description", &self.description);
617        formatter.field("platform", &self.platform);
618        formatter.field("compute_role_arn", &self.compute_role_arn);
619        formatter.field("iam_service_role_arn", &self.iam_service_role_arn);
620        formatter.field("environment_variables", &self.environment_variables);
621        formatter.field("enable_branch_auto_build", &self.enable_branch_auto_build);
622        formatter.field("enable_branch_auto_deletion", &self.enable_branch_auto_deletion);
623        formatter.field("enable_basic_auth", &self.enable_basic_auth);
624        formatter.field("basic_auth_credentials", &"*** Sensitive Data Redacted ***");
625        formatter.field("custom_rules", &self.custom_rules);
626        formatter.field("build_spec", &"*** Sensitive Data Redacted ***");
627        formatter.field("custom_headers", &self.custom_headers);
628        formatter.field("enable_auto_branch_creation", &self.enable_auto_branch_creation);
629        formatter.field("auto_branch_creation_patterns", &self.auto_branch_creation_patterns);
630        formatter.field("auto_branch_creation_config", &self.auto_branch_creation_config);
631        formatter.field("repository", &self.repository);
632        formatter.field("oauth_token", &"*** Sensitive Data Redacted ***");
633        formatter.field("access_token", &"*** Sensitive Data Redacted ***");
634        formatter.field("job_config", &self.job_config);
635        formatter.field("cache_config", &self.cache_config);
636        formatter.finish()
637    }
638}