Class Function

  • All Implemented Interfaces:
    FunctionOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class Function
    extends com.google.protobuf.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.v2beta.Function
    See Also:
    Serialized Form
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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
      • containsLabels

        public boolean containsLabels​(String key)
         Labels associated with this Cloud Function.
         
        map<string, string> labels = 8;
        Specified by:
        containsLabels 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • 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​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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