Class Function (2.62.0)

publicfinalclassFunctionextendsGeneratedMessageV3implementsFunctionOrBuilder

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.

Protobuf type google.cloud.functions.v2beta.Function

Static Fields

BUILD_CONFIG_FIELD_NUMBER

publicstaticfinalintBUILD_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

publicstaticfinalintCREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

publicstaticfinalintDESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ENVIRONMENT_FIELD_NUMBER

publicstaticfinalintENVIRONMENT_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_TRIGGER_FIELD_NUMBER

publicstaticfinalintEVENT_TRIGGER_FIELD_NUMBER
Field Value
TypeDescription
int

KMS_KEY_NAME_FIELD_NUMBER

publicstaticfinalintKMS_KEY_NAME_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

publicstaticfinalintLABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

publicstaticfinalintNAME_FIELD_NUMBER
Field Value
TypeDescription
int

SATISFIES_PZS_FIELD_NUMBER

publicstaticfinalintSATISFIES_PZS_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_CONFIG_FIELD_NUMBER

publicstaticfinalintSERVICE_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

publicstaticfinalintSTATE_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_MESSAGES_FIELD_NUMBER

publicstaticfinalintSTATE_MESSAGES_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

publicstaticfinalintUPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

URL_FIELD_NUMBER

publicstaticfinalintURL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

publicstaticFunctiongetDefaultInstance()
Returns
TypeDescription
Function

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

publicstaticFunction.BuildernewBuilder()
Returns
TypeDescription
Function.Builder

newBuilder(Function prototype)

publicstaticFunction.BuildernewBuilder(Functionprototype)
Parameter
NameDescription
prototypeFunction
Returns
TypeDescription
Function.Builder

parseDelimitedFrom(InputStream input)

publicstaticFunctionparseDelimitedFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticFunctionparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

publicstaticFunctionparseFrom(byte[]data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

publicstaticFunctionparseFrom(ByteStringdata)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticFunctionparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticFunctionparseFrom(CodedInputStreaminput)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticFunctionparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

publicstaticFunctionparseFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticFunctionparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

publicstaticFunctionparseFrom(ByteBufferdata)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticFunctionparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

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

Methods

containsLabels(String key)

publicbooleancontainsLabels(Stringkey)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBuildConfig()

publicBuildConfiggetBuildConfig()

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

.google.cloud.functions.v2beta.BuildConfig build_config = 3;

Returns
TypeDescription
BuildConfig

The buildConfig.

getBuildConfigOrBuilder()

publicBuildConfigOrBuildergetBuildConfigOrBuilder()

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

.google.cloud.functions.v2beta.BuildConfig build_config = 3;

Returns
TypeDescription
BuildConfigOrBuilder

getCreateTime()

publicTimestampgetCreateTime()

Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.

.google.protobuf.Timestamp create_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

publicTimestampOrBuildergetCreateTimeOrBuilder()

Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.

.google.protobuf.Timestamp create_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

publicFunctiongetDefaultInstanceForType()
Returns
TypeDescription
Function

getDescription()

publicStringgetDescription()

User-provided description of a function.

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

publicByteStringgetDescriptionBytes()

User-provided description of a function.

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getEnvironment()

publicEnvironmentgetEnvironment()

Describe whether the function is 1st Gen or 2nd Gen.

.google.cloud.functions.v2beta.Environment environment = 10;

Returns
TypeDescription
Environment

The environment.

getEnvironmentValue()

publicintgetEnvironmentValue()

Describe whether the function is 1st Gen or 2nd Gen.

.google.cloud.functions.v2beta.Environment environment = 10;

Returns
TypeDescription
int

The enum numeric value on the wire for environment.

getEventTrigger()

publicEventTriggergetEventTrigger()

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

.google.cloud.functions.v2beta.EventTrigger event_trigger = 5;

Returns
TypeDescription
EventTrigger

The eventTrigger.

getEventTriggerOrBuilder()

publicEventTriggerOrBuildergetEventTriggerOrBuilder()

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

.google.cloud.functions.v2beta.EventTrigger event_trigger = 5;

Returns
TypeDescription
EventTriggerOrBuilder

getKmsKeyName()

publicStringgetKmsKeyName()

[Preview] Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources.

It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 25 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The kmsKeyName.

getKmsKeyNameBytes()

publicByteStringgetKmsKeyNameBytes()

[Preview] Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources.

It must match the pattern projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}.

string kms_key_name = 25 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for kmsKeyName.

getLabels() (deprecated)

publicMap<String,String>getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

publicintgetLabelsCount()

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Returns
TypeDescription
int

getLabelsMap()

publicMap<String,String>getLabelsMap()

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

publicStringgetLabelsOrDefault(Stringkey,StringdefaultValue)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

publicStringgetLabelsOrThrow(Stringkey)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getName()

publicStringgetName()

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

string name = 1;

Returns
TypeDescription
String

The name.

getNameBytes()

publicByteStringgetNameBytes()

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

string name = 1;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

publicParser<Function>getParserForType()
Returns
TypeDescription
Parser<Function>
Overrides

getSatisfiesPzs()

publicbooleangetSatisfiesPzs()

Output only. Reserved for future use.

bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

The satisfiesPzs.

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
Overrides

getServiceConfig()

publicServiceConfiggetServiceConfig()

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

.google.cloud.functions.v2beta.ServiceConfig service_config = 4;

Returns
TypeDescription
ServiceConfig

The serviceConfig.

getServiceConfigOrBuilder()

publicServiceConfigOrBuildergetServiceConfigOrBuilder()

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

.google.cloud.functions.v2beta.ServiceConfig service_config = 4;

Returns
TypeDescription
ServiceConfigOrBuilder

getState()

publicFunction.StategetState()

Output only. State of the function.

.google.cloud.functions.v2beta.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Function.State

The state.

getStateMessages(int index)

publicStateMessagegetStateMessages(intindex)

Output only. State Messages for this Cloud Function.

repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
StateMessage

getStateMessagesCount()

publicintgetStateMessagesCount()

Output only. State Messages for this Cloud Function.

repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

getStateMessagesList()

publicList<StateMessage>getStateMessagesList()

Output only. State Messages for this Cloud Function.

repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<StateMessage>

getStateMessagesOrBuilder(int index)

publicStateMessageOrBuildergetStateMessagesOrBuilder(intindex)

Output only. State Messages for this Cloud Function.

repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
indexint
Returns
TypeDescription
StateMessageOrBuilder

getStateMessagesOrBuilderList()

publicList<?extendsStateMessageOrBuilder>getStateMessagesOrBuilderList()

Output only. State Messages for this Cloud Function.

repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
List<? extends com.google.cloud.functions.v2beta.StateMessageOrBuilder>

getStateValue()

publicintgetStateValue()

Output only. State of the function.

.google.cloud.functions.v2beta.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getUpdateTime()

publicTimestampgetUpdateTime()

Output only. The last update timestamp of a Cloud Function.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

publicTimestampOrBuildergetUpdateTimeOrBuilder()

Output only. The last update timestamp of a Cloud Function.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
TimestampOrBuilder

getUrl()

publicStringgetUrl()

Output only. The deployed url for the function.

string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The url.

getUrlBytes()

publicByteStringgetUrlBytes()

Output only. The deployed url for the function.

string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for url.

hasBuildConfig()

publicbooleanhasBuildConfig()

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

.google.cloud.functions.v2beta.BuildConfig build_config = 3;

Returns
TypeDescription
boolean

Whether the buildConfig field is set.

hasCreateTime()

publicbooleanhasCreateTime()

Output only. The create timestamp of a Cloud Function. This is only applicable to 2nd Gen functions.

.google.protobuf.Timestamp create_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasEventTrigger()

publicbooleanhasEventTrigger()

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

.google.cloud.functions.v2beta.EventTrigger event_trigger = 5;

Returns
TypeDescription
boolean

Whether the eventTrigger field is set.

hasServiceConfig()

publicbooleanhasServiceConfig()

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

.google.cloud.functions.v2beta.ServiceConfig service_config = 4;

Returns
TypeDescription
boolean

Whether the serviceConfig field is set.

hasUpdateTime()

publicbooleanhasUpdateTime()

Output only. The last update timestamp of a Cloud Function.

.google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
boolean

Whether the updateTime 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()

publicFunction.BuildernewBuilderForType()
Returns
TypeDescription
Function.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedFunction.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Function.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicFunction.BuildertoBuilder()
Returns
TypeDescription
Function.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException