Class BuildConfig.Builder (0.58.0)

public static final class BuildConfig.Builder extends GeneratedMessageV3.Builder<BuildConfig.Builder> implements BuildConfigOrBuilder

Describes the Build step of the function that builds a container from the given source.

Protobuf type google.cloud.run.v2.BuildConfig

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BuildConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

build()

public BuildConfig build()
Returns
Type Description
BuildConfig

buildPartial()

public BuildConfig buildPartial()
Returns
Type Description
BuildConfig

clear()

public BuildConfig.Builder clear()
Returns
Type Description
BuildConfig.Builder
Overrides

clearBaseImage()

public BuildConfig.Builder clearBaseImage()

Optional. The base image used to build the function.

string base_image = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearEnableAutomaticUpdates()

public BuildConfig.Builder clearEnableAutomaticUpdates()

Optional. Sets whether the function will receive automatic base image updates.

bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearEnvironmentVariables()

public BuildConfig.Builder clearEnvironmentVariables()
Returns
Type Description
BuildConfig.Builder

clearField(Descriptors.FieldDescriptor field)

public BuildConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BuildConfig.Builder
Overrides

clearFunctionTarget()

public BuildConfig.Builder clearFunctionTarget()

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

string function_target = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearImageUri()

public BuildConfig.Builder clearImageUri()

Optional. Artifact Registry URI to store the built image.

string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearName()

public BuildConfig.Builder clearName()

Output only. The Cloud Build name of the latest successful deployment of the function.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public BuildConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BuildConfig.Builder
Overrides

clearServiceAccount()

public BuildConfig.Builder clearServiceAccount()

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

string service_account = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearSourceLocation()

public BuildConfig.Builder clearSourceLocation()

The Cloud Storage bucket URI where the function source code is located.

string source_location = 2;

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearWorkerPool()

public BuildConfig.Builder clearWorkerPool()

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clone()

public BuildConfig.Builder clone()
Returns
Type Description
BuildConfig.Builder
Overrides

containsEnvironmentVariables(String key)

public boolean containsEnvironmentVariables(String key)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
boolean

getBaseImage()

public String getBaseImage()

Optional. The base image used to build the function.

string base_image = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The baseImage.

getBaseImageBytes()

public ByteString getBaseImageBytes()

Optional. The base image used to build the function.

string base_image = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for baseImage.

getDefaultInstanceForType()

public BuildConfig getDefaultInstanceForType()
Returns
Type Description
BuildConfig

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getEnableAutomaticUpdates()

public boolean getEnableAutomaticUpdates()

Optional. Sets whether the function will receive automatic base image updates.

bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The enableAutomaticUpdates.

getEnvironmentVariables() (deprecated)

public Map<String,String> getEnvironmentVariables()
Returns
Type Description
Map<String,String>

getEnvironmentVariablesCount()

public int getEnvironmentVariablesCount()

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getEnvironmentVariablesMap()

public Map<String,String> getEnvironmentVariablesMap()

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Map<String,String>

getEnvironmentVariablesOrDefault(String key, String defaultValue)

public String getEnvironmentVariablesOrDefault(String key, String defaultValue)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getEnvironmentVariablesOrThrow(String key)

public String getEnvironmentVariablesOrThrow(String key)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
String

getFunctionTarget()

public String getFunctionTarget()

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

string function_target = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The functionTarget.

getFunctionTargetBytes()

public ByteString getFunctionTargetBytes()

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

string function_target = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for functionTarget.

getImageUri()

public String getImageUri()

Optional. Artifact Registry URI to store the built image.

string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The imageUri.

getImageUriBytes()

public ByteString getImageUriBytes()

Optional. Artifact Registry URI to store the built image.

string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for imageUri.

getMutableEnvironmentVariables() (deprecated)

public Map<String,String> getMutableEnvironmentVariables()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getName()

public String getName()

Output only. The Cloud Build name of the latest successful deployment of the function.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The Cloud Build name of the latest successful deployment of the function.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for name.

getServiceAccount()

public String getServiceAccount()

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

string service_account = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

public ByteString getServiceAccountBytes()

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

string service_account = 9 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for serviceAccount.

getSourceLocation()

public String getSourceLocation()

The Cloud Storage bucket URI where the function source code is located.

string source_location = 2;

Returns
Type Description
String

The sourceLocation.

getSourceLocationBytes()

public ByteString getSourceLocationBytes()

The Cloud Storage bucket URI where the function source code is located.

string source_location = 2;

Returns
Type Description
ByteString

The bytes for sourceLocation.

getWorkerPool()

public String getWorkerPool()

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The workerPool.

getWorkerPoolBytes()

public ByteString getWorkerPoolBytes()

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for workerPool.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(BuildConfig other)

public BuildConfig.Builder mergeFrom(BuildConfig other)
Parameter
Name Description
other BuildConfig
Returns
Type Description
BuildConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BuildConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BuildConfig.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BuildConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BuildConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildConfig.Builder
Overrides

putAllEnvironmentVariables(Map<String,String> values)

public BuildConfig.Builder putAllEnvironmentVariables(Map<String,String> values)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Map<String,String>
Returns
Type Description
BuildConfig.Builder

putEnvironmentVariables(String key, String value)

public BuildConfig.Builder putEnvironmentVariables(String key, String value)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
key String
value String
Returns
Type Description
BuildConfig.Builder

removeEnvironmentVariables(String key)

public BuildConfig.Builder removeEnvironmentVariables(String key)

Optional. User-provided build-time environment variables for the function

map<string, string> environment_variables = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
key String
Returns
Type Description
BuildConfig.Builder

setBaseImage(String value)

public BuildConfig.Builder setBaseImage(String value)

Optional. The base image used to build the function.

string base_image = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The baseImage to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setBaseImageBytes(ByteString value)

public BuildConfig.Builder setBaseImageBytes(ByteString value)

Optional. The base image used to build the function.

string base_image = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for baseImage to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setEnableAutomaticUpdates(boolean value)

public BuildConfig.Builder setEnableAutomaticUpdates(boolean value)

Optional. Sets whether the function will receive automatic base image updates.

bool enable_automatic_updates = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The enableAutomaticUpdates to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BuildConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

setFunctionTarget(String value)

public BuildConfig.Builder setFunctionTarget(String value)

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

string function_target = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The functionTarget to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setFunctionTargetBytes(ByteString value)

public BuildConfig.Builder setFunctionTargetBytes(ByteString value)

Optional. The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function".

string function_target = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for functionTarget to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setImageUri(String value)

public BuildConfig.Builder setImageUri(String value)

Optional. Artifact Registry URI to store the built image.

string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The imageUri to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setImageUriBytes(ByteString value)

public BuildConfig.Builder setImageUriBytes(ByteString value)

Optional. Artifact Registry URI to store the built image.

string image_uri = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for imageUri to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setName(String value)

public BuildConfig.Builder setName(String value)

Output only. The Cloud Build name of the latest successful deployment of the function.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The name to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setNameBytes(ByteString value)

public BuildConfig.Builder setNameBytes(ByteString value)

Output only. The Cloud Build name of the latest successful deployment of the function.

string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

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

public BuildConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

setServiceAccount(String value)

public BuildConfig.Builder setServiceAccount(String value)

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

string service_account = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The serviceAccount to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

public BuildConfig.Builder setServiceAccountBytes(ByteString value)

Optional. Service account to be used for building the container. The format of this field is projects/{projectId}/serviceAccounts/{serviceAccountEmail}.

string service_account = 9 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for serviceAccount to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setSourceLocation(String value)

public BuildConfig.Builder setSourceLocation(String value)

The Cloud Storage bucket URI where the function source code is located.

string source_location = 2;

Parameter
Name Description
value String

The sourceLocation to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setSourceLocationBytes(ByteString value)

public BuildConfig.Builder setSourceLocationBytes(ByteString value)

The Cloud Storage bucket URI where the function source code is located.

string source_location = 2;

Parameter
Name Description
value ByteString

The bytes for sourceLocation to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BuildConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildConfig.Builder
Overrides

setWorkerPool(String value)

public BuildConfig.Builder setWorkerPool(String value)

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The workerPool to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setWorkerPoolBytes(ByteString value)

public BuildConfig.Builder setWorkerPoolBytes(ByteString value)

Optional. Name of the Cloud Build Custom Worker Pool that should be used to build the Cloud Run function. The format of this field is projects/{project}/locations/{region}/workerPools/{workerPool} where {project} and {region} are the project id and region respectively where the worker pool is defined and {workerPool} is the short name of the worker pool.

string worker_pool = 7 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for workerPool to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.