Class ServiceConfig.Builder (2.62.0)

publicstaticfinalclassServiceConfig.BuilderextendsGeneratedMessageV3.Builder<ServiceConfig.Builder>implementsServiceConfigOrBuilder

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).

Protobuf type google.cloud.functions.v2.ServiceConfig

Static Methods

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllSecretEnvironmentVariables(Iterable<? extends SecretEnvVar> values)

publicServiceConfig.BuilderaddAllSecretEnvironmentVariables(Iterable<?extendsSecretEnvVar>values)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.functions.v2.SecretEnvVar>
Returns
TypeDescription
ServiceConfig.Builder

addAllSecretVolumes(Iterable<? extends SecretVolume> values)

publicServiceConfig.BuilderaddAllSecretVolumes(Iterable<?extendsSecretVolume>values)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.functions.v2.SecretVolume>
Returns
TypeDescription
ServiceConfig.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

publicServiceConfig.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceConfig.Builder
Overrides

addSecretEnvironmentVariables(SecretEnvVar value)

publicServiceConfig.BuilderaddSecretEnvironmentVariables(SecretEnvVarvalue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
valueSecretEnvVar
Returns
TypeDescription
ServiceConfig.Builder

addSecretEnvironmentVariables(SecretEnvVar.Builder builderForValue)

publicServiceConfig.BuilderaddSecretEnvironmentVariables(SecretEnvVar.BuilderbuilderForValue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
builderForValueSecretEnvVar.Builder
Returns
TypeDescription
ServiceConfig.Builder

addSecretEnvironmentVariables(int index, SecretEnvVar value)

publicServiceConfig.BuilderaddSecretEnvironmentVariables(intindex,SecretEnvVarvalue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameters
NameDescription
indexint
valueSecretEnvVar
Returns
TypeDescription
ServiceConfig.Builder

addSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)

publicServiceConfig.BuilderaddSecretEnvironmentVariables(intindex,SecretEnvVar.BuilderbuilderForValue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameters
NameDescription
indexint
builderForValueSecretEnvVar.Builder
Returns
TypeDescription
ServiceConfig.Builder

addSecretEnvironmentVariablesBuilder()

publicSecretEnvVar.BuilderaddSecretEnvironmentVariablesBuilder()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
SecretEnvVar.Builder

addSecretEnvironmentVariablesBuilder(int index)

publicSecretEnvVar.BuilderaddSecretEnvironmentVariablesBuilder(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretEnvVar.Builder

addSecretVolumes(SecretVolume value)

publicServiceConfig.BuilderaddSecretVolumes(SecretVolumevalue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
valueSecretVolume
Returns
TypeDescription
ServiceConfig.Builder

addSecretVolumes(SecretVolume.Builder builderForValue)

publicServiceConfig.BuilderaddSecretVolumes(SecretVolume.BuilderbuilderForValue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
builderForValueSecretVolume.Builder
Returns
TypeDescription
ServiceConfig.Builder

addSecretVolumes(int index, SecretVolume value)

publicServiceConfig.BuilderaddSecretVolumes(intindex,SecretVolumevalue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameters
NameDescription
indexint
valueSecretVolume
Returns
TypeDescription
ServiceConfig.Builder

addSecretVolumes(int index, SecretVolume.Builder builderForValue)

publicServiceConfig.BuilderaddSecretVolumes(intindex,SecretVolume.BuilderbuilderForValue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameters
NameDescription
indexint
builderForValueSecretVolume.Builder
Returns
TypeDescription
ServiceConfig.Builder

addSecretVolumesBuilder()

publicSecretVolume.BuilderaddSecretVolumesBuilder()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
SecretVolume.Builder

addSecretVolumesBuilder(int index)

publicSecretVolume.BuilderaddSecretVolumesBuilder(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.Builder

build()

publicServiceConfigbuild()
Returns
TypeDescription
ServiceConfig

buildPartial()

publicServiceConfigbuildPartial()
Returns
TypeDescription
ServiceConfig

clear()

publicServiceConfig.Builderclear()
Returns
TypeDescription
ServiceConfig.Builder
Overrides

clearAllTrafficOnLatestRevision()

publicServiceConfig.BuilderclearAllTrafficOnLatestRevision()

Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.

bool all_traffic_on_latest_revision = 16;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearAvailableCpu()

publicServiceConfig.BuilderclearAvailableCpu()

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

string available_cpu = 22;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearAvailableMemory()

publicServiceConfig.BuilderclearAvailableMemory()

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.

string available_memory = 13;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearBinaryAuthorizationPolicy()

publicServiceConfig.BuilderclearBinaryAuthorizationPolicy()

Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearEnvironmentVariables()

publicServiceConfig.BuilderclearEnvironmentVariables()
Returns
TypeDescription
ServiceConfig.Builder

clearField(Descriptors.FieldDescriptor field)

publicServiceConfig.BuilderclearField(Descriptors.FieldDescriptorfield)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ServiceConfig.Builder
Overrides

clearIngressSettings()

publicServiceConfig.BuilderclearIngressSettings()

The ingress settings for the function, controlling what traffic can reach it.

.google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearMaxInstanceCount()

publicServiceConfig.BuilderclearMaxInstanceCount()

The limit on the maximum number of function instances that may coexist at a given time.

In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate.

See the Max Instances Guide for more details.

int32 max_instance_count = 5;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearMaxInstanceRequestConcurrency()

publicServiceConfig.BuilderclearMaxInstanceRequestConcurrency()

Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.

int32 max_instance_request_concurrency = 20;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearMinInstanceCount()

publicServiceConfig.BuilderclearMinInstanceCount()

The limit on the minimum number of function instances that may coexist at a given time.

Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.

int32 min_instance_count = 12;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

publicServiceConfig.BuilderclearOneof(Descriptors.OneofDescriptoroneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
ServiceConfig.Builder
Overrides

clearRevision()

publicServiceConfig.BuilderclearRevision()

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearSecretEnvironmentVariables()

publicServiceConfig.BuilderclearSecretEnvironmentVariables()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
ServiceConfig.Builder

clearSecretVolumes()

publicServiceConfig.BuilderclearSecretVolumes()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
ServiceConfig.Builder

clearSecurityLevel()

publicServiceConfig.BuilderclearSecurityLevel()

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

.google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearService()

publicServiceConfig.BuilderclearService()

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

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

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearServiceAccountEmail()

publicServiceConfig.BuilderclearServiceAccountEmail()

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

string service_account_email = 10;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearTimeoutSeconds()

publicServiceConfig.BuilderclearTimeoutSeconds()

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

int32 timeout_seconds = 2;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearUri()

publicServiceConfig.BuilderclearUri()

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearVpcConnector()

publicServiceConfig.BuilderclearVpcConnector()

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clearVpcConnectorEgressSettings()

publicServiceConfig.BuilderclearVpcConnectorEgressSettings()

The egress settings for the connector, controlling what traffic is diverted through it.

.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

clone()

publicServiceConfig.Builderclone()
Returns
TypeDescription
ServiceConfig.Builder
Overrides

containsEnvironmentVariables(String key)

publicbooleancontainsEnvironmentVariables(Stringkey)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAllTrafficOnLatestRevision()

publicbooleangetAllTrafficOnLatestRevision()

Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.

bool all_traffic_on_latest_revision = 16;

Returns
TypeDescription
boolean

The allTrafficOnLatestRevision.

getAvailableCpu()

publicStringgetAvailableCpu()

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

string available_cpu = 22;

Returns
TypeDescription
String

The availableCpu.

getAvailableCpuBytes()

publicByteStringgetAvailableCpuBytes()

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

string available_cpu = 22;

Returns
TypeDescription
ByteString

The bytes for availableCpu.

getAvailableMemory()

publicStringgetAvailableMemory()

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.

string available_memory = 13;

Returns
TypeDescription
String

The availableMemory.

getAvailableMemoryBytes()

publicByteStringgetAvailableMemoryBytes()

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.

string available_memory = 13;

Returns
TypeDescription
ByteString

The bytes for availableMemory.

getBinaryAuthorizationPolicy()

publicStringgetBinaryAuthorizationPolicy()

Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
String

The binaryAuthorizationPolicy.

getBinaryAuthorizationPolicyBytes()

publicByteStringgetBinaryAuthorizationPolicyBytes()

Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The bytes for binaryAuthorizationPolicy.

getDefaultInstanceForType()

publicServiceConfiggetDefaultInstanceForType()
Returns
TypeDescription
ServiceConfig

getDescriptorForType()

publicDescriptors.DescriptorgetDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEnvironmentVariables() (deprecated)

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

getEnvironmentVariablesCount()

publicintgetEnvironmentVariablesCount()

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Returns
TypeDescription
int

getEnvironmentVariablesMap()

publicMap<String,String>getEnvironmentVariablesMap()

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Returns
TypeDescription
Map<String,String>

getEnvironmentVariablesOrDefault(String key, String defaultValue)

publicStringgetEnvironmentVariablesOrDefault(Stringkey,StringdefaultValue)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getEnvironmentVariablesOrThrow(String key)

publicStringgetEnvironmentVariablesOrThrow(Stringkey)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getIngressSettings()

publicServiceConfig.IngressSettingsgetIngressSettings()

The ingress settings for the function, controlling what traffic can reach it.

.google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8;

Returns
TypeDescription
ServiceConfig.IngressSettings

The ingressSettings.

getIngressSettingsValue()

publicintgetIngressSettingsValue()

The ingress settings for the function, controlling what traffic can reach it.

.google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8;

Returns
TypeDescription
int

The enum numeric value on the wire for ingressSettings.

getMaxInstanceCount()

publicintgetMaxInstanceCount()

The limit on the maximum number of function instances that may coexist at a given time.

In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate.

See the Max Instances Guide for more details.

int32 max_instance_count = 5;

Returns
TypeDescription
int

The maxInstanceCount.

getMaxInstanceRequestConcurrency()

publicintgetMaxInstanceRequestConcurrency()

Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.

int32 max_instance_request_concurrency = 20;

Returns
TypeDescription
int

The maxInstanceRequestConcurrency.

getMinInstanceCount()

publicintgetMinInstanceCount()

The limit on the minimum number of function instances that may coexist at a given time.

Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.

int32 min_instance_count = 12;

Returns
TypeDescription
int

The minInstanceCount.

getMutableEnvironmentVariables() (deprecated)

publicMap<String,String>getMutableEnvironmentVariables()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getRevision()

publicStringgetRevision()

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The revision.

getRevisionBytes()

publicByteStringgetRevisionBytes()

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for revision.

getSecretEnvironmentVariables(int index)

publicSecretEnvVargetSecretEnvironmentVariables(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretEnvVar

getSecretEnvironmentVariablesBuilder(int index)

publicSecretEnvVar.BuildergetSecretEnvironmentVariablesBuilder(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretEnvVar.Builder

getSecretEnvironmentVariablesBuilderList()

publicList<SecretEnvVar.Builder>getSecretEnvironmentVariablesBuilderList()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
List<Builder>

getSecretEnvironmentVariablesCount()

publicintgetSecretEnvironmentVariablesCount()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
int

getSecretEnvironmentVariablesList()

publicList<SecretEnvVar>getSecretEnvironmentVariablesList()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
List<SecretEnvVar>

getSecretEnvironmentVariablesOrBuilder(int index)

publicSecretEnvVarOrBuildergetSecretEnvironmentVariablesOrBuilder(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretEnvVarOrBuilder

getSecretEnvironmentVariablesOrBuilderList()

publicList<?extendsSecretEnvVarOrBuilder>getSecretEnvironmentVariablesOrBuilderList()

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Returns
TypeDescription
List<? extends com.google.cloud.functions.v2.SecretEnvVarOrBuilder>

getSecretVolumes(int index)

publicSecretVolumegetSecretVolumes(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume

getSecretVolumesBuilder(int index)

publicSecretVolume.BuildergetSecretVolumesBuilder(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolume.Builder

getSecretVolumesBuilderList()

publicList<SecretVolume.Builder>getSecretVolumesBuilderList()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
List<Builder>

getSecretVolumesCount()

publicintgetSecretVolumesCount()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
int

getSecretVolumesList()

publicList<SecretVolume>getSecretVolumesList()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
List<SecretVolume>

getSecretVolumesOrBuilder(int index)

publicSecretVolumeOrBuildergetSecretVolumesOrBuilder(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
indexint
Returns
TypeDescription
SecretVolumeOrBuilder

getSecretVolumesOrBuilderList()

publicList<?extendsSecretVolumeOrBuilder>getSecretVolumesOrBuilderList()

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Returns
TypeDescription
List<? extends com.google.cloud.functions.v2.SecretVolumeOrBuilder>

getSecurityLevel()

publicServiceConfig.SecurityLevelgetSecurityLevel()

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

.google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21;

Returns
TypeDescription
ServiceConfig.SecurityLevel

The securityLevel.

getSecurityLevelValue()

publicintgetSecurityLevelValue()

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

.google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21;

Returns
TypeDescription
int

The enum numeric value on the wire for securityLevel.

getService()

publicStringgetService()

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

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

Returns
TypeDescription
String

The service.

getServiceAccountEmail()

publicStringgetServiceAccountEmail()

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

string service_account_email = 10;

Returns
TypeDescription
String

The serviceAccountEmail.

getServiceAccountEmailBytes()

publicByteStringgetServiceAccountEmailBytes()

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

string service_account_email = 10;

Returns
TypeDescription
ByteString

The bytes for serviceAccountEmail.

getServiceBytes()

publicByteStringgetServiceBytes()

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

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

Returns
TypeDescription
ByteString

The bytes for service.

getTimeoutSeconds()

publicintgetTimeoutSeconds()

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

int32 timeout_seconds = 2;

Returns
TypeDescription
int

The timeoutSeconds.

getUri()

publicStringgetUri()

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The uri.

getUriBytes()

publicByteStringgetUriBytes()

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for uri.

getVpcConnector()

publicStringgetVpcConnector()

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The vpcConnector.

getVpcConnectorBytes()

publicByteStringgetVpcConnectorBytes()

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for vpcConnector.

getVpcConnectorEgressSettings()

publicServiceConfig.VpcConnectorEgressSettingsgetVpcConnectorEgressSettings()

The egress settings for the connector, controlling what traffic is diverted through it.

.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Returns
TypeDescription
ServiceConfig.VpcConnectorEgressSettings

The vpcConnectorEgressSettings.

getVpcConnectorEgressSettingsValue()

publicintgetVpcConnectorEgressSettingsValue()

The egress settings for the connector, controlling what traffic is diverted through it.

.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Returns
TypeDescription
int

The enum numeric value on the wire for vpcConnectorEgressSettings.

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.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ServiceConfig other)

publicServiceConfig.BuildermergeFrom(ServiceConfigother)
Parameter
NameDescription
otherServiceConfig
Returns
TypeDescription
ServiceConfig.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicServiceConfig.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ServiceConfig.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

publicServiceConfig.BuildermergeFrom(Messageother)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ServiceConfig.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

publicfinalServiceConfig.BuildermergeUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceConfig.Builder
Overrides

putAllEnvironmentVariables(Map<String,String> values)

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

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
ServiceConfig.Builder

putEnvironmentVariables(String key, String value)

publicServiceConfig.BuilderputEnvironmentVariables(Stringkey,Stringvalue)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
ServiceConfig.Builder

removeEnvironmentVariables(String key)

publicServiceConfig.BuilderremoveEnvironmentVariables(Stringkey)

Environment variables that shall be available during function execution.

map<string, string> environment_variables = 4;

Parameter
NameDescription
keyString
Returns
TypeDescription
ServiceConfig.Builder

removeSecretEnvironmentVariables(int index)

publicServiceConfig.BuilderremoveSecretEnvironmentVariables(intindex)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceConfig.Builder

removeSecretVolumes(int index)

publicServiceConfig.BuilderremoveSecretVolumes(intindex)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameter
NameDescription
indexint
Returns
TypeDescription
ServiceConfig.Builder

setAllTrafficOnLatestRevision(boolean value)

publicServiceConfig.BuildersetAllTrafficOnLatestRevision(booleanvalue)

Whether 100% of traffic is routed to the latest revision. On CreateFunction and UpdateFunction, when set to true, the revision being deployed will serve 100% of traffic, ignoring any traffic split settings, if any. On GetFunction, true will be returned if the latest revision is serving 100% of traffic.

bool all_traffic_on_latest_revision = 16;

Parameter
NameDescription
valueboolean

The allTrafficOnLatestRevision to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setAvailableCpu(String value)

publicServiceConfig.BuildersetAvailableCpu(Stringvalue)

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

string available_cpu = 22;

Parameter
NameDescription
valueString

The availableCpu to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setAvailableCpuBytes(ByteString value)

publicServiceConfig.BuildersetAvailableCpuBytes(ByteStringvalue)

The number of CPUs used in a single container instance. Default value is calculated from available memory. Supports the same values as Cloud Run, see https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements Example: "1" indicates 1 vCPU

string available_cpu = 22;

Parameter
NameDescription
valueByteString

The bytes for availableCpu to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setAvailableMemory(String value)

publicServiceConfig.BuildersetAvailableMemory(Stringvalue)

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.

string available_memory = 13;

Parameter
NameDescription
valueString

The availableMemory to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setAvailableMemoryBytes(ByteString value)

publicServiceConfig.BuildersetAvailableMemoryBytes(ByteStringvalue)

The amount of memory available for a function. Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is supplied the value is interpreted as bytes. See https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go a full description.

string available_memory = 13;

Parameter
NameDescription
valueByteString

The bytes for availableMemory to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setBinaryAuthorizationPolicy(String value)

publicServiceConfig.BuildersetBinaryAuthorizationPolicy(Stringvalue)

Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueString

The binaryAuthorizationPolicy to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setBinaryAuthorizationPolicyBytes(ByteString value)

publicServiceConfig.BuildersetBinaryAuthorizationPolicyBytes(ByteStringvalue)

Optional. The binary authorization policy to be checked when deploying the Cloud Run service.

string binary_authorization_policy = 23 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueByteString

The bytes for binaryAuthorizationPolicy to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

publicServiceConfig.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ServiceConfig.Builder
Overrides

setIngressSettings(ServiceConfig.IngressSettings value)

publicServiceConfig.BuildersetIngressSettings(ServiceConfig.IngressSettingsvalue)

The ingress settings for the function, controlling what traffic can reach it.

.google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8;

Parameter
NameDescription
valueServiceConfig.IngressSettings

The ingressSettings to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setIngressSettingsValue(int value)

publicServiceConfig.BuildersetIngressSettingsValue(intvalue)

The ingress settings for the function, controlling what traffic can reach it.

.google.cloud.functions.v2.ServiceConfig.IngressSettings ingress_settings = 8;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setMaxInstanceCount(int value)

publicServiceConfig.BuildersetMaxInstanceCount(intvalue)

The limit on the maximum number of function instances that may coexist at a given time.

In some cases, such as rapid traffic surges, Cloud Functions may, for a short period of time, create more instances than the specified max instances limit. If your function cannot tolerate this temporary behavior, you may want to factor in a safety margin and set a lower max instances value than your function can tolerate.

See the Max Instances Guide for more details.

int32 max_instance_count = 5;

Parameter
NameDescription
valueint

The maxInstanceCount to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setMaxInstanceRequestConcurrency(int value)

publicServiceConfig.BuildersetMaxInstanceRequestConcurrency(intvalue)

Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.

int32 max_instance_request_concurrency = 20;

Parameter
NameDescription
valueint

The maxInstanceRequestConcurrency to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setMinInstanceCount(int value)

publicServiceConfig.BuildersetMinInstanceCount(intvalue)

The limit on the minimum number of function instances that may coexist at a given time.

Function instances are kept in idle state for a short period after they finished executing the request to reduce cold start time for subsequent requests. Setting a minimum instance count will ensure that the given number of instances are kept running in idle state always. This can help with cold start times when jump in incoming request count occurs after the idle instance would have been stopped in the default case.

int32 min_instance_count = 12;

Parameter
NameDescription
valueint

The minInstanceCount to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

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

publicServiceConfig.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ServiceConfig.Builder
Overrides

setRevision(String value)

publicServiceConfig.BuildersetRevision(Stringvalue)

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The revision to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setRevisionBytes(ByteString value)

publicServiceConfig.BuildersetRevisionBytes(ByteStringvalue)

Output only. The name of service revision.

string revision = 18 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for revision to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setSecretEnvironmentVariables(int index, SecretEnvVar value)

publicServiceConfig.BuildersetSecretEnvironmentVariables(intindex,SecretEnvVarvalue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameters
NameDescription
indexint
valueSecretEnvVar
Returns
TypeDescription
ServiceConfig.Builder

setSecretEnvironmentVariables(int index, SecretEnvVar.Builder builderForValue)

publicServiceConfig.BuildersetSecretEnvironmentVariables(intindex,SecretEnvVar.BuilderbuilderForValue)

Secret environment variables configuration.

repeated .google.cloud.functions.v2.SecretEnvVar secret_environment_variables = 17;

Parameters
NameDescription
indexint
builderForValueSecretEnvVar.Builder
Returns
TypeDescription
ServiceConfig.Builder

setSecretVolumes(int index, SecretVolume value)

publicServiceConfig.BuildersetSecretVolumes(intindex,SecretVolumevalue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameters
NameDescription
indexint
valueSecretVolume
Returns
TypeDescription
ServiceConfig.Builder

setSecretVolumes(int index, SecretVolume.Builder builderForValue)

publicServiceConfig.BuildersetSecretVolumes(intindex,SecretVolume.BuilderbuilderForValue)

Secret volumes configuration.

repeated .google.cloud.functions.v2.SecretVolume secret_volumes = 19;

Parameters
NameDescription
indexint
builderForValueSecretVolume.Builder
Returns
TypeDescription
ServiceConfig.Builder

setSecurityLevel(ServiceConfig.SecurityLevel value)

publicServiceConfig.BuildersetSecurityLevel(ServiceConfig.SecurityLevelvalue)

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

.google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21;

Parameter
NameDescription
valueServiceConfig.SecurityLevel

The securityLevel to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setSecurityLevelValue(int value)

publicServiceConfig.BuildersetSecurityLevelValue(intvalue)

Security level configure whether the function only accepts https. This configuration is only applicable to 1st Gen functions with Http trigger. By default https is optional for 1st Gen functions; 2nd Gen functions are https ONLY.

.google.cloud.functions.v2.ServiceConfig.SecurityLevel security_level = 21;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setService(String value)

publicServiceConfig.BuildersetService(Stringvalue)

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

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

Parameter
NameDescription
valueString

The service to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setServiceAccountEmail(String value)

publicServiceConfig.BuildersetServiceAccountEmail(Stringvalue)

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

string service_account_email = 10;

Parameter
NameDescription
valueString

The serviceAccountEmail to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setServiceAccountEmailBytes(ByteString value)

publicServiceConfig.BuildersetServiceAccountEmailBytes(ByteStringvalue)

The email of the service's service account. If empty, defaults to {project_number}-compute@developer.gserviceaccount.com.

string service_account_email = 10;

Parameter
NameDescription
valueByteString

The bytes for serviceAccountEmail to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setServiceBytes(ByteString value)

publicServiceConfig.BuildersetServiceBytes(ByteStringvalue)

Output only. Name of the service associated with a Function. The format of this field is projects/{project}/locations/{region}/services/{service}

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

Parameter
NameDescription
valueByteString

The bytes for service to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setTimeoutSeconds(int value)

publicServiceConfig.BuildersetTimeoutSeconds(intvalue)

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

int32 timeout_seconds = 2;

Parameter
NameDescription
valueint

The timeoutSeconds to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

publicfinalServiceConfig.BuildersetUnknownFields(UnknownFieldSetunknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
ServiceConfig.Builder
Overrides

setUri(String value)

publicServiceConfig.BuildersetUri(Stringvalue)

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The uri to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setUriBytes(ByteString value)

publicServiceConfig.BuildersetUriBytes(ByteStringvalue)

Output only. URI of the Service deployed.

string uri = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for uri to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setVpcConnector(String value)

publicServiceConfig.BuildersetVpcConnector(Stringvalue)

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The vpcConnector to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setVpcConnectorBytes(ByteString value)

publicServiceConfig.BuildersetVpcConnectorBytes(ByteStringvalue)

The Serverless VPC Access connector that this cloud function can connect to. The format of this field is projects/*/locations/*/connectors/*.

string vpc_connector = 6 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for vpcConnector to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setVpcConnectorEgressSettings(ServiceConfig.VpcConnectorEgressSettings value)

publicServiceConfig.BuildersetVpcConnectorEgressSettings(ServiceConfig.VpcConnectorEgressSettingsvalue)

The egress settings for the connector, controlling what traffic is diverted through it.

.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Parameter
NameDescription
valueServiceConfig.VpcConnectorEgressSettings

The vpcConnectorEgressSettings to set.

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.

setVpcConnectorEgressSettingsValue(int value)

publicServiceConfig.BuildersetVpcConnectorEgressSettingsValue(intvalue)

The egress settings for the connector, controlling what traffic is diverted through it.

.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings vpc_connector_egress_settings = 7;

Parameter
NameDescription
valueint

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

Returns
TypeDescription
ServiceConfig.Builder

This builder for chaining.