Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookRequest

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

Overview

The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. You may see undocumented fields in an actual request. These fields are used internally by Dialogflow and should be ignored.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3WebhookRequest

Returns a new instance of GoogleCloudDialogflowCxV3WebhookRequest.



2810
2811
2812
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2810

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

Instance Attribute Details

#detect_intent_response_idString

Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller. Corresponds to the JSON property detectIntentResponseId

Returns:

  • (String)


2743
2744
2745
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2743

def detect_intent_response_id
  @detect_intent_response_id
end

#fulfillment_infoGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo

Represents fulfillment information communicated to the webhook. Corresponds to the JSON property fulfillmentInfo



2748
2749
2750
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2748

def fulfillment_info
  @fulfillment_info
end

#intent_infoGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookRequestIntentInfo

Represents intent information communicated to the webhook. Corresponds to the JSON property intentInfo



2753
2754
2755
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2753

def intent_info
  @intent_info
end

#language_codeString

The language code specified in the original request. Corresponds to the JSON property languageCode

Returns:

  • (String)


2758
2759
2760
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2758

def language_code
  @language_code
end

#messagesArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowCxV3ResponseMessage>

The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response; Corresponds to the JSON property messages



2764
2765
2766
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2764

def messages
  @messages
end

#page_infoGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3PageInfo

Represents page information communicated to and from the webhook. Corresponds to the JSON property pageInfo



2769
2770
2771
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2769

def page_info
  @page_info
end

#payloadHash<String,Object>

Custom data set in QueryParameters.payload. Corresponds to the JSON property payload

Returns:

  • (Hash<String,Object>)


2774
2775
2776
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2774

def payload
  @payload
end

#sentiment_analysis_resultGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult

Represents the result of sentiment analysis. Corresponds to the JSON property sentimentAnalysisResult



2779
2780
2781
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2779

def sentiment_analysis_result
  @sentiment_analysis_result
end

#session_infoGoogle::Apis::DialogflowV2::GoogleCloudDialogflowCxV3SessionInfo

Represents session information communicated to and from the webhook. Corresponds to the JSON property sessionInfo



2784
2785
2786
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2784

def session_info
  @session_info
end

#textString

If natural language text was provided as input, this field will contain a copy of the text. Corresponds to the JSON property text

Returns:

  • (String)


2790
2791
2792
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2790

def text
  @text
end

#transcriptString

If natural language speech audio was provided as input, this field will contain the transcript for the audio. Corresponds to the JSON property transcript

Returns:

  • (String)


2796
2797
2798
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2796

def transcript
  @transcript
end

#trigger_eventString

If an event was provided as input, this field will contain the name of the event. Corresponds to the JSON property triggerEvent

Returns:

  • (String)


2802
2803
2804
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2802

def trigger_event
  @trigger_event
end

#trigger_intentString

If an intent was provided as input, this field will contain a copy of the intent identifier. Format: projects//locations//agents//intents/. Corresponds to the JSON property triggerIntent

Returns:

  • (String)


2808
2809
2810
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2808

def trigger_intent
  @trigger_intent
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 2815

def update!(**args)
  @detect_intent_response_id = args[:detect_intent_response_id] if args.key?(:detect_intent_response_id)
  @fulfillment_info = args[:fulfillment_info] if args.key?(:fulfillment_info)
  @intent_info = args[:intent_info] if args.key?(:intent_info)
  @language_code = args[:language_code] if args.key?(:language_code)
  @messages = args[:messages] if args.key?(:messages)
  @page_info = args[:page_info] if args.key?(:page_info)
  @payload = args[:payload] if args.key?(:payload)
  @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result)
  @session_info = args[:session_info] if args.key?(:session_info)
  @text = args[:text] if args.key?(:text)
  @transcript = args[:transcript] if args.key?(:transcript)
  @trigger_event = args[:trigger_event] if args.key?(:trigger_event)
  @trigger_intent = args[:trigger_intent] if args.key?(:trigger_intent)
end