Class BuildConfig.Builder (2.61.0)

publicstaticfinalclass BuildConfig.BuilderextendsGeneratedMessageV3.Builder<BuildConfig.Builder>implementsBuildConfigOrBuilder

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

Protobuf type google.cloud.functions.v2alpha.BuildConfig

Inherited Members

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicBuildConfig.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

build()

publicBuildConfigbuild()
Returns
Type Description
BuildConfig

buildPartial()

publicBuildConfigbuildPartial()
Returns
Type Description
BuildConfig

clear()

publicBuildConfig.Builderclear()
Returns
Type Description
BuildConfig.Builder
Overrides

clearAutomaticUpdatePolicy()

publicBuildConfig.BuilderclearAutomaticUpdatePolicy()

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Returns
Type Description
BuildConfig.Builder

clearBuild()

publicBuildConfig.BuilderclearBuild()

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

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

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearDockerRegistry()

publicBuildConfig.BuilderclearDockerRegistry()

Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.

If unspecified, it defaults to ARTIFACT_REGISTRY. If docker_repository field is specified, this field should either be left unspecified or set to ARTIFACT_REGISTRY.

.google.cloud.functions.v2alpha.BuildConfig.DockerRegistry docker_registry = 10;

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearDockerRepository()

publicBuildConfig.BuilderclearDockerRepository()

Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

string docker_repository = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearEntryPoint()

publicBuildConfig.BuilderclearEntryPoint()

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". For Node.js this is name of a function exported by the module specified in source_location.

string entry_point = 3;

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearEnvironmentVariables()

publicBuildConfig.BuilderclearEnvironmentVariables()
Returns
Type Description
BuildConfig.Builder

clearField(Descriptors.FieldDescriptor field)

publicBuildConfig.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BuildConfig.Builder
Overrides

clearOnDeployUpdatePolicy()

publicBuildConfig.BuilderclearOnDeployUpdatePolicy()

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Returns
Type Description
BuildConfig.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

publicBuildConfig.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BuildConfig.Builder
Overrides

clearRuntime()

publicBuildConfig.BuilderclearRuntime()

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

string runtime = 2;

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearRuntimeUpdatePolicy()

publicBuildConfig.BuilderclearRuntimeUpdatePolicy()
Returns
Type Description
BuildConfig.Builder

clearServiceAccount()

publicBuildConfig.BuilderclearServiceAccount()

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

string service_account = 27;

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clearSource()

publicBuildConfig.BuilderclearSource()

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Returns
Type Description
BuildConfig.Builder

clearSourceProvenance()

publicBuildConfig.BuilderclearSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
BuildConfig.Builder

clearWorkerPool()

publicBuildConfig.BuilderclearWorkerPool()

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

string worker_pool = 5 [(.google.api.resource_reference) = { ... }

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

clone()

publicBuildConfig.Builderclone()
Returns
Type Description
BuildConfig.Builder
Overrides

containsEnvironmentVariables(String key)

publicbooleancontainsEnvironmentVariables(Stringkey)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameter
Name Description
key String
Returns
Type Description
boolean

getAutomaticUpdatePolicy()

publicAutomaticUpdatePolicygetAutomaticUpdatePolicy()

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Returns
Type Description
AutomaticUpdatePolicy

The automaticUpdatePolicy.

getAutomaticUpdatePolicyBuilder()

publicAutomaticUpdatePolicy.BuildergetAutomaticUpdatePolicyBuilder()

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Returns
Type Description
AutomaticUpdatePolicy.Builder

getAutomaticUpdatePolicyOrBuilder()

publicAutomaticUpdatePolicyOrBuildergetAutomaticUpdatePolicyOrBuilder()

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Returns
Type Description
AutomaticUpdatePolicyOrBuilder

getBuild()

publicStringgetBuild()

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

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

Returns
Type Description
String

The build.

getBuildBytes()

publicByteStringgetBuildBytes()

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

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

Returns
Type Description
ByteString

The bytes for build.

getDefaultInstanceForType()

publicBuildConfiggetDefaultInstanceForType()
Returns
Type Description
BuildConfig

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDockerRegistry()

publicBuildConfig.DockerRegistrygetDockerRegistry()

Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.

If unspecified, it defaults to ARTIFACT_REGISTRY. If docker_repository field is specified, this field should either be left unspecified or set to ARTIFACT_REGISTRY.

.google.cloud.functions.v2alpha.BuildConfig.DockerRegistry docker_registry = 10;

Returns
Type Description
BuildConfig.DockerRegistry

The dockerRegistry.

getDockerRegistryValue()

publicintgetDockerRegistryValue()

Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.

If unspecified, it defaults to ARTIFACT_REGISTRY. If docker_repository field is specified, this field should either be left unspecified or set to ARTIFACT_REGISTRY.

.google.cloud.functions.v2alpha.BuildConfig.DockerRegistry docker_registry = 10;

Returns
Type Description
int

The enum numeric value on the wire for dockerRegistry.

getDockerRepository()

publicStringgetDockerRepository()

Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

string docker_repository = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The dockerRepository.

getDockerRepositoryBytes()

publicByteStringgetDockerRepositoryBytes()

Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

string docker_repository = 7 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for dockerRepository.

getEntryPoint()

publicStringgetEntryPoint()

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". For Node.js this is name of a function exported by the module specified in source_location.

string entry_point = 3;

Returns
Type Description
String

The entryPoint.

getEntryPointBytes()

publicByteStringgetEntryPointBytes()

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". For Node.js this is name of a function exported by the module specified in source_location.

string entry_point = 3;

Returns
Type Description
ByteString

The bytes for entryPoint.

getEnvironmentVariables() (deprecated)

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

getEnvironmentVariablesCount()

publicintgetEnvironmentVariablesCount()

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Returns
Type Description
int

getEnvironmentVariablesMap()

publicMap<String,String>getEnvironmentVariablesMap()

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Returns
Type Description
Map<String,String>

getEnvironmentVariablesOrDefault(String key, String defaultValue)

publicStringgetEnvironmentVariablesOrDefault(Stringkey,StringdefaultValue)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getEnvironmentVariablesOrThrow(String key)

publicStringgetEnvironmentVariablesOrThrow(Stringkey)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameter
Name Description
key String
Returns
Type Description
String

getMutableEnvironmentVariables() (deprecated)

publicMap<String,String>getMutableEnvironmentVariables()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getOnDeployUpdatePolicy()

publicOnDeployUpdatePolicygetOnDeployUpdatePolicy()

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Returns
Type Description
OnDeployUpdatePolicy

The onDeployUpdatePolicy.

getOnDeployUpdatePolicyBuilder()

publicOnDeployUpdatePolicy.BuildergetOnDeployUpdatePolicyBuilder()

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Returns
Type Description
OnDeployUpdatePolicy.Builder

getOnDeployUpdatePolicyOrBuilder()

publicOnDeployUpdatePolicyOrBuildergetOnDeployUpdatePolicyOrBuilder()

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Returns
Type Description
OnDeployUpdatePolicyOrBuilder

getRuntime()

publicStringgetRuntime()

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

string runtime = 2;

Returns
Type Description
String

The runtime.

getRuntimeBytes()

publicByteStringgetRuntimeBytes()

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

string runtime = 2;

Returns
Type Description
ByteString

The bytes for runtime.

getRuntimeUpdatePolicyCase()

publicBuildConfig.RuntimeUpdatePolicyCasegetRuntimeUpdatePolicyCase()
Returns
Type Description
BuildConfig.RuntimeUpdatePolicyCase

getServiceAccount()

publicStringgetServiceAccount()

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

string service_account = 27;

Returns
Type Description
String

The serviceAccount.

getServiceAccountBytes()

publicByteStringgetServiceAccountBytes()

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

string service_account = 27;

Returns
Type Description
ByteString

The bytes for serviceAccount.

getSource()

publicSourcegetSource()

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Returns
Type Description
Source

The source.

getSourceBuilder()

publicSource.BuildergetSourceBuilder()

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Returns
Type Description
Source.Builder

getSourceOrBuilder()

publicSourceOrBuildergetSourceOrBuilder()

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Returns
Type Description
SourceOrBuilder

getSourceProvenance()

publicSourceProvenancegetSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SourceProvenance

The sourceProvenance.

getSourceProvenanceBuilder()

publicSourceProvenance.BuildergetSourceProvenanceBuilder()

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SourceProvenance.Builder

getSourceProvenanceOrBuilder()

publicSourceProvenanceOrBuildergetSourceProvenanceOrBuilder()

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
SourceProvenanceOrBuilder

getWorkerPool()

publicStringgetWorkerPool()

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

string worker_pool = 5 [(.google.api.resource_reference) = { ... }

Returns
Type Description
String

The workerPool.

getWorkerPoolBytes()

publicByteStringgetWorkerPoolBytes()

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

string worker_pool = 5 [(.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for workerPool.

hasAutomaticUpdatePolicy()

publicbooleanhasAutomaticUpdatePolicy()

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Returns
Type Description
boolean

Whether the automaticUpdatePolicy field is set.

hasOnDeployUpdatePolicy()

publicbooleanhasOnDeployUpdatePolicy()

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Returns
Type Description
boolean

Whether the onDeployUpdatePolicy field is set.

hasSource()

publicbooleanhasSource()

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Returns
Type Description
boolean

Whether the source field is set.

hasSourceProvenance()

publicbooleanhasSourceProvenance()

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the sourceProvenance field is set.

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

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

internalGetMutableMapFieldReflection(int number)

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

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

mergeAutomaticUpdatePolicy(AutomaticUpdatePolicy value)

publicBuildConfig.BuildermergeAutomaticUpdatePolicy(AutomaticUpdatePolicyvalue)

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Parameter
Name Description
value AutomaticUpdatePolicy
Returns
Type Description
BuildConfig.Builder

mergeFrom(BuildConfig other)

publicBuildConfig.BuildermergeFrom(BuildConfigother)
Parameter
Name Description
other BuildConfig
Returns
Type Description
BuildConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicBuildConfig.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BuildConfig.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

publicBuildConfig.BuildermergeFrom(Messageother)
Parameter
Name Description
other Message
Returns
Type Description
BuildConfig.Builder
Overrides

mergeOnDeployUpdatePolicy(OnDeployUpdatePolicy value)

publicBuildConfig.BuildermergeOnDeployUpdatePolicy(OnDeployUpdatePolicyvalue)

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Parameter
Name Description
value OnDeployUpdatePolicy
Returns
Type Description
BuildConfig.Builder

mergeSource(Source value)

publicBuildConfig.BuildermergeSource(Sourcevalue)

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Parameter
Name Description
value Source
Returns
Type Description
BuildConfig.Builder

mergeSourceProvenance(SourceProvenance value)

publicBuildConfig.BuildermergeSourceProvenance(SourceProvenancevalue)

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value SourceProvenance
Returns
Type Description
BuildConfig.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalBuildConfig.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildConfig.Builder
Overrides

putAllEnvironmentVariables(Map<String,String> values)

publicBuildConfig.BuilderputAllEnvironmentVariables(Map<String,String>values)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

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

putEnvironmentVariables(String key, String value)

publicBuildConfig.BuilderputEnvironmentVariables(Stringkey,Stringvalue)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

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

removeEnvironmentVariables(String key)

publicBuildConfig.BuilderremoveEnvironmentVariables(Stringkey)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameter
Name Description
key String
Returns
Type Description
BuildConfig.Builder

setAutomaticUpdatePolicy(AutomaticUpdatePolicy value)

publicBuildConfig.BuildersetAutomaticUpdatePolicy(AutomaticUpdatePolicyvalue)

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Parameter
Name Description
value AutomaticUpdatePolicy
Returns
Type Description
BuildConfig.Builder

setAutomaticUpdatePolicy(AutomaticUpdatePolicy.Builder builderForValue)

publicBuildConfig.BuildersetAutomaticUpdatePolicy(AutomaticUpdatePolicy.BuilderbuilderForValue)

.google.cloud.functions.v2alpha.AutomaticUpdatePolicy automatic_update_policy = 40;

Parameter
Name Description
builderForValue AutomaticUpdatePolicy.Builder
Returns
Type Description
BuildConfig.Builder

setBuild(String value)

publicBuildConfig.BuildersetBuild(Stringvalue)

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

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

Parameter
Name Description
value String

The build to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setBuildBytes(ByteString value)

publicBuildConfig.BuildersetBuildBytes(ByteStringvalue)

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

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

Parameter
Name Description
value ByteString

The bytes for build to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setDockerRegistry(BuildConfig.DockerRegistry value)

publicBuildConfig.BuildersetDockerRegistry(BuildConfig.DockerRegistryvalue)

Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.

If unspecified, it defaults to ARTIFACT_REGISTRY. If docker_repository field is specified, this field should either be left unspecified or set to ARTIFACT_REGISTRY.

.google.cloud.functions.v2alpha.BuildConfig.DockerRegistry docker_registry = 10;

Parameter
Name Description
value BuildConfig.DockerRegistry

The dockerRegistry to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setDockerRegistryValue(int value)

publicBuildConfig.BuildersetDockerRegistryValue(intvalue)

Docker Registry to use for this deployment. This configuration is only applicable to 1st Gen functions, 2nd Gen functions can only use Artifact Registry.

If unspecified, it defaults to ARTIFACT_REGISTRY. If docker_repository field is specified, this field should either be left unspecified or set to ARTIFACT_REGISTRY.

.google.cloud.functions.v2alpha.BuildConfig.DockerRegistry docker_registry = 10;

Parameter
Name Description
value int

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

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setDockerRepository(String value)

publicBuildConfig.BuildersetDockerRepository(Stringvalue)

Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

string docker_repository = 7 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The dockerRepository to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setDockerRepositoryBytes(ByteString value)

publicBuildConfig.BuildersetDockerRepositoryBytes(ByteStringvalue)

Repository in Artifact Registry to which the function docker image will be pushed after it is built by Cloud Build. If specified by user, it is created and managed by user with a customer managed encryption key. Otherwise, GCF will create and use a repository named 'gcf-artifacts' for every deployed region.

It must match the pattern projects/{project}/locations/{location}/repositories/{repository}.

Cross-project repositories are not supported. Cross-location repositories are not supported. Repository format must be 'DOCKER'.

string docker_repository = 7 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for dockerRepository to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setEntryPoint(String value)

publicBuildConfig.BuildersetEntryPoint(Stringvalue)

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". For Node.js this is name of a function exported by the module specified in source_location.

string entry_point = 3;

Parameter
Name Description
value String

The entryPoint to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setEntryPointBytes(ByteString value)

publicBuildConfig.BuildersetEntryPointBytes(ByteStringvalue)

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". For Node.js this is name of a function exported by the module specified in source_location.

string entry_point = 3;

Parameter
Name Description
value ByteString

The bytes for entryPoint to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicBuildConfig.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

setOnDeployUpdatePolicy(OnDeployUpdatePolicy value)

publicBuildConfig.BuildersetOnDeployUpdatePolicy(OnDeployUpdatePolicyvalue)

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Parameter
Name Description
value OnDeployUpdatePolicy
Returns
Type Description
BuildConfig.Builder

setOnDeployUpdatePolicy(OnDeployUpdatePolicy.Builder builderForValue)

publicBuildConfig.BuildersetOnDeployUpdatePolicy(OnDeployUpdatePolicy.BuilderbuilderForValue)

.google.cloud.functions.v2alpha.OnDeployUpdatePolicy on_deploy_update_policy = 41;

Parameter
Name Description
builderForValue OnDeployUpdatePolicy.Builder
Returns
Type Description
BuildConfig.Builder

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

publicBuildConfig.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BuildConfig.Builder
Overrides

setRuntime(String value)

publicBuildConfig.BuildersetRuntime(Stringvalue)

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

string runtime = 2;

Parameter
Name Description
value String

The runtime to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setRuntimeBytes(ByteString value)

publicBuildConfig.BuildersetRuntimeBytes(ByteStringvalue)

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

string runtime = 2;

Parameter
Name Description
value ByteString

The bytes for runtime to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setServiceAccount(String value)

publicBuildConfig.BuildersetServiceAccount(Stringvalue)

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

string service_account = 27;

Parameter
Name Description
value String

The serviceAccount to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setServiceAccountBytes(ByteString value)

publicBuildConfig.BuildersetServiceAccountBytes(ByteStringvalue)

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

string service_account = 27;

Parameter
Name Description
value ByteString

The bytes for serviceAccount to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

setSource(Source value)

publicBuildConfig.BuildersetSource(Sourcevalue)

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Parameter
Name Description
value Source
Returns
Type Description
BuildConfig.Builder

setSource(Source.Builder builderForValue)

publicBuildConfig.BuildersetSource(Source.BuilderbuilderForValue)

The location of the function source code.

.google.cloud.functions.v2alpha.Source source = 4;

Parameter
Name Description
builderForValue Source.Builder
Returns
Type Description
BuildConfig.Builder

setSourceProvenance(SourceProvenance value)

publicBuildConfig.BuildersetSourceProvenance(SourceProvenancevalue)

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value SourceProvenance
Returns
Type Description
BuildConfig.Builder

setSourceProvenance(SourceProvenance.Builder builderForValue)

publicBuildConfig.BuildersetSourceProvenance(SourceProvenance.BuilderbuilderForValue)

Output only. A permanent fixed identifier for source.

.google.cloud.functions.v2alpha.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue SourceProvenance.Builder
Returns
Type Description
BuildConfig.Builder

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalBuildConfig.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BuildConfig.Builder
Overrides

setWorkerPool(String value)

publicBuildConfig.BuildersetWorkerPool(Stringvalue)

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

string worker_pool = 5 [(.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)

publicBuildConfig.BuildersetWorkerPoolBytes(ByteStringvalue)

Name of the Cloud Build Custom Worker Pool that should be used to build the 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.

If the project id is not the same as the function, then the Cloud Functions Service Agent (service-<project_number>@gcf-admin-robot.iam.gserviceaccount.com) must be granted the role Cloud Build Custom Workers Builder (roles/cloudbuild.customworkers.builder) in the project.

string worker_pool = 5 [(.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for workerPool to set.

Returns
Type Description
BuildConfig.Builder

This builder for chaining.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.