Class Trigger

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

    public final class Trigger
    extends com.google.protobuf.GeneratedMessageV3
    implements TriggerOrBuilder
     A representation of the trigger resource.
     
    Protobuf type google.cloud.eventarc.v1.Trigger
    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()
         Required. The resource name of the trigger. Must be unique within the location of the
         project and must be in
         `projects/{project}/locations/{location}/triggers/{trigger}` format.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getName in interface TriggerOrBuilder
        Returns:
        The name.
      • getNameBytes

        public com.google.protobuf.ByteString getNameBytes()
         Required. The resource name of the trigger. Must be unique within the location of the
         project and must be in
         `projects/{project}/locations/{location}/triggers/{trigger}` format.
         
        string name = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getNameBytes in interface TriggerOrBuilder
        Returns:
        The bytes for name.
      • getUid

        public String getUid()
         Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
         string and guaranteed to remain unchanged until the resource is deleted.
         
        string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUid in interface TriggerOrBuilder
        Returns:
        The uid.
      • getUidBytes

        public com.google.protobuf.ByteString getUidBytes()
         Output only. Server-assigned unique identifier for the trigger. The value is a UUID4
         string and guaranteed to remain unchanged until the resource is deleted.
         
        string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUidBytes in interface TriggerOrBuilder
        Returns:
        The bytes for uid.
      • hasCreateTime

        public boolean hasCreateTime()
         Output only. The creation time.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasCreateTime in interface TriggerOrBuilder
        Returns:
        Whether the createTime field is set.
      • getCreateTime

        public com.google.protobuf.Timestamp getCreateTime()
         Output only. The creation time.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTime in interface TriggerOrBuilder
        Returns:
        The createTime.
      • getCreateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
         Output only. The creation time.
         
        .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCreateTimeOrBuilder in interface TriggerOrBuilder
      • hasUpdateTime

        public boolean hasUpdateTime()
         Output only. The last-modified time.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        hasUpdateTime in interface TriggerOrBuilder
        Returns:
        Whether the updateTime field is set.
      • getUpdateTime

        public com.google.protobuf.Timestamp getUpdateTime()
         Output only. The last-modified time.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTime in interface TriggerOrBuilder
        Returns:
        The updateTime.
      • getUpdateTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder()
         Output only. The last-modified time.
         
        .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getUpdateTimeOrBuilder in interface TriggerOrBuilder
      • getEventFiltersList

        public List<EventFilter> getEventFiltersList()
         Required. Unordered list. The list of filters that applies to event attributes. Only events that
         match all the provided filters are sent to the destination.
         
        repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventFiltersList in interface TriggerOrBuilder
      • getEventFiltersOrBuilderList

        public List<? extends EventFilterOrBuilder> getEventFiltersOrBuilderList()
         Required. Unordered list. The list of filters that applies to event attributes. Only events that
         match all the provided filters are sent to the destination.
         
        repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventFiltersOrBuilderList in interface TriggerOrBuilder
      • getEventFiltersCount

        public int getEventFiltersCount()
         Required. Unordered list. The list of filters that applies to event attributes. Only events that
         match all the provided filters are sent to the destination.
         
        repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventFiltersCount in interface TriggerOrBuilder
      • getEventFilters

        public EventFilter getEventFilters​(int index)
         Required. Unordered list. The list of filters that applies to event attributes. Only events that
         match all the provided filters are sent to the destination.
         
        repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventFilters in interface TriggerOrBuilder
      • getEventFiltersOrBuilder

        public EventFilterOrBuilder getEventFiltersOrBuilder​(int index)
         Required. Unordered list. The list of filters that applies to event attributes. Only events that
         match all the provided filters are sent to the destination.
         
        repeated .google.cloud.eventarc.v1.EventFilter event_filters = 8 [(.google.api.field_behavior) = UNORDERED_LIST, (.google.api.field_behavior) = REQUIRED];
        Specified by:
        getEventFiltersOrBuilder in interface TriggerOrBuilder
      • getServiceAccount

        public String getServiceAccount()
         Optional. The IAM service account email associated with the trigger. The
         service account represents the identity of the trigger.
        
         The principal who calls this API must have the `iam.serviceAccounts.actAs`
         permission in the service account. See
         https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
         for more information.
        
         For Cloud Run destinations, this service account is used to generate
         identity tokens when invoking the service. See
         https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
         for information on how to invoke authenticated Cloud Run services.
         To create Audit Log triggers, the service account should also
         have the `roles/eventarc.eventReceiver` IAM role.
         
        string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getServiceAccount in interface TriggerOrBuilder
        Returns:
        The serviceAccount.
      • getServiceAccountBytes

        public com.google.protobuf.ByteString getServiceAccountBytes()
         Optional. The IAM service account email associated with the trigger. The
         service account represents the identity of the trigger.
        
         The principal who calls this API must have the `iam.serviceAccounts.actAs`
         permission in the service account. See
         https://cloud.google.com/iam/docs/understanding-service-accounts?hl=en#sa_common
         for more information.
        
         For Cloud Run destinations, this service account is used to generate
         identity tokens when invoking the service. See
         https://cloud.google.com/run/docs/triggering/pubsub-push#create-service-account
         for information on how to invoke authenticated Cloud Run services.
         To create Audit Log triggers, the service account should also
         have the `roles/eventarc.eventReceiver` IAM role.
         
        string service_account = 9 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getServiceAccountBytes in interface TriggerOrBuilder
        Returns:
        The bytes for serviceAccount.
      • hasDestination

        public boolean hasDestination()
         Required. Destination specifies where the events should be sent to.
         
        .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        hasDestination in interface TriggerOrBuilder
        Returns:
        Whether the destination field is set.
      • getDestination

        public Destination getDestination()
         Required. Destination specifies where the events should be sent to.
         
        .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDestination in interface TriggerOrBuilder
        Returns:
        The destination.
      • getDestinationOrBuilder

        public DestinationOrBuilder getDestinationOrBuilder()
         Required. Destination specifies where the events should be sent to.
         
        .google.cloud.eventarc.v1.Destination destination = 10 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getDestinationOrBuilder in interface TriggerOrBuilder
      • hasTransport

        public boolean hasTransport()
         Optional. To deliver messages, Eventarc might use other GCP
         products as a transport intermediary. This field contains a reference to
         that transport intermediary. This information can be used for debugging
         purposes.
         
        .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasTransport in interface TriggerOrBuilder
        Returns:
        Whether the transport field is set.
      • getTransport

        public Transport getTransport()
         Optional. To deliver messages, Eventarc might use other GCP
         products as a transport intermediary. This field contains a reference to
         that transport intermediary. This information can be used for debugging
         purposes.
         
        .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getTransport in interface TriggerOrBuilder
        Returns:
        The transport.
      • getTransportOrBuilder

        public TransportOrBuilder getTransportOrBuilder()
         Optional. To deliver messages, Eventarc might use other GCP
         products as a transport intermediary. This field contains a reference to
         that transport intermediary. This information can be used for debugging
         purposes.
         
        .google.cloud.eventarc.v1.Transport transport = 11 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getTransportOrBuilder in interface TriggerOrBuilder
      • getLabelsCount

        public int getLabelsCount()
        Description copied from interface: TriggerOrBuilder
         Optional. User labels attached to the triggers that can be used to group resources.
         
        map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsCount in interface TriggerOrBuilder
      • containsLabels

        public boolean containsLabels​(String key)
         Optional. User labels attached to the triggers that can be used to group resources.
         
        map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        containsLabels in interface TriggerOrBuilder
      • getLabelsMap

        public Map<String,​String> getLabelsMap()
         Optional. User labels attached to the triggers that can be used to group resources.
         
        map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsMap in interface TriggerOrBuilder
      • getLabelsOrDefault

        public String getLabelsOrDefault​(String key,
                                         String defaultValue)
         Optional. User labels attached to the triggers that can be used to group resources.
         
        map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrDefault in interface TriggerOrBuilder
      • getLabelsOrThrow

        public String getLabelsOrThrow​(String key)
         Optional. User labels attached to the triggers that can be used to group resources.
         
        map<string, string> labels = 12 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getLabelsOrThrow in interface TriggerOrBuilder
      • 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 = 13 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getChannel in interface TriggerOrBuilder
        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 = 13 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getChannelBytes in interface TriggerOrBuilder
        Returns:
        The bytes for channel.
      • getConditionsCount

        public int getConditionsCount()
        Description copied from interface: TriggerOrBuilder
         Output only. The reason(s) why a trigger is in FAILED state.
         
        map<string, .google.cloud.eventarc.v1.StateCondition> conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConditionsCount in interface TriggerOrBuilder
      • containsConditions

        public boolean containsConditions​(String key)
         Output only. The reason(s) why a trigger is in FAILED state.
         
        map<string, .google.cloud.eventarc.v1.StateCondition> conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        containsConditions in interface TriggerOrBuilder
      • getConditionsMap

        public Map<String,​StateCondition> getConditionsMap()
         Output only. The reason(s) why a trigger is in FAILED state.
         
        map<string, .google.cloud.eventarc.v1.StateCondition> conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConditionsMap in interface TriggerOrBuilder
      • getConditionsOrDefault

        public StateCondition getConditionsOrDefault​(String key,
                                                     StateCondition defaultValue)
         Output only. The reason(s) why a trigger is in FAILED state.
         
        map<string, .google.cloud.eventarc.v1.StateCondition> conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConditionsOrDefault in interface TriggerOrBuilder
      • getConditionsOrThrow

        public StateCondition getConditionsOrThrow​(String key)
         Output only. The reason(s) why a trigger is in FAILED state.
         
        map<string, .google.cloud.eventarc.v1.StateCondition> conditions = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getConditionsOrThrow in interface TriggerOrBuilder
      • getEtag

        public String getEtag()
         Output only. This checksum is computed by the server based on the value of other
         fields, and might be sent only on create requests to ensure that the
         client has an up-to-date value before proceeding.
         
        string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getEtag in interface TriggerOrBuilder
        Returns:
        The etag.
      • getEtagBytes

        public com.google.protobuf.ByteString getEtagBytes()
         Output only. This checksum is computed by the server based on the value of other
         fields, and might be sent only on create requests to ensure that the
         client has an up-to-date value before proceeding.
         
        string etag = 99 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getEtagBytes in interface TriggerOrBuilder
        Returns:
        The bytes for etag.
      • 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 Trigger parseFrom​(ByteBuffer data)
                                 throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

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

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

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

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

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

        public static Trigger getDefaultInstance()
      • parser

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

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