Class BuildOptions.Builder (3.31.0)

public static final class BuildOptions.Builder extends GeneratedMessageV3.Builder<BuildOptions.Builder> implements BuildOptionsOrBuilder

Optional arguments to enable specific features of builds.

Protobuf type google.devtools.cloudbuild.v1.BuildOptions

Static Methods

getDescriptor()

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

Methods

addAllEnv(Iterable<String> values)

public BuildOptions.Builder addAllEnv(Iterable<String> values)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameter
NameDescription
valuesIterable<String>

The env to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addAllSecretEnv(Iterable<String> values)

public BuildOptions.Builder addAllSecretEnv(Iterable<String> values)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameter
NameDescription
valuesIterable<String>

The secretEnv to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addAllSourceProvenanceHash(Iterable<? extends Hash.HashType> values)

public BuildOptions.Builder addAllSourceProvenanceHash(Iterable<? extends Hash.HashType> values)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Hash.HashType>

The sourceProvenanceHash to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addAllSourceProvenanceHashValue(Iterable<Integer> values)

public BuildOptions.Builder addAllSourceProvenanceHashValue(Iterable<Integer> values)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
valuesIterable<Integer>

The enum numeric values on the wire for sourceProvenanceHash to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addAllVolumes(Iterable<? extends Volume> values)

public BuildOptions.Builder addAllVolumes(Iterable<? extends Volume> values)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
valuesIterable<? extends com.google.cloudbuild.v1.Volume>
Returns
TypeDescription
BuildOptions.Builder

addEnv(String value)

public BuildOptions.Builder addEnv(String value)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameter
NameDescription
valueString

The env to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addEnvBytes(ByteString value)

public BuildOptions.Builder addEnvBytes(ByteString value)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameter
NameDescription
valueByteString

The bytes of the env to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addSecretEnv(String value)

public BuildOptions.Builder addSecretEnv(String value)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameter
NameDescription
valueString

The secretEnv to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addSecretEnvBytes(ByteString value)

public BuildOptions.Builder addSecretEnvBytes(ByteString value)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameter
NameDescription
valueByteString

The bytes of the secretEnv to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addSourceProvenanceHash(Hash.HashType value)

public BuildOptions.Builder addSourceProvenanceHash(Hash.HashType value)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
valueHash.HashType

The sourceProvenanceHash to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addSourceProvenanceHashValue(int value)

public BuildOptions.Builder addSourceProvenanceHashValue(int value)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
valueint

The enum numeric value on the wire for sourceProvenanceHash to add.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

addVolumes(Volume value)

public BuildOptions.Builder addVolumes(Volume value)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
valueVolume
Returns
TypeDescription
BuildOptions.Builder

addVolumes(Volume.Builder builderForValue)

public BuildOptions.Builder addVolumes(Volume.Builder builderForValue)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
builderForValueVolume.Builder
Returns
TypeDescription
BuildOptions.Builder

addVolumes(int index, Volume value)

public BuildOptions.Builder addVolumes(int index, Volume value)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameters
NameDescription
indexint
valueVolume
Returns
TypeDescription
BuildOptions.Builder

addVolumes(int index, Volume.Builder builderForValue)

public BuildOptions.Builder addVolumes(int index, Volume.Builder builderForValue)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameters
NameDescription
indexint
builderForValueVolume.Builder
Returns
TypeDescription
BuildOptions.Builder

addVolumesBuilder()

public Volume.Builder addVolumesBuilder()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Returns
TypeDescription
Volume.Builder

addVolumesBuilder(int index)

public Volume.Builder addVolumesBuilder(int index)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume.Builder

build()

public BuildOptions build()
Returns
TypeDescription
BuildOptions

buildPartial()

public BuildOptions buildPartial()
Returns
TypeDescription
BuildOptions

clear()

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

clearAutomapSubstitutions()

public BuildOptions.Builder clearAutomapSubstitutions()

Option to include built-in and custom substitutions as env variables for all build steps.

bool automap_substitutions = 22;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearDefaultLogsBucketBehavior()

public BuildOptions.Builder clearDefaultLogsBucketBehavior()

Optional. Option to specify how default logs buckets are setup.

.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearDiskSizeGb()

public BuildOptions.Builder clearDiskSizeGb()

Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.

int64 disk_size_gb = 6;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearDynamicSubstitutions()

public BuildOptions.Builder clearDynamicSubstitutions()

Option to specify whether or not to apply bash style string operations to the substitutions.

NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.

bool dynamic_substitutions = 17;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearEnv()

public BuildOptions.Builder clearEnv()

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearLogStreamingOption()

public BuildOptions.Builder clearLogStreamingOption()

Option to define build log streaming behavior to Cloud Storage.

.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearLogging()

public BuildOptions.Builder clearLogging()

Option to specify the logging mode, which determines if and where build logs are stored.

.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearMachineType()

public BuildOptions.Builder clearMachineType()

Compute Engine machine type on which to run the build.

.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearPool()

public BuildOptions.Builder clearPool()

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.Builder

clearRequestedVerifyOption()

public BuildOptions.Builder clearRequestedVerifyOption()

Requested verifiability options.

.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearSecretEnv()

public BuildOptions.Builder clearSecretEnv()

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearSourceProvenanceHash()

public BuildOptions.Builder clearSourceProvenanceHash()

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearSubstitutionOption()

public BuildOptions.Builder clearSubstitutionOption()

Option to specify behavior when there is an error in the substitution checks.

NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clearVolumes()

public BuildOptions.Builder clearVolumes()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Returns
TypeDescription
BuildOptions.Builder

clearWorkerPool() (deprecated)

public BuildOptions.Builder clearWorkerPool()

Deprecated. google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See google/devtools/cloudbuild/v1/cloudbuild.proto;l=2266

This field deprecated; please use pool.name instead.

string worker_pool = 7 [deprecated = true];

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

clone()

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

getAutomapSubstitutions()

public boolean getAutomapSubstitutions()

Option to include built-in and custom substitutions as env variables for all build steps.

bool automap_substitutions = 22;

Returns
TypeDescription
boolean

The automapSubstitutions.

getDefaultInstanceForType()

public BuildOptions getDefaultInstanceForType()
Returns
TypeDescription
BuildOptions

getDefaultLogsBucketBehavior()

public BuildOptions.DefaultLogsBucketBehavior getDefaultLogsBucketBehavior()

Optional. Option to specify how default logs buckets are setup.

.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.DefaultLogsBucketBehavior

The defaultLogsBucketBehavior.

getDefaultLogsBucketBehaviorValue()

public int getDefaultLogsBucketBehaviorValue()

Optional. Option to specify how default logs buckets are setup.

.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for defaultLogsBucketBehavior.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDiskSizeGb()

public long getDiskSizeGb()

Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.

int64 disk_size_gb = 6;

Returns
TypeDescription
long

The diskSizeGb.

getDynamicSubstitutions()

public boolean getDynamicSubstitutions()

Option to specify whether or not to apply bash style string operations to the substitutions.

NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.

bool dynamic_substitutions = 17;

Returns
TypeDescription
boolean

The dynamicSubstitutions.

getEnv(int index)

public String getEnv(int index)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The env at the given index.

getEnvBytes(int index)

public ByteString getEnvBytes(int index)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the env at the given index.

getEnvCount()

public int getEnvCount()

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Returns
TypeDescription
int

The count of env.

getEnvList()

public ProtocolStringList getEnvList()

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Returns
TypeDescription
ProtocolStringList

A list containing the env.

getLogStreamingOption()

public BuildOptions.LogStreamingOption getLogStreamingOption()

Option to define build log streaming behavior to Cloud Storage.

.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Returns
TypeDescription
BuildOptions.LogStreamingOption

The logStreamingOption.

getLogStreamingOptionValue()

public int getLogStreamingOptionValue()

Option to define build log streaming behavior to Cloud Storage.

.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Returns
TypeDescription
int

The enum numeric value on the wire for logStreamingOption.

getLogging()

public BuildOptions.LoggingMode getLogging()

Option to specify the logging mode, which determines if and where build logs are stored.

.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Returns
TypeDescription
BuildOptions.LoggingMode

The logging.

getLoggingValue()

public int getLoggingValue()

Option to specify the logging mode, which determines if and where build logs are stored.

.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Returns
TypeDescription
int

The enum numeric value on the wire for logging.

getMachineType()

public BuildOptions.MachineType getMachineType()

Compute Engine machine type on which to run the build.

.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Returns
TypeDescription
BuildOptions.MachineType

The machineType.

getMachineTypeValue()

public int getMachineTypeValue()

Compute Engine machine type on which to run the build.

.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Returns
TypeDescription
int

The enum numeric value on the wire for machineType.

getPool()

public BuildOptions.PoolOption getPool()

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.PoolOption

The pool.

getPoolBuilder()

public BuildOptions.PoolOption.Builder getPoolBuilder()

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.PoolOption.Builder

getPoolOrBuilder()

public BuildOptions.PoolOptionOrBuilder getPoolOrBuilder()

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
BuildOptions.PoolOptionOrBuilder

getRequestedVerifyOption()

public BuildOptions.VerifyOption getRequestedVerifyOption()

Requested verifiability options.

.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Returns
TypeDescription
BuildOptions.VerifyOption

The requestedVerifyOption.

getRequestedVerifyOptionValue()

public int getRequestedVerifyOptionValue()

Requested verifiability options.

.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Returns
TypeDescription
int

The enum numeric value on the wire for requestedVerifyOption.

getSecretEnv(int index)

public String getSecretEnv(int index)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The secretEnv at the given index.

getSecretEnvBytes(int index)

public ByteString getSecretEnvBytes(int index)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the secretEnv at the given index.

getSecretEnvCount()

public int getSecretEnvCount()

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Returns
TypeDescription
int

The count of secretEnv.

getSecretEnvList()

public ProtocolStringList getSecretEnvList()

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Returns
TypeDescription
ProtocolStringList

A list containing the secretEnv.

getSourceProvenanceHash(int index)

public Hash.HashType getSourceProvenanceHash(int index)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
Hash.HashType

The sourceProvenanceHash at the given index.

getSourceProvenanceHashCount()

public int getSourceProvenanceHashCount()

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
TypeDescription
int

The count of sourceProvenanceHash.

getSourceProvenanceHashList()

public List<Hash.HashType> getSourceProvenanceHashList()

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
TypeDescription
List<HashType>

A list containing the sourceProvenanceHash.

getSourceProvenanceHashValue(int index)

public int getSourceProvenanceHashValue(int index)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
int

The enum numeric value on the wire of sourceProvenanceHash at the given index.

getSourceProvenanceHashValueList()

public List<Integer> getSourceProvenanceHashValueList()

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
TypeDescription
List<Integer>

A list containing the enum numeric values on the wire for sourceProvenanceHash.

getSubstitutionOption()

public BuildOptions.SubstitutionOption getSubstitutionOption()

Option to specify behavior when there is an error in the substitution checks.

NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Returns
TypeDescription
BuildOptions.SubstitutionOption

The substitutionOption.

getSubstitutionOptionValue()

public int getSubstitutionOptionValue()

Option to specify behavior when there is an error in the substitution checks.

NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Returns
TypeDescription
int

The enum numeric value on the wire for substitutionOption.

getVolumes(int index)

public Volume getVolumes(int index)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume

getVolumesBuilder(int index)

public Volume.Builder getVolumesBuilder(int index)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
Volume.Builder

getVolumesBuilderList()

public List<Volume.Builder> getVolumesBuilderList()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Returns
TypeDescription
List<Builder>

getVolumesCount()

public int getVolumesCount()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Returns
TypeDescription
int

getVolumesList()

public List<Volume> getVolumesList()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Returns
TypeDescription
List<Volume>

getVolumesOrBuilder(int index)

public VolumeOrBuilder getVolumesOrBuilder(int index)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
VolumeOrBuilder

getVolumesOrBuilderList()

public List<? extends VolumeOrBuilder> getVolumesOrBuilderList()

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

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

getWorkerPool() (deprecated)

public String getWorkerPool()

Deprecated. google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See google/devtools/cloudbuild/v1/cloudbuild.proto;l=2266

This field deprecated; please use pool.name instead.

string worker_pool = 7 [deprecated = true];

Returns
TypeDescription
String

The workerPool.

getWorkerPoolBytes() (deprecated)

public ByteString getWorkerPoolBytes()

Deprecated. google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See google/devtools/cloudbuild/v1/cloudbuild.proto;l=2266

This field deprecated; please use pool.name instead.

string worker_pool = 7 [deprecated = true];

Returns
TypeDescription
ByteString

The bytes for workerPool.

hasPool()

public boolean hasPool()

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

Whether the pool field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(BuildOptions other)

public BuildOptions.Builder mergeFrom(BuildOptions other)
Parameter
NameDescription
otherBuildOptions
Returns
TypeDescription
BuildOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergePool(BuildOptions.PoolOption value)

public BuildOptions.Builder mergePool(BuildOptions.PoolOption value)

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueBuildOptions.PoolOption
Returns
TypeDescription
BuildOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeVolumes(int index)

public BuildOptions.Builder removeVolumes(int index)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameter
NameDescription
indexint
Returns
TypeDescription
BuildOptions.Builder

setAutomapSubstitutions(boolean value)

public BuildOptions.Builder setAutomapSubstitutions(boolean value)

Option to include built-in and custom substitutions as env variables for all build steps.

bool automap_substitutions = 22;

Parameter
NameDescription
valueboolean

The automapSubstitutions to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setDefaultLogsBucketBehavior(BuildOptions.DefaultLogsBucketBehavior value)

public BuildOptions.Builder setDefaultLogsBucketBehavior(BuildOptions.DefaultLogsBucketBehavior value)

Optional. Option to specify how default logs buckets are setup.

.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueBuildOptions.DefaultLogsBucketBehavior

The defaultLogsBucketBehavior to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setDefaultLogsBucketBehaviorValue(int value)

public BuildOptions.Builder setDefaultLogsBucketBehaviorValue(int value)

Optional. Option to specify how default logs buckets are setup.

.google.devtools.cloudbuild.v1.BuildOptions.DefaultLogsBucketBehavior default_logs_bucket_behavior = 21 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setDiskSizeGb(long value)

public BuildOptions.Builder setDiskSizeGb(long value)

Requested disk size for the VM that runs the build. Note that this is NOT "disk free"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.

int64 disk_size_gb = 6;

Parameter
NameDescription
valuelong

The diskSizeGb to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setDynamicSubstitutions(boolean value)

public BuildOptions.Builder setDynamicSubstitutions(boolean value)

Option to specify whether or not to apply bash style string operations to the substitutions.

NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.

bool dynamic_substitutions = 17;

Parameter
NameDescription
valueboolean

The dynamicSubstitutions to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setEnv(int index, String value)

public BuildOptions.Builder setEnv(int index, String value)

A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value.

The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE".

repeated string env = 12;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The env to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setLogStreamingOption(BuildOptions.LogStreamingOption value)

public BuildOptions.Builder setLogStreamingOption(BuildOptions.LogStreamingOption value)

Option to define build log streaming behavior to Cloud Storage.

.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Parameter
NameDescription
valueBuildOptions.LogStreamingOption

The logStreamingOption to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setLogStreamingOptionValue(int value)

public BuildOptions.Builder setLogStreamingOptionValue(int value)

Option to define build log streaming behavior to Cloud Storage.

.google.devtools.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setLogging(BuildOptions.LoggingMode value)

public BuildOptions.Builder setLogging(BuildOptions.LoggingMode value)

Option to specify the logging mode, which determines if and where build logs are stored.

.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Parameter
NameDescription
valueBuildOptions.LoggingMode

The logging to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setLoggingValue(int value)

public BuildOptions.Builder setLoggingValue(int value)

Option to specify the logging mode, which determines if and where build logs are stored.

.google.devtools.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setMachineType(BuildOptions.MachineType value)

public BuildOptions.Builder setMachineType(BuildOptions.MachineType value)

Compute Engine machine type on which to run the build.

.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Parameter
NameDescription
valueBuildOptions.MachineType

The machineType to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setMachineTypeValue(int value)

public BuildOptions.Builder setMachineTypeValue(int value)

Compute Engine machine type on which to run the build.

.google.devtools.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setPool(BuildOptions.PoolOption value)

public BuildOptions.Builder setPool(BuildOptions.PoolOption value)

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueBuildOptions.PoolOption
Returns
TypeDescription
BuildOptions.Builder

setPool(BuildOptions.PoolOption.Builder builderForValue)

public BuildOptions.Builder setPool(BuildOptions.PoolOption.Builder builderForValue)

Optional. Specification for execution on a WorkerPool.

See running builds in a private pool for more information.

.google.devtools.cloudbuild.v1.BuildOptions.PoolOption pool = 19 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
builderForValueBuildOptions.PoolOption.Builder
Returns
TypeDescription
BuildOptions.Builder

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

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

setRequestedVerifyOption(BuildOptions.VerifyOption value)

public BuildOptions.Builder setRequestedVerifyOption(BuildOptions.VerifyOption value)

Requested verifiability options.

.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Parameter
NameDescription
valueBuildOptions.VerifyOption

The requestedVerifyOption to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setRequestedVerifyOptionValue(int value)

public BuildOptions.Builder setRequestedVerifyOptionValue(int value)

Requested verifiability options.

.google.devtools.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setSecretEnv(int index, String value)

public BuildOptions.Builder setSecretEnv(int index, String value)

A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's Secret. These variables will be available to all build steps in this build.

repeated string secret_env = 13;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The secretEnv to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setSourceProvenanceHash(int index, Hash.HashType value)

public BuildOptions.Builder setSourceProvenanceHash(int index, Hash.HashType value)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueHash.HashType

The sourceProvenanceHash to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setSourceProvenanceHashValue(int index, int value)

public BuildOptions.Builder setSourceProvenanceHashValue(int index, int value)

Requested hash for SourceProvenance.

repeated .google.devtools.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setSubstitutionOption(BuildOptions.SubstitutionOption value)

public BuildOptions.Builder setSubstitutionOption(BuildOptions.SubstitutionOption value)

Option to specify behavior when there is an error in the substitution checks.

NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Parameter
NameDescription
valueBuildOptions.SubstitutionOption

The substitutionOption to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setSubstitutionOptionValue(int value)

public BuildOptions.Builder setSubstitutionOptionValue(int value)

Option to specify behavior when there is an error in the substitution checks.

NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.

.google.devtools.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setVolumes(int index, Volume value)

public BuildOptions.Builder setVolumes(int index, Volume value)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameters
NameDescription
indexint
valueVolume
Returns
TypeDescription
BuildOptions.Builder

setVolumes(int index, Volume.Builder builderForValue)

public BuildOptions.Builder setVolumes(int index, Volume.Builder builderForValue)

Global list of volumes to mount for ALL build steps

Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step.

Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.

repeated .google.devtools.cloudbuild.v1.Volume volumes = 14;

Parameters
NameDescription
indexint
builderForValueVolume.Builder
Returns
TypeDescription
BuildOptions.Builder

setWorkerPool(String value) (deprecated)

public BuildOptions.Builder setWorkerPool(String value)

Deprecated. google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See google/devtools/cloudbuild/v1/cloudbuild.proto;l=2266

This field deprecated; please use pool.name instead.

string worker_pool = 7 [deprecated = true];

Parameter
NameDescription
valueString

The workerPool to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.

setWorkerPoolBytes(ByteString value) (deprecated)

public BuildOptions.Builder setWorkerPoolBytes(ByteString value)

Deprecated. google.devtools.cloudbuild.v1.BuildOptions.worker_pool is deprecated. See google/devtools/cloudbuild/v1/cloudbuild.proto;l=2266

This field deprecated; please use pool.name instead.

string worker_pool = 7 [deprecated = true];

Parameter
NameDescription
valueByteString

The bytes for workerPool to set.

Returns
TypeDescription
BuildOptions.Builder

This builder for chaining.