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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
    • clear

      public EventHandler.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EventHandler.Builder>
    • getDefaultInstanceForType

      public EventHandler getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public EventHandler build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public EventHandler buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public EventHandler.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventHandler.Builder>
    • mergeFrom

      public EventHandler.Builder mergeFrom(EventHandler other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EventHandler.Builder>
      Throws:
      IOException
    • getTargetCase

      public EventHandler.TargetCase getTargetCase()
      Specified by:
      getTargetCase in interface EventHandlerOrBuilder
    • clearTarget

      public EventHandler.Builder clearTarget()
    • getName

      public String getName()
       Output only. The unique identifier of this event handler.
       
      string name = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface EventHandlerOrBuilder
      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:
      getNameBytes in interface EventHandlerOrBuilder
      Returns:
      The bytes for name.
    • setName

      public EventHandler.Builder setName(String value)
       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

      public EventHandler.Builder 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

      public EventHandler.Builder setNameBytes(com.google.protobuf.ByteString value)
       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

      public String getEvent()
       Required. The name of the event to handle.
       
      string event = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getEvent in interface EventHandlerOrBuilder
      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:
      getEventBytes in interface EventHandlerOrBuilder
      Returns:
      The bytes for event.
    • setEvent

      public EventHandler.Builder setEvent(String value)
       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

      public EventHandler.Builder clearEvent()
       Required. The name of the event to handle.
       
      string event = 4 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setEventBytes

      public EventHandler.Builder setEventBytes(com.google.protobuf.ByteString value)
       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:
      hasTriggerFulfillment in interface EventHandlerOrBuilder
      Returns:
      Whether the triggerFulfillment field is set.
    • 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.v3beta1.Fulfillment trigger_fulfillment = 5;
      Specified by:
      getTriggerFulfillment in interface EventHandlerOrBuilder
      Returns:
      The triggerFulfillment.
    • setTriggerFulfillment

      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.v3beta1.Fulfillment trigger_fulfillment = 5;
    • setTriggerFulfillment

      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.v3beta1.Fulfillment trigger_fulfillment = 5;
    • mergeTriggerFulfillment

      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.v3beta1.Fulfillment trigger_fulfillment = 5;
    • 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.v3beta1.Fulfillment trigger_fulfillment = 5;
    • 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.v3beta1.Fulfillment trigger_fulfillment = 5;
    • 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.v3beta1.Fulfillment trigger_fulfillment = 5;
      Specified by:
      getTriggerFulfillmentOrBuilder in interface EventHandlerOrBuilder
    • 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:
      hasTargetPage in interface EventHandlerOrBuilder
      Returns:
      Whether the targetPage field is set.
    • getTargetPage

      public String 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:
      getTargetPage in interface EventHandlerOrBuilder
      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:
      getTargetPageBytes in interface EventHandlerOrBuilder
      Returns:
      The bytes for targetPage.
    • setTargetPage

      public EventHandler.Builder setTargetPage(String value)
       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

      public EventHandler.Builder 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

      public EventHandler.Builder setTargetPageBytes(com.google.protobuf.ByteString value)
       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:
      hasTargetFlow in interface EventHandlerOrBuilder
      Returns:
      Whether the targetFlow field is set.
    • getTargetFlow

      public String 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:
      getTargetFlow in interface EventHandlerOrBuilder
      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:
      getTargetFlowBytes in interface EventHandlerOrBuilder
      Returns:
      The bytes for targetFlow.
    • setTargetFlow

      public EventHandler.Builder setTargetFlow(String value)
       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

      public EventHandler.Builder 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

      public EventHandler.Builder setTargetFlowBytes(com.google.protobuf.ByteString value)
       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:
      hasTargetPlaybook in interface EventHandlerOrBuilder
      Returns:
      Whether the targetPlaybook field is set.
    • getTargetPlaybook

      public String 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:
      getTargetPlaybook in interface EventHandlerOrBuilder
      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:
      getTargetPlaybookBytes in interface EventHandlerOrBuilder
      Returns:
      The bytes for targetPlaybook.
    • setTargetPlaybook

      public EventHandler.Builder setTargetPlaybook(String value)
       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

      public EventHandler.Builder 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

      public EventHandler.Builder setTargetPlaybookBytes(com.google.protobuf.ByteString value)
       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.