/* * 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.codebuild.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a build. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Build implements Serializable, Cloneable, StructuredPojo { /** ** The unique ID for the build. *
*/ private String id; /** ** The Amazon Resource Name (ARN) of the build. *
*/ private String arn; /** *
* The number of the build. For each project, the buildNumber
of its first build is 1
. The
* buildNumber
of each subsequent build is incremented by 1
. If a build is deleted, the
* buildNumber
of other builds does not change.
*
* When the build process started, expressed in Unix time format. *
*/ private java.util.Date startTime; /** ** When the build process ended, expressed in Unix time format. *
*/ private java.util.Date endTime; /** ** The current build phase. *
*/ private String currentPhase; /** ** The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* Any version identifier for the version of the source code to be built. If sourceVersion
is specified
* at the project level, then this sourceVersion
(at the build level) takes precedence.
*
* For more information, see Source Version Sample * with CodeBuild in the CodeBuild User Guide. *
*/ private String sourceVersion; /** ** An identifier for the version of this build's source code. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** The name of the CodeBuild project. *
*/ private String projectName; /** ** Information about all previous build phases that are complete and information about any current build phase that * is not yet complete. *
*/ private java.util.List* Information about the source code to be built. *
*/ private ProjectSource source; /** *
* An array of ProjectSource
objects.
*
* An array of ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one of:
*
* For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the
* source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the branch's
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you * want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default * branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
** Information about the output artifacts for the build. *
*/ private BuildArtifacts artifacts; /** *
* An array of ProjectArtifacts
objects.
*
* Information about the cache for the build. *
*/ private ProjectCache cache; /** ** Information about the build environment for this build. *
*/ private ProjectEnvironment environment; /** ** The name of a service role used for this build. *
*/ private String serviceRole; /** ** Information about the build's logs in CloudWatch Logs. *
*/ private LogsLocation logs; /** ** How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as completed. *
*/ private Integer timeoutInMinutes; /** ** The number of minutes a build is allowed to be queued before it times out. *
*/ private Integer queuedTimeoutInMinutes; /** ** Whether the build is complete. True if complete; otherwise, false. *
*/ private Boolean buildComplete; /** ** The entity that started the build. Valid values include: *
*
* If CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC * ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same * VPC. You must provide at least one security group and one subnet ID. *
*/ private VpcConfig vpcConfig; /** ** Describes a network interface. *
*/ private NetworkInterface networkInterface; /** ** The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. *
** You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to * that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the
* format alias/<alias-name>
).
*
* A list of exported environment variables for this build. *
** Exported environment variables are used in conjunction with CodePipeline to export environment variables from the * current build stage to subsequent stages in the pipeline. For more information, see Working with * variables in the CodePipeline User Guide. *
*/ private java.util.List* An array of the ARNs associated with this build's reports. *
*/ private java.util.List
* An array of ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
,
* mountOptions
, mountPoint
, and type
of a file system created using Amazon
* Elastic File System.
*
* Contains information about the debug session for this build. *
*/ private DebugSession debugSession; /** ** The ARN of the batch build that this build is a member of, if applicable. *
*/ private String buildBatchArn; /** ** The unique ID for the build. *
* * @param id * The unique ID for the build. */ public void setId(String id) { this.id = id; } /** ** The unique ID for the build. *
* * @return The unique ID for the build. */ public String getId() { return this.id; } /** ** The unique ID for the build. *
* * @param id * The unique ID for the build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withId(String id) { setId(id); return this; } /** ** The Amazon Resource Name (ARN) of the build. *
* * @param arn * The Amazon Resource Name (ARN) of the build. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) of the build. *
* * @return The Amazon Resource Name (ARN) of the build. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) of the build. *
* * @param arn * The Amazon Resource Name (ARN) of the build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withArn(String arn) { setArn(arn); return this; } /** *
* The number of the build. For each project, the buildNumber
of its first build is 1
. The
* buildNumber
of each subsequent build is incremented by 1
. If a build is deleted, the
* buildNumber
of other builds does not change.
*
buildNumber
of its first build is
* 1
. The buildNumber
of each subsequent build is incremented by 1
. If
* a build is deleted, the buildNumber
of other builds does not change.
*/
public void setBuildNumber(Long buildNumber) {
this.buildNumber = buildNumber;
}
/**
*
* The number of the build. For each project, the buildNumber
of its first build is 1
. The
* buildNumber
of each subsequent build is incremented by 1
. If a build is deleted, the
* buildNumber
of other builds does not change.
*
buildNumber
of its first build is
* 1
. The buildNumber
of each subsequent build is incremented by 1
.
* If a build is deleted, the buildNumber
of other builds does not change.
*/
public Long getBuildNumber() {
return this.buildNumber;
}
/**
*
* The number of the build. For each project, the buildNumber
of its first build is 1
. The
* buildNumber
of each subsequent build is incremented by 1
. If a build is deleted, the
* buildNumber
of other builds does not change.
*
buildNumber
of its first build is
* 1
. The buildNumber
of each subsequent build is incremented by 1
. If
* a build is deleted, the buildNumber
of other builds does not change.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withBuildNumber(Long buildNumber) {
setBuildNumber(buildNumber);
return this;
}
/**
* * When the build process started, expressed in Unix time format. *
* * @param startTime * When the build process started, expressed in Unix time format. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** ** When the build process started, expressed in Unix time format. *
* * @return When the build process started, expressed in Unix time format. */ public java.util.Date getStartTime() { return this.startTime; } /** ** When the build process started, expressed in Unix time format. *
* * @param startTime * When the build process started, expressed in Unix time format. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** ** When the build process ended, expressed in Unix time format. *
* * @param endTime * When the build process ended, expressed in Unix time format. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** ** When the build process ended, expressed in Unix time format. *
* * @return When the build process ended, expressed in Unix time format. */ public java.util.Date getEndTime() { return this.endTime; } /** ** When the build process ended, expressed in Unix time format. *
* * @param endTime * When the build process ended, expressed in Unix time format. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** ** The current build phase. *
* * @param currentPhase * The current build phase. */ public void setCurrentPhase(String currentPhase) { this.currentPhase = currentPhase; } /** ** The current build phase. *
* * @return The current build phase. */ public String getCurrentPhase() { return this.currentPhase; } /** ** The current build phase. *
* * @param currentPhase * The current build phase. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withCurrentPhase(String currentPhase) { setCurrentPhase(currentPhase); return this; } /** ** The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* The current status of the build. Valid values include: *
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* FAILED
: The build failed.
*
* FAULT
: The build faulted.
*
* IN_PROGRESS
: The build is still in progress.
*
* STOPPED
: The build stopped.
*
* SUCCEEDED
: The build succeeded.
*
* TIMED_OUT
: The build timed out.
*
* Any version identifier for the version of the source code to be built. If sourceVersion
is specified
* at the project level, then this sourceVersion
(at the build level) takes precedence.
*
* For more information, see Source Version Sample * with CodeBuild in the CodeBuild User Guide. *
* * @param sourceVersion * Any version identifier for the version of the source code to be built. IfsourceVersion
is
* specified at the project level, then this sourceVersion
(at the build level) takes
* precedence.
* * For more information, see Source Version * Sample with CodeBuild in the CodeBuild User Guide. */ public void setSourceVersion(String sourceVersion) { this.sourceVersion = sourceVersion; } /** *
* Any version identifier for the version of the source code to be built. If sourceVersion
is specified
* at the project level, then this sourceVersion
(at the build level) takes precedence.
*
* For more information, see Source Version Sample * with CodeBuild in the CodeBuild User Guide. *
* * @return Any version identifier for the version of the source code to be built. IfsourceVersion
is
* specified at the project level, then this sourceVersion
(at the build level) takes
* precedence.
* * For more information, see Source Version * Sample with CodeBuild in the CodeBuild User Guide. */ public String getSourceVersion() { return this.sourceVersion; } /** *
* Any version identifier for the version of the source code to be built. If sourceVersion
is specified
* at the project level, then this sourceVersion
(at the build level) takes precedence.
*
* For more information, see Source Version Sample * with CodeBuild in the CodeBuild User Guide. *
* * @param sourceVersion * Any version identifier for the version of the source code to be built. IfsourceVersion
is
* specified at the project level, then this sourceVersion
(at the build level) takes
* precedence.
* * For more information, see Source Version * Sample with CodeBuild in the CodeBuild User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withSourceVersion(String sourceVersion) { setSourceVersion(sourceVersion); return this; } /** *
* An identifier for the version of this build's source code. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** An identifier for the version of this build's source code. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** An identifier for the version of this build's source code. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** For CodeCommit, GitHub, GitHub Enterprise, and BitBucket, the commit ID. *
** For CodePipeline, the source revision provided by CodePipeline. *
** For Amazon S3, this does not apply. *
** The name of the CodeBuild project. *
* * @param projectName * The name of the CodeBuild project. */ public void setProjectName(String projectName) { this.projectName = projectName; } /** ** The name of the CodeBuild project. *
* * @return The name of the CodeBuild project. */ public String getProjectName() { return this.projectName; } /** ** The name of the CodeBuild project. *
* * @param projectName * The name of the CodeBuild project. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withProjectName(String projectName) { setProjectName(projectName); return this; } /** ** Information about all previous build phases that are complete and information about any current build phase that * is not yet complete. *
* * @return Information about all previous build phases that are complete and information about any current build * phase that is not yet complete. */ public java.util.List* Information about all previous build phases that are complete and information about any current build phase that * is not yet complete. *
* * @param phases * Information about all previous build phases that are complete and information about any current build * phase that is not yet complete. */ public void setPhases(java.util.Collection* Information about all previous build phases that are complete and information about any current build phase that * is not yet complete. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPhases(java.util.Collection)} or {@link #withPhases(java.util.Collection)} if you want to override the * existing values. *
* * @param phases * Information about all previous build phases that are complete and information about any current build * phase that is not yet complete. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withPhases(BuildPhase... phases) { if (this.phases == null) { setPhases(new java.util.ArrayList* Information about all previous build phases that are complete and information about any current build phase that * is not yet complete. *
* * @param phases * Information about all previous build phases that are complete and information about any current build * phase that is not yet complete. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withPhases(java.util.Collection* Information about the source code to be built. *
* * @param source * Information about the source code to be built. */ public void setSource(ProjectSource source) { this.source = source; } /** ** Information about the source code to be built. *
* * @return Information about the source code to be built. */ public ProjectSource getSource() { return this.source; } /** ** Information about the source code to be built. *
* * @param source * Information about the source code to be built. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withSource(ProjectSource source) { setSource(source); return this; } /** *
* An array of ProjectSource
objects.
*
ProjectSource
objects.
*/
public java.util.List
* An array of ProjectSource
objects.
*
ProjectSource
objects.
*/
public void setSecondarySources(java.util.Collection
* An array of ProjectSource
objects.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecondarySources(java.util.Collection)} or {@link #withSecondarySources(java.util.Collection)} if you * want to override the existing values. *
* * @param secondarySources * An array ofProjectSource
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withSecondarySources(ProjectSource... secondarySources) {
if (this.secondarySources == null) {
setSecondarySources(new java.util.ArrayList
* An array of ProjectSource
objects.
*
ProjectSource
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withSecondarySources(java.util.Collection
* An array of ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one of:
*
* For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the
* source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the branch's
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you * want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default * branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one
* of:
* * For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of
* the source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code * you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, * the default branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*
* An array of ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one of:
*
* For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the
* source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the branch's
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you * want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default * branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one
* of:
* * For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of
* the source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code * you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, * the default branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*
* An array of ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one of:
*
* For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the
* source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the branch's
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you * want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default * branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecondarySourceVersions(java.util.Collection)} or * {@link #withSecondarySourceVersions(java.util.Collection)} if you want to override the existing values. *
* * @param secondarySourceVersions * An array ofProjectSourceVersion
objects. Each ProjectSourceVersion
must be one
* of:
* * For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of
* the source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code * you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, * the default branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*
* An array of ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one of:
*
* For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of the
* source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the branch's
* HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code you * want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default * branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
*ProjectSourceVersion
objects. Each ProjectSourceVersion
must be one
* of:
* * For CodeCommit: the commit ID, branch, or Git tag to use. *
*
* For GitHub: the commit ID, pull request ID, branch name, or tag name that corresponds to the version of
* the source code you want to build. If a pull request ID is specified, it must use the format
* pr/pull-request-ID
(for example, pr/25
). If a branch name is specified, the
* branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
*
* For Bitbucket: the commit ID, branch name, or tag name that corresponds to the version of the source code * you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, * the default branch's HEAD commit ID is used. *
** For Amazon S3: the version ID of the object that represents the build input ZIP file to use. *
** Information about the output artifacts for the build. *
* * @param artifacts * Information about the output artifacts for the build. */ public void setArtifacts(BuildArtifacts artifacts) { this.artifacts = artifacts; } /** ** Information about the output artifacts for the build. *
* * @return Information about the output artifacts for the build. */ public BuildArtifacts getArtifacts() { return this.artifacts; } /** ** Information about the output artifacts for the build. *
* * @param artifacts * Information about the output artifacts for the build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withArtifacts(BuildArtifacts artifacts) { setArtifacts(artifacts); return this; } /** *
* An array of ProjectArtifacts
objects.
*
ProjectArtifacts
objects.
*/
public java.util.List
* An array of ProjectArtifacts
objects.
*
ProjectArtifacts
objects.
*/
public void setSecondaryArtifacts(java.util.Collection
* An array of ProjectArtifacts
objects.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSecondaryArtifacts(java.util.Collection)} or {@link #withSecondaryArtifacts(java.util.Collection)} if * you want to override the existing values. *
* * @param secondaryArtifacts * An array ofProjectArtifacts
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withSecondaryArtifacts(BuildArtifacts... secondaryArtifacts) {
if (this.secondaryArtifacts == null) {
setSecondaryArtifacts(new java.util.ArrayList
* An array of ProjectArtifacts
objects.
*
ProjectArtifacts
objects.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withSecondaryArtifacts(java.util.Collection* Information about the cache for the build. *
* * @param cache * Information about the cache for the build. */ public void setCache(ProjectCache cache) { this.cache = cache; } /** ** Information about the cache for the build. *
* * @return Information about the cache for the build. */ public ProjectCache getCache() { return this.cache; } /** ** Information about the cache for the build. *
* * @param cache * Information about the cache for the build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withCache(ProjectCache cache) { setCache(cache); return this; } /** ** Information about the build environment for this build. *
* * @param environment * Information about the build environment for this build. */ public void setEnvironment(ProjectEnvironment environment) { this.environment = environment; } /** ** Information about the build environment for this build. *
* * @return Information about the build environment for this build. */ public ProjectEnvironment getEnvironment() { return this.environment; } /** ** Information about the build environment for this build. *
* * @param environment * Information about the build environment for this build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withEnvironment(ProjectEnvironment environment) { setEnvironment(environment); return this; } /** ** The name of a service role used for this build. *
* * @param serviceRole * The name of a service role used for this build. */ public void setServiceRole(String serviceRole) { this.serviceRole = serviceRole; } /** ** The name of a service role used for this build. *
* * @return The name of a service role used for this build. */ public String getServiceRole() { return this.serviceRole; } /** ** The name of a service role used for this build. *
* * @param serviceRole * The name of a service role used for this build. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withServiceRole(String serviceRole) { setServiceRole(serviceRole); return this; } /** ** Information about the build's logs in CloudWatch Logs. *
* * @param logs * Information about the build's logs in CloudWatch Logs. */ public void setLogs(LogsLocation logs) { this.logs = logs; } /** ** Information about the build's logs in CloudWatch Logs. *
* * @return Information about the build's logs in CloudWatch Logs. */ public LogsLocation getLogs() { return this.logs; } /** ** Information about the build's logs in CloudWatch Logs. *
* * @param logs * Information about the build's logs in CloudWatch Logs. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withLogs(LogsLocation logs) { setLogs(logs); return this; } /** ** How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as completed. *
* * @param timeoutInMinutes * How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as * completed. */ public void setTimeoutInMinutes(Integer timeoutInMinutes) { this.timeoutInMinutes = timeoutInMinutes; } /** ** How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as completed. *
* * @return How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as * completed. */ public Integer getTimeoutInMinutes() { return this.timeoutInMinutes; } /** ** How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as completed. *
* * @param timeoutInMinutes * How long, in minutes, for CodeBuild to wait before timing out this build if it does not get marked as * completed. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withTimeoutInMinutes(Integer timeoutInMinutes) { setTimeoutInMinutes(timeoutInMinutes); return this; } /** ** The number of minutes a build is allowed to be queued before it times out. *
* * @param queuedTimeoutInMinutes * The number of minutes a build is allowed to be queued before it times out. */ public void setQueuedTimeoutInMinutes(Integer queuedTimeoutInMinutes) { this.queuedTimeoutInMinutes = queuedTimeoutInMinutes; } /** ** The number of minutes a build is allowed to be queued before it times out. *
* * @return The number of minutes a build is allowed to be queued before it times out. */ public Integer getQueuedTimeoutInMinutes() { return this.queuedTimeoutInMinutes; } /** ** The number of minutes a build is allowed to be queued before it times out. *
* * @param queuedTimeoutInMinutes * The number of minutes a build is allowed to be queued before it times out. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withQueuedTimeoutInMinutes(Integer queuedTimeoutInMinutes) { setQueuedTimeoutInMinutes(queuedTimeoutInMinutes); return this; } /** ** Whether the build is complete. True if complete; otherwise, false. *
* * @param buildComplete * Whether the build is complete. True if complete; otherwise, false. */ public void setBuildComplete(Boolean buildComplete) { this.buildComplete = buildComplete; } /** ** Whether the build is complete. True if complete; otherwise, false. *
* * @return Whether the build is complete. True if complete; otherwise, false. */ public Boolean getBuildComplete() { return this.buildComplete; } /** ** Whether the build is complete. True if complete; otherwise, false. *
* * @param buildComplete * Whether the build is complete. True if complete; otherwise, false. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withBuildComplete(Boolean buildComplete) { setBuildComplete(buildComplete); return this; } /** ** Whether the build is complete. True if complete; otherwise, false. *
* * @return Whether the build is complete. True if complete; otherwise, false. */ public Boolean isBuildComplete() { return this.buildComplete; } /** ** The entity that started the build. Valid values include: *
*
* If CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* If CodePipeline started the build, the pipeline's name (for example,
* codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* The entity that started the build. Valid values include: *
*
* If CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* If CodePipeline started the build, the pipeline's name (for example,
* codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* The entity that started the build. Valid values include: *
*
* If CodePipeline started the build, the pipeline's name (for example, codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* If CodePipeline started the build, the pipeline's name (for example,
* codepipeline/my-demo-pipeline
).
*
* If an IAM user started the build, the user's name (for example, MyUserName
).
*
* If the Jenkins plugin for CodeBuild started the build, the string CodeBuild-Jenkins-Plugin
.
*
* If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC * ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same * VPC. You must provide at least one security group and one subnet ID. *
* * @param vpcConfig * If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies * the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong * to the same VPC. You must provide at least one security group and one subnet ID. */ public void setVpcConfig(VpcConfig vpcConfig) { this.vpcConfig = vpcConfig; } /** ** If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC * ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same * VPC. You must provide at least one security group and one subnet ID. *
* * @return If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies * the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong * to the same VPC. You must provide at least one security group and one subnet ID. */ public VpcConfig getVpcConfig() { return this.vpcConfig; } /** ** If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies the VPC * ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong to the same * VPC. You must provide at least one security group and one subnet ID. *
* * @param vpcConfig * If your CodeBuild project accesses resources in an Amazon VPC, you provide this parameter that identifies * the VPC ID and the list of security group IDs and subnet IDs. The security groups and subnets must belong * to the same VPC. You must provide at least one security group and one subnet ID. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withVpcConfig(VpcConfig vpcConfig) { setVpcConfig(vpcConfig); return this; } /** ** Describes a network interface. *
* * @param networkInterface * Describes a network interface. */ public void setNetworkInterface(NetworkInterface networkInterface) { this.networkInterface = networkInterface; } /** ** Describes a network interface. *
* * @return Describes a network interface. */ public NetworkInterface getNetworkInterface() { return this.networkInterface; } /** ** Describes a network interface. *
* * @param networkInterface * Describes a network interface. * @return Returns a reference to this object so that method calls can be chained together. */ public Build withNetworkInterface(NetworkInterface networkInterface) { setNetworkInterface(networkInterface); return this; } /** ** The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. *
** You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to * that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the
* format alias/<alias-name>
).
*
* You can use a cross-account KMS key to encrypt the build output artifacts if your service role has * permission to that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using
* the format alias/<alias-name>
).
*/
public void setEncryptionKey(String encryptionKey) {
this.encryptionKey = encryptionKey;
}
/**
*
* The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. *
** You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to * that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the
* format alias/<alias-name>
).
*
* You can use a cross-account KMS key to encrypt the build output artifacts if your service role has * permission to that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using
* the format alias/<alias-name>
).
*/
public String getEncryptionKey() {
return this.encryptionKey;
}
/**
*
* The Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. *
** You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to * that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the
* format alias/<alias-name>
).
*
* You can use a cross-account KMS key to encrypt the build output artifacts if your service role has * permission to that key. *
*
* You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using
* the format alias/<alias-name>
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withEncryptionKey(String encryptionKey) {
setEncryptionKey(encryptionKey);
return this;
}
/**
*
* A list of exported environment variables for this build. *
** Exported environment variables are used in conjunction with CodePipeline to export environment variables from the * current build stage to subsequent stages in the pipeline. For more information, see Working with * variables in the CodePipeline User Guide. *
* * @return A list of exported environment variables for this build. *
* Exported environment variables are used in conjunction with CodePipeline to export environment variables
* from the current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
*/
public java.util.List
* A list of exported environment variables for this build.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables from the
* current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables
* from the current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
*/
public void setExportedEnvironmentVariables(java.util.Collection
* A list of exported environment variables for this build.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables from the
* current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setExportedEnvironmentVariables(java.util.Collection)} or
* {@link #withExportedEnvironmentVariables(java.util.Collection)} if you want to override the existing values.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables
* from the current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withExportedEnvironmentVariables(ExportedEnvironmentVariable... exportedEnvironmentVariables) {
if (this.exportedEnvironmentVariables == null) {
setExportedEnvironmentVariables(new java.util.ArrayList
* A list of exported environment variables for this build.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables from the
* current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
*
* Exported environment variables are used in conjunction with CodePipeline to export environment variables
* from the current build stage to subsequent stages in the pipeline. For more information, see Working with
* variables in the CodePipeline User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withExportedEnvironmentVariables(java.util.Collection
* An array of the ARNs associated with this build's reports.
*
* An array of the ARNs associated with this build's reports.
*
* An array of the ARNs associated with this build's reports.
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReportArns(java.util.Collection)} or {@link #withReportArns(java.util.Collection)} if you want to
* override the existing values.
*
* An array of the ARNs associated with this build's reports.
*
* An array of
* An array of
* An array of
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setFileSystemLocations(java.util.Collection)} or {@link #withFileSystemLocations(java.util.Collection)}
* if you want to override the existing values.
*
* An array of
* Contains information about the debug session for this build.
*
* Contains information about the debug session for this build.
*
* Contains information about the debug session for this build.
*
* The ARN of the batch build that this build is a member of, if applicable.
*
* The ARN of the batch build that this build is a member of, if applicable.
*
* The ARN of the batch build that this build is a member of, if applicable.
* ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
,
* mountOptions
, mountPoint
, and type
of a file system created using Amazon
* Elastic File System.
* ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
,
* location
, mountOptions
, mountPoint
, and type
of a
* file system created using Amazon Elastic File System.
*/
public java.util.ListProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
,
* mountOptions
, mountPoint
, and type
of a file system created using Amazon
* Elastic File System.
* ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
* , mountOptions
, mountPoint
, and type
of a file system created using
* Amazon Elastic File System.
*/
public void setFileSystemLocations(java.util.CollectionProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
,
* mountOptions
, mountPoint
, and type
of a file system created using Amazon
* Elastic File System.
* ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
* , mountOptions
, mountPoint
, and type
of a file system created using
* Amazon Elastic File System.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withFileSystemLocations(ProjectFileSystemLocation... fileSystemLocations) {
if (this.fileSystemLocations == null) {
setFileSystemLocations(new java.util.ArrayListProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
,
* mountOptions
, mountPoint
, and type
of a file system created using Amazon
* Elastic File System.
* ProjectFileSystemLocation
objects for a CodeBuild build project. A
* ProjectFileSystemLocation
object specifies the identifier
, location
* , mountOptions
, mountPoint
, and type
of a file system created using
* Amazon Elastic File System.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Build withFileSystemLocations(java.util.Collection