Class BuildBatch
- java.lang.Object
-
- software.amazon.awssdk.services.codebuild.model.BuildBatch
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<BuildBatch.Builder,BuildBatch>
@Generated("software.amazon.awssdk:codegen") public final class BuildBatch extends Object implements SdkPojo, Serializable, ToCopyableBuilder<BuildBatch.Builder,BuildBatch>
Contains information about a batch build.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBuildBatch.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringarn()The ARN of the batch build.BuildArtifactsartifacts()ABuildArtifactsobject the defines the build artifacts for this batch build.ProjectBuildBatchConfigbuildBatchConfig()Returns the value of the BuildBatchConfig property for this object.LongbuildBatchNumber()The number of the batch build.StatusTypebuildBatchStatus()The status of the batch build.StringbuildBatchStatusAsString()The status of the batch build.static BuildBatch.Builderbuilder()List<BuildGroup>buildGroups()An array ofBuildGroupobjects that define the build groups for the batch build.IntegerbuildTimeoutInMinutes()Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in.ProjectCachecache()Returns the value of the Cache property for this object.Booleancomplete()Indicates if the batch build is complete.StringcurrentPhase()The current phase of the batch build.BooleandebugSessionEnabled()Specifies if session debugging is enabled for this batch build.StringencryptionKey()The Key Management Service customer master key (CMK) to be used for encrypting the batch build output artifacts.InstantendTime()The date and time that the batch build ended.ProjectEnvironmentenvironment()Returns the value of the Environment property for this object.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)List<ProjectFileSystemLocation>fileSystemLocations()An array ofProjectFileSystemLocationobjects for the batch build project.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasBuildGroups()For responses, this returns true if the service returned a value for the BuildGroups property.booleanhasFileSystemLocations()For responses, this returns true if the service returned a value for the FileSystemLocations property.inthashCode()booleanhasPhases()For responses, this returns true if the service returned a value for the Phases property.booleanhasSecondaryArtifacts()For responses, this returns true if the service returned a value for the SecondaryArtifacts property.booleanhasSecondarySources()For responses, this returns true if the service returned a value for the SecondarySources property.booleanhasSecondarySourceVersions()For responses, this returns true if the service returned a value for the SecondarySourceVersions property.Stringid()The identifier of the batch build.Stringinitiator()The entity that started the batch build.LogsConfiglogConfig()Returns the value of the LogConfig property for this object.List<BuildBatchPhase>phases()An array ofBuildBatchPhaseobjects the specify the phases of the batch build.StringprojectName()The name of the batch build project.IntegerqueuedTimeoutInMinutes()Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out.StringresolvedSourceVersion()The identifier of the resolved version of this batch build's source code.List<SdkField<?>>sdkFields()List<BuildArtifacts>secondaryArtifacts()An array ofBuildArtifactsobjects the define the build artifacts for this batch build.List<ProjectSource>secondarySources()An array ofProjectSourceobjects that define the sources for the batch build.List<ProjectSourceVersion>secondarySourceVersions()An array ofProjectSourceVersionobjects.static Class<? extends BuildBatch.Builder>serializableBuilderClass()StringserviceRole()The name of a service role used for builds in the batch.ProjectSourcesource()Returns the value of the Source property for this object.StringsourceVersion()The identifier of the version of the source code to be built.InstantstartTime()The date and time that the batch build started.BuildBatch.BuildertoBuilder()StringtoString()Returns a string representation of this object.VpcConfigvpcConfig()Returns the value of the VpcConfig property for this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
id
public final String id()
The identifier of the batch build.
- Returns:
- The identifier of the batch build.
-
arn
public final String arn()
The ARN of the batch build.
- Returns:
- The ARN of the batch build.
-
startTime
public final Instant startTime()
The date and time that the batch build started.
- Returns:
- The date and time that the batch build started.
-
endTime
public final Instant endTime()
The date and time that the batch build ended.
- Returns:
- The date and time that the batch build ended.
-
currentPhase
public final String currentPhase()
The current phase of the batch build.
- Returns:
- The current phase of the batch build.
-
buildBatchStatus
public final StatusType buildBatchStatus()
The status of the batch build.
If the service returns an enum value that is not available in the current SDK version,
buildBatchStatuswill returnStatusType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombuildBatchStatusAsString().- Returns:
- The status of the batch build.
- See Also:
StatusType
-
buildBatchStatusAsString
public final String buildBatchStatusAsString()
The status of the batch build.
If the service returns an enum value that is not available in the current SDK version,
buildBatchStatuswill returnStatusType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frombuildBatchStatusAsString().- Returns:
- The status of the batch build.
- See Also:
StatusType
-
sourceVersion
public final String sourceVersion()
The identifier of the version of the source code to be built.
- Returns:
- The identifier of the version of the source code to be built.
-
resolvedSourceVersion
public final String resolvedSourceVersion()
The identifier of the resolved version of this batch 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.
- Returns:
- The identifier of the resolved version of this batch 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.
-
-
-
projectName
public final String projectName()
The name of the batch build project.
- Returns:
- The name of the batch build project.
-
hasPhases
public final boolean hasPhases()
For responses, this returns true if the service returned a value for the Phases property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
phases
public final List<BuildBatchPhase> phases()
An array of
BuildBatchPhaseobjects the specify the phases of the batch build.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasPhases()method.- Returns:
- An array of
BuildBatchPhaseobjects the specify the phases of the batch build.
-
source
public final ProjectSource source()
Returns the value of the Source property for this object.- Returns:
- The value of the Source property for this object.
-
hasSecondarySources
public final boolean hasSecondarySources()
For responses, this returns true if the service returned a value for the SecondarySources property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
secondarySources
public final List<ProjectSource> secondarySources()
An array of
ProjectSourceobjects that define the sources for the batch build.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecondarySources()method.- Returns:
- An array of
ProjectSourceobjects that define the sources for the batch build.
-
hasSecondarySourceVersions
public final boolean hasSecondarySourceVersions()
For responses, this returns true if the service returned a value for the SecondarySourceVersions property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
secondarySourceVersions
public final List<ProjectSourceVersion> secondarySourceVersions()
An array of
ProjectSourceVersionobjects. EachProjectSourceVersionmust 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.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecondarySourceVersions()method.- Returns:
- An array of
ProjectSourceVersionobjects. EachProjectSourceVersionmust 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.
-
-
-
artifacts
public final BuildArtifacts artifacts()
A
BuildArtifactsobject the defines the build artifacts for this batch build.- Returns:
- A
BuildArtifactsobject the defines the build artifacts for this batch build.
-
hasSecondaryArtifacts
public final boolean hasSecondaryArtifacts()
For responses, this returns true if the service returned a value for the SecondaryArtifacts property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
secondaryArtifacts
public final List<BuildArtifacts> secondaryArtifacts()
An array of
BuildArtifactsobjects the define the build artifacts for this batch build.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSecondaryArtifacts()method.- Returns:
- An array of
BuildArtifactsobjects the define the build artifacts for this batch build.
-
cache
public final ProjectCache cache()
Returns the value of the Cache property for this object.- Returns:
- The value of the Cache property for this object.
-
environment
public final ProjectEnvironment environment()
Returns the value of the Environment property for this object.- Returns:
- The value of the Environment property for this object.
-
serviceRole
public final String serviceRole()
The name of a service role used for builds in the batch.
- Returns:
- The name of a service role used for builds in the batch.
-
logConfig
public final LogsConfig logConfig()
Returns the value of the LogConfig property for this object.- Returns:
- The value of the LogConfig property for this object.
-
buildTimeoutInMinutes
public final Integer buildTimeoutInMinutes()
Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in.
- Returns:
- Specifies the maximum amount of time, in minutes, that the build in a batch must be completed in.
-
queuedTimeoutInMinutes
public final Integer queuedTimeoutInMinutes()
Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out.
- Returns:
- Specifies the amount of time, in minutes, that the batch build is allowed to be queued before it times out.
-
complete
public final Boolean complete()
Indicates if the batch build is complete.
- Returns:
- Indicates if the batch build is complete.
-
initiator
public final String initiator()
The entity that started the batch build. Valid values include:
-
If CodePipeline started the build, the pipeline's name (for example,
codepipeline/my-demo-pipeline). -
If a user started the build, the user's name.
-
If the Jenkins plugin for CodeBuild started the build, the string
CodeBuild-Jenkins-Plugin.
- Returns:
- The entity that started the batch build. Valid values include:
-
If CodePipeline started the build, the pipeline's name (for example,
codepipeline/my-demo-pipeline). -
If a user started the build, the user's name.
-
If the Jenkins plugin for CodeBuild started the build, the string
CodeBuild-Jenkins-Plugin.
-
-
-
vpcConfig
public final VpcConfig vpcConfig()
Returns the value of the VpcConfig property for this object.- Returns:
- The value of the VpcConfig property for this object.
-
encryptionKey
public final String encryptionKey()
The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>).- Returns:
- The Key Management Service customer master key (CMK) to be used for encrypting the batch 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>).
-
buildBatchNumber
public final Long buildBatchNumber()
The number of the batch build. For each project, the
buildBatchNumberof its first batch build is1. ThebuildBatchNumberof each subsequent batch build is incremented by1. If a batch build is deleted, thebuildBatchNumberof other batch builds does not change.- Returns:
- The number of the batch build. For each project, the
buildBatchNumberof its first batch build is1. ThebuildBatchNumberof each subsequent batch build is incremented by1. If a batch build is deleted, thebuildBatchNumberof other batch builds does not change.
-
hasFileSystemLocations
public final boolean hasFileSystemLocations()
For responses, this returns true if the service returned a value for the FileSystemLocations property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
fileSystemLocations
public final List<ProjectFileSystemLocation> fileSystemLocations()
An array of
ProjectFileSystemLocationobjects for the batch build project. AProjectFileSystemLocationobject specifies theidentifier,location,mountOptions,mountPoint, andtypeof a file system created using Amazon Elastic File System.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasFileSystemLocations()method.- Returns:
- An array of
ProjectFileSystemLocationobjects for the batch build project. AProjectFileSystemLocationobject specifies theidentifier,location,mountOptions,mountPoint, andtypeof a file system created using Amazon Elastic File System.
-
buildBatchConfig
public final ProjectBuildBatchConfig buildBatchConfig()
Returns the value of the BuildBatchConfig property for this object.- Returns:
- The value of the BuildBatchConfig property for this object.
-
hasBuildGroups
public final boolean hasBuildGroups()
For responses, this returns true if the service returned a value for the BuildGroups property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
-
buildGroups
public final List<BuildGroup> buildGroups()
An array of
BuildGroupobjects that define the build groups for the batch build.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasBuildGroups()method.- Returns:
- An array of
BuildGroupobjects that define the build groups for the batch build.
-
debugSessionEnabled
public final Boolean debugSessionEnabled()
Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
- Returns:
- Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
-
toBuilder
public BuildBatch.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<BuildBatch.Builder,BuildBatch>
-
builder
public static BuildBatch.Builder builder()
-
serializableBuilderClass
public static Class<? extends BuildBatch.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
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.
-
-