/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.amplify.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** *

* The request structure used to create apps in Amplify. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateAppRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The name for an Amplify app. *

*/ private String name; /** *

* The description for an Amplify app. *

*/ private String description; /** *

* The repository for an Amplify app. *

*/ private String repository; /** *

* The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic * server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify * Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. *

*/ private String platform; /** *

* The AWS Identity and Access Management (IAM) service role for an Amplify app. *

*/ private String iamServiceRoleArn; /** *

* 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. *

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To * authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

*/ private String oauthToken; /** *

* 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. *

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider such as * Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

*/ private String accessToken; /** *

* The environment variables map for an Amplify app. *

*/ private java.util.Map environmentVariables; /** *

* Enables the auto building of branches for an Amplify app. *

*/ private Boolean enableBranchAutoBuild; /** *

* Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. *

*/ private Boolean enableBranchAutoDeletion; /** *

* Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. *

*/ private Boolean enableBasicAuth; /** *

* The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials * and provide them in the format user:password. *

*/ private String basicAuthCredentials; /** *

* The custom rewrite and redirect rules for an Amplify app. *

*/ private java.util.List customRules; /** *

* The tag for an Amplify app. *

*/ private java.util.Map tags; /** *

* The build specification (build spec) for an Amplify app. *

*/ private String buildSpec; /** *

* The custom HTTP headers for an Amplify app. *

*/ private String customHeaders; /** *

* Enables automated branch creation for an Amplify app. *

*/ private Boolean enableAutoBranchCreation; /** *

* The automated branch creation glob patterns for an Amplify app. *

*/ private java.util.List autoBranchCreationPatterns; /** *

* The automated branch creation configuration for an Amplify app. *

*/ private AutoBranchCreationConfig autoBranchCreationConfig; /** *

* The name for an Amplify app. *

* * @param name * The name for an Amplify app. */ public void setName(String name) { this.name = name; } /** *

* The name for an Amplify app. *

* * @return The name for an Amplify app. */ public String getName() { return this.name; } /** *

* The name for an Amplify app. *

* * @param name * The name for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withName(String name) { setName(name); return this; } /** *

* The description for an Amplify app. *

* * @param description * The description for an Amplify app. */ public void setDescription(String description) { this.description = description; } /** *

* The description for an Amplify app. *

* * @return The description for an Amplify app. */ public String getDescription() { return this.description; } /** *

* The description for an Amplify app. *

* * @param description * The description for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withDescription(String description) { setDescription(description); return this; } /** *

* The repository for an Amplify app. *

* * @param repository * The repository for an Amplify app. */ public void setRepository(String repository) { this.repository = repository; } /** *

* The repository for an Amplify app. *

* * @return The repository for an Amplify app. */ public String getRepository() { return this.repository; } /** *

* The repository for an Amplify app. *

* * @param repository * The repository for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withRepository(String repository) { setRepository(repository); return this; } /** *

* The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic * server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify * Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. *

* * @param platform * The platform for the Amplify app. For a static app, set the platform type to WEB. For a * dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app * requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. * @see Platform */ public void setPlatform(String platform) { this.platform = platform; } /** *

* The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic * server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify * Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. *

* * @return The platform for the Amplify app. For a static app, set the platform type to WEB. For a * dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app * requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. * @see Platform */ public String getPlatform() { return this.platform; } /** *

* The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic * server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify * Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. *

* * @param platform * The platform for the Amplify app. For a static app, set the platform type to WEB. For a * dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app * requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public CreateAppRequest withPlatform(String platform) { setPlatform(platform); return this; } /** *

* The platform for the Amplify app. For a static app, set the platform type to WEB. For a dynamic * server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app requiring Amplify * Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. *

* * @param platform * The platform for the Amplify app. For a static app, set the platform type to WEB. For a * dynamic server-side rendered (SSR) app, set the platform type to WEB_COMPUTE. For an app * requiring Amplify Hosting's original SSR support only, set the platform type to WEB_DYNAMIC. * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public CreateAppRequest withPlatform(Platform platform) { this.platform = platform.toString(); return this; } /** *

* The AWS Identity and Access Management (IAM) service role for an Amplify app. *

* * @param iamServiceRoleArn * The AWS Identity and Access Management (IAM) service role for an Amplify app. */ public void setIamServiceRoleArn(String iamServiceRoleArn) { this.iamServiceRoleArn = iamServiceRoleArn; } /** *

* The AWS Identity and Access Management (IAM) service role for an Amplify app. *

* * @return The AWS Identity and Access Management (IAM) service role for an Amplify app. */ public String getIamServiceRoleArn() { return this.iamServiceRoleArn; } /** *

* The AWS Identity and Access Management (IAM) service role for an Amplify app. *

* * @param iamServiceRoleArn * The AWS Identity and Access Management (IAM) service role for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withIamServiceRoleArn(String iamServiceRoleArn) { setIamServiceRoleArn(iamServiceRoleArn); return this; } /** *

* 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. *

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To * authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @param oauthToken * 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.

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. * To authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . */ public void setOauthToken(String oauthToken) { this.oauthToken = oauthToken; } /** *

* 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. *

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To * authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @return 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.

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. * To authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . */ public String getOauthToken() { return this.oauthToken; } /** *

* 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. *

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. To * authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @param oauthToken * 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.

*

* Use oauthToken for repository providers other than GitHub, such as Bitbucket or CodeCommit. * To authorize access to GitHub as your repository provider, use accessToken. *

*

* You must specify either oauthToken or accessToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withOauthToken(String oauthToken) { setOauthToken(oauthToken); return this; } /** *

* 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. *

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider such as * Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @param accessToken * 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.

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider * such as Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . */ public void setAccessToken(String accessToken) { this.accessToken = accessToken; } /** *

* 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. *

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider such as * Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @return 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.

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider * such as Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . */ public String getAccessToken() { return this.accessToken; } /** *

* 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. *

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider such as * Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . *

* * @param accessToken * 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.

*

* Use accessToken for GitHub repositories only. To authorize access to a repository provider * such as Bitbucket or CodeCommit, use oauthToken. *

*

* You must specify either accessToken or oauthToken when you create a new app. *

*

* 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 Migrating an existing OAuth app to the Amplify GitHub App in the Amplify User Guide . * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withAccessToken(String accessToken) { setAccessToken(accessToken); return this; } /** *

* The environment variables map for an Amplify app. *

* * @return The environment variables map for an Amplify app. */ public java.util.Map getEnvironmentVariables() { return environmentVariables; } /** *

* The environment variables map for an Amplify app. *

* * @param environmentVariables * The environment variables map for an Amplify app. */ public void setEnvironmentVariables(java.util.Map environmentVariables) { this.environmentVariables = environmentVariables; } /** *

* The environment variables map for an Amplify app. *

* * @param environmentVariables * The environment variables map for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withEnvironmentVariables(java.util.Map environmentVariables) { setEnvironmentVariables(environmentVariables); return this; } /** * Add a single EnvironmentVariables entry * * @see CreateAppRequest#withEnvironmentVariables * @returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest addEnvironmentVariablesEntry(String key, String value) { if (null == this.environmentVariables) { this.environmentVariables = new java.util.HashMap(); } if (this.environmentVariables.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.environmentVariables.put(key, value); return this; } /** * Removes all the entries added into EnvironmentVariables. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest clearEnvironmentVariablesEntries() { this.environmentVariables = null; return this; } /** *

* Enables the auto building of branches for an Amplify app. *

* * @param enableBranchAutoBuild * Enables the auto building of branches for an Amplify app. */ public void setEnableBranchAutoBuild(Boolean enableBranchAutoBuild) { this.enableBranchAutoBuild = enableBranchAutoBuild; } /** *

* Enables the auto building of branches for an Amplify app. *

* * @return Enables the auto building of branches for an Amplify app. */ public Boolean getEnableBranchAutoBuild() { return this.enableBranchAutoBuild; } /** *

* Enables the auto building of branches for an Amplify app. *

* * @param enableBranchAutoBuild * Enables the auto building of branches for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withEnableBranchAutoBuild(Boolean enableBranchAutoBuild) { setEnableBranchAutoBuild(enableBranchAutoBuild); return this; } /** *

* Enables the auto building of branches for an Amplify app. *

* * @return Enables the auto building of branches for an Amplify app. */ public Boolean isEnableBranchAutoBuild() { return this.enableBranchAutoBuild; } /** *

* Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. *

* * @param enableBranchAutoDeletion * Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git * repository. */ public void setEnableBranchAutoDeletion(Boolean enableBranchAutoDeletion) { this.enableBranchAutoDeletion = enableBranchAutoDeletion; } /** *

* Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. *

* * @return Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git * repository. */ public Boolean getEnableBranchAutoDeletion() { return this.enableBranchAutoDeletion; } /** *

* Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. *

* * @param enableBranchAutoDeletion * Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git * repository. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withEnableBranchAutoDeletion(Boolean enableBranchAutoDeletion) { setEnableBranchAutoDeletion(enableBranchAutoDeletion); return this; } /** *

* Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git repository. *

* * @return Automatically disconnects a branch in the Amplify Console when you delete a branch from your Git * repository. */ public Boolean isEnableBranchAutoDeletion() { return this.enableBranchAutoDeletion; } /** *

* Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. *

* * @param enableBasicAuth * Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. */ public void setEnableBasicAuth(Boolean enableBasicAuth) { this.enableBasicAuth = enableBasicAuth; } /** *

* Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. *

* * @return Enables basic authorization for an Amplify app. This will apply to all branches that are part of this * app. */ public Boolean getEnableBasicAuth() { return this.enableBasicAuth; } /** *

* Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. *

* * @param enableBasicAuth * Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withEnableBasicAuth(Boolean enableBasicAuth) { setEnableBasicAuth(enableBasicAuth); return this; } /** *

* Enables basic authorization for an Amplify app. This will apply to all branches that are part of this app. *

* * @return Enables basic authorization for an Amplify app. This will apply to all branches that are part of this * app. */ public Boolean isEnableBasicAuth() { return this.enableBasicAuth; } /** *

* The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials * and provide them in the format user:password. *

* * @param basicAuthCredentials * The credentials for basic authorization for an Amplify app. You must base64-encode the authorization * credentials and provide them in the format user:password. */ public void setBasicAuthCredentials(String basicAuthCredentials) { this.basicAuthCredentials = basicAuthCredentials; } /** *

* The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials * and provide them in the format user:password. *

* * @return The credentials for basic authorization for an Amplify app. You must base64-encode the authorization * credentials and provide them in the format user:password. */ public String getBasicAuthCredentials() { return this.basicAuthCredentials; } /** *

* The credentials for basic authorization for an Amplify app. You must base64-encode the authorization credentials * and provide them in the format user:password. *

* * @param basicAuthCredentials * The credentials for basic authorization for an Amplify app. You must base64-encode the authorization * credentials and provide them in the format user:password. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withBasicAuthCredentials(String basicAuthCredentials) { setBasicAuthCredentials(basicAuthCredentials); return this; } /** *

* The custom rewrite and redirect rules for an Amplify app. *

* * @return The custom rewrite and redirect rules for an Amplify app. */ public java.util.List getCustomRules() { return customRules; } /** *

* The custom rewrite and redirect rules for an Amplify app. *

* * @param customRules * The custom rewrite and redirect rules for an Amplify app. */ public void setCustomRules(java.util.Collection customRules) { if (customRules == null) { this.customRules = null; return; } this.customRules = new java.util.ArrayList(customRules); } /** *

* The custom rewrite and redirect rules for an Amplify app. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setCustomRules(java.util.Collection)} or {@link #withCustomRules(java.util.Collection)} if you want to * override the existing values. *

* * @param customRules * The custom rewrite and redirect rules for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withCustomRules(CustomRule... customRules) { if (this.customRules == null) { setCustomRules(new java.util.ArrayList(customRules.length)); } for (CustomRule ele : customRules) { this.customRules.add(ele); } return this; } /** *

* The custom rewrite and redirect rules for an Amplify app. *

* * @param customRules * The custom rewrite and redirect rules for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withCustomRules(java.util.Collection customRules) { setCustomRules(customRules); return this; } /** *

* The tag for an Amplify app. *

* * @return The tag for an Amplify app. */ public java.util.Map getTags() { return tags; } /** *

* The tag for an Amplify app. *

* * @param tags * The tag for an Amplify app. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The tag for an Amplify app. *

* * @param tags * The tag for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateAppRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest clearTagsEntries() { this.tags = null; return this; } /** *

* The build specification (build spec) for an Amplify app. *

* * @param buildSpec * The build specification (build spec) for an Amplify app. */ public void setBuildSpec(String buildSpec) { this.buildSpec = buildSpec; } /** *

* The build specification (build spec) for an Amplify app. *

* * @return The build specification (build spec) for an Amplify app. */ public String getBuildSpec() { return this.buildSpec; } /** *

* The build specification (build spec) for an Amplify app. *

* * @param buildSpec * The build specification (build spec) for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withBuildSpec(String buildSpec) { setBuildSpec(buildSpec); return this; } /** *

* The custom HTTP headers for an Amplify app. *

* * @param customHeaders * The custom HTTP headers for an Amplify app. */ public void setCustomHeaders(String customHeaders) { this.customHeaders = customHeaders; } /** *

* The custom HTTP headers for an Amplify app. *

* * @return The custom HTTP headers for an Amplify app. */ public String getCustomHeaders() { return this.customHeaders; } /** *

* The custom HTTP headers for an Amplify app. *

* * @param customHeaders * The custom HTTP headers for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withCustomHeaders(String customHeaders) { setCustomHeaders(customHeaders); return this; } /** *

* Enables automated branch creation for an Amplify app. *

* * @param enableAutoBranchCreation * Enables automated branch creation for an Amplify app. */ public void setEnableAutoBranchCreation(Boolean enableAutoBranchCreation) { this.enableAutoBranchCreation = enableAutoBranchCreation; } /** *

* Enables automated branch creation for an Amplify app. *

* * @return Enables automated branch creation for an Amplify app. */ public Boolean getEnableAutoBranchCreation() { return this.enableAutoBranchCreation; } /** *

* Enables automated branch creation for an Amplify app. *

* * @param enableAutoBranchCreation * Enables automated branch creation for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withEnableAutoBranchCreation(Boolean enableAutoBranchCreation) { setEnableAutoBranchCreation(enableAutoBranchCreation); return this; } /** *

* Enables automated branch creation for an Amplify app. *

* * @return Enables automated branch creation for an Amplify app. */ public Boolean isEnableAutoBranchCreation() { return this.enableAutoBranchCreation; } /** *

* The automated branch creation glob patterns for an Amplify app. *

* * @return The automated branch creation glob patterns for an Amplify app. */ public java.util.List getAutoBranchCreationPatterns() { return autoBranchCreationPatterns; } /** *

* The automated branch creation glob patterns for an Amplify app. *

* * @param autoBranchCreationPatterns * The automated branch creation glob patterns for an Amplify app. */ public void setAutoBranchCreationPatterns(java.util.Collection autoBranchCreationPatterns) { if (autoBranchCreationPatterns == null) { this.autoBranchCreationPatterns = null; return; } this.autoBranchCreationPatterns = new java.util.ArrayList(autoBranchCreationPatterns); } /** *

* The automated branch creation glob patterns for an Amplify app. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAutoBranchCreationPatterns(java.util.Collection)} or * {@link #withAutoBranchCreationPatterns(java.util.Collection)} if you want to override the existing values. *

* * @param autoBranchCreationPatterns * The automated branch creation glob patterns for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withAutoBranchCreationPatterns(String... autoBranchCreationPatterns) { if (this.autoBranchCreationPatterns == null) { setAutoBranchCreationPatterns(new java.util.ArrayList(autoBranchCreationPatterns.length)); } for (String ele : autoBranchCreationPatterns) { this.autoBranchCreationPatterns.add(ele); } return this; } /** *

* The automated branch creation glob patterns for an Amplify app. *

* * @param autoBranchCreationPatterns * The automated branch creation glob patterns for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withAutoBranchCreationPatterns(java.util.Collection autoBranchCreationPatterns) { setAutoBranchCreationPatterns(autoBranchCreationPatterns); return this; } /** *

* The automated branch creation configuration for an Amplify app. *

* * @param autoBranchCreationConfig * The automated branch creation configuration for an Amplify app. */ public void setAutoBranchCreationConfig(AutoBranchCreationConfig autoBranchCreationConfig) { this.autoBranchCreationConfig = autoBranchCreationConfig; } /** *

* The automated branch creation configuration for an Amplify app. *

* * @return The automated branch creation configuration for an Amplify app. */ public AutoBranchCreationConfig getAutoBranchCreationConfig() { return this.autoBranchCreationConfig; } /** *

* The automated branch creation configuration for an Amplify app. *

* * @param autoBranchCreationConfig * The automated branch creation configuration for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateAppRequest withAutoBranchCreationConfig(AutoBranchCreationConfig autoBranchCreationConfig) { setAutoBranchCreationConfig(autoBranchCreationConfig); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRepository() != null) sb.append("Repository: ").append(getRepository()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getIamServiceRoleArn() != null) sb.append("IamServiceRoleArn: ").append(getIamServiceRoleArn()).append(","); if (getOauthToken() != null) sb.append("OauthToken: ").append("***Sensitive Data Redacted***").append(","); if (getAccessToken() != null) sb.append("AccessToken: ").append("***Sensitive Data Redacted***").append(","); if (getEnvironmentVariables() != null) sb.append("EnvironmentVariables: ").append(getEnvironmentVariables()).append(","); if (getEnableBranchAutoBuild() != null) sb.append("EnableBranchAutoBuild: ").append(getEnableBranchAutoBuild()).append(","); if (getEnableBranchAutoDeletion() != null) sb.append("EnableBranchAutoDeletion: ").append(getEnableBranchAutoDeletion()).append(","); if (getEnableBasicAuth() != null) sb.append("EnableBasicAuth: ").append(getEnableBasicAuth()).append(","); if (getBasicAuthCredentials() != null) sb.append("BasicAuthCredentials: ").append("***Sensitive Data Redacted***").append(","); if (getCustomRules() != null) sb.append("CustomRules: ").append(getCustomRules()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getBuildSpec() != null) sb.append("BuildSpec: ").append("***Sensitive Data Redacted***").append(","); if (getCustomHeaders() != null) sb.append("CustomHeaders: ").append(getCustomHeaders()).append(","); if (getEnableAutoBranchCreation() != null) sb.append("EnableAutoBranchCreation: ").append(getEnableAutoBranchCreation()).append(","); if (getAutoBranchCreationPatterns() != null) sb.append("AutoBranchCreationPatterns: ").append(getAutoBranchCreationPatterns()).append(","); if (getAutoBranchCreationConfig() != null) sb.append("AutoBranchCreationConfig: ").append(getAutoBranchCreationConfig()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateAppRequest == false) return false; CreateAppRequest other = (CreateAppRequest) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getRepository() == null ^ this.getRepository() == null) return false; if (other.getRepository() != null && other.getRepository().equals(this.getRepository()) == false) return false; if (other.getPlatform() == null ^ this.getPlatform() == null) return false; if (other.getPlatform() != null && other.getPlatform().equals(this.getPlatform()) == false) return false; if (other.getIamServiceRoleArn() == null ^ this.getIamServiceRoleArn() == null) return false; if (other.getIamServiceRoleArn() != null && other.getIamServiceRoleArn().equals(this.getIamServiceRoleArn()) == false) return false; if (other.getOauthToken() == null ^ this.getOauthToken() == null) return false; if (other.getOauthToken() != null && other.getOauthToken().equals(this.getOauthToken()) == false) return false; if (other.getAccessToken() == null ^ this.getAccessToken() == null) return false; if (other.getAccessToken() != null && other.getAccessToken().equals(this.getAccessToken()) == false) return false; if (other.getEnvironmentVariables() == null ^ this.getEnvironmentVariables() == null) return false; if (other.getEnvironmentVariables() != null && other.getEnvironmentVariables().equals(this.getEnvironmentVariables()) == false) return false; if (other.getEnableBranchAutoBuild() == null ^ this.getEnableBranchAutoBuild() == null) return false; if (other.getEnableBranchAutoBuild() != null && other.getEnableBranchAutoBuild().equals(this.getEnableBranchAutoBuild()) == false) return false; if (other.getEnableBranchAutoDeletion() == null ^ this.getEnableBranchAutoDeletion() == null) return false; if (other.getEnableBranchAutoDeletion() != null && other.getEnableBranchAutoDeletion().equals(this.getEnableBranchAutoDeletion()) == false) return false; if (other.getEnableBasicAuth() == null ^ this.getEnableBasicAuth() == null) return false; if (other.getEnableBasicAuth() != null && other.getEnableBasicAuth().equals(this.getEnableBasicAuth()) == false) return false; if (other.getBasicAuthCredentials() == null ^ this.getBasicAuthCredentials() == null) return false; if (other.getBasicAuthCredentials() != null && other.getBasicAuthCredentials().equals(this.getBasicAuthCredentials()) == false) return false; if (other.getCustomRules() == null ^ this.getCustomRules() == null) return false; if (other.getCustomRules() != null && other.getCustomRules().equals(this.getCustomRules()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getBuildSpec() == null ^ this.getBuildSpec() == null) return false; if (other.getBuildSpec() != null && other.getBuildSpec().equals(this.getBuildSpec()) == false) return false; if (other.getCustomHeaders() == null ^ this.getCustomHeaders() == null) return false; if (other.getCustomHeaders() != null && other.getCustomHeaders().equals(this.getCustomHeaders()) == false) return false; if (other.getEnableAutoBranchCreation() == null ^ this.getEnableAutoBranchCreation() == null) return false; if (other.getEnableAutoBranchCreation() != null && other.getEnableAutoBranchCreation().equals(this.getEnableAutoBranchCreation()) == false) return false; if (other.getAutoBranchCreationPatterns() == null ^ this.getAutoBranchCreationPatterns() == null) return false; if (other.getAutoBranchCreationPatterns() != null && other.getAutoBranchCreationPatterns().equals(this.getAutoBranchCreationPatterns()) == false) return false; if (other.getAutoBranchCreationConfig() == null ^ this.getAutoBranchCreationConfig() == null) return false; if (other.getAutoBranchCreationConfig() != null && other.getAutoBranchCreationConfig().equals(this.getAutoBranchCreationConfig()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRepository() == null) ? 0 : getRepository().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getIamServiceRoleArn() == null) ? 0 : getIamServiceRoleArn().hashCode()); hashCode = prime * hashCode + ((getOauthToken() == null) ? 0 : getOauthToken().hashCode()); hashCode = prime * hashCode + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode()); hashCode = prime * hashCode + ((getEnvironmentVariables() == null) ? 0 : getEnvironmentVariables().hashCode()); hashCode = prime * hashCode + ((getEnableBranchAutoBuild() == null) ? 0 : getEnableBranchAutoBuild().hashCode()); hashCode = prime * hashCode + ((getEnableBranchAutoDeletion() == null) ? 0 : getEnableBranchAutoDeletion().hashCode()); hashCode = prime * hashCode + ((getEnableBasicAuth() == null) ? 0 : getEnableBasicAuth().hashCode()); hashCode = prime * hashCode + ((getBasicAuthCredentials() == null) ? 0 : getBasicAuthCredentials().hashCode()); hashCode = prime * hashCode + ((getCustomRules() == null) ? 0 : getCustomRules().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getBuildSpec() == null) ? 0 : getBuildSpec().hashCode()); hashCode = prime * hashCode + ((getCustomHeaders() == null) ? 0 : getCustomHeaders().hashCode()); hashCode = prime * hashCode + ((getEnableAutoBranchCreation() == null) ? 0 : getEnableAutoBranchCreation().hashCode()); hashCode = prime * hashCode + ((getAutoBranchCreationPatterns() == null) ? 0 : getAutoBranchCreationPatterns().hashCode()); hashCode = prime * hashCode + ((getAutoBranchCreationConfig() == null) ? 0 : getAutoBranchCreationConfig().hashCode()); return hashCode; } @Override public CreateAppRequest clone() { return (CreateAppRequest) super.clone(); } }