com.amazonaws.services.codebuild.model

## Class Build

- java.lang.Object
- - com.amazonaws.services.codebuild.model.Build

All Implemented Interfaces:
  Serializable, Cloneable

    public class Build
    extends Object
    implements Serializable, Cloneable

Information about a build.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`Build()`

### Method Summary

All Methods Instance Methods Concrete Methods
`Build` `clone()`
`boolean` `equals(Object obj)`
`String` `getArn()` The build's Amazon Resource Name (ARN).
`BuildArtifacts` `getArtifacts()` Information about the build's output artifacts.
`Boolean` `getBuildComplete()` Whether the build has finished.
`String` `getBuildStatus()` The build's current status.
`String` `getCurrentPhase()` The build's current build phase.
`Date` `getEndTime()` When the build process ended, expressed in Unix time format.
`ProjectEnvironment` `getEnvironment()` Information about the build environment for this build.
`String` `getId()` The build's unique ID.
`String` `getInitiator()` The entity that started the build.
`LogsLocation` `getLogs()` Information about the build's logs in Amazon CloudWatch Logs.
`List<BuildPhase>` `getPhases()` Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
`String` `getProjectName()` The build project's name.
`ProjectSource` `getSource()` Information about the source code to be built.
`String` `getSourceVersion()` Any version identifier for the version of the source code to be built.
`Date` `getStartTime()` When the build process started, expressed in Unix time format.
`Integer` `getTimeoutInMinutes()` How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.
`int` `hashCode()`
`Boolean` `isBuildComplete()` Whether the build has finished.
`void` `setArn(String arn)` The build's Amazon Resource Name (ARN).
`void` `setArtifacts(BuildArtifacts artifacts)` Information about the build's output artifacts.
`void` `setBuildComplete(Boolean buildComplete)` Whether the build has finished.
`void` `setBuildStatus(StatusType buildStatus)` The build's current status.
`void` `setBuildStatus(String buildStatus)` The build's current status.
`void` `setCurrentPhase(String currentPhase)` The build's current build phase.
`void` `setEndTime(Date endTime)` When the build process ended, expressed in Unix time format.
`void` `setEnvironment(ProjectEnvironment environment)` Information about the build environment for this build.
`void` `setId(String id)` The build's unique ID.
`void` `setInitiator(String initiator)` The entity that started the build.
`void` `setLogs(LogsLocation logs)` Information about the build's logs in Amazon CloudWatch Logs.
`void` `setPhases(Collection<BuildPhase> phases)` Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
`void` `setProjectName(String projectName)` The build project's name.
`void` `setSource(ProjectSource source)` Information about the source code to be built.
`void` `setSourceVersion(String sourceVersion)` Any version identifier for the version of the source code to be built.
`void` `setStartTime(Date startTime)` When the build process started, expressed in Unix time format.
`void` `setTimeoutInMinutes(Integer timeoutInMinutes)` How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.
`String` `toString()` Returns a string representation of this object; useful for testing and debugging.
`Build` `withArn(String arn)` The build's Amazon Resource Name (ARN).
`Build` `withArtifacts(BuildArtifacts artifacts)` Information about the build's output artifacts.
`Build` `withBuildComplete(Boolean buildComplete)` Whether the build has finished.
`Build` `withBuildStatus(StatusType buildStatus)` The build's current status.
`Build` `withBuildStatus(String buildStatus)` The build's current status.
`Build` `withCurrentPhase(String currentPhase)` The build's current build phase.
`Build` `withEndTime(Date endTime)` When the build process ended, expressed in Unix time format.
`Build` `withEnvironment(ProjectEnvironment environment)` Information about the build environment for this build.
`Build` `withId(String id)` The build's unique ID.
`Build` `withInitiator(String initiator)` The entity that started the build.
`Build` `withLogs(LogsLocation logs)` Information about the build's logs in Amazon CloudWatch Logs.
`Build` `withPhases(BuildPhase... phases)` Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
`Build` `withPhases(Collection<BuildPhase> phases)` Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
`Build` `withProjectName(String projectName)` The build project's name.
`Build` `withSource(ProjectSource source)` Information about the source code to be built.
`Build` `withSourceVersion(String sourceVersion)` Any version identifier for the version of the source code to be built.
`Build` `withStartTime(Date startTime)` When the build process started, expressed in Unix time format.
`Build` `withTimeoutInMinutes(Integer timeoutInMinutes)` How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

### Methods inherited from class java.lang.Object

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Build

    public Build()

### Method Detail

#### setId

    public void setId(String id)

The build's unique ID.

Parameters:
  `id` - The build's unique ID.

#### getId

    public String getId()

The build's unique ID.

Returns:
  The build's unique ID.

#### withId

    public Build withId(String id)

The build's unique ID.

Parameters:
  `id` - The build's unique ID.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setArn

    public void setArn(String arn)

The build's Amazon Resource Name (ARN).

Parameters:
  `arn` - The build's Amazon Resource Name (ARN).

#### getArn

    public String getArn()

The build's Amazon Resource Name (ARN).

Returns:
  The build's Amazon Resource Name (ARN).

#### withArn

    public Build withArn(String arn)

The build's Amazon Resource Name (ARN).

Parameters:
  `arn` - The build's Amazon Resource Name (ARN).
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setStartTime

    public void setStartTime(Date startTime)

When the build process started, expressed in Unix time format.

Parameters:
  `startTime` - When the build process started, expressed in Unix time format.

#### getStartTime

    public Date getStartTime()

When the build process started, expressed in Unix time format.

Returns:
  When the build process started, expressed in Unix time format.

#### withStartTime

    public Build withStartTime(Date startTime)

When the build process started, expressed in Unix time format.

Parameters:
  `startTime` - When the build process started, expressed in Unix time format.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setEndTime

    public void setEndTime(Date endTime)

When the build process ended, expressed in Unix time format.

Parameters:
  `endTime` - When the build process ended, expressed in Unix time format.

#### getEndTime

    public Date getEndTime()

When the build process ended, expressed in Unix time format.

Returns:
  When the build process ended, expressed in Unix time format.

#### withEndTime

    public Build withEndTime(Date endTime)

When the build process ended, expressed in Unix time format.

Parameters:
  `endTime` - When the build process ended, expressed in Unix time format.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setCurrentPhase

    public void setCurrentPhase(String currentPhase)

The build's current build phase.

Parameters:
  `currentPhase` - The build's current build phase.

#### getCurrentPhase

    public String getCurrentPhase()

The build's current build phase.

Returns:
  The build's current build phase.

#### withCurrentPhase

    public Build withCurrentPhase(String currentPhase)

The build's current build phase.

Parameters:
  `currentPhase` - The build's current build phase.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setBuildStatus

    public void setBuildStatus(String buildStatus)

The build's current status. 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.

Parameters:
  `buildStatus` - The build's current status. 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.

See Also:
  `StatusType`

#### getBuildStatus

    public String getBuildStatus()

The build's current status. 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.

Returns:
  The build's current status. 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.

See Also:
  `StatusType`

#### withBuildStatus

    public Build withBuildStatus(String buildStatus)

The build's current status. 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.

Parameters:
  `buildStatus` - The build's current status. 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.

Returns:
  Returns a reference to this object so that method calls can be chained together.
See Also:
  `StatusType`

#### setBuildStatus

    public void setBuildStatus(StatusType buildStatus)

The build's current status. 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.

Parameters:
  `buildStatus` - The build's current status. 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.

See Also:
  `StatusType`

#### withBuildStatus

    public Build withBuildStatus(StatusType buildStatus)

The build's current status. 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.

Parameters:
  `buildStatus` - The build's current status. 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.

Returns:
  Returns a reference to this object so that method calls can be chained together.
See Also:
  `StatusType`

#### setSourceVersion

    public void setSourceVersion(String sourceVersion)

Any version identifier for the version of the source code to be built.

Parameters:
  `sourceVersion` - Any version identifier for the version of the source code to be built.

#### getSourceVersion

    public String getSourceVersion()

Any version identifier for the version of the source code to be built.

Returns:
  Any version identifier for the version of the source code to be built.

#### withSourceVersion

    public Build withSourceVersion(String sourceVersion)

Any version identifier for the version of the source code to be built.

Parameters:
  `sourceVersion` - Any version identifier for the version of the source code to be built.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setProjectName

    public void setProjectName(String projectName)

The build project's name.

Parameters:
  `projectName` - The build project's name.

#### getProjectName

    public String getProjectName()

The build project's name.

Returns:
  The build project's name.

#### withProjectName

    public Build withProjectName(String projectName)

The build project's name.

Parameters:
  `projectName` - The build project's name.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### getPhases

    public List<BuildPhase> getPhases()

Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

Returns:
  Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

#### setPhases

    public void setPhases(Collection<BuildPhase> phases)

Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

Parameters:
  `phases` - Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

#### withPhases

    public Build withPhases(BuildPhase... phases)

Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

NOTE: This method appends the values to the existing list (if any). Use `setPhases(java.util.Collection)` or `withPhases(java.util.Collection)` if you want to override the existing values.

Parameters:
  `phases` - Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### withPhases

    public Build withPhases(Collection<BuildPhase> phases)

Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.

Parameters:
  `phases` - Information about all previous build phases that have completed, and information about any current build phase that has not yet completed.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setSource

    public void setSource(ProjectSource source)

Information about the source code to be built.

Parameters:
  `source` - Information about the source code to be built.

#### getSource

    public ProjectSource getSource()

Information about the source code to be built.

Returns:
  Information about the source code to be built.

#### withSource

    public Build withSource(ProjectSource source)

Information about the source code to be built.

Parameters:
  `source` - Information about the source code to be built.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setArtifacts

    public void setArtifacts(BuildArtifacts artifacts)

Information about the build's output artifacts.

Parameters:
  `artifacts` - Information about the build's output artifacts.

#### getArtifacts

    public BuildArtifacts getArtifacts()

Information about the build's output artifacts.

Returns:
  Information about the build's output artifacts.

#### withArtifacts

    public Build withArtifacts(BuildArtifacts artifacts)

Information about the build's output artifacts.

Parameters:
  `artifacts` - Information about the build's output artifacts.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setEnvironment

    public void setEnvironment(ProjectEnvironment environment)

Information about the build environment for this build.

Parameters:
  `environment` - Information about the build environment for this build.

#### getEnvironment

    public ProjectEnvironment getEnvironment()

Information about the build environment for this build.

Returns:
  Information about the build environment for this build.

#### withEnvironment

    public Build withEnvironment(ProjectEnvironment environment)

Information about the build environment for this build.

Parameters:
  `environment` - Information about the build environment for this build.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setLogs

    public void setLogs(LogsLocation logs)

Information about the build's logs in Amazon CloudWatch Logs.

Parameters:
  `logs` - Information about the build's logs in Amazon CloudWatch Logs.

#### getLogs

    public LogsLocation getLogs()

Information about the build's logs in Amazon CloudWatch Logs.

Returns:
  Information about the build's logs in Amazon CloudWatch Logs.

#### withLogs

    public Build withLogs(LogsLocation logs)

Information about the build's logs in Amazon CloudWatch Logs.

Parameters:
  `logs` - Information about the build's logs in Amazon CloudWatch Logs.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setTimeoutInMinutes

    public void setTimeoutInMinutes(Integer timeoutInMinutes)

How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

Parameters:
  `timeoutInMinutes` - How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

#### getTimeoutInMinutes

    public Integer getTimeoutInMinutes()

How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

Returns:
  How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

#### withTimeoutInMinutes

    public Build withTimeoutInMinutes(Integer timeoutInMinutes)

How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.

Parameters:
  `timeoutInMinutes` - How long in minutes for AWS CodeBuild to wait to timeout this build if it does not get marked as completed.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### setBuildComplete

    public void setBuildComplete(Boolean buildComplete)

Whether the build has finished. Valid values include true if completed; otherwise, false.

Parameters:
  `buildComplete` - Whether the build has finished. Valid values include true if completed; otherwise, false.

#### getBuildComplete

    public Boolean getBuildComplete()

Whether the build has finished. Valid values include true if completed; otherwise, false.

Returns:
  Whether the build has finished. Valid values include true if completed; otherwise, false.

#### withBuildComplete

    public Build withBuildComplete(Boolean buildComplete)

Whether the build has finished. Valid values include true if completed; otherwise, false.

Parameters:
  `buildComplete` - Whether the build has finished. Valid values include true if completed; otherwise, false.
Returns:
  Returns a reference to this object so that method calls can be chained together.

#### isBuildComplete

    public Boolean isBuildComplete()

Whether the build has finished. Valid values include true if completed; otherwise, false.

Returns:
  Whether the build has finished. Valid values include true if completed; otherwise, false.

#### setInitiator

    public void setInitiator(String initiator)

The entity that started the build. Valid values include:

- If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

- If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

- If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

Parameters:
  `initiator` - The entity that started the build. Valid values include:

  - If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

  - If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

  - If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

#### getInitiator

    public String getInitiator()

The entity that started the build. Valid values include:

- If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

- If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

- If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

Returns:
  The entity that started the build. Valid values include:

  - If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

  - If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

  - If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

#### withInitiator

    public Build withInitiator(String initiator)

The entity that started the build. Valid values include:

- If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

- If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

- If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

Parameters:
  `initiator` - The entity that started the build. Valid values include:

  - If AWS CodePipeline started the build, the pipeline's name, for example `codepipeline/my-demo-pipeline`.

  - If an AWS Identity and Access Management (IAM) user started the build, the user's name, for example `MyUserName`.

  - If the Jenkins plugin for AWS CodeBuild started the build, the string `CodeBuild-Jenkins-Plugin`.

Returns:
  Returns a reference to this object so that method calls can be chained together.

#### toString

    public String toString()

Returns a string representation of this object; useful for testing and debugging.

Overrides:
  `toString` in class `Object`
Returns:
  A string representation of this object.
See Also:
  `Object.toString()`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### clone

    public Build clone()

Overrides:
  `clone` in class `Object`