Class EventHandler.Builder (0.48.0)

public static final class EventHandler.Builder extends GeneratedMessageV3.Builder<EventHandler.Builder> implements EventHandlerOrBuilder

An event handler specifies an event that can be handled during a session. When the specified event happens, the following actions are taken in order:

  • If there is a trigger_fulfillment associated with the event, it will be called.
  • If there is a target_page associated with the event, the session will transition into the specified page.
  • If there is a target_flow associated with the event, the session will transition into the specified flow.

Protobuf type google.cloud.dialogflow.cx.v3.EventHandler

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public EventHandler build()
Returns
TypeDescription
EventHandler

buildPartial()

public EventHandler buildPartial()
Returns
TypeDescription
EventHandler

clear()

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

clearEvent()

public EventHandler.Builder clearEvent()

Required. The name of the event to handle.

string event = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearName()

public EventHandler.Builder clearName()

Output only. The unique identifier of this event handler.

string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTarget()

public EventHandler.Builder clearTarget()
Returns
TypeDescription
EventHandler.Builder

clearTargetFlow()

public EventHandler.Builder clearTargetFlow()

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

clearTargetPage()

public EventHandler.Builder clearTargetPage()

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

clearTriggerFulfillment()

public EventHandler.Builder clearTriggerFulfillment()

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Returns
TypeDescription
EventHandler.Builder

clone()

public EventHandler.Builder clone()
Returns
TypeDescription
EventHandler.Builder
Overrides

getDefaultInstanceForType()

public EventHandler getDefaultInstanceForType()
Returns
TypeDescription
EventHandler

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getEvent()

public String getEvent()

Required. The name of the event to handle.

string event = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The event.

getEventBytes()

public ByteString getEventBytes()

Required. The name of the event to handle.

string event = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for event.

getName()

public String getName()

Output only. The unique identifier of this event handler.

string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
String

The name.

getNameBytes()

public ByteString getNameBytes()

Output only. The unique identifier of this event handler.

string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
TypeDescription
ByteString

The bytes for name.

getTargetCase()

public EventHandler.TargetCase getTargetCase()
Returns
TypeDescription
EventHandler.TargetCase

getTargetFlow()

public String getTargetFlow()

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The targetFlow.

getTargetFlowBytes()

public ByteString getTargetFlowBytes()

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for targetFlow.

getTargetPage()

public String getTargetPage()

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The targetPage.

getTargetPageBytes()

public ByteString getTargetPageBytes()

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for targetPage.

getTriggerFulfillment()

public Fulfillment getTriggerFulfillment()

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Returns
TypeDescription
Fulfillment

The triggerFulfillment.

getTriggerFulfillmentBuilder()

public Fulfillment.Builder getTriggerFulfillmentBuilder()

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Returns
TypeDescription
Fulfillment.Builder

getTriggerFulfillmentOrBuilder()

public FulfillmentOrBuilder getTriggerFulfillmentOrBuilder()

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Returns
TypeDescription
FulfillmentOrBuilder

hasTargetFlow()

public boolean hasTargetFlow()

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
boolean

Whether the targetFlow field is set.

hasTargetPage()

public boolean hasTargetPage()

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Returns
TypeDescription
boolean

Whether the targetPage field is set.

hasTriggerFulfillment()

public boolean hasTriggerFulfillment()

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Returns
TypeDescription
boolean

Whether the triggerFulfillment field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(EventHandler other)

public EventHandler.Builder mergeFrom(EventHandler other)
Parameter
NameDescription
otherEventHandler
Returns
TypeDescription
EventHandler.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeTriggerFulfillment(Fulfillment value)

public EventHandler.Builder mergeTriggerFulfillment(Fulfillment value)

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Parameter
NameDescription
valueFulfillment
Returns
TypeDescription
EventHandler.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setEvent(String value)

public EventHandler.Builder setEvent(String value)

Required. The name of the event to handle.

string event = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The event to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setEventBytes(ByteString value)

public EventHandler.Builder setEventBytes(ByteString value)

Required. The name of the event to handle.

string event = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for event to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setName(String value)

public EventHandler.Builder setName(String value)

Output only. The unique identifier of this event handler.

string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueString

The name to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setNameBytes(ByteString value)

public EventHandler.Builder setNameBytes(ByteString value)

Output only. The unique identifier of this event handler.

string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
NameDescription
valueByteString

The bytes for name to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

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

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

setTargetFlow(String value)

public EventHandler.Builder setTargetFlow(String value)

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The targetFlow to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setTargetFlowBytes(ByteString value)

public EventHandler.Builder setTargetFlowBytes(ByteString value)

The target flow to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>.

string target_flow = 3 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for targetFlow to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setTargetPage(String value)

public EventHandler.Builder setTargetPage(String value)

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The targetPage to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setTargetPageBytes(ByteString value)

public EventHandler.Builder setTargetPageBytes(ByteString value)

The target page to transition to. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/flows/<Flow ID>/pages/<Page ID>.

string target_page = 2 [(.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for targetPage to set.

Returns
TypeDescription
EventHandler.Builder

This builder for chaining.

setTriggerFulfillment(Fulfillment value)

public EventHandler.Builder setTriggerFulfillment(Fulfillment value)

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Parameter
NameDescription
valueFulfillment
Returns
TypeDescription
EventHandler.Builder

setTriggerFulfillment(Fulfillment.Builder builderForValue)

public EventHandler.Builder setTriggerFulfillment(Fulfillment.Builder builderForValue)

The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.

.google.cloud.dialogflow.cx.v3.Fulfillment trigger_fulfillment = 5;

Parameter
NameDescription
builderForValueFulfillment.Builder
Returns
TypeDescription
EventHandler.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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