Class BuildOptions (0.15.0)

public final class BuildOptions extends GeneratedMessageV3 implements BuildOptionsOrBuilder

Optional arguments to enable specific features of builds.

Protobuf type google.events.cloud.cloudbuild.v1.BuildOptions

Static Fields

DISK_SIZE_GB_FIELD_NUMBER

public static final int DISK_SIZE_GB_FIELD_NUMBER
Field Value
Type Description
int

ENV_FIELD_NUMBER

public static final int ENV_FIELD_NUMBER
Field Value
Type Description
int

LOGGING_FIELD_NUMBER

public static final int LOGGING_FIELD_NUMBER
Field Value
Type Description
int

LOG_STREAMING_OPTION_FIELD_NUMBER

public static final int LOG_STREAMING_OPTION_FIELD_NUMBER
Field Value
Type Description
int

MACHINE_TYPE_FIELD_NUMBER

public static final int MACHINE_TYPE_FIELD_NUMBER
Field Value
Type Description
int

REQUESTED_VERIFY_OPTION_FIELD_NUMBER

public static final int REQUESTED_VERIFY_OPTION_FIELD_NUMBER
Field Value
Type Description
int

SECRET_ENV_FIELD_NUMBER

public static final int SECRET_ENV_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_PROVENANCE_HASH_FIELD_NUMBER

public static final int SOURCE_PROVENANCE_HASH_FIELD_NUMBER
Field Value
Type Description
int

SUBSTITUTION_OPTION_FIELD_NUMBER

public static final int SUBSTITUTION_OPTION_FIELD_NUMBER
Field Value
Type Description
int

VOLUMES_FIELD_NUMBER

public static final int VOLUMES_FIELD_NUMBER
Field Value
Type Description
int

WORKER_POOL_FIELD_NUMBER

public static final int WORKER_POOL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static BuildOptions getDefaultInstance()
Returns
Type Description
BuildOptions

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static BuildOptions.Builder newBuilder()
Returns
Type Description
BuildOptions.Builder

newBuilder(BuildOptions prototype)

public static BuildOptions.Builder newBuilder(BuildOptions prototype)
Parameter
Name Description
prototype BuildOptions
Returns
Type Description
BuildOptions.Builder

parseDelimitedFrom(InputStream input)

public static BuildOptions parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static BuildOptions parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BuildOptions parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BuildOptions parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static BuildOptions parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static BuildOptions parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BuildOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<BuildOptions> parser()
Returns
Type Description
Parser<BuildOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public BuildOptions getDefaultInstanceForType()
Returns
Type Description
BuildOptions

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 1000GB; builds that request more than the maximum are rejected with an error.

int64 disk_size_gb = 6;

Returns
Type Description
long

The diskSizeGb.

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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
ProtocolStringList

A list containing the env.

getLogStreamingOption()

public BuildOptions.LogStreamingOption getLogStreamingOption()

Option to define build log streaming behavior to Google Cloud Storage.

.google.events.cloud.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Returns
Type Description
BuildOptions.LogStreamingOption

The logStreamingOption.

getLogStreamingOptionValue()

public int getLogStreamingOptionValue()

Option to define build log streaming behavior to Google Cloud Storage.

.google.events.cloud.cloudbuild.v1.BuildOptions.LogStreamingOption log_streaming_option = 5;

Returns
Type Description
int

The enum numeric value on the wire for logStreamingOption.

getLogging()

public BuildOptions.LoggingMode getLogging()

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

.google.events.cloud.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Returns
Type Description
BuildOptions.LoggingMode

The logging.

getLoggingValue()

public int getLoggingValue()

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

.google.events.cloud.cloudbuild.v1.BuildOptions.LoggingMode logging = 11;

Returns
Type Description
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.events.cloud.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Returns
Type Description
BuildOptions.MachineType

The machineType.

getMachineTypeValue()

public int getMachineTypeValue()

Compute Engine machine type on which to run the build.

.google.events.cloud.cloudbuild.v1.BuildOptions.MachineType machine_type = 3;

Returns
Type Description
int

The enum numeric value on the wire for machineType.

getParserForType()

public Parser<BuildOptions> getParserForType()
Returns
Type Description
Parser<BuildOptions>
Overrides

getRequestedVerifyOption()

public BuildOptions.VerifyOption getRequestedVerifyOption()

Requested verifiability options.

.google.events.cloud.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Returns
Type Description
BuildOptions.VerifyOption

The requestedVerifyOption.

getRequestedVerifyOptionValue()

public int getRequestedVerifyOptionValue()

Requested verifiability options.

.google.events.cloud.cloudbuild.v1.BuildOptions.VerifyOption requested_verify_option = 2;

Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
ProtocolStringList

A list containing the secretEnv.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getSourceProvenanceHash(int index)

public Hash.HashType getSourceProvenanceHash(int index)

Requested hash for SourceProvenance.

repeated .google.events.cloud.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
Hash.HashType

The sourceProvenanceHash at the given index.

getSourceProvenanceHashCount()

public int getSourceProvenanceHashCount()

Requested hash for SourceProvenance.

repeated .google.events.cloud.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
Type Description
int

The count of sourceProvenanceHash.

getSourceProvenanceHashList()

public List<Hash.HashType> getSourceProvenanceHashList()

Requested hash for SourceProvenance.

repeated .google.events.cloud.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
Type Description
List<HashType>

A list containing the sourceProvenanceHash.

getSourceProvenanceHashValue(int index)

public int getSourceProvenanceHashValue(int index)

Requested hash for SourceProvenance.

repeated .google.events.cloud.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
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.events.cloud.cloudbuild.v1.Hash.HashType source_provenance_hash = 1;

Returns
Type Description
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.

.google.events.cloud.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Returns
Type Description
BuildOptions.SubstitutionOption

The substitutionOption.

getSubstitutionOptionValue()

public int getSubstitutionOptionValue()

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

.google.events.cloud.cloudbuild.v1.BuildOptions.SubstitutionOption substitution_option = 4;

Returns
Type Description
int

The enum numeric value on the wire for substitutionOption.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

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.events.cloud.cloudbuild.v1.Volume volumes = 14;

Parameter
Name Description
index int
Returns
Type Description
Volume

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.events.cloud.cloudbuild.v1.Volume volumes = 14;

Returns
Type Description
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.events.cloud.cloudbuild.v1.Volume volumes = 14;

Returns
Type Description
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.events.cloud.cloudbuild.v1.Volume volumes = 14;

Parameter
Name Description
index int
Returns
Type Description
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.events.cloud.cloudbuild.v1.Volume volumes = 14;

Returns
Type Description
List<? extends com.google.events.cloud.cloudbuild.v1.VolumeOrBuilder>

getWorkerPool()

public String getWorkerPool()

Option to specify a WorkerPool for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool}

string worker_pool = 7;

Returns
Type Description
String

The workerPool.

getWorkerPoolBytes()

public ByteString getWorkerPoolBytes()

Option to specify a WorkerPool for the build. Format: projects/{project}/locations/{location}/workerPools/{workerPool}

string worker_pool = 7;

Returns
Type Description
ByteString

The bytes for workerPool.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public BuildOptions.Builder newBuilderForType()
Returns
Type Description
BuildOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BuildOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
BuildOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public BuildOptions.Builder toBuilder()
Returns
Type Description
BuildOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException