Class EventTrigger

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

    public final class EventTrigger
    extends com.google.protobuf.GeneratedMessageV3
    implements EventTriggerOrBuilder
     Describes EventTrigger, used to request that events be sent from another
     service.
     
    Protobuf type google.cloud.functions.v1.EventTrigger
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  EventTrigger.Builder
      Describes EventTrigger, used to request that events be sent from another service.
      • Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3

        com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,​BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,​BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
      • Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

        com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EVENT_TYPE_FIELD_NUMBER  
      static int FAILURE_POLICY_FIELD_NUMBER  
      static int RESOURCE_FIELD_NUMBER  
      static int SERVICE_FIELD_NUMBER  
      • Fields inherited from class com.google.protobuf.GeneratedMessageV3

        alwaysUseFieldBuilders, unknownFields
      • Fields inherited from class com.google.protobuf.AbstractMessage

        memoizedSize
      • Fields inherited from class com.google.protobuf.AbstractMessageLite

        memoizedHashCode
    • 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()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • getEventType

        public String getEventType()
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Specified by:
        getEventType in interface EventTriggerOrBuilder
        Returns:
        The eventType.
      • getEventTypeBytes

        public com.google.protobuf.ByteString getEventTypeBytes()
         Required. The type of event to observe. For example:
         `providers/cloud.storage/eventTypes/object.change` and
         `providers/cloud.pubsub/eventTypes/topic.publish`.
        
         Event types match pattern `providers/*/eventTypes/*.*`.
         The pattern contains:
        
         1. namespace: For example, `cloud.storage` and
            `google.firebase.analytics`.
         2. resource type: The type of resource on which event occurs. For
            example, the Google Cloud Storage API includes the type `object`.
         3. action: The action that generates the event. For example, action for
            a Google Cloud Storage Object is 'change'.
         These parts are lowercase.
         
        string event_type = 1;
        Specified by:
        getEventTypeBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for eventType.
      • getResource

        public String getResource()
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Specified by:
        getResource in interface EventTriggerOrBuilder
        Returns:
        The resource.
      • getResourceBytes

        public com.google.protobuf.ByteString getResourceBytes()
         Required. The resource(s) from which to observe events, for example,
         `projects/_/buckets/myBucket`.
        
         Not all syntactically correct values are accepted by all services. For
         example:
        
         1. The authorization model must support it. Google Cloud Functions
            only allows EventTriggers to be deployed that observe resources in the
            same project as the `CloudFunction`.
         2. The resource type must match the pattern expected for an
            `event_type`. For example, an `EventTrigger` that has an
            `event_type` of "google.pubsub.topic.publish" should have a resource
            that matches Google Cloud Pub/Sub topics.
        
         Additionally, some services may support short names when creating an
         `EventTrigger`. These are always returned in the normalized "long"
         format.
        
         See each *service's* documentation for supported formats.
         
        string resource = 2;
        Specified by:
        getResourceBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for resource.
      • getService

        public String getService()
         The hostname of the service that should be observed.
        
         If no string is provided, the default service implementing the API will
         be used. For example, `storage.googleapis.com` is the default for all
         event types in the `google.storage` namespace.
         
        string service = 3;
        Specified by:
        getService in interface EventTriggerOrBuilder
        Returns:
        The service.
      • getServiceBytes

        public com.google.protobuf.ByteString getServiceBytes()
         The hostname of the service that should be observed.
        
         If no string is provided, the default service implementing the API will
         be used. For example, `storage.googleapis.com` is the default for all
         event types in the `google.storage` namespace.
         
        string service = 3;
        Specified by:
        getServiceBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for service.
      • hasFailurePolicy

        public boolean hasFailurePolicy()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
        Specified by:
        hasFailurePolicy in interface EventTriggerOrBuilder
        Returns:
        Whether the failurePolicy field is set.
      • getFailurePolicy

        public FailurePolicy getFailurePolicy()
         Specifies policy for failed executions.
         
        .google.cloud.functions.v1.FailurePolicy failure_policy = 5;
        Specified by:
        getFailurePolicy in interface EventTriggerOrBuilder
        Returns:
        The failurePolicy.
      • 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 EventTrigger parseFrom​(ByteBuffer data)
                                      throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

        protected EventTrigger.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstance

        public static EventTrigger getDefaultInstance()
      • parser

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

        public com.google.protobuf.Parser<EventTrigger> 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 EventTrigger getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder