Class EventHandler.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
com.google.cloud.dialogflow.cx.v3beta1.EventHandler.Builder
- All Implemented Interfaces:
EventHandlerOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- EventHandler
public static final class EventHandler.Builder
extends com.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
implements EventHandlerOrBuilder
An event handler specifies an [event][google.cloud.dialogflow.cx.v3beta1.EventHandler.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`][google.cloud.dialogflow.cx.v3beta1.EventHandler.trigger_fulfillment] associated with the event, it will be called. * If there is a [`target_page`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_page] associated with the event, the session will transition into the specified page. * If there is a [`target_flow`][google.cloud.dialogflow.cx.v3beta1.EventHandler.target_flow] associated with the event, the session will transition into the specified flow.Protobuf type
google.cloud.dialogflow.cx.v3beta1.EventHandler-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()Required.Output only.The target flow to transition to.The target page to transition to.The target playbook to transition to.The fulfillment to call when the event occurs.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetEvent()Required.com.google.protobuf.ByteStringRequired.getName()Output only.com.google.protobuf.ByteStringOutput only.The target flow to transition to.com.google.protobuf.ByteStringThe target flow to transition to.The target page to transition to.com.google.protobuf.ByteStringThe target page to transition to.The target playbook to transition to.com.google.protobuf.ByteStringThe target playbook to transition to.The fulfillment to call when the event occurs.The fulfillment to call when the event occurs.The fulfillment to call when the event occurs.booleanThe target flow to transition to.booleanThe target page to transition to.booleanThe target playbook to transition to.booleanThe fulfillment to call when the event occurs.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(EventHandler other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) The fulfillment to call when the event occurs.Required.setEventBytes(com.google.protobuf.ByteString value) Required.Output only.setNameBytes(com.google.protobuf.ByteString value) Output only.setTargetFlow(String value) The target flow to transition to.setTargetFlowBytes(com.google.protobuf.ByteString value) The target flow to transition to.setTargetPage(String value) The target page to transition to.setTargetPageBytes(com.google.protobuf.ByteString value) The target page to transition to.setTargetPlaybook(String value) The target playbook to transition to.setTargetPlaybookBytes(com.google.protobuf.ByteString value) The target playbook to transition to.setTriggerFulfillment(Fulfillment value) The fulfillment to call when the event occurs.setTriggerFulfillment(Fulfillment.Builder builderForValue) The fulfillment to call when the event occurs.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EventHandler.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
-
mergeFrom
public EventHandler.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<EventHandler.Builder>- Throws:
IOException
-
getTargetCase
- Specified by:
getTargetCasein interfaceEventHandlerOrBuilder
-
clearTarget
-
getName
Output only. The unique identifier of this event handler.
string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getNamein interfaceEventHandlerOrBuilder- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()Output only. The unique identifier of this event handler.
string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getNameBytesin interfaceEventHandlerOrBuilder- Returns:
- The bytes for name.
-
setName
Output only. The unique identifier of this event handler.
string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The name to set.- Returns:
- This builder for chaining.
-
clearName
Output only. The unique identifier of this event handler.
string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setNameBytes
Output only. The unique identifier of this event handler.
string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for name to set.- Returns:
- This builder for chaining.
-
getEvent
Required. The name of the event to handle.
string event = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getEventin interfaceEventHandlerOrBuilder- Returns:
- The event.
-
getEventBytes
public com.google.protobuf.ByteString getEventBytes()Required. The name of the event to handle.
string event = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getEventBytesin interfaceEventHandlerOrBuilder- Returns:
- The bytes for event.
-
setEvent
Required. The name of the event to handle.
string event = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The event to set.- Returns:
- This builder for chaining.
-
clearEvent
Required. The name of the event to handle.
string event = 4 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setEventBytes
Required. The name of the event to handle.
string event = 4 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for event to set.- Returns:
- This builder for chaining.
-
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.v3beta1.Fulfillment trigger_fulfillment = 5;- Specified by:
hasTriggerFulfillmentin interfaceEventHandlerOrBuilder- Returns:
- Whether the triggerFulfillment field is set.
-
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.v3beta1.Fulfillment trigger_fulfillment = 5;- Specified by:
getTriggerFulfillmentin interfaceEventHandlerOrBuilder- Returns:
- The triggerFulfillment.
-
setTriggerFulfillment
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.v3beta1.Fulfillment trigger_fulfillment = 5; -
setTriggerFulfillment
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.v3beta1.Fulfillment trigger_fulfillment = 5; -
mergeTriggerFulfillment
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.v3beta1.Fulfillment trigger_fulfillment = 5; -
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.v3beta1.Fulfillment trigger_fulfillment = 5; -
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.v3beta1.Fulfillment trigger_fulfillment = 5; -
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.v3beta1.Fulfillment trigger_fulfillment = 5;- Specified by:
getTriggerFulfillmentOrBuilderin interfaceEventHandlerOrBuilder
-
hasTargetPage
public boolean hasTargetPage()The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Specified by:
hasTargetPagein interfaceEventHandlerOrBuilder- Returns:
- Whether the targetPage field is set.
-
getTargetPage
The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetPagein interfaceEventHandlerOrBuilder- Returns:
- The targetPage.
-
getTargetPageBytes
public com.google.protobuf.ByteString getTargetPageBytes()The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetPageBytesin interfaceEventHandlerOrBuilder- Returns:
- The bytes for targetPage.
-
setTargetPage
The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Parameters:
value- The targetPage to set.- Returns:
- This builder for chaining.
-
clearTargetPage
The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setTargetPageBytes
The target page to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>/pages/<PageID>`.
string target_page = 2 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for targetPage to set.- Returns:
- This builder for chaining.
-
hasTargetFlow
public boolean hasTargetFlow()The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Specified by:
hasTargetFlowin interfaceEventHandlerOrBuilder- Returns:
- Whether the targetFlow field is set.
-
getTargetFlow
The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetFlowin interfaceEventHandlerOrBuilder- Returns:
- The targetFlow.
-
getTargetFlowBytes
public com.google.protobuf.ByteString getTargetFlowBytes()The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetFlowBytesin interfaceEventHandlerOrBuilder- Returns:
- The bytes for targetFlow.
-
setTargetFlow
The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Parameters:
value- The targetFlow to set.- Returns:
- This builder for chaining.
-
clearTargetFlow
The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setTargetFlowBytes
The target flow to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/flows/<FlowID>`.
string target_flow = 3 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for targetFlow to set.- Returns:
- This builder for chaining.
-
hasTargetPlaybook
public boolean hasTargetPlaybook()The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Specified by:
hasTargetPlaybookin interfaceEventHandlerOrBuilder- Returns:
- Whether the targetPlaybook field is set.
-
getTargetPlaybook
The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetPlaybookin interfaceEventHandlerOrBuilder- Returns:
- The targetPlaybook.
-
getTargetPlaybookBytes
public com.google.protobuf.ByteString getTargetPlaybookBytes()The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Specified by:
getTargetPlaybookBytesin interfaceEventHandlerOrBuilder- Returns:
- The bytes for targetPlaybook.
-
setTargetPlaybook
The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Parameters:
value- The targetPlaybook to set.- Returns:
- This builder for chaining.
-
clearTargetPlaybook
The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Returns:
- This builder for chaining.
-
setTargetPlaybookBytes
The target playbook to transition to. Format: `projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/playbooks/<PlaybookID>`.
string target_playbook = 7 [(.google.api.resource_reference) = { ... }- Parameters:
value- The bytes for targetPlaybook to set.- Returns:
- This builder for chaining.
-