Class BuildConfig (2.62.0)

publicfinalclassBuildConfigextendsGeneratedMessageV3implementsBuildConfigOrBuilder

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

Protobuf type google.cloud.functions.v2beta.BuildConfig

Static Fields

AUTOMATIC_UPDATE_POLICY_FIELD_NUMBER

publicstaticfinalintAUTOMATIC_UPDATE_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

BUILD_FIELD_NUMBER

publicstaticfinalintBUILD_FIELD_NUMBER
Field Value
TypeDescription
int

DOCKER_REGISTRY_FIELD_NUMBER

publicstaticfinalintDOCKER_REGISTRY_FIELD_NUMBER
Field Value
TypeDescription
int

DOCKER_REPOSITORY_FIELD_NUMBER

publicstaticfinalintDOCKER_REPOSITORY_FIELD_NUMBER
Field Value
TypeDescription
int

ENTRY_POINT_FIELD_NUMBER

publicstaticfinalintENTRY_POINT_FIELD_NUMBER
Field Value
TypeDescription
int

ENVIRONMENT_VARIABLES_FIELD_NUMBER

publicstaticfinalintENVIRONMENT_VARIABLES_FIELD_NUMBER
Field Value
TypeDescription
int

ON_DEPLOY_UPDATE_POLICY_FIELD_NUMBER

publicstaticfinalintON_DEPLOY_UPDATE_POLICY_FIELD_NUMBER
Field Value
TypeDescription
int

RUNTIME_FIELD_NUMBER

publicstaticfinalintRUNTIME_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_ACCOUNT_FIELD_NUMBER

publicstaticfinalintSERVICE_ACCOUNT_FIELD_NUMBER
Field Value
TypeDescription
int

SOURCE_FIELD_NUMBER

publicstaticfinalintSOURCE_FIELD_NUMBER
Field Value
TypeDescription
int

SOURCE_PROVENANCE_FIELD_NUMBER

publicstaticfinalintSOURCE_PROVENANCE_FIELD_NUMBER
Field Value
TypeDescription
int

WORKER_POOL_FIELD_NUMBER

publicstaticfinalintWORKER_POOL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

publicstaticBuildConfiggetDefaultInstance()
Returns
TypeDescription
BuildConfig

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

publicstaticBuildConfig.BuildernewBuilder()
Returns
TypeDescription
BuildConfig.Builder

newBuilder(BuildConfig prototype)

publicstaticBuildConfig.BuildernewBuilder(BuildConfigprototype)
Parameter
NameDescription
prototypeBuildConfig
Returns
TypeDescription
BuildConfig.Builder

parseDelimitedFrom(InputStream input)

publicstaticBuildConfigparseDelimitedFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

publicstaticBuildConfigparseFrom(byte[]data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticBuildConfigparseFrom(ByteStringdata)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticBuildConfigparseFrom(CodedInputStreaminput)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

publicstaticBuildConfigparseFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

publicstaticBuildConfigparseFrom(ByteBufferdata)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticBuildConfigparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BuildConfig
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

publicstaticParser<BuildConfig>parser()
Returns
TypeDescription
Parser<BuildConfig>

Methods

containsEnvironmentVariables(String key)

publicbooleancontainsEnvironmentVariables(Stringkey)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAutomaticUpdatePolicy()

publicAutomaticUpdatePolicygetAutomaticUpdatePolicy()

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

Returns
TypeDescription
AutomaticUpdatePolicy

The automaticUpdatePolicy.

getAutomaticUpdatePolicyOrBuilder()

publicAutomaticUpdatePolicyOrBuildergetAutomaticUpdatePolicyOrBuilder()

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for build.

getDefaultInstanceForType()

publicBuildConfiggetDefaultInstanceForType()
Returns
TypeDescription
BuildConfig

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.v2beta.BuildConfig.DockerRegistry docker_registry = 10;

Returns
TypeDescription
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.v2beta.BuildConfig.DockerRegistry docker_registry = 10;

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for entryPoint.

getEnvironmentVariables() (deprecated)

publicMap<String,String>getEnvironmentVariables()
Returns
TypeDescription
Map<String,String>

getEnvironmentVariablesCount()

publicintgetEnvironmentVariablesCount()

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Returns
TypeDescription
int

getEnvironmentVariablesMap()

publicMap<String,String>getEnvironmentVariablesMap()

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Returns
TypeDescription
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
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getEnvironmentVariablesOrThrow(String key)

publicStringgetEnvironmentVariablesOrThrow(Stringkey)

User-provided build-time environment variables for the function

map<string, string> environment_variables = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getOnDeployUpdatePolicy()

publicOnDeployUpdatePolicygetOnDeployUpdatePolicy()

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

Returns
TypeDescription
OnDeployUpdatePolicy

The onDeployUpdatePolicy.

getOnDeployUpdatePolicyOrBuilder()

publicOnDeployUpdatePolicyOrBuildergetOnDeployUpdatePolicyOrBuilder()

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

Returns
TypeDescription
OnDeployUpdatePolicyOrBuilder

getParserForType()

publicParser<BuildConfig>getParserForType()
Returns
TypeDescription
Parser<BuildConfig>
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
TypeDescription
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
TypeDescription
ByteString

The bytes for runtime.

getRuntimeUpdatePolicyCase()

publicBuildConfig.RuntimeUpdatePolicyCasegetRuntimeUpdatePolicyCase()
Returns
TypeDescription
BuildConfig.RuntimeUpdatePolicyCase

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
Overrides

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
TypeDescription
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
TypeDescription
ByteString

The bytes for serviceAccount.

getSource()

publicSourcegetSource()

The location of the function source code.

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

Returns
TypeDescription
Source

The source.

getSourceOrBuilder()

publicSourceOrBuildergetSourceOrBuilder()

The location of the function source code.

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

Returns
TypeDescription
SourceOrBuilder

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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for workerPool.

hasAutomaticUpdatePolicy()

publicbooleanhasAutomaticUpdatePolicy()

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

Returns
TypeDescription
boolean

Whether the automaticUpdatePolicy field is set.

hasOnDeployUpdatePolicy()

publicbooleanhasOnDeployUpdatePolicy()

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

Returns
TypeDescription
boolean

Whether the onDeployUpdatePolicy field is set.

hasSource()

publicbooleanhasSource()

The location of the function source code.

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

Returns
TypeDescription
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
TypeDescription
boolean

Whether the sourceProvenance field is set.

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

publicBuildConfig.BuildernewBuilderForType()
Returns
TypeDescription
BuildConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedBuildConfig.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
BuildConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

publicBuildConfig.BuildertoBuilder()
Returns
TypeDescription
BuildConfig.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException