/* * 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 for the update app request. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateAppRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** The unique ID for an Amplify app. *
*/ private String appId; /** ** The name for an Amplify app. *
*/ private String name; /** ** The description for an Amplify app. *
*/ private String description; /** *
* 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
.
*
* The AWS Identity and Access Management (IAM) service role for an Amplify app. *
*/ private String iamServiceRoleArn; /** ** The environment variables for an Amplify app. *
*/ private java.util.Map* Enables branch auto-building 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. *
*/ private Boolean enableBasicAuth; /** *
* The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and
* provide them in the format user:password
.
*
* The custom redirect and rewrite rules for an Amplify app. *
*/ private java.util.List* 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; /** ** Describes the automated branch creation glob patterns for an Amplify app. *
*/ private java.util.List* The automated branch creation configuration for an Amplify app. *
*/ private AutoBranchCreationConfig autoBranchCreationConfig; /** ** The name of the repository for an Amplify app *
*/ private String repository; /** ** 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 update an 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 update an 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 unique ID for an Amplify app. *
* * @param appId * The unique ID for an Amplify app. */ public void setAppId(String appId) { this.appId = appId; } /** ** The unique ID for an Amplify app. *
* * @return The unique ID for an Amplify app. */ public String getAppId() { return this.appId; } /** ** The unique ID for an Amplify app. *
* * @param appId * The unique ID for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withAppId(String appId) { setAppId(appId); return this; } /** ** 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 UpdateAppRequest 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 UpdateAppRequest withDescription(String description) { setDescription(description); 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
.
*
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
.
*
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
.
*
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 UpdateAppRequest 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
.
*
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 UpdateAppRequest 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 UpdateAppRequest withIamServiceRoleArn(String iamServiceRoleArn) { setIamServiceRoleArn(iamServiceRoleArn); return this; } /** ** The environment variables for an Amplify app. *
* * @return The environment variables for an Amplify app. */ public java.util.Map* The environment variables for an Amplify app. *
* * @param environmentVariables * The environment variables for an Amplify app. */ public void setEnvironmentVariables(java.util.Map* The environment variables for an Amplify app. *
* * @param environmentVariables * The environment variables for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withEnvironmentVariables(java.util.Map* Enables branch auto-building for an Amplify app. *
* * @param enableBranchAutoBuild * Enables branch auto-building for an Amplify app. */ public void setEnableBranchAutoBuild(Boolean enableBranchAutoBuild) { this.enableBranchAutoBuild = enableBranchAutoBuild; } /** ** Enables branch auto-building for an Amplify app. *
* * @return Enables branch auto-building for an Amplify app. */ public Boolean getEnableBranchAutoBuild() { return this.enableBranchAutoBuild; } /** ** Enables branch auto-building for an Amplify app. *
* * @param enableBranchAutoBuild * Enables branch auto-building for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withEnableBranchAutoBuild(Boolean enableBranchAutoBuild) { setEnableBranchAutoBuild(enableBranchAutoBuild); return this; } /** ** Enables branch auto-building for an Amplify app. *
* * @return Enables branch auto-building 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 UpdateAppRequest 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. *
* * @param enableBasicAuth * Enables basic authorization for an Amplify app. */ public void setEnableBasicAuth(Boolean enableBasicAuth) { this.enableBasicAuth = enableBasicAuth; } /** ** Enables basic authorization for an Amplify app. *
* * @return Enables basic authorization for an Amplify app. */ public Boolean getEnableBasicAuth() { return this.enableBasicAuth; } /** ** Enables basic authorization for an Amplify app. *
* * @param enableBasicAuth * Enables basic authorization for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withEnableBasicAuth(Boolean enableBasicAuth) { setEnableBasicAuth(enableBasicAuth); return this; } /** ** Enables basic authorization for an Amplify app. *
* * @return Enables basic authorization for an Amplify app. */ public Boolean isEnableBasicAuth() { return this.enableBasicAuth; } /** *
* The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and
* provide them in the format user:password
.
*
user:password
.
*/
public void setBasicAuthCredentials(String basicAuthCredentials) {
this.basicAuthCredentials = basicAuthCredentials;
}
/**
*
* The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and
* provide them in the format user:password
.
*
user:password
.
*/
public String getBasicAuthCredentials() {
return this.basicAuthCredentials;
}
/**
*
* The basic authorization credentials for an Amplify app. You must base64-encode the authorization credentials and
* provide them in the format user:password
.
*
user:password
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateAppRequest withBasicAuthCredentials(String basicAuthCredentials) {
setBasicAuthCredentials(basicAuthCredentials);
return this;
}
/**
* * The custom redirect and rewrite rules for an Amplify app. *
* * @return The custom redirect and rewrite rules for an Amplify app. */ public java.util.List* The custom redirect and rewrite rules for an Amplify app. *
* * @param customRules * The custom redirect and rewrite rules for an Amplify app. */ public void setCustomRules(java.util.Collection* The custom redirect and rewrite 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 redirect and rewrite rules for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withCustomRules(CustomRule... customRules) { if (this.customRules == null) { setCustomRules(new java.util.ArrayList* The custom redirect and rewrite rules for an Amplify app. *
* * @param customRules * The custom redirect and rewrite rules for an Amplify app. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withCustomRules(java.util.Collection* 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 UpdateAppRequest 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 UpdateAppRequest 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 UpdateAppRequest 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; } /** ** Describes the automated branch creation glob patterns for an Amplify app. *
* * @return Describes the automated branch creation glob patterns for an Amplify app. */ public java.util.List* Describes the automated branch creation glob patterns for an Amplify app. *
* * @param autoBranchCreationPatterns * Describes the automated branch creation glob patterns for an Amplify app. */ public void setAutoBranchCreationPatterns(java.util.Collection* Describes 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 * Describes 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 UpdateAppRequest withAutoBranchCreationPatterns(String... autoBranchCreationPatterns) { if (this.autoBranchCreationPatterns == null) { setAutoBranchCreationPatterns(new java.util.ArrayList* Describes the automated branch creation glob patterns for an Amplify app. *
* * @param autoBranchCreationPatterns * Describes 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 UpdateAppRequest withAutoBranchCreationPatterns(java.util.Collection* 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 UpdateAppRequest withAutoBranchCreationConfig(AutoBranchCreationConfig autoBranchCreationConfig) { setAutoBranchCreationConfig(autoBranchCreationConfig); return this; } /** ** The name of the repository for an Amplify app *
* * @param repository * The name of the repository for an Amplify app */ public void setRepository(String repository) { this.repository = repository; } /** ** The name of the repository for an Amplify app *
* * @return The name of the repository for an Amplify app */ public String getRepository() { return this.repository; } /** ** The name of the repository for an Amplify app *
* * @param repository * The name of the repository for an Amplify app * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateAppRequest withRepository(String repository) { setRepository(repository); 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 update an 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 update an 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 update an 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 update an 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 update an 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 update an 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 UpdateAppRequest 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 update an 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 update an 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 update an 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 update an 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 update an 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 update an 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 UpdateAppRequest withAccessToken(String accessToken) { setAccessToken(accessToken); 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 (getAppId() != null) sb.append("AppId: ").append(getAppId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getPlatform() != null) sb.append("Platform: ").append(getPlatform()).append(","); if (getIamServiceRoleArn() != null) sb.append("IamServiceRoleArn: ").append(getIamServiceRoleArn()).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 (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()).append(","); if (getRepository() != null) sb.append("Repository: ").append(getRepository()).append(","); if (getOauthToken() != null) sb.append("OauthToken: ").append("***Sensitive Data Redacted***").append(","); if (getAccessToken() != null) sb.append("AccessToken: ").append("***Sensitive Data Redacted***"); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateAppRequest == false) return false; UpdateAppRequest other = (UpdateAppRequest) obj; if (other.getAppId() == null ^ this.getAppId() == null) return false; if (other.getAppId() != null && other.getAppId().equals(this.getAppId()) == false) return false; 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.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.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.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; if (other.getRepository() == null ^ this.getRepository() == null) return false; if (other.getRepository() != null && other.getRepository().equals(this.getRepository()) == 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; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); hashCode = prime * hashCode + ((getIamServiceRoleArn() == null) ? 0 : getIamServiceRoleArn().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 + ((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()); hashCode = prime * hashCode + ((getRepository() == null) ? 0 : getRepository().hashCode()); hashCode = prime * hashCode + ((getOauthToken() == null) ? 0 : getOauthToken().hashCode()); hashCode = prime * hashCode + ((getAccessToken() == null) ? 0 : getAccessToken().hashCode()); return hashCode; } @Override public UpdateAppRequest clone() { return (UpdateAppRequest) super.clone(); } }