Class Function

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.functions.v2beta.Function
All Implemented Interfaces:
FunctionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class Function extends com.google.protobuf.GeneratedMessage 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.v2beta.Function
See Also:
  • Field Details

    • NAME_FIELD_NUMBER

      public static final int NAME_FIELD_NUMBER
      See Also:
    • DESCRIPTION_FIELD_NUMBER

      public static final int DESCRIPTION_FIELD_NUMBER
      See Also:
    • BUILD_CONFIG_FIELD_NUMBER

      public static final int BUILD_CONFIG_FIELD_NUMBER
      See Also:
    • SERVICE_CONFIG_FIELD_NUMBER

      public static final int SERVICE_CONFIG_FIELD_NUMBER
      See Also:
    • EVENT_TRIGGER_FIELD_NUMBER

      public static final int EVENT_TRIGGER_FIELD_NUMBER
      See Also:
    • STATE_FIELD_NUMBER

      public static final int STATE_FIELD_NUMBER
      See Also:
    • UPDATE_TIME_FIELD_NUMBER

      public static final int UPDATE_TIME_FIELD_NUMBER
      See Also:
    • LABELS_FIELD_NUMBER

      public static final int LABELS_FIELD_NUMBER
      See Also:
    • STATE_MESSAGES_FIELD_NUMBER

      public static final int STATE_MESSAGES_FIELD_NUMBER
      See Also:
    • ENVIRONMENT_FIELD_NUMBER

      public static final int ENVIRONMENT_FIELD_NUMBER
      See Also:
    • URL_FIELD_NUMBER

      public static final int URL_FIELD_NUMBER
      See Also:
    • KMS_KEY_NAME_FIELD_NUMBER

      public static final int KMS_KEY_NAME_FIELD_NUMBER
      See Also:
    • SATISFIES_PZS_FIELD_NUMBER

      public static final int SATISFIES_PZS_FIELD_NUMBER
      See Also:
    • CREATE_TIME_FIELD_NUMBER

      public static final int CREATE_TIME_FIELD_NUMBER
      See Also:
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • 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;
      Specified by:
      getName in interface FunctionOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       A user-defined name of the function. Function names must be unique
       globally and match pattern `projects/*/locations/*/functions/*`
       
      string name = 1;
      Specified by:
      getNameBytes in interface FunctionOrBuilder
      Returns:
      The bytes for name.
    • getDescription

      public String getDescription()
       User-provided description of a function.
       
      string description = 2;
      Specified by:
      getDescription in interface FunctionOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       User-provided description of a function.
       
      string description = 2;
      Specified by:
      getDescriptionBytes in interface FunctionOrBuilder
      Returns:
      The bytes for description.
    • hasBuildConfig

      public boolean hasBuildConfig()
       Describes the Build step of the function that builds a container from the
       given source.
       
      .google.cloud.functions.v2beta.BuildConfig build_config = 3;
      Specified by:
      hasBuildConfig in interface FunctionOrBuilder
      Returns:
      Whether the buildConfig field is set.
    • getBuildConfig

      public BuildConfig getBuildConfig()
       Describes the Build step of the function that builds a container from the
       given source.
       
      .google.cloud.functions.v2beta.BuildConfig build_config = 3;
      Specified by:
      getBuildConfig in interface FunctionOrBuilder
      Returns:
      The buildConfig.
    • getBuildConfigOrBuilder

      public BuildConfigOrBuilder getBuildConfigOrBuilder()
       Describes the Build step of the function that builds a container from the
       given source.
       
      .google.cloud.functions.v2beta.BuildConfig build_config = 3;
      Specified by:
      getBuildConfigOrBuilder in interface FunctionOrBuilder
    • hasServiceConfig

      public boolean hasServiceConfig()
       Describes the Service being deployed. Currently deploys services to Cloud
       Run (fully managed).
       
      .google.cloud.functions.v2beta.ServiceConfig service_config = 4;
      Specified by:
      hasServiceConfig in interface FunctionOrBuilder
      Returns:
      Whether the serviceConfig field is set.
    • getServiceConfig

      public ServiceConfig getServiceConfig()
       Describes the Service being deployed. Currently deploys services to Cloud
       Run (fully managed).
       
      .google.cloud.functions.v2beta.ServiceConfig service_config = 4;
      Specified by:
      getServiceConfig in interface FunctionOrBuilder
      Returns:
      The serviceConfig.
    • getServiceConfigOrBuilder

      public ServiceConfigOrBuilder getServiceConfigOrBuilder()
       Describes the Service being deployed. Currently deploys services to Cloud
       Run (fully managed).
       
      .google.cloud.functions.v2beta.ServiceConfig service_config = 4;
      Specified by:
      getServiceConfigOrBuilder in interface FunctionOrBuilder
    • 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.v2beta.EventTrigger event_trigger = 5;
      Specified by:
      hasEventTrigger in interface FunctionOrBuilder
      Returns:
      Whether the eventTrigger field is set.
    • 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.v2beta.EventTrigger event_trigger = 5;
      Specified by:
      getEventTrigger in interface FunctionOrBuilder
      Returns:
      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.v2beta.EventTrigger event_trigger = 5;
      Specified by:
      getEventTriggerOrBuilder in interface FunctionOrBuilder
    • getStateValue

      public int getStateValue()
       Output only. State of the function.
       
      .google.cloud.functions.v2beta.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface FunctionOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • getState

      public Function.State getState()
       Output only. State of the function.
       
      .google.cloud.functions.v2beta.Function.State state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface FunctionOrBuilder
      Returns:
      The state.
    • 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];
      Specified by:
      hasUpdateTime in interface FunctionOrBuilder
      Returns:
      Whether the updateTime field is set.
    • getUpdateTime

      public com.google.protobuf.Timestamp getUpdateTime()
       Output only. The last update timestamp of a Cloud Function.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTime in interface FunctionOrBuilder
      Returns:
      The updateTime.
    • getUpdateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
       Output only. The last update timestamp of a Cloud Function.
       
      .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUpdateTimeOrBuilder in interface FunctionOrBuilder
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: FunctionOrBuilder
       Labels associated with this Cloud Function.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsCount in interface FunctionOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Labels associated with this Cloud Function.
       
      map<string, string> labels = 8;
      Specified by:
      containsLabels in interface FunctionOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface FunctionOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Labels associated with this Cloud Function.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsMap in interface FunctionOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Labels associated with this Cloud Function.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrDefault in interface FunctionOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Labels associated with this Cloud Function.
       
      map<string, string> labels = 8;
      Specified by:
      getLabelsOrThrow in interface FunctionOrBuilder
    • getStateMessagesList

      public List<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];
      Specified by:
      getStateMessagesList in interface FunctionOrBuilder
    • getStateMessagesOrBuilderList

      public List<? extends StateMessageOrBuilder> getStateMessagesOrBuilderList()
       Output only. State Messages for this Cloud Function.
       
      repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateMessagesOrBuilderList in interface FunctionOrBuilder
    • getStateMessagesCount

      public int getStateMessagesCount()
       Output only. State Messages for this Cloud Function.
       
      repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateMessagesCount in interface FunctionOrBuilder
    • getStateMessages

      public StateMessage getStateMessages(int index)
       Output only. State Messages for this Cloud Function.
       
      repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateMessages in interface FunctionOrBuilder
    • getStateMessagesOrBuilder

      public StateMessageOrBuilder getStateMessagesOrBuilder(int index)
       Output only. State Messages for this Cloud Function.
       
      repeated .google.cloud.functions.v2beta.StateMessage state_messages = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateMessagesOrBuilder in interface FunctionOrBuilder
    • getEnvironmentValue

      public int getEnvironmentValue()
       Describe whether the function is 1st Gen or 2nd Gen.
       
      .google.cloud.functions.v2beta.Environment environment = 10;
      Specified by:
      getEnvironmentValue in interface FunctionOrBuilder
      Returns:
      The enum numeric value on the wire for environment.
    • getEnvironment

      public Environment getEnvironment()
       Describe whether the function is 1st Gen or 2nd Gen.
       
      .google.cloud.functions.v2beta.Environment environment = 10;
      Specified by:
      getEnvironment in interface FunctionOrBuilder
      Returns:
      The environment.
    • getUrl

      public String getUrl()
       Output only. The deployed url for the function.
       
      string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUrl in interface FunctionOrBuilder
      Returns:
      The url.
    • getUrlBytes

      public com.google.protobuf.ByteString getUrlBytes()
       Output only. The deployed url for the function.
       
      string url = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getUrlBytes in interface FunctionOrBuilder
      Returns:
      The bytes for url.
    • getKmsKeyName

      public String getKmsKeyName()
       [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) = { ... }
      Specified by:
      getKmsKeyName in interface FunctionOrBuilder
      Returns:
      The kmsKeyName.
    • getKmsKeyNameBytes

      public com.google.protobuf.ByteString getKmsKeyNameBytes()
       [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) = { ... }
      Specified by:
      getKmsKeyNameBytes in interface FunctionOrBuilder
      Returns:
      The bytes for kmsKeyName.
    • getSatisfiesPzs

      public boolean getSatisfiesPzs()
       Output only. Reserved for future use.
       
      bool satisfies_pzs = 27 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSatisfiesPzs in interface FunctionOrBuilder
      Returns:
      The satisfiesPzs.
    • hasCreateTime

      public boolean hasCreateTime()
       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];
      Specified by:
      hasCreateTime in interface FunctionOrBuilder
      Returns:
      Whether the createTime field is set.
    • getCreateTime

      public com.google.protobuf.Timestamp getCreateTime()
       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];
      Specified by:
      getCreateTime in interface FunctionOrBuilder
      Returns:
      The createTime.
    • getCreateTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
       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];
      Specified by:
      getCreateTimeOrBuilder in interface FunctionOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Function parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Function parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Function parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Function parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Function parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Function parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Function parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Function.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Function.Builder newBuilder()
    • newBuilder

      public static Function.Builder newBuilder(Function prototype)
    • toBuilder

      public Function.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Function.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Function getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Function> parser()
    • getParserForType

      public com.google.protobuf.Parser<Function> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Function getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder