Class BuildConfig (2.7.0)

publicfinalclass BuildConfigextendsGeneratedMessageV3implementsBuildConfigOrBuilder

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

Protobuf type google.cloud.functions.v2beta.BuildConfig

Inherited Members

Static Fields

BUILD_FIELD_NUMBER

publicstaticfinalintBUILD_FIELD_NUMBER
Field Value
Type Description
int

DOCKER_REPOSITORY_FIELD_NUMBER

publicstaticfinalintDOCKER_REPOSITORY_FIELD_NUMBER
Field Value
Type Description
int

ENTRY_POINT_FIELD_NUMBER

publicstaticfinalintENTRY_POINT_FIELD_NUMBER
Field Value
Type Description
int

ENVIRONMENT_VARIABLES_FIELD_NUMBER

publicstaticfinalintENVIRONMENT_VARIABLES_FIELD_NUMBER
Field Value
Type Description
int

RUNTIME_FIELD_NUMBER

publicstaticfinalintRUNTIME_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_FIELD_NUMBER

publicstaticfinalintSOURCE_FIELD_NUMBER
Field Value
Type Description
int

SOURCE_PROVENANCE_FIELD_NUMBER

publicstaticfinalintSOURCE_PROVENANCE_FIELD_NUMBER
Field Value
Type Description
int

WORKER_POOL_FIELD_NUMBER

publicstaticfinalintWORKER_POOL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticBuildConfiggetDefaultInstance()
Returns
Type Description

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticBuildConfig.BuildernewBuilder()
Returns
Type Description

newBuilder(BuildConfig prototype)

publicstaticBuildConfig.BuildernewBuilder(BuildConfigprototype)
Parameter
Name Description
prototype BuildConfig
Returns
Type Description

parseDelimitedFrom(InputStream input)

publicstaticBuildConfigparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data)

publicstaticBuildConfigparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
Exceptions
Type Description

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data)

publicstaticBuildConfigparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input)

publicstaticBuildConfigparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

publicstaticBuildConfigparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data)

publicstaticBuildConfigparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Exceptions
Type Description

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parser()

publicstaticParser<BuildConfig>parser()
Returns
Type Description

Methods

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

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
Overrides

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

getDockerRepository()

publicStringgetDockerRepository()

Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, 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.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The dockerRepository.

getDockerRepositoryBytes()

publicByteStringgetDockerRepositoryBytes()

Optional. User managed repository created in Artifact Registry optionally with a customer managed encryption key. This is the repository to which the function docker image will be pushed after it is built by Cloud Build. If unspecified, 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.field_behavior) = OPTIONAL, (.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()

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

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

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

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

getParserForType()

publicParser<BuildConfig>getParserForType()
Returns
Type Description
Overrides

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.

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getSource()

publicSourcegetSource()

The location of the function source code.

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

Returns
Type Description
Source

The source.

getSourceOrBuilder()

publicSourceOrBuildergetSourceOrBuilder()

The location of the function source code.

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

Returns
Type Description

getSourceProvenance()

publicSourceProvenancegetSourceProvenance()

Output only. A permanent fixed identifier for source.

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

Returns
Type Description
SourceProvenance

The sourceProvenance.

getSourceProvenanceOrBuilder()

publicSourceProvenanceOrBuildergetSourceProvenanceOrBuilder()

Output only. A permanent fixed identifier for source.

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

Returns
Type Description

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
Overrides

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.

hasSource()

publicbooleanhasSource()

The location of the function source code.

.google.cloud.functions.v2beta.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.v2beta.SourceProvenance source_provenance = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the sourceProvenance field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
Overrides

internalGetMapField(int number)

protectedMapFieldinternalGetMapField(intnumber)
Parameter
Name Description
number int
Returns
Type Description
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicBuildConfig.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedBuildConfig.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
Returns
Type Description
Overrides

toBuilder()

publicBuildConfig.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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.