Class Build.Builder (3.20.0)

public static final class Build.Builder extends GeneratedMessageV3.Builder<Build.Builder> implements BuildOrBuilder

A build resource in the Cloud Build API. At a high level, a Build describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created:

  • $PROJECT_ID: the project ID of the build.
  • $PROJECT_NUMBER: the project number of the build.
  • $LOCATION: the location/region of the build.
  • $BUILD_ID: the autogenerated ID of the build.
  • $REPO_NAME: the source repository name specified by RepoSource.
  • $BRANCH_NAME: the branch name specified by RepoSource.
  • $TAG_NAME: the tag name specified by RepoSource.
  • $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag.
  • $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.

Protobuf type google.devtools.cloudbuild.v1.Build

Implements

BuildOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllImages(Iterable<String> values)

public Build.Builder addAllImages(Iterable<String> values)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameter
NameDescription
valuesIterable<String>

The images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addAllSecrets(Iterable<? extends Secret> values)

public Build.Builder addAllSecrets(Iterable<? extends Secret> values)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Secret>
Returns
TypeDescription
Build.Builder

addAllSteps(Iterable<? extends BuildStep> values)

public Build.Builder addAllSteps(Iterable<? extends BuildStep> values)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.BuildStep>
Returns
TypeDescription
Build.Builder

addAllTags(Iterable<String> values)

public Build.Builder addAllTags(Iterable<String> values)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameter
NameDescription
valuesIterable<String>

The tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addAllWarnings(Iterable<? extends Build.Warning> values)

public Build.Builder addAllWarnings(Iterable<? extends Build.Warning> values)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Build.Warning>
Returns
TypeDescription
Build.Builder

addImages(String value)

public Build.Builder addImages(String value)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameter
NameDescription
valueString

The images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addImagesBytes(ByteString value)

public Build.Builder addImagesBytes(ByteString value)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameter
NameDescription
valueByteString

The bytes of the images to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Build.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Build.Builder
Overrides

addSecrets(Secret value)

public Build.Builder addSecrets(Secret value)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
valueSecret
Returns
TypeDescription
Build.Builder

addSecrets(Secret.Builder builderForValue)

public Build.Builder addSecrets(Secret.Builder builderForValue)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
builderForValueSecret.Builder
Returns
TypeDescription
Build.Builder

addSecrets(int index, Secret value)

public Build.Builder addSecrets(int index, Secret value)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
valueSecret
Returns
TypeDescription
Build.Builder

addSecrets(int index, Secret.Builder builderForValue)

public Build.Builder addSecrets(int index, Secret.Builder builderForValue)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
builderForValueSecret.Builder
Returns
TypeDescription
Build.Builder

addSecretsBuilder()

public Secret.Builder addSecretsBuilder()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
Secret.Builder

addSecretsBuilder(int index)

public Secret.Builder addSecretsBuilder(int index)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Secret.Builder

addSteps(BuildStep value)

public Build.Builder addSteps(BuildStep value)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
valueBuildStep
Returns
TypeDescription
Build.Builder

addSteps(BuildStep.Builder builderForValue)

public Build.Builder addSteps(BuildStep.Builder builderForValue)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
builderForValueBuildStep.Builder
Returns
TypeDescription
Build.Builder

addSteps(int index, BuildStep value)

public Build.Builder addSteps(int index, BuildStep value)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
valueBuildStep
Returns
TypeDescription
Build.Builder

addSteps(int index, BuildStep.Builder builderForValue)

public Build.Builder addSteps(int index, BuildStep.Builder builderForValue)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
builderForValueBuildStep.Builder
Returns
TypeDescription
Build.Builder

addStepsBuilder()

public BuildStep.Builder addStepsBuilder()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
BuildStep.Builder

addStepsBuilder(int index)

public BuildStep.Builder addStepsBuilder(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildStep.Builder

addTags(String value)

public Build.Builder addTags(String value)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameter
NameDescription
valueString

The tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addTagsBytes(ByteString value)

public Build.Builder addTagsBytes(ByteString value)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameter
NameDescription
valueByteString

The bytes of the tags to add.

Returns
TypeDescription
Build.Builder

This builder for chaining.

addWarnings(Build.Warning value)

public Build.Builder addWarnings(Build.Warning value)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuild.Warning
Returns
TypeDescription
Build.Builder

addWarnings(Build.Warning.Builder builderForValue)

public Build.Builder addWarnings(Build.Warning.Builder builderForValue)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuild.Warning.Builder
Returns
TypeDescription
Build.Builder

addWarnings(int index, Build.Warning value)

public Build.Builder addWarnings(int index, Build.Warning value)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueBuild.Warning
Returns
TypeDescription
Build.Builder

addWarnings(int index, Build.Warning.Builder builderForValue)

public Build.Builder addWarnings(int index, Build.Warning.Builder builderForValue)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueBuild.Warning.Builder
Returns
TypeDescription
Build.Builder

addWarningsBuilder()

public Build.Warning.Builder addWarningsBuilder()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Warning.Builder

addWarningsBuilder(int index)

public Build.Warning.Builder addWarningsBuilder(int index)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Warning.Builder

build()

public Build build()
Returns
TypeDescription
Build

buildPartial()

public Build buildPartial()
Returns
TypeDescription
Build

clear()

public Build.Builder clear()
Returns
TypeDescription
Build.Builder
Overrides

clearApproval()

public Build.Builder clearApproval()

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearArtifacts()

public Build.Builder clearArtifacts()

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Build.Builder

clearAvailableSecrets()

public Build.Builder clearAvailableSecrets()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Build.Builder

clearBuildTriggerId()

public Build.Builder clearBuildTriggerId()

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearCreateTime()

public Build.Builder clearCreateTime()

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearFailureInfo()

public Build.Builder clearFailureInfo()

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearField(Descriptors.FieldDescriptor field)

public Build.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Build.Builder
Overrides

clearFinishTime()

public Build.Builder clearFinishTime()

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearId()

public Build.Builder clearId()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearImages()

public Build.Builder clearImages()

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearLogUrl()

public Build.Builder clearLogUrl()

Output only. URL to logs for this build in Google Cloud Console.

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearLogsBucket()

public Build.Builder clearLogsBucket()

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

string logs_bucket = 19;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearName()

public Build.Builder clearName()

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Build.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Build.Builder
Overrides

clearOptions()

public Build.Builder clearOptions()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
Build.Builder

clearProjectId()

public Build.Builder clearProjectId()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearQueueTtl()

public Build.Builder clearQueueTtl()

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Build.Builder

clearResults()

public Build.Builder clearResults()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearSecrets()

public Build.Builder clearSecrets()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
Build.Builder

clearServiceAccount()

public Build.Builder clearServiceAccount()

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearSource()

public Build.Builder clearSource()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
Build.Builder

clearSourceProvenance()

public Build.Builder clearSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearStartTime()

public Build.Builder clearStartTime()

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clearStatus()

public Build.Builder clearStatus()

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearStatusDetail()

public Build.Builder clearStatusDetail()

Output only. Customer-readable message about the current status.

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearSteps()

public Build.Builder clearSteps()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
Build.Builder

clearSubstitutions()

public Build.Builder clearSubstitutions()
Returns
TypeDescription
Build.Builder

clearTags()

public Build.Builder clearTags()

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Returns
TypeDescription
Build.Builder

This builder for chaining.

clearTimeout()

public Build.Builder clearTimeout()

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
Build.Builder

clearTiming()

public Build.Builder clearTiming()
Returns
TypeDescription
Build.Builder

clearWarnings()

public Build.Builder clearWarnings()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Builder

clone()

public Build.Builder clone()
Returns
TypeDescription
Build.Builder
Overrides

containsSubstitutions(String key)

public boolean containsSubstitutions(String key)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsTiming(String key)

public boolean containsTiming(String key)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getApproval()

public BuildApproval getApproval()

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApproval

The approval.

getApprovalBuilder()

public BuildApproval.Builder getApprovalBuilder()

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApproval.Builder

getApprovalOrBuilder()

public BuildApprovalOrBuilder getApprovalOrBuilder()

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
BuildApprovalOrBuilder

getArtifacts()

public Artifacts getArtifacts()

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Artifacts

The artifacts.

getArtifactsBuilder()

public Artifacts.Builder getArtifactsBuilder()

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
Artifacts.Builder

getArtifactsOrBuilder()

public ArtifactsOrBuilder getArtifactsOrBuilder()

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
ArtifactsOrBuilder

getAvailableSecrets()

public Secrets getAvailableSecrets()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Secrets

The availableSecrets.

getAvailableSecretsBuilder()

public Secrets.Builder getAvailableSecretsBuilder()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
Secrets.Builder

getAvailableSecretsOrBuilder()

public SecretsOrBuilder getAvailableSecretsOrBuilder()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
SecretsOrBuilder

getBuildTriggerId()

public String getBuildTriggerId()

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The buildTriggerId.

getBuildTriggerIdBytes()

public ByteString getBuildTriggerIdBytes()

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for buildTriggerId.

getCreateTime()

public Timestamp getCreateTime()

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Build getDefaultInstanceForType()
Returns
TypeDescription
Build

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getFailureInfo()

public Build.FailureInfo getFailureInfo()

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfo

The failureInfo.

getFailureInfoBuilder()

public Build.FailureInfo.Builder getFailureInfoBuilder()

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfo.Builder

getFailureInfoOrBuilder()

public Build.FailureInfoOrBuilder getFailureInfoOrBuilder()

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.FailureInfoOrBuilder

getFinishTime()

public Timestamp getFinishTime()

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The finishTime.

getFinishTimeBuilder()

public Timestamp.Builder getFinishTimeBuilder()

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getFinishTimeOrBuilder()

public TimestampOrBuilder getFinishTimeOrBuilder()

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getId()

public String getId()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for id.

getImages(int index)

public String getImages(int index)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The images at the given index.

getImagesBytes(int index)

public ByteString getImagesBytes(int index)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the images at the given index.

getImagesCount()

public int getImagesCount()

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Returns
TypeDescription
int

The count of images.

getImagesList()

public ProtocolStringList getImagesList()

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the images.

getLogUrl()

public String getLogUrl()

Output only. URL to logs for this build in Google Cloud Console.

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The logUrl.

getLogUrlBytes()

public ByteString getLogUrlBytes()

Output only. URL to logs for this build in Google Cloud Console.

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for logUrl.

getLogsBucket()

public String getLogsBucket()

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

string logs_bucket = 19;

Returns
TypeDescription
String

The logsBucket.

getLogsBucketBytes()

public ByteString getLogsBucketBytes()

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

string logs_bucket = 19;

Returns
TypeDescription
ByteString

The bytes for logsBucket.

getMutableSubstitutions()

public Map<String,String> getMutableSubstitutions()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getMutableTiming()

public Map<String,TimeSpan> getMutableTiming()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,TimeSpan>

getName()

public String getName()

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getOptions()

public BuildOptions getOptions()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptions

The options.

getOptionsBuilder()

public BuildOptions.Builder getOptionsBuilder()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptions.Builder

getOptionsOrBuilder()

public BuildOptionsOrBuilder getOptionsOrBuilder()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
BuildOptionsOrBuilder

getProjectId()

public String getProjectId()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The projectId.

getProjectIdBytes()

public ByteString getProjectIdBytes()

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for projectId.

getQueueTtl()

public Duration getQueueTtl()

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Duration

The queueTtl.

getQueueTtlBuilder()

public Duration.Builder getQueueTtlBuilder()

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
Builder

getQueueTtlOrBuilder()

public DurationOrBuilder getQueueTtlOrBuilder()

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
DurationOrBuilder

getResults()

public Results getResults()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Results

The results.

getResultsBuilder()

public Results.Builder getResultsBuilder()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Results.Builder

getResultsOrBuilder()

public ResultsOrBuilder getResultsOrBuilder()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ResultsOrBuilder

getSecrets(int index)

public Secret getSecrets(int index)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Secret

getSecretsBuilder(int index)

public Secret.Builder getSecretsBuilder(int index)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Secret.Builder

getSecretsBuilderList()

public List<Secret.Builder> getSecretsBuilderList()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
List<Builder>

getSecretsCount()

public int getSecretsCount()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
int

getSecretsList()

public List<Secret> getSecretsList()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
List<Secret>

getSecretsOrBuilder(int index)

public SecretOrBuilder getSecretsOrBuilder(int index)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretOrBuilder

getSecretsOrBuilderList()

public List<? extends SecretOrBuilder> getSecretsOrBuilderList()

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Returns
TypeDescription
List<? extends com.google.cloudbuild.v1.SecretOrBuilder>

getServiceAccount()

public String getServiceAccount()

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for serviceAccount.

getSource()

public Source getSource()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
Source

The source.

getSourceBuilder()

public Source.Builder getSourceBuilder()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
Source.Builder

getSourceOrBuilder()

public SourceOrBuilder getSourceOrBuilder()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
SourceOrBuilder

getSourceProvenance()

public SourceProvenance getSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SourceProvenance

The sourceProvenance.

getSourceProvenanceBuilder()

public SourceProvenance.Builder getSourceProvenanceBuilder()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SourceProvenance.Builder

getSourceProvenanceOrBuilder()

public SourceProvenanceOrBuilder getSourceProvenanceOrBuilder()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
SourceProvenanceOrBuilder

getStartTime()

public Timestamp getStartTime()

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The startTime.

getStartTimeBuilder()

public Timestamp.Builder getStartTimeBuilder()

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Builder

getStartTimeOrBuilder()

public TimestampOrBuilder getStartTimeOrBuilder()

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getStatus()

public Build.Status getStatus()

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Build.Status

The status.

getStatusDetail()

public String getStatusDetail()

Output only. Customer-readable message about the current status.

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The statusDetail.

getStatusDetailBytes()

public ByteString getStatusDetailBytes()

Output only. Customer-readable message about the current status.

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for statusDetail.

getStatusValue()

public int getStatusValue()

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for status.

getSteps(int index)

public BuildStep getSteps(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildStep

getStepsBuilder(int index)

public BuildStep.Builder getStepsBuilder(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildStep.Builder

getStepsBuilderList()

public List<BuildStep.Builder> getStepsBuilderList()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
List<Builder>

getStepsCount()

public int getStepsCount()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
int

getStepsList()

public List<BuildStep> getStepsList()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
List<BuildStep>

getStepsOrBuilder(int index)

public BuildStepOrBuilder getStepsOrBuilder(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildStepOrBuilder

getStepsOrBuilderList()

public List<? extends BuildStepOrBuilder> getStepsOrBuilderList()

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Returns
TypeDescription
List<? extends com.google.cloudbuild.v1.BuildStepOrBuilder>

getSubstitutions()

public Map<String,String> getSubstitutions()
Returns
TypeDescription
Map<String,String>

getSubstitutionsCount()

public int getSubstitutionsCount()

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Returns
TypeDescription
int

getSubstitutionsMap()

public Map<String,String> getSubstitutionsMap()

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Returns
TypeDescription
Map<String,String>

getSubstitutionsOrDefault(String key, String defaultValue)

public String getSubstitutionsOrDefault(String key, String defaultValue)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getSubstitutionsOrThrow(String key)

public String getSubstitutionsOrThrow(String key)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getTags(int index)

public String getTags(int index)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The tags at the given index.

getTagsBytes(int index)

public ByteString getTagsBytes(int index)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the tags at the given index.

getTagsCount()

public int getTagsCount()

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Returns
TypeDescription
int

The count of tags.

getTagsList()

public ProtocolStringList getTagsList()

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Returns
TypeDescription
ProtocolStringList

A list containing the tags.

getTimeout()

public Duration getTimeout()

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
Duration

The timeout.

getTimeoutBuilder()

public Duration.Builder getTimeoutBuilder()

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
Builder

getTimeoutOrBuilder()

public DurationOrBuilder getTimeoutOrBuilder()

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
DurationOrBuilder

getTiming()

public Map<String,TimeSpan> getTiming()

Use #getTimingMap() instead.

Returns
TypeDescription
Map<String,TimeSpan>

getTimingCount()

public int getTimingCount()

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getTimingMap()

public Map<String,TimeSpan> getTimingMap()

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Map<String,TimeSpan>

getTimingOrDefault(String key, TimeSpan defaultValue)

public TimeSpan getTimingOrDefault(String key, TimeSpan defaultValue)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
keyString
defaultValueTimeSpan
Returns
TypeDescription
TimeSpan

getTimingOrThrow(String key)

public TimeSpan getTimingOrThrow(String key)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
TimeSpan

getWarnings(int index)

public Build.Warning getWarnings(int index)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Warning

getWarningsBuilder(int index)

public Build.Warning.Builder getWarningsBuilder(int index)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Warning.Builder

getWarningsBuilderList()

public List<Build.Warning.Builder> getWarningsBuilderList()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<Builder>

getWarningsCount()

public int getWarningsCount()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getWarningsList()

public List<Build.Warning> getWarningsList()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<Warning>

getWarningsOrBuilder(int index)

public Build.WarningOrBuilder getWarningsOrBuilder(int index)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.WarningOrBuilder

getWarningsOrBuilderList()

public List<? extends Build.WarningOrBuilder> getWarningsOrBuilderList()

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloudbuild.v1.Build.WarningOrBuilder>

hasApproval()

public boolean hasApproval()

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the approval field is set.

hasArtifacts()

public boolean hasArtifacts()

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Returns
TypeDescription
boolean

Whether the artifacts field is set.

hasAvailableSecrets()

public boolean hasAvailableSecrets()

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Returns
TypeDescription
boolean

Whether the availableSecrets field is set.

hasCreateTime()

public boolean hasCreateTime()

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasFailureInfo()

public boolean hasFailureInfo()

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the failureInfo field is set.

hasFinishTime()

public boolean hasFinishTime()

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the finishTime field is set.

hasOptions()

public boolean hasOptions()

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Returns
TypeDescription
boolean

Whether the options field is set.

hasQueueTtl()

public boolean hasQueueTtl()

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Returns
TypeDescription
boolean

Whether the queueTtl field is set.

hasResults()

public boolean hasResults()

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the results field is set.

hasSource()

public boolean hasSource()

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Returns
TypeDescription
boolean

Whether the source field is set.

hasSourceProvenance()

public boolean hasSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the sourceProvenance field is set.

hasStartTime()

public boolean hasStartTime()

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the startTime field is set.

hasTimeout()

public boolean hasTimeout()

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Returns
TypeDescription
boolean

Whether the timeout field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeApproval(BuildApproval value)

public Build.Builder mergeApproval(BuildApproval value)

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuildApproval
Returns
TypeDescription
Build.Builder

mergeArtifacts(Artifacts value)

public Build.Builder mergeArtifacts(Artifacts value)

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Parameter
NameDescription
valueArtifacts
Returns
TypeDescription
Build.Builder

mergeAvailableSecrets(Secrets value)

public Build.Builder mergeAvailableSecrets(Secrets value)

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Parameter
NameDescription
valueSecrets
Returns
TypeDescription
Build.Builder

mergeCreateTime(Timestamp value)

public Build.Builder mergeCreateTime(Timestamp value)

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

mergeFailureInfo(Build.FailureInfo value)

public Build.Builder mergeFailureInfo(Build.FailureInfo value)

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuild.FailureInfo
Returns
TypeDescription
Build.Builder

mergeFinishTime(Timestamp value)

public Build.Builder mergeFinishTime(Timestamp value)

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

mergeFrom(Build other)

public Build.Builder mergeFrom(Build other)
Parameter
NameDescription
otherBuild
Returns
TypeDescription
Build.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Build.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Build.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Build.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Build.Builder
Overrides

mergeOptions(BuildOptions value)

public Build.Builder mergeOptions(BuildOptions value)

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Parameter
NameDescription
valueBuildOptions
Returns
TypeDescription
Build.Builder

mergeQueueTtl(Duration value)

public Build.Builder mergeQueueTtl(Duration value)

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Build.Builder

mergeResults(Results value)

public Build.Builder mergeResults(Results value)

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResults
Returns
TypeDescription
Build.Builder

mergeSource(Source value)

public Build.Builder mergeSource(Source value)

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Parameter
NameDescription
valueSource
Returns
TypeDescription
Build.Builder

mergeSourceProvenance(SourceProvenance value)

public Build.Builder mergeSourceProvenance(SourceProvenance value)

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueSourceProvenance
Returns
TypeDescription
Build.Builder

mergeStartTime(Timestamp value)

public Build.Builder mergeStartTime(Timestamp value)

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

mergeTimeout(Duration value)

public Build.Builder mergeTimeout(Duration value)

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Build.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Build.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Build.Builder
Overrides

putAllSubstitutions(Map<String,String> values)

public Build.Builder putAllSubstitutions(Map<String,String> values)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
Build.Builder

putAllTiming(Map<String,TimeSpan> values)

public Build.Builder putAllTiming(Map<String,TimeSpan> values)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valuesMap<String,TimeSpan>
Returns
TypeDescription
Build.Builder

putSubstitutions(String key, String value)

public Build.Builder putSubstitutions(String key, String value)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Build.Builder

putTiming(String key, TimeSpan value)

public Build.Builder putTiming(String key, TimeSpan value)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
keyString
valueTimeSpan
Returns
TypeDescription
Build.Builder

removeSecrets(int index)

public Build.Builder removeSecrets(int index)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Builder

removeSteps(int index)

public Build.Builder removeSteps(int index)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Builder

removeSubstitutions(String key)

public Build.Builder removeSubstitutions(String key)

Substitutions data for Build resource.

map<string, string> substitutions = 29;

Parameter
NameDescription
keyString
Returns
TypeDescription
Build.Builder

removeTiming(String key)

public Build.Builder removeTiming(String key)

Output only. Stores timing information for phases of the build. Valid keys are:

  • BUILD: time to execute all build steps.
  • PUSH: time to push all artifacts including docker images and non docker artifacts.
  • FETCHSOURCE: time to fetch source.
  • SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.

map<string, .google.devtools.cloudbuild.v1.TimeSpan> timing = 33 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
keyString
Returns
TypeDescription
Build.Builder

removeWarnings(int index)

public Build.Builder removeWarnings(int index)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
Build.Builder

setApproval(BuildApproval value)

public Build.Builder setApproval(BuildApproval value)

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuildApproval
Returns
TypeDescription
Build.Builder

setApproval(BuildApproval.Builder builderForValue)

public Build.Builder setApproval(BuildApproval.Builder builderForValue)

Output only. Describes this build's approval configuration, status, and result.

.google.devtools.cloudbuild.v1.BuildApproval approval = 44 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuildApproval.Builder
Returns
TypeDescription
Build.Builder

setArtifacts(Artifacts value)

public Build.Builder setArtifacts(Artifacts value)

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Parameter
NameDescription
valueArtifacts
Returns
TypeDescription
Build.Builder

setArtifacts(Artifacts.Builder builderForValue)

public Build.Builder setArtifacts(Artifacts.Builder builderForValue)

Artifacts produced by the build that should be uploaded upon successful completion of all build steps.

.google.devtools.cloudbuild.v1.Artifacts artifacts = 37;

Parameter
NameDescription
builderForValueArtifacts.Builder
Returns
TypeDescription
Build.Builder

setAvailableSecrets(Secrets value)

public Build.Builder setAvailableSecrets(Secrets value)

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Parameter
NameDescription
valueSecrets
Returns
TypeDescription
Build.Builder

setAvailableSecrets(Secrets.Builder builderForValue)

public Build.Builder setAvailableSecrets(Secrets.Builder builderForValue)

Secrets and secret environment variables.

.google.devtools.cloudbuild.v1.Secrets available_secrets = 47;

Parameter
NameDescription
builderForValueSecrets.Builder
Returns
TypeDescription
Build.Builder

setBuildTriggerId(String value)

public Build.Builder setBuildTriggerId(String value)

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The buildTriggerId to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setBuildTriggerIdBytes(ByteString value)

public Build.Builder setBuildTriggerIdBytes(ByteString value)

Output only. The ID of the BuildTrigger that triggered this build, if it was triggered automatically.

string build_trigger_id = 22 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for buildTriggerId to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Build.Builder setCreateTime(Timestamp value)

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Build.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. Time at which the request to create the build was received.

.google.protobuf.Timestamp create_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Build.Builder

setFailureInfo(Build.FailureInfo value)

public Build.Builder setFailureInfo(Build.FailureInfo value)

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuild.FailureInfo
Returns
TypeDescription
Build.Builder

setFailureInfo(Build.FailureInfo.Builder builderForValue)

public Build.Builder setFailureInfo(Build.FailureInfo.Builder builderForValue)

Output only. Contains information about the build when status=FAILURE.

.google.devtools.cloudbuild.v1.Build.FailureInfo failure_info = 51 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuild.FailureInfo.Builder
Returns
TypeDescription
Build.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Build.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Build.Builder
Overrides

setFinishTime(Timestamp value)

public Build.Builder setFinishTime(Timestamp value)

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

setFinishTime(Timestamp.Builder builderForValue)

public Build.Builder setFinishTime(Timestamp.Builder builderForValue)

Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.

.google.protobuf.Timestamp finish_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Build.Builder

setId(String value)

public Build.Builder setId(String value)

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Build.Builder setIdBytes(ByteString value)

Output only. Unique identifier of the build.

string id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setImages(int index, String value)

public Build.Builder setImages(int index, String value)

A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build status is marked FAILURE.

repeated string images = 13;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The images to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setLogUrl(String value)

public Build.Builder setLogUrl(String value)

Output only. URL to logs for this build in Google Cloud Console.

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The logUrl to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setLogUrlBytes(ByteString value)

public Build.Builder setLogUrlBytes(ByteString value)

Output only. URL to logs for this build in Google Cloud Console.

string log_url = 25 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for logUrl to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setLogsBucket(String value)

public Build.Builder setLogsBucket(String value)

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

string logs_bucket = 19;

Parameter
NameDescription
valueString

The logsBucket to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setLogsBucketBytes(ByteString value)

public Build.Builder setLogsBucketBytes(ByteString value)

Google Cloud Storage bucket where logs should be written (see Bucket Name Requirements). Logs file names will be of the format ${logs_bucket}/log-${build_id}.txt.

string logs_bucket = 19;

Parameter
NameDescription
valueByteString

The bytes for logsBucket to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setName(String value)

public Build.Builder setName(String value)

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Build.Builder setNameBytes(ByteString value)

Output only. The 'Build' name with format: projects/{project}/locations/{location}/builds/{build}, where {build} is a unique identifier generated by the service.

string name = 45 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setOptions(BuildOptions value)

public Build.Builder setOptions(BuildOptions value)

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Parameter
NameDescription
valueBuildOptions
Returns
TypeDescription
Build.Builder

setOptions(BuildOptions.Builder builderForValue)

public Build.Builder setOptions(BuildOptions.Builder builderForValue)

Special options for this build.

.google.devtools.cloudbuild.v1.BuildOptions options = 23;

Parameter
NameDescription
builderForValueBuildOptions.Builder
Returns
TypeDescription
Build.Builder

setProjectId(String value)

public Build.Builder setProjectId(String value)

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The projectId to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setProjectIdBytes(ByteString value)

public Build.Builder setProjectIdBytes(ByteString value)

Output only. ID of the project.

string project_id = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for projectId to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setQueueTtl(Duration value)

public Build.Builder setQueueTtl(Duration value)

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Build.Builder

setQueueTtl(Duration.Builder builderForValue)

public Build.Builder setQueueTtl(Duration.Builder builderForValue)

TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be EXPIRED. The TTL starts ticking from create_time.

.google.protobuf.Duration queue_ttl = 40;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Build.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Build.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Build.Builder
Overrides

setResults(Results value)

public Build.Builder setResults(Results value)

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueResults
Returns
TypeDescription
Build.Builder

setResults(Results.Builder builderForValue)

public Build.Builder setResults(Results.Builder builderForValue)

Output only. Results of the build.

.google.devtools.cloudbuild.v1.Results results = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueResults.Builder
Returns
TypeDescription
Build.Builder

setSecrets(int index, Secret value)

public Build.Builder setSecrets(int index, Secret value)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
valueSecret
Returns
TypeDescription
Build.Builder

setSecrets(int index, Secret.Builder builderForValue)

public Build.Builder setSecrets(int index, Secret.Builder builderForValue)

Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use available_secrets to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets

repeated .google.devtools.cloudbuild.v1.Secret secrets = 32;

Parameters
NameDescription
indexint
builderForValueSecret.Builder
Returns
TypeDescription
Build.Builder

setServiceAccount(String value)

public Build.Builder setServiceAccount(String value)

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The serviceAccount to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

public Build.Builder setServiceAccountBytes(ByteString value)

IAM service account whose credentials will be used at build runtime. Must be of the format projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}. ACCOUNT can be email address or uniqueId of the service account.

string service_account = 42 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for serviceAccount to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setSource(Source value)

public Build.Builder setSource(Source value)

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Parameter
NameDescription
valueSource
Returns
TypeDescription
Build.Builder

setSource(Source.Builder builderForValue)

public Build.Builder setSource(Source.Builder builderForValue)

The location of the source files to build.

.google.devtools.cloudbuild.v1.Source source = 3;

Parameter
NameDescription
builderForValueSource.Builder
Returns
TypeDescription
Build.Builder

setSourceProvenance(SourceProvenance value)

public Build.Builder setSourceProvenance(SourceProvenance value)

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueSourceProvenance
Returns
TypeDescription
Build.Builder

setSourceProvenance(SourceProvenance.Builder builderForValue)

public Build.Builder setSourceProvenance(SourceProvenance.Builder builderForValue)

Output only. A permanent fixed identifier for source.

.google.devtools.cloudbuild.v1.SourceProvenance source_provenance = 21 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueSourceProvenance.Builder
Returns
TypeDescription
Build.Builder

setStartTime(Timestamp value)

public Build.Builder setStartTime(Timestamp value)

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Build.Builder

setStartTime(Timestamp.Builder builderForValue)

public Build.Builder setStartTime(Timestamp.Builder builderForValue)

Output only. Time at which execution of the build was started.

.google.protobuf.Timestamp start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Build.Builder

setStatus(Build.Status value)

public Build.Builder setStatus(Build.Status value)

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueBuild.Status

The status to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setStatusDetail(String value)

public Build.Builder setStatusDetail(String value)

Output only. Customer-readable message about the current status.

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The statusDetail to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setStatusDetailBytes(ByteString value)

public Build.Builder setStatusDetailBytes(ByteString value)

Output only. Customer-readable message about the current status.

string status_detail = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for statusDetail to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setStatusValue(int value)

public Build.Builder setStatusValue(int value)

Output only. Status of the build.

.google.devtools.cloudbuild.v1.Build.Status status = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueint

The enum numeric value on the wire for status to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setSteps(int index, BuildStep value)

public Build.Builder setSteps(int index, BuildStep value)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
valueBuildStep
Returns
TypeDescription
Build.Builder

setSteps(int index, BuildStep.Builder builderForValue)

public Build.Builder setSteps(int index, BuildStep.Builder builderForValue)

Required. The operations to be performed on the workspace.

repeated .google.devtools.cloudbuild.v1.BuildStep steps = 11;

Parameters
NameDescription
indexint
builderForValueBuildStep.Builder
Returns
TypeDescription
Build.Builder

setTags(int index, String value)

public Build.Builder setTags(int index, String value)

Tags for annotation of a Build. These are not docker tags.

repeated string tags = 31;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The tags to set.

Returns
TypeDescription
Build.Builder

This builder for chaining.

setTimeout(Duration value)

public Build.Builder setTimeout(Duration value)

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
Build.Builder

setTimeout(Duration.Builder builderForValue)

public Build.Builder setTimeout(Duration.Builder builderForValue)

Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be TIMEOUT. timeout starts ticking from startTime. Default time is 60 minutes.

.google.protobuf.Duration timeout = 12;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Build.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Build.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Build.Builder
Overrides

setWarnings(int index, Build.Warning value)

public Build.Builder setWarnings(int index, Build.Warning value)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
valueBuild.Warning
Returns
TypeDescription
Build.Builder

setWarnings(int index, Build.Warning.Builder builderForValue)

public Build.Builder setWarnings(int index, Build.Warning.Builder builderForValue)

Output only. Non-fatal problems encountered during the execution of the build.

repeated .google.devtools.cloudbuild.v1.Build.Warning warnings = 49 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameters
NameDescription
indexint
builderForValueBuild.Warning.Builder
Returns
TypeDescription
Build.Builder