Class EventTrigger.Builder (2.5.0)

public static final class EventTrigger.Builder extends GeneratedMessageV3.Builder<EventTrigger.Builder> implements EventTriggerOrBuilder

Describes EventTrigger, used to request events to be sent from another service.

Protobuf type google.cloud.functions.v2.EventTrigger

Static Methods

getDescriptor()

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

Methods

addAllEventFilters(Iterable<? extends EventFilter> values)

public EventTrigger.Builder addAllEventFilters(Iterable<? extends EventFilter> values)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.functions.v2.EventFilter>
Returns
TypeDescription
EventTrigger.Builder

addEventFilters(EventFilter value)

public EventTrigger.Builder addEventFilters(EventFilter value)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
valueEventFilter
Returns
TypeDescription
EventTrigger.Builder

addEventFilters(EventFilter.Builder builderForValue)

public EventTrigger.Builder addEventFilters(EventFilter.Builder builderForValue)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
builderForValueEventFilter.Builder
Returns
TypeDescription
EventTrigger.Builder

addEventFilters(int index, EventFilter value)

public EventTrigger.Builder addEventFilters(int index, EventFilter value)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameters
NameDescription
indexint
valueEventFilter
Returns
TypeDescription
EventTrigger.Builder

addEventFilters(int index, EventFilter.Builder builderForValue)

public EventTrigger.Builder addEventFilters(int index, EventFilter.Builder builderForValue)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameters
NameDescription
indexint
builderForValueEventFilter.Builder
Returns
TypeDescription
EventTrigger.Builder

addEventFiltersBuilder()

public EventFilter.Builder addEventFiltersBuilder()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
EventFilter.Builder

addEventFiltersBuilder(int index)

public EventFilter.Builder addEventFiltersBuilder(int index)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilter.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public EventTrigger.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EventTrigger.Builder
Overrides

build()

public EventTrigger build()
Returns
TypeDescription
EventTrigger

buildPartial()

public EventTrigger buildPartial()
Returns
TypeDescription
EventTrigger

clear()

public EventTrigger.Builder clear()
Returns
TypeDescription
EventTrigger.Builder
Overrides

clearChannel()

public EventTrigger.Builder clearChannel()

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) = { ... }

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearEventFilters()

public EventTrigger.Builder clearEventFilters()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
EventTrigger.Builder

clearEventType()

public EventTrigger.Builder clearEventType()

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

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public EventTrigger.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
EventTrigger.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public EventTrigger.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
EventTrigger.Builder
Overrides

clearPubsubTopic()

public EventTrigger.Builder clearPubsubTopic()

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) = { ... }

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearRetryPolicy()

public EventTrigger.Builder clearRetryPolicy()

Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).

.google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearServiceAccountEmail()

public EventTrigger.Builder clearServiceAccountEmail()

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

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearTrigger()

public EventTrigger.Builder clearTrigger()

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) = { ... }

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clearTriggerRegion()

public EventTrigger.Builder clearTriggerRegion()

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;

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

clone()

public EventTrigger.Builder clone()
Returns
TypeDescription
EventTrigger.Builder
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 = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

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 = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for channel.

getDefaultInstanceForType()

public EventTrigger getDefaultInstanceForType()
Returns
TypeDescription
EventTrigger

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEventFilters(int index)

public EventFilter getEventFilters(int index)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilter

getEventFiltersBuilder(int index)

public EventFilter.Builder getEventFiltersBuilder(int index)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilter.Builder

getEventFiltersBuilderList()

public List<EventFilter.Builder> getEventFiltersBuilderList()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
List<Builder>

getEventFiltersCount()

public int getEventFiltersCount()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
int

getEventFiltersList()

public List<EventFilter> getEventFiltersList()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
List<EventFilter>

getEventFiltersOrBuilder(int index)

public EventFilterOrBuilder getEventFiltersOrBuilder(int index)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventFilterOrBuilder

getEventFiltersOrBuilderList()

public List<? extends EventFilterOrBuilder> getEventFiltersOrBuilderList()

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Returns
TypeDescription
List<? extends com.google.cloud.functions.v2.EventFilterOrBuilder>

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

Returns
TypeDescription
String

The eventType.

getEventTypeBytes()

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

Returns
TypeDescription
ByteString

The bytes for eventType.

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) = { ... }

Returns
TypeDescription
String

The pubsubTopic.

getPubsubTopicBytes()

public 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) = { ... }

Returns
TypeDescription
ByteString

The bytes for pubsubTopic.

getRetryPolicy()

public EventTrigger.RetryPolicy getRetryPolicy()

Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).

.google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
EventTrigger.RetryPolicy

The retryPolicy.

getRetryPolicyValue()

public int getRetryPolicyValue()

Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).

.google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for retryPolicy.

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

Returns
TypeDescription
String

The serviceAccountEmail.

getServiceAccountEmailBytes()

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

Returns
TypeDescription
ByteString

The bytes for serviceAccountEmail.

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) = { ... }

Returns
TypeDescription
String

The trigger.

getTriggerBytes()

public 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) = { ... }

Returns
TypeDescription
ByteString

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;

Returns
TypeDescription
String

The triggerRegion.

getTriggerRegionBytes()

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

Returns
TypeDescription
ByteString

The bytes for triggerRegion.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(EventTrigger other)

public EventTrigger.Builder mergeFrom(EventTrigger other)
Parameter
NameDescription
otherEventTrigger
Returns
TypeDescription
EventTrigger.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public EventTrigger.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
EventTrigger.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public EventTrigger.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
EventTrigger.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final EventTrigger.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EventTrigger.Builder
Overrides

removeEventFilters(int index)

public EventTrigger.Builder removeEventFilters(int index)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameter
NameDescription
indexint
Returns
TypeDescription
EventTrigger.Builder

setChannel(String value)

public EventTrigger.Builder setChannel(String value)

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) = { ... }

Parameter
NameDescription
valueString

The channel to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setChannelBytes(ByteString value)

public EventTrigger.Builder setChannelBytes(ByteString value)

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) = { ... }

Parameter
NameDescription
valueByteString

The bytes for channel to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setEventFilters(int index, EventFilter value)

public EventTrigger.Builder setEventFilters(int index, EventFilter value)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameters
NameDescription
indexint
valueEventFilter
Returns
TypeDescription
EventTrigger.Builder

setEventFilters(int index, EventFilter.Builder builderForValue)

public EventTrigger.Builder setEventFilters(int index, EventFilter.Builder builderForValue)

Criteria used to filter events.

repeated .google.cloud.functions.v2.EventFilter event_filters = 4;

Parameters
NameDescription
indexint
builderForValueEventFilter.Builder
Returns
TypeDescription
EventTrigger.Builder

setEventType(String value)

public EventTrigger.Builder setEventType(String value)

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

Parameter
NameDescription
valueString

The eventType to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setEventTypeBytes(ByteString value)

public EventTrigger.Builder setEventTypeBytes(ByteString value)

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

Parameter
NameDescription
valueByteString

The bytes for eventType to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public EventTrigger.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
EventTrigger.Builder
Overrides

setPubsubTopic(String value)

public EventTrigger.Builder setPubsubTopic(String value)

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) = { ... }

Parameter
NameDescription
valueString

The pubsubTopic to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setPubsubTopicBytes(ByteString value)

public EventTrigger.Builder setPubsubTopicBytes(ByteString value)

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) = { ... }

Parameter
NameDescription
valueByteString

The bytes for pubsubTopic to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public EventTrigger.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
EventTrigger.Builder
Overrides

setRetryPolicy(EventTrigger.RetryPolicy value)

public EventTrigger.Builder setRetryPolicy(EventTrigger.RetryPolicy value)

Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).

.google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueEventTrigger.RetryPolicy

The retryPolicy to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setRetryPolicyValue(int value)

public EventTrigger.Builder setRetryPolicyValue(int value)

Optional. If unset, then defaults to ignoring failures (i.e. not retrying them).

.google.cloud.functions.v2.EventTrigger.RetryPolicy retry_policy = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueint

The enum numeric value on the wire for retryPolicy to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setServiceAccountEmail(String value)

public EventTrigger.Builder setServiceAccountEmail(String value)

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

Parameter
NameDescription
valueString

The serviceAccountEmail to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setServiceAccountEmailBytes(ByteString value)

public EventTrigger.Builder setServiceAccountEmailBytes(ByteString value)

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

Parameter
NameDescription
valueByteString

The bytes for serviceAccountEmail to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setTrigger(String value)

public EventTrigger.Builder setTrigger(String value)

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) = { ... }

Parameter
NameDescription
valueString

The trigger to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setTriggerBytes(ByteString value)

public EventTrigger.Builder setTriggerBytes(ByteString value)

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) = { ... }

Parameter
NameDescription
valueByteString

The bytes for trigger to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setTriggerRegion(String value)

public EventTrigger.Builder setTriggerRegion(String value)

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;

Parameter
NameDescription
valueString

The triggerRegion to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setTriggerRegionBytes(ByteString value)

public EventTrigger.Builder setTriggerRegionBytes(ByteString value)

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;

Parameter
NameDescription
valueByteString

The bytes for triggerRegion to set.

Returns
TypeDescription
EventTrigger.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final EventTrigger.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
EventTrigger.Builder
Overrides