Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2WebhookRequest

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

Overview

The request message for a webhook call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2WebhookRequest

Returns a new instance of GoogleCloudDialogflowV2WebhookRequest



2326
2327
2328
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2326

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

Instance Attribute Details

#original_detect_intent_requestGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2OriginalDetectIntentRequest

Represents the contents of the original request that was passed to the [Streaming]DetectIntent call. Corresponds to the JSON property originalDetectIntentRequest



2304
2305
2306
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2304

def original_detect_intent_request
  @original_detect_intent_request
end

#query_resultGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2QueryResult

Represents the result of conversational query or event processing. Corresponds to the JSON property queryResult



2309
2310
2311
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2309

def query_result
  @query_result
end

#response_idString

The unique identifier of the response. Contains the same value as [Streaming]DetectIntentResponse.response_id. Corresponds to the JSON property responseId

Returns:

  • (String)


2315
2316
2317
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2315

def response_id
  @response_id
end

#sessionString

The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format: projects/<Project ID>/agent/sessions/<Session ID>, or projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session ID>. Corresponds to the JSON property session

Returns:

  • (String)


2324
2325
2326
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2324

def session
  @session
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2331
2332
2333
2334
2335
2336
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 2331

def update!(**args)
  @original_detect_intent_request = args[:original_detect_intent_request] if args.key?(:original_detect_intent_request)
  @query_result = args[:query_result] if args.key?(:query_result)
  @response_id = args[:response_id] if args.key?(:response_id)
  @session = args[:session] if args.key?(:session)
end