Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2QueryParameters

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

Represents the parameters of the conversational query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2QueryParameters

Returns a new instance of GoogleCloudDialogflowV2QueryParameters.



11567
11568
11569
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11567

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

Instance Attribute Details

#contextsArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2Context>

The collection of contexts to be activated before this query is executed. Corresponds to the JSON property contexts



11511
11512
11513
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11511

def contexts
  @contexts
end

#geo_locationGoogle::Apis::DialogflowV2::GoogleTypeLatLng

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges. Corresponds to the JSON property geoLocation



11519
11520
11521
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11519

def geo_location
  @geo_location
end

#payloadHash<String,Object>

This field can be used to pass custom data to your webhook. Arbitrary JSON objects are supported. If supplied, the value is used to populate the WebhookRequest.original_detect_intent_request.payload field sent to your webhook. Corresponds to the JSON property payload

Returns:

  • (Hash<String,Object>)


11527
11528
11529
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11527

def payload
  @payload
end

#reset_contextsBoolean Also known as: reset_contexts?

Specifies whether to delete all contexts in the current session before the new ones are activated. Corresponds to the JSON property resetContexts

Returns:

  • (Boolean)


11533
11534
11535
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11533

def reset_contexts
  @reset_contexts
end

#sentiment_analysis_request_configGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2SentimentAnalysisRequestConfig

Configures the types of sentiment analysis to perform. Corresponds to the JSON property sentimentAnalysisRequestConfig



11539
11540
11541
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11539

def sentiment_analysis_request_config
  @sentiment_analysis_request_config
end

#session_entity_typesArray<Google::Apis::DialogflowV2::GoogleCloudDialogflowV2SessionEntityType>

Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session of this query. Corresponds to the JSON property sessionEntityTypes



11546
11547
11548
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11546

def session_entity_types
  @session_entity_types
end

#time_zoneString

The time zone of this conversational query from the time zone database, e.g., America/New_York, Europe/Paris. If not provided, the time zone specified in agent settings is used. Corresponds to the JSON property timeZone

Returns:

  • (String)


11553
11554
11555
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11553

def time_zone
  @time_zone
end

#webhook_headersHash<String,String>

This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through the Dialogflow web console. The headers defined within this field will overwrite the headers configured through the Dialogflow console if there is a conflict. Header names are case-insensitive. Google's specified headers are not allowed. Including: "Host", "Content-Length", "Connection", "From", "User- Agent", "Accept-Encoding", "If-Modified-Since", "If-None-Match", "X-Forwarded- For", etc. Corresponds to the JSON property webhookHeaders

Returns:

  • (Hash<String,String>)


11565
11566
11567
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11565

def webhook_headers
  @webhook_headers
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
# File 'lib/google/apis/dialogflow_v2/classes.rb', line 11572

def update!(**args)
  @contexts = args[:contexts] if args.key?(:contexts)
  @geo_location = args[:geo_location] if args.key?(:geo_location)
  @payload = args[:payload] if args.key?(:payload)
  @reset_contexts = args[:reset_contexts] if args.key?(:reset_contexts)
  @sentiment_analysis_request_config = args[:sentiment_analysis_request_config] if args.key?(:sentiment_analysis_request_config)
  @session_entity_types = args[:session_entity_types] if args.key?(:session_entity_types)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @webhook_headers = args[:webhook_headers] if args.key?(:webhook_headers)
end