Class Trigger (0.14.1)

public final class Trigger extends GeneratedMessageV3 implements TriggerOrBuilder

A representation of the trigger resource.

Protobuf type google.events.cloud.eventarc.v1.Trigger

Implements

TriggerOrBuilder

Static Fields

CHANNEL_FIELD_NUMBER

public static final int CHANNEL_FIELD_NUMBER
Field Value
TypeDescription
int

CONDITIONS_FIELD_NUMBER

public static final int CONDITIONS_FIELD_NUMBER
Field Value
TypeDescription
int

CREATE_TIME_FIELD_NUMBER

public static final int CREATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

DESTINATION_FIELD_NUMBER

public static final int DESTINATION_FIELD_NUMBER
Field Value
TypeDescription
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_DATA_CONTENT_TYPE_FIELD_NUMBER

public static final int EVENT_DATA_CONTENT_TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

EVENT_FILTERS_FIELD_NUMBER

public static final int EVENT_FILTERS_FIELD_NUMBER
Field Value
TypeDescription
int

LABELS_FIELD_NUMBER

public static final int LABELS_FIELD_NUMBER
Field Value
TypeDescription
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
TypeDescription
int

SERVICE_ACCOUNT_FIELD_NUMBER

public static final int SERVICE_ACCOUNT_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSPORT_FIELD_NUMBER

public static final int TRANSPORT_FIELD_NUMBER
Field Value
TypeDescription
int

UID_FIELD_NUMBER

public static final int UID_FIELD_NUMBER
Field Value
TypeDescription
int

UPDATE_TIME_FIELD_NUMBER

public static final int UPDATE_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static Trigger getDefaultInstance()
Returns
TypeDescription
Trigger

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static Trigger.Builder newBuilder()
Returns
TypeDescription
Trigger.Builder

newBuilder(Trigger prototype)

public static Trigger.Builder newBuilder(Trigger prototype)
Parameter
NameDescription
prototypeTrigger
Returns
TypeDescription
Trigger.Builder

parseDelimitedFrom(InputStream input)

public static Trigger parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Trigger parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static Trigger parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Trigger parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Trigger parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Trigger parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Trigger parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Trigger parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static Trigger parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Trigger parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static Trigger parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Trigger parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Trigger
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<Trigger> parser()
Returns
TypeDescription
Parser<Trigger>

Methods

containsConditions(String key)

public boolean containsConditions(String key)

Output only. The reason(s) why a trigger is in FAILED state.

map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

containsLabels(String key)

public boolean containsLabels(String key)

Optional. User labels attached to the triggers that can be used to group resources.

map<string, string> labels = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

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;

Returns
TypeDescription
String

The channel.

getChannelBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for channel.

getConditions()

public Map<String,StateCondition> getConditions()

Use #getConditionsMap() instead.

Returns
TypeDescription
Map<String,StateCondition>

getConditionsCount()

public int getConditionsCount()

Output only. The reason(s) why a trigger is in FAILED state.

map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15;

Returns
TypeDescription
int

getConditionsMap()

public Map<String,StateCondition> getConditionsMap()

Output only. The reason(s) why a trigger is in FAILED state.

map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15;

Returns
TypeDescription
Map<String,StateCondition>

getConditionsOrDefault(String key, StateCondition defaultValue)

public StateCondition getConditionsOrDefault(String key, StateCondition defaultValue)

Output only. The reason(s) why a trigger is in FAILED state.

map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15;

Parameters
NameDescription
keyString
defaultValueStateCondition
Returns
TypeDescription
StateCondition

getConditionsOrThrow(String key)

public StateCondition getConditionsOrThrow(String key)

Output only. The reason(s) why a trigger is in FAILED state.

map<string, .google.events.cloud.eventarc.v1.StateCondition> conditions = 15;

Parameter
NameDescription
keyString
Returns
TypeDescription
StateCondition

getCreateTime()

public Timestamp getCreateTime()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
Timestamp

The createTime.

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
TimestampOrBuilder

getDefaultInstanceForType()

public Trigger getDefaultInstanceForType()
Returns
TypeDescription
Trigger

getDestination()

public Destination getDestination()

Required. Destination specifies where the events should be sent to.

.google.events.cloud.eventarc.v1.Destination destination = 10;

Returns
TypeDescription
Destination

The destination.

getDestinationOrBuilder()

public DestinationOrBuilder getDestinationOrBuilder()

Required. Destination specifies where the events should be sent to.

.google.events.cloud.eventarc.v1.Destination destination = 10;

Returns
TypeDescription
DestinationOrBuilder

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;

Returns
TypeDescription
String

The etag.

getEtagBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for etag.

getEventDataContentType()

public String getEventDataContentType()

Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data field. This is set to application/json if the value is not defined.

string event_data_content_type = 16;

Returns
TypeDescription
String

The eventDataContentType.

getEventDataContentTypeBytes()

public ByteString getEventDataContentTypeBytes()

Optional. EventDataContentType specifies the type of payload in MIME format that is expected from the CloudEvent data field. This is set to application/json if the value is not defined.

string event_data_content_type = 16;

Returns
TypeDescription
ByteString

The bytes for eventDataContentType.

getEventFilters(int index)

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.events.cloud.eventarc.v1.EventFilter event_filters = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilter

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.events.cloud.eventarc.v1.EventFilter event_filters = 8;

Returns
TypeDescription
int

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.events.cloud.eventarc.v1.EventFilter event_filters = 8;

Returns
TypeDescription
List<EventFilter>

getEventFiltersOrBuilder(int index)

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.events.cloud.eventarc.v1.EventFilter event_filters = 8;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilterOrBuilder

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.events.cloud.eventarc.v1.EventFilter event_filters = 8;

Returns
TypeDescription
List<? extends com.google.events.cloud.eventarc.v1.EventFilterOrBuilder>

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

Optional. User labels attached to the triggers that can be used to group resources.

map<string, string> labels = 12;

Returns
TypeDescription
int

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;

Returns
TypeDescription
Map<String,String>

getLabelsOrDefault(String key, String defaultValue)

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;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

Optional. User labels attached to the triggers that can be used to group resources.

map<string, string> labels = 12;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

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;

Returns
TypeDescription
String

The name.

getNameBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for name.

getParserForType()

public Parser<Trigger> getParserForType()
Returns
TypeDescription
Parser<Trigger>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

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;

Returns
TypeDescription
String

The serviceAccount.

getServiceAccountBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for serviceAccount.

getTransport()

public Transport getTransport()

Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

.google.events.cloud.eventarc.v1.Transport transport = 11;

Returns
TypeDescription
Transport

The transport.

getTransportOrBuilder()

public TransportOrBuilder getTransportOrBuilder()

Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

.google.events.cloud.eventarc.v1.Transport transport = 11;

Returns
TypeDescription
TransportOrBuilder

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;

Returns
TypeDescription
String

The uid.

getUidBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for uid.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
Timestamp

The updateTime.

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The creation time.

.google.protobuf.Timestamp create_time = 5;

Returns
TypeDescription
boolean

Whether the createTime field is set.

hasDestination()

public boolean hasDestination()

Required. Destination specifies where the events should be sent to.

.google.events.cloud.eventarc.v1.Destination destination = 10;

Returns
TypeDescription
boolean

Whether the destination field is set.

hasTransport()

public boolean hasTransport()

Optional. To deliver messages, Eventarc might use other Google Cloud products as a transport intermediary. This field contains a reference to that transport intermediary. This information can be used for debugging purposes.

.google.events.cloud.eventarc.v1.Transport transport = 11;

Returns
TypeDescription
boolean

Whether the transport field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The last-modified time.

.google.protobuf.Timestamp update_time = 6;

Returns
TypeDescription
boolean

Whether the updateTime field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public Trigger.Builder newBuilderForType()
Returns
TypeDescription
Trigger.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Trigger.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
Trigger.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public Trigger.Builder toBuilder()
Returns
TypeDescription
Trigger.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException