Class Function (2.4.3)

public final class Function extends GeneratedMessageV3 implements FunctionOrBuilder

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.v2alpha.Function

Implements

FunctionOrBuilder

Static Fields

BUILD_CONFIG_FIELD_NUMBER

public static final int BUILD_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

DESCRIPTION_FIELD_NUMBER

public static final int DESCRIPTION_FIELD_NUMBER
Field Value
TypeDescription
int

ENVIRONMENT_FIELD_NUMBER

public static final int ENVIRONMENT_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_TRIGGER_FIELD_NUMBER

public static final int EVENT_TRIGGER_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_CONFIG_FIELD_NUMBER

public static final int SERVICE_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_FIELD_NUMBER

public static final int STATE_FIELD_NUMBER
Field Value
TypeDescription
int

STATE_MESSAGES_FIELD_NUMBER

public static final int STATE_MESSAGES_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Function getDefaultInstance()
Returns
TypeDescription
Function

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Function.Builder newBuilder()
Returns
TypeDescription
Function.Builder

newBuilder(Function prototype)

public static Function.Builder newBuilder(Function prototype)
Parameter
NameDescription
prototypeFunction
Returns
TypeDescription
Function.Builder

parseDelimitedFrom(InputStream input)

public static Function parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Function parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Function parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Function parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Function parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Function parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Function parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Function parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Function parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Function parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Function parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Function parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Function
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Function> parser()
Returns
TypeDescription
Parser<Function>

Methods

containsLabels(String key)

public boolean containsLabels(String key)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getBuildConfig()

public BuildConfig getBuildConfig()

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

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

Returns
TypeDescription
BuildConfig

The buildConfig.

getBuildConfigOrBuilder()

public BuildConfigOrBuilder getBuildConfigOrBuilder()

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

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

Returns
TypeDescription
BuildConfigOrBuilder

getDefaultInstanceForType()

public Function getDefaultInstanceForType()
Returns
TypeDescription
Function

getDescription()

public String getDescription()

User-provided description of a function.

string description = 2;

Returns
TypeDescription
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

User-provided description of a function.

string description = 2;

Returns
TypeDescription
ByteString

The bytes for description.

getEnvironment()

public Environment getEnvironment()

Describe whether the function is gen1 or gen2.

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

Returns
TypeDescription
Environment

The environment.

getEnvironmentValue()

public int getEnvironmentValue()

Describe whether the function is gen1 or gen2.

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

Returns
TypeDescription
int

The enum numeric value on the wire for environment.

getEventTrigger()

public EventTrigger getEventTrigger()

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

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

Returns
TypeDescription
EventTrigger

The eventTrigger.

getEventTriggerOrBuilder()

public EventTriggerOrBuilder getEventTriggerOrBuilder()

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

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

Returns
TypeDescription
EventTriggerOrBuilder

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

public String getLabelsOrDefault(String key, String defaultValue)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Labels associated with this Cloud Function.

map<string, string> labels = 8;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getName()

public String getName()

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()

public ByteString getNameBytes()

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()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getServiceConfig()

public ServiceConfig getServiceConfig()

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

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

Returns
TypeDescription
ServiceConfig

The serviceConfig.

getServiceConfigOrBuilder()

public ServiceConfigOrBuilder getServiceConfigOrBuilder()

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

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

Returns
TypeDescription
ServiceConfigOrBuilder

getState()

public Function.State getState()

Output only. State of the function.

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

Returns
TypeDescription
Function.State

The state.

getStateMessages(int index)

public StateMessage getStateMessages(int index)

Output only. State Messages for this Cloud Function.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
StateMessage

getStateMessagesCount()

public int getStateMessagesCount()

Output only. State Messages for this Cloud Function.

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

Returns
TypeDescription
int

getStateMessagesList()

public List<StateMessage> getStateMessagesList()

Output only. State Messages for this Cloud Function.

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

Returns
TypeDescription
List<StateMessage>

getStateMessagesOrBuilder(int index)

public StateMessageOrBuilder getStateMessagesOrBuilder(int index)

Output only. State Messages for this Cloud Function.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
StateMessageOrBuilder

getStateMessagesOrBuilderList()

public List<? extends StateMessageOrBuilder> getStateMessagesOrBuilderList()

Output only. State Messages for this Cloud Function.

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

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

getStateValue()

public int getStateValue()

Output only. State of the function.

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

Returns
TypeDescription
int

The enum numeric value on the wire for state.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

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()

public TimestampOrBuilder getUpdateTimeOrBuilder()

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

hasBuildConfig()

public boolean hasBuildConfig()

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

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

Returns
TypeDescription
boolean

Whether the buildConfig field is set.

hasEventTrigger()

public boolean hasEventTrigger()

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

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

Returns
TypeDescription
boolean

Whether the eventTrigger field is set.

hasServiceConfig()

public boolean hasServiceConfig()

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

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

Returns
TypeDescription
boolean

Whether the serviceConfig field is set.

hasUpdateTime()

public boolean hasUpdateTime()

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()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Function.Builder newBuilderForType()
Returns
TypeDescription
Function.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Function.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Function.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Function.Builder toBuilder()
Returns
TypeDescription
Function.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException