Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1HandlerEventHandler

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb

Overview

A handler that is triggered by the specified event.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1HandlerEventHandler

Returns a new instance of GoogleCloudDialogflowCxV3beta1HandlerEventHandler.



9252
9253
9254
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 9252

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#conditionString

Optional. The condition that must be satisfied to trigger this handler. Corresponds to the JSON property condition

Returns:

  • (String)


9234
9235
9236
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 9234

def condition
  @condition
end

#eventString

Required. The name of the event that triggers this handler. Corresponds to the JSON property event

Returns:

  • (String)


9239
9240
9241
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 9239

def event
  @event
end

#fulfillmentGoogle::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Fulfillment

A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page's entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both. Corresponds to the JSON property fulfillment



9250
9251
9252
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 9250

def fulfillment
  @fulfillment
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9257
9258
9259
9260
9261
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 9257

def update!(**args)
  @condition = args[:condition] if args.key?(:condition)
  @event = args[:event] if args.key?(:event)
  @fulfillment = args[:fulfillment] if args.key?(:fulfillment)
end