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 events to be sent from another
     service.
     
    Protobuf type google.cloud.functions.v2beta.EventTrigger
    See Also:
    Serialized Form
    • Field Detail

      • TRIGGER_REGION_FIELD_NUMBER

        public static final int TRIGGER_REGION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EVENT_TYPE_FIELD_NUMBER

        public static final int EVENT_TYPE_FIELD_NUMBER
        See Also:
        Constant Field Values
      • EVENT_FILTERS_FIELD_NUMBER

        public static final int EVENT_FILTERS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • PUBSUB_TOPIC_FIELD_NUMBER

        public static final int PUBSUB_TOPIC_FIELD_NUMBER
        See Also:
        Constant Field Values
      • SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER

        public static final int SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER
        See Also:
        Constant Field Values
      • RETRY_POLICY_FIELD_NUMBER

        public static final int RETRY_POLICY_FIELD_NUMBER
        See Also:
        Constant Field Values
    • 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
      • getTrigger

        public String getTrigger()
         Output only. The resource name of the Eventarc trigger. The format of this
         field is `projects/{project}/locations/{region}/triggers/{trigger}`.
         
        string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getTrigger in interface EventTriggerOrBuilder
        Returns:
        The trigger.
      • getTriggerBytes

        public com.google.protobuf.ByteString getTriggerBytes()
         Output only. The resource name of the Eventarc trigger. The format of this
         field is `projects/{project}/locations/{region}/triggers/{trigger}`.
         
        string trigger = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... }
        Specified by:
        getTriggerBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for trigger.
      • getTriggerRegion

        public String getTriggerRegion()
         The region that the trigger will be in. The trigger will only receive
         events originating in this region. It can be the same
         region as the function, a different region or multi-region, or the global
         region. If not provided, defaults to the same region as the function.
         
        string trigger_region = 2;
        Specified by:
        getTriggerRegion in interface EventTriggerOrBuilder
        Returns:
        The triggerRegion.
      • getTriggerRegionBytes

        public com.google.protobuf.ByteString getTriggerRegionBytes()
         The region that the trigger will be in. The trigger will only receive
         events originating in this region. It can be the same
         region as the function, a different region or multi-region, or the global
         region. If not provided, defaults to the same region as the function.
         
        string trigger_region = 2;
        Specified by:
        getTriggerRegionBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for triggerRegion.
      • getEventType

        public String getEventType()
         Required. The type of event to observe. For example:
         `google.cloud.audit.log.v1.written` or
         `google.cloud.pubsub.topic.v1.messagePublished`.
         
        string event_type = 3 [(.google.api.field_behavior) = REQUIRED];
        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:
         `google.cloud.audit.log.v1.written` or
         `google.cloud.pubsub.topic.v1.messagePublished`.
         
        string event_type = 3 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventTypeBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for eventType.
      • getEventFiltersCount

        public int getEventFiltersCount()
         Criteria used to filter events.
         
        repeated .google.cloud.functions.v2beta.EventFilter event_filters = 4;
        Specified by:
        getEventFiltersCount in interface EventTriggerOrBuilder
      • getEventFilters

        public EventFilter getEventFilters​(int index)
         Criteria used to filter events.
         
        repeated .google.cloud.functions.v2beta.EventFilter event_filters = 4;
        Specified by:
        getEventFilters in interface EventTriggerOrBuilder
      • getPubsubTopic

        public String getPubsubTopic()
         Optional. The name of a Pub/Sub topic in the same project that will be used
         as the transport topic for the event delivery. Format:
         `projects/{project}/topics/{topic}`.
        
         This is only valid for events of type
         `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here
         will not be deleted at function deletion.
         
        string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getPubsubTopic in interface EventTriggerOrBuilder
        Returns:
        The pubsubTopic.
      • getPubsubTopicBytes

        public com.google.protobuf.ByteString getPubsubTopicBytes()
         Optional. The name of a Pub/Sub topic in the same project that will be used
         as the transport topic for the event delivery. Format:
         `projects/{project}/topics/{topic}`.
        
         This is only valid for events of type
         `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here
         will not be deleted at function deletion.
         
        string pubsub_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getPubsubTopicBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for pubsubTopic.
      • getServiceAccountEmail

        public String getServiceAccountEmail()
         Optional. The email of the trigger's service account. The service account
         must have permission to invoke Cloud Run services, the permission is
         `run.routes.invoke`.
         If empty, defaults to the Compute Engine default service account:
         `{project_number}-compute@developer.gserviceaccount.com`.
         
        string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getServiceAccountEmail in interface EventTriggerOrBuilder
        Returns:
        The serviceAccountEmail.
      • getServiceAccountEmailBytes

        public com.google.protobuf.ByteString getServiceAccountEmailBytes()
         Optional. The email of the trigger's service account. The service account
         must have permission to invoke Cloud Run services, the permission is
         `run.routes.invoke`.
         If empty, defaults to the Compute Engine default service account:
         `{project_number}-compute@developer.gserviceaccount.com`.
         
        string service_account_email = 6 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getServiceAccountEmailBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for serviceAccountEmail.
      • getRetryPolicyValue

        public int getRetryPolicyValue()
         Optional. If unset, then defaults to ignoring failures (i.e. not retrying
         them).
         
        .google.cloud.functions.v2beta.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRetryPolicyValue in interface EventTriggerOrBuilder
        Returns:
        The enum numeric value on the wire for retryPolicy.
      • getRetryPolicy

        public EventTrigger.RetryPolicy getRetryPolicy()
         Optional. If unset, then defaults to ignoring failures (i.e. not retrying
         them).
         
        .google.cloud.functions.v2beta.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getRetryPolicy in interface EventTriggerOrBuilder
        Returns:
        The retryPolicy.
      • getChannel

        public String getChannel()
         Optional. The name of the channel associated with the trigger in
         `projects/{project}/locations/{location}/channels/{channel}` format.
         You must provide a channel to receive events from Eventarc SaaS partners.
         
        string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getChannel in interface EventTriggerOrBuilder
        Returns:
        The channel.
      • getChannelBytes

        public com.google.protobuf.ByteString getChannelBytes()
         Optional. The name of the channel associated with the trigger in
         `projects/{project}/locations/{location}/channels/{channel}` format.
         You must provide a channel to receive events from Eventarc SaaS partners.
         
        string channel = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getChannelBytes in interface EventTriggerOrBuilder
        Returns:
        The bytes for channel.
      • 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